/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://dochoitot.com
 Description:  Child theme for GeneratePress - DoChoiTot.com (affiliate toy listing)
 Author:       DoChoiTot
 Template:     generatepress
 Version:      3.3.0
*/

.dct-product-video-wrap{margin:1.25rem 0}.dct-product-video{display:block;width:100%;max-height:32rem;border-radius:var(--dct-radius-sm);background:#000;object-fit:contain}
.dct-video-selectors{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem}.dct-video-selector{border:1px solid var(--dct-border);border-radius:var(--dct-radius-sm);background:#fff;padding:.45rem .75rem;cursor:pointer}.dct-video-selector[aria-pressed="true"]{border-color:var(--dct-blue);color:var(--dct-blue);font-weight:700}.dct-video-selector:focus-visible{outline:3px solid var(--dct-yellow);outline-offset:2px}

/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
    --dct-ink: #183153;
    --dct-ink-soft: #425b78;
    --dct-blue: #2563eb;
    --dct-blue-dark: #1d4ed8;
    --dct-yellow: #fbbf24;
    --dct-coral: #fb7185;
    --dct-mint: #34d399;
    --dct-sky: #eaf4ff;
    --dct-cream: #fff9ed;
    --dct-white: #ffffff;
    --dct-border: #dce6f2;
    --dct-shopee: #ee4d2d;
    --dct-lazada: #0f146d;
    --dct-radius-sm: 10px;
    --dct-radius-md: 18px;
    --dct-radius-lg: 28px;
    --dct-shadow-card: 0 12px 30px rgba(24, 49, 83, 0.10);
    --dct-shadow-header: 0 2px 12px rgba(24, 49, 83, 0.08);
    --dct-content-width: 1200px;
    --dct-space-xs: 8px;
    --dct-space-sm: 12px;
    --dct-space-md: 20px;
    --dct-space-lg: 32px;
    --dct-space-xl: 56px;
    --dct-space-2xl: 80px;
    --dct-font-heading: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --dct-font-body: 'Nunito', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* =========================================================
   GLOBAL TYPOGRAPHY
   ========================================================= */
body {
    font-family: var(--dct-font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dct-ink);
}
h1, h2, h3, h4, h5, h6,
.site-title, .main-title {
    font-family: var(--dct-font-heading);
}
h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 600; line-height: 1.25; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }

/* =========================================================
   FRONT PAGE RESET — remove article shell
   ========================================================= */
.home.separate-containers .inside-article {
    padding: 0;
    background: none;
    box-shadow: none;
}
.home .entry-header {
    display: none;
}
.home .site-main,
.home .entry-content {
    margin: 0;
}
.home .entry-content > * {
    margin-bottom: 0;
}

/* =========================================================
   HEADER — Tầng 1: Logo + Search + Contact
   ========================================================= */
.inside-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 16px;
    padding-bottom: 16px;
}

.site-branding { flex-shrink: 0; }
.site-branding .main-title,
.site-title a {
    font-family: var(--dct-font-heading);
    font-weight: 700;
    font-size: clamp(22px, 3vw, 30px);
    color: var(--dct-ink);
    text-decoration: none;
}

.site-description {
    color: var(--dct-ink-soft);
    font-size: 13px;
    margin-top: 2px;
}

.dct-header-search { width: min(420px, 45vw); }
.dct-header-search form { display: flex; margin: 0; }
.dct-header-search input[type="search"] {
    flex: 1; min-width: 0;
    border-radius: var(--dct-radius-sm);
    border: 2px solid var(--dct-border);
    padding: 10px 16px; font-size: 15px;
    font-family: var(--dct-font-body);
    transition: border-color 0.2s;
}
.dct-header-search input[type="search"]:focus {
    border-color: var(--dct-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.dct-header-search button,
.dct-header-search input[type="submit"] {
    background: var(--dct-blue);
    color: var(--dct-white);
    border: none;
    border-radius: 0 var(--dct-radius-sm) var(--dct-radius-sm) 0;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.dct-header-search button:hover,
.dct-header-search input[type="submit"]:hover {
    background: var(--dct-blue-dark);
}

.dct-header-contact {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600;
    color: var(--dct-ink); white-space: nowrap; flex-shrink: 0;
}
.dct-header-contact svg {
    width: 18px; height: 18px; color: var(--dct-coral);
}

/* =========================================================
   HEADER — Sticky
   ========================================================= */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--dct-white);
    transition: box-shadow 0.3s;
}
.site-header.has-shadow {
    box-shadow: var(--dct-shadow-header);
}

/* =========================================================
   TRUST BAR
   ========================================================= */
.dct-trust-bar {
    background: var(--dct-sky);
    padding: 12px 20px; font-size: 14px;
    color: var(--dct-ink);
}
.dct-trust-bar__inner {
    max-width: var(--dct-content-width); margin: 0 auto;
    display: flex; justify-content: center;
    align-items: center; gap: 24px; flex-wrap: wrap;
}
.dct-trust-bar__item {
    display: flex; align-items: center; gap: 6px;
}
.dct-trust-bar__item svg {
    width: 16px; height: 16px;
    color: var(--dct-mint); flex-shrink: 0;
}

/* =========================================================
   NAVIGATION — Tầng 2: Nav bar
   ========================================================= */
.main-navigation {
    background: var(--dct-ink);
}
.main-navigation .inside-navigation { position: relative; }
.main-navigation .main-nav > ul { display: flex; flex-wrap: nowrap; }
.main-navigation .main-nav > ul > li > a {
    white-space: nowrap;
    padding: 14px 18px;
    font-weight: 500; font-size: 15px;
    color: var(--dct-white);
    transition: color 0.15s, background-color 0.15s;
}
.main-navigation .main-nav > ul > li > a:hover,
.main-navigation .main-nav > ul > li.current-menu-item > a,
.main-navigation .main-nav > ul > li.current_page_item > a {
    color: var(--dct-yellow);
    background: rgba(255, 255, 255, 0.08);
}

/* Sub-menu base */
.main-navigation .main-nav ul ul {
    background: var(--dct-white);
    border-radius: 0 0 var(--dct-radius-sm) var(--dct-radius-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.main-navigation .main-nav ul ul li a {
    color: var(--dct-ink);
    padding: 10px 18px; font-size: 14px;
}
.main-navigation .main-nav ul ul li a:hover {
    color: var(--dct-blue);
    background: var(--dct-sky);
}

/* =========================================================
   MEGA MENU (desktop only)
   ========================================================= */
@media (min-width: 769px) {
    .main-navigation:not(.toggled) .dct-mega-trigger { position: static; }
    .main-navigation:not(.toggled) .dct-mega-trigger > .sub-menu {
        left: 0; right: 0; top: 100%; width: 100%;
        height: 0; overflow: hidden; opacity: 0; pointer-events: none;
        display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px 20px; padding: 0 20px;
        background: var(--dct-white);
        border-top: 3px solid var(--dct-shopee);
        box-shadow: 0 8px 24px rgba(0,0,0,.14);
        transition: opacity 0.2s, height 0.2s;
    }
    .main-navigation:not(.toggled) .dct-mega-trigger:hover > .sub-menu,
    .main-navigation:not(.toggled) .dct-mega-trigger.sfHover > .sub-menu,
    .main-navigation:not(.toggled) .dct-mega-trigger:focus-within > .sub-menu {
        left: 0; opacity: 1; height: auto; overflow: visible;
        pointer-events: auto; padding: 18px 20px;
    }
    .main-navigation .dct-mega-trigger > .sub-menu > li { width: auto; }
    .main-navigation .dct-mega-trigger > .sub-menu > li > a {
        padding: 9px 12px; border-radius: var(--dct-radius-sm);
        transition: background 0.15s, color 0.15s;
    }
    .main-navigation .dct-mega-trigger > .sub-menu > li > a:hover {
        background: var(--dct-sky); color: var(--dct-blue);
    }
}

@media (max-width: 1024px) {
    .main-navigation .main-nav > ul > li > a {
        padding-left: 11px; padding-right: 11px; font-size: 14px;
    }
}

@media (max-width: 768px) {
    .inside-header { align-items: flex-start; flex-direction: column; gap: 14px; }
    .dct-header-search { width: 100%; }
    .main-navigation .main-nav > ul { display: block; }
    .main-navigation .main-nav > ul > li > a { white-space: normal; }
}

/* =========================================================
   AFFILIATE CTA BUTTONS
   ========================================================= */
.dct-affiliate-buttons {
    display: flex; gap: 12px; margin: 20px 0; flex-wrap: wrap;
}
.dct-affiliate-buttons a {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 14px 28px;
    border-radius: var(--dct-radius-sm);
    font-size: 16px; font-weight: 600; text-decoration: none;
    color: var(--dct-white);
    transition: opacity 0.2s, transform 0.15s;
    flex: 1; min-width: 180px; text-align: center;
}
.dct-affiliate-buttons a:hover {
    opacity: 0.9; transform: translateY(-1px);
    color: var(--dct-white); text-decoration: none;
}
.dct-btn-shopee { background: var(--dct-shopee); }
.dct-btn-lazada { background: var(--dct-lazada); }
.dct-price-ref {
    font-size: 22px; font-weight: 700;
    color: var(--dct-coral); margin-bottom: 6px;
}
.dct-price-ref span {
    font-size: 14px; font-weight: 400; color: var(--dct-ink-soft);
}
.dct-social-proof { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--dct-ink-soft); font-size: 14px; }
.dct-social-proof > span + span::before { content: "·"; margin-right: 12px; color: var(--dct-border); }
.dct-social-proof .dct-rating { color: #d98b00; font-weight: 700; }
.dct-mobile-back { display: none; }

/* Hide default add-to-cart */
.single-product .woocommerce .single_add_to_cart_button,
.single-product .woocommerce .quantity,
.single-product .woocommerce div.product form.cart {
    display: none !important;
}
.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button {
    display: none !important;
}

@media (max-width: 768px) {
    body.single-product { padding-bottom: 76px; }
    body.single-product .site-header,
    body.single-product #site-navigation,
    body.single-product #mobile-header,
    body.single-product .dct-trust-bar { display: none !important; }
    body.single-product .site-content,
    body.single-product .content-area,
    body.single-product .site-main,
    body.single-product .inside-article { margin: 0; padding: 0; max-width: none; }
    body.single-product .woocommerce-breadcrumb { display: none; }
    body.single-product.dct-has-product-video .woocommerce-product-gallery { display: none !important; }
    body.single-product.dct-has-product-video div.product { display: flex; flex-direction: column; }
    body.single-product.dct-has-product-video div.product .summary { display: flex; flex-direction: column; float: none; width: 100%; margin: 0; }
    body.single-product.dct-has-product-video .dct-product-video-wrap { order: -1; width: 100vw; margin: 0 calc(50% - 50vw) 16px; background: #000; }
    body.single-product.dct-has-product-video .dct-product-video { width: 100%; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; object-fit: contain; }
    body.single-product.dct-has-product-video .dct-video-selectors { position: absolute; z-index: 3; right: 12px; top: calc(100dvh - 48px); margin: 0; }
    body.single-product.dct-has-product-video .dct-video-selector { padding: 6px 10px; background: rgba(255,255,255,.9); font-size: 12px; }
    body.single-product .summary > :not(.dct-product-video-wrap) { margin-left: 16px; margin-right: 16px; }
    .dct-mobile-back { display: grid; place-items: center; position: fixed; z-index: 100; top: max(12px, env(safe-area-inset-top)); left: 12px; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; background: rgba(0,0,0,.48); color: #fff; backdrop-filter: blur(4px); }
    .dct-mobile-back svg { width: 24px; height: 24px; }
    .dct-mobile-back:focus-visible { outline: 3px solid var(--dct-yellow); outline-offset: 2px; }
    body.single-product .dct-affiliate-buttons { position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 0; margin: 0; padding-bottom: env(safe-area-inset-bottom); background: #fff; box-shadow: 0 -3px 16px rgba(24,49,83,.16); }
    body.single-product .dct-affiliate-buttons a { min-width: 0; min-height: 60px; padding: 10px 8px; border-radius: 0; font-size: 14px; }
}

/* =========================================================
   HOMEPAGE SECTIONS
   ========================================================= */
.dct-section { padding: var(--dct-space-xl) 0; }
.dct-section--hero {
    background: linear-gradient(135deg, var(--dct-sky) 0%, var(--dct-cream) 100%);
    padding: var(--dct-space-2xl) 0; text-align: center;
}
.dct-section--hero h1 {
    font-size: clamp(28px, 5vw, 48px);
    color: var(--dct-ink); line-height: 1.2;
    margin-bottom: var(--dct-space-md);
}
.dct-section--hero p {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--dct-ink-soft);
    max-width: 600px; margin: 0 auto var(--dct-space-lg);
}
.dct-section--trust {
    background: var(--dct-ink); color: var(--dct-white);
    padding: var(--dct-space-lg) 0;
}
.dct-trust-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--dct-space-md); max-width: var(--dct-content-width);
    margin: 0 auto; padding: 0 var(--dct-space-md); text-align: center;
}
.dct-trust-item { padding: var(--dct-space-sm); }
.dct-trust-item strong { display: block; font-size: 18px; margin-bottom: 4px; }
.dct-trust-item span { font-size: 14px; opacity: 0.8; }

/* =========================================================
   AGE / SKILL / CATEGORY CARDS
   ========================================================= */
.dct-card-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: var(--dct-space-md); max-width: var(--dct-content-width);
    margin: 0 auto; padding: 0 var(--dct-space-md);
}
.dct-card {
    display: block; padding: 20px 16px;
    border-radius: var(--dct-radius-md); text-align: center;
    text-decoration: none; color: var(--dct-ink);
    background: var(--dct-white); box-shadow: var(--dct-shadow-card);
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 600; font-size: 15px; line-height: 1.3;
    min-height: 96px;
    display: flex; align-items: center; justify-content: center;
}
.dct-card > a {
    display: flex; width: 100%; min-height: 56px;
    align-items: center; justify-content: center;
    color: var(--dct-ink); text-decoration: none;
}
.dct-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(24, 49, 83, 0.15);
    text-decoration: none; color: var(--dct-ink);
}
.dct-card--age { border-top: 4px solid var(--dct-coral); }
.dct-card--skill { border-top: 4px solid var(--dct-mint); }
.dct-card--cat { border-top: 4px solid var(--dct-blue); }

@media (max-width: 1024px) {
    .dct-card-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .dct-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
    .dct-card-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   PRODUCT CARDS (WooCommerce override)
   ========================================================= */
.woocommerce ul.products li.product {
    border-radius: var(--dct-radius-md); overflow: hidden;
    box-shadow: var(--dct-shadow-card);
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 0; margin-bottom: var(--dct-space-md);
}
.woocommerce ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(24, 49, 83, 0.15);
}
.woocommerce ul.products li.product img { border-radius: 0; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px; font-weight: 600; color: var(--dct-ink);
    padding: 0 var(--dct-space-sm);
}
.woocommerce ul.products li.product .price {
    color: var(--dct-coral); font-weight: 700;
    padding: 0 var(--dct-space-sm) var(--dct-space-sm);
}

/* =========================================================
   FOOTER — 5 columns + Trust strip + Disclaimer
   ========================================================= */
.site-footer {
    background: var(--dct-ink);
    color: rgba(255, 255, 255, 0.8);
}
.footer-widgets { display: none; }
.site-info { display: none; }

.dct-footer-trust {
    background: #102a49;
    padding: var(--dct-space-md) var(--dct-space-md);
}
.dct-footer-trust__inner {
    max-width: var(--dct-content-width); margin: 0 auto;
    display: flex; justify-content: center;
    align-items: center; gap: var(--dct-space-lg);
    flex-wrap: wrap;
}
.dct-footer-trust__badge {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; color: rgba(255, 255, 255, 0.9);
}
.dct-footer-trust__badge svg {
    width: 20px; height: 20px; color: var(--dct-mint);
}

.dct-footer-main {
    background: var(--dct-ink);
    color: rgba(255, 255, 255, 0.8);
}
.dct-footer-main__inner {
    max-width: var(--dct-content-width);
    margin: 0 auto;
    padding: var(--dct-space-xl) var(--dct-space-md) var(--dct-space-lg);
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: var(--dct-space-lg);
}
.dct-footer-col h4 {
    color: var(--dct-white);
    font-size: 15px; font-weight: 600;
    margin-bottom: var(--dct-space-sm);
    font-family: var(--dct-font-heading);
}
.dct-footer-col p {
    font-size: 14px; line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}
.dct-footer-col ul {
    list-style: none; padding: 0; margin: 0;
}
.dct-footer-col ul li { margin-bottom: 6px; }
.dct-footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px; text-decoration: none;
    transition: color 0.15s;
}
.dct-footer-col ul li a:hover {
    color: var(--dct-yellow);
}
.dct-footer-social {
    display: flex; gap: 12px; margin-top: var(--dct-space-sm);
}
.dct-footer-social a {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--dct-white); transition: background 0.15s;
}
.dct-footer-social a:hover { background: var(--dct-blue); }
.dct-footer-social svg { width: 18px; height: 18px; }

/* Disclaimer */
.dct-footer-disclaimer {
    background: #0d1f3c;
    color: rgba(255, 255, 255, 0.7);
    padding: 20px; font-size: 14px;
    line-height: 1.6; text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.dct-footer-disclaimer strong { color: var(--dct-white); }
.dct-footer-disclaimer > div {
    max-width: 900px; margin: 0 auto;
}

/* Footer responsive */
@media (max-width: 1024px) {
    .dct-footer-main__inner {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 768px) {
    .dct-footer-main__inner {
        grid-template-columns: 1fr;
        gap: var(--dct-space-md);
        padding: var(--dct-space-lg) var(--dct-space-md);
    }
}

/* =========================================================
   SECTION HEADINGS
   ========================================================= */
.dct-section-title {
    text-align: center; margin-bottom: var(--dct-space-lg);
}
.dct-section-title h2 {
    font-size: clamp(22px, 3vw, 32px);
    color: var(--dct-ink); margin-bottom: 8px;
}
.dct-section-title p {
    color: var(--dct-ink-soft); font-size: 16px;
    max-width: 500px; margin: 0 auto;
}

/* =========================================================
   UTILITY
   ========================================================= */
.dct-container {
    max-width: var(--dct-content-width);
    margin: 0 auto; padding: 0 var(--dct-space-md);
}
.dct-cta-group {
    display: flex; gap: 16px; justify-content: center;
    flex-wrap: wrap; margin-top: var(--dct-space-lg);
}
.dct-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px; border-radius: var(--dct-radius-sm);
    font-size: 16px; font-weight: 600; text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
}
.dct-btn:hover {
    opacity: 0.9; transform: translateY(-1px); text-decoration: none;
}
.dct-btn--primary,
.dct-btn--primary .wp-block-button__link {
    background: var(--dct-blue); color: var(--dct-white);
    border: none; border-radius: var(--dct-radius-sm);
}
.dct-btn--primary:hover,
.dct-btn--primary:hover .wp-block-button__link,
.dct-btn--primary .wp-block-button__link:hover {
    color: var(--dct-white); background: var(--dct-blue-dark);
}
.dct-btn--secondary,
.dct-btn--secondary .wp-block-button__link {
    background: var(--dct-white); color: var(--dct-blue);
    border: 2px solid var(--dct-blue);
}
.dct-btn--secondary:hover,
.dct-btn--secondary:hover .wp-block-button__link,
.dct-btn--secondary .wp-block-button__link:hover {
    color: var(--dct-blue); background: var(--dct-sky);
}

/* =========================================================
   CTA SVG ICONS
   ========================================================= */
.dct-affiliate-buttons svg,
.dct-btn svg {
    width: 18px; height: 18px;
    flex-shrink: 0;
}

/* =========================================================
   ACCESSIBILITY — prefers-reduced-motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Screen reader only */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}