/* Da Phuc refresh: wide shell, calm surfaces, one card system.
   The customizer CSS and "Additional CSS" print after this file, so several
   selectors carry an extra id or element to win on specificity. */
:root {
    /* ===== Global design tokens: the one source for brand and base values. =====
       Every daphuc-*.css file uses these; names describe the role, not the color.
       These are the defaults. The Customizer section "Thiết kế: màu sắc & bố cục"
       (core/daphuc-design-settings.php) prints changed values on html:root; Additional
       CSS can override any token the same way, e.g. html:root { --dp-primary: #0f766e; }.
       Keep each *-rgb triplet in step with its color. */

    /* Brand */
    --dp-primary: #245888;                  /* Màu chính: buttons, links, active states */
    --dp-primary-rgb: 36, 88, 136;
    --dp-primary-hover: #1a4570;
    --dp-primary-ink: #245888;              /* readable brand text on a light surface */
    --dp-action: #245888;                   /* fill with readable white text/icons */
    --dp-action-hover: #1a4570;
    --dp-on-action: #ffffff;
    --dp-primary-subtle: #eaf1f8;           /* tinted backgrounds (hover rows, chips) */
    --dp-on-primary: #fff;                  /* text/icons on --dp-primary */
    --dp-accent: #e8592b;                   /* Màu nhấn: underline, title bars, focus ring */
    --dp-accent-subtle: #ffd3c2;
    --dp-brand-surface: #102d4a;            /* Nền vùng thương hiệu: top bar, footer, heading band, menu button */
    --dp-brand-surface-rgb: 16, 45, 74;     /* also used for shadows and overlays */
    --dp-brand-surface-deep: #0b2238;
    --dp-brand-surface-deep-rgb: 11, 34, 56;
    --dp-on-brand: #fff;                    /* text/icons on --dp-brand-surface */
    --dp-on-brand-rgb: 255, 255, 255;
    --dp-heading-band-end: #1b4670;         /* news heading band gradient end */

    /* Surfaces */
    --dp-page-bg: #f3f5f8;                  /* Nền trang */
    --dp-surface: #fff;                     /* Nền thẻ và khung: cards, nav bar, panels */
    --dp-surface-rgb: 255, 255, 255;
    --dp-fill: #eef2f6;                     /* image placeholders, subtle fills */
    --dp-fill-light: #f7f9fb;               /* inputs, drawer chips */

    /* Text */
    --dp-text: #1b2a3a;                     /* Màu chữ */
    --dp-text-soft: #2c3b4a;
    --dp-text-body: #26384a;                /* single post body */
    --dp-text-excerpt: #3b4d60;             /* news listing excerpts */
    --dp-text-muted: #5d6d7e;               /* Màu chữ phụ */
    --dp-text-subtle: #a8b4c1;              /* chevrons, faint icons */

    /* Borders */
    --dp-border: #e1e7ee;                   /* Màu viền */
    --dp-border-strong: #cfd9e3;            /* search fields */
    --dp-card-border-hover: #c5d4e3;
    --dp-button-border: #c9d7e5;            /* outline "Xem thêm" buttons */
    --dp-menu-separator: #edf1f5;           /* category drop-down rows */
    --dp-scrollbar: #b8c6d4;

    /* Article bodies: their inline ".dp-article" CSS is mapped to these in daphuc-news.css */
    --dp-article-text: #26384a;
    --dp-article-heading: #173e62;
    --dp-article-lead: #334d63;
    --dp-article-lead-border: #b4c5d1;
    --dp-article-accent: #285b85;
    --dp-article-summary-bg: #edf4f8;
    --dp-article-editorial-summary-bg: #f4f6f8;
    --dp-article-contact-bg: #f4f7fa;
    --dp-article-checklist-bg: #f6f8fa;
    --dp-article-table-bg: #f2f6f8;
    --dp-article-border: #dce5ec;
    --dp-article-message-border: #95afc2;
    --dp-article-note: #607183;

    /* Shape and depth */
    --dp-radius: 10px;                      /* Bo góc thẻ */
    --dp-radius-sm: 6px;                    /* buttons, inputs (60 % of --dp-radius) */
    --dp-shadow: 0 1px 2px rgba(var(--dp-brand-surface-rgb), .05), 0 2px 8px rgba(var(--dp-brand-surface-rgb), .04);
    --dp-shadow-hover: 0 10px 28px rgba(var(--dp-brand-surface-rgb), .12);

    /* Layout */
    --dp-container-max: 1600px;             /* Chiều rộng tối đa */
    --dp-gutter: clamp(16px, 2.5vw, 40px);
    --dp-reading-width: 760px;              /* Cột đọc bài viết */
    --dp-sidebar-width: 300px;              /* news pages */
    --dp-nav-h: 60px;                       /* desktop navigation bar (same in flow and stuck) */
    --dp-nav-item-h: 44px;                  /* menu toggle and links */
    --dp-mobile-h: 64px;                    /* sticky mobile header */
    --dp-sticky-top: 0px;                   /* offset for the logged-in toolbar, below */
}
/* Logged-in toolbar (#wpadminbar): fixed 32 px above 782 px, fixed 46 px from 601 to
   782 px, position: absolute (scrolls away) at 600 px and below. */
body.admin-bar { --dp-sticky-top: 32px; }
@media (max-width: 782px) { body.admin-bar { --dp-sticky-top: 46px; } }
@media (max-width: 600px) { body.admin-bar { --dp-sticky-top: 0px; } }

/* ---------- Base ---------- */
body {
    color: var(--dp-text);
    background: var(--dp-page-bg);
    -webkit-font-smoothing: antialiased;
}
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
/* The theme prints "a:focus { outline: none !important }" inline; win it back for keyboards only. */
html body a:focus-visible, html body button:focus-visible, html body input:focus-visible,
html body select:focus-visible, html body textarea:focus-visible, html body [tabindex]:focus-visible {
    outline: 3px solid var(--dp-accent) !important;
    outline-offset: 2px;
}

/* ---------- Wide shell: one width for header, nav, content and footer ---------- */
#page .container {
    width: 100%;
    max-width: var(--dp-container-max);
    padding-left: var(--dp-gutter);
    padding-right: var(--dp-gutter);
    box-sizing: border-box;
}

/* ---------- Top bar ---------- */
#page #top-bar {
    background: var(--dp-brand-surface);
    font-size: 13px;
}
#page #top-bar,
#page #top-bar a,
#page #top-bar i { color: var(--dp-on-brand); }
#page #top-bar .top-left-inner span { border: 0; }
#page #top-bar .top-left-inner span i { color: var(--dp-on-brand); opacity: .7; margin-right: 4px; }
#page #top-bar .free-text { font-weight: 600; color: var(--dp-on-brand); }

/* ---------- Mid header: logo, search, hotline ---------- */
#page div.mid-header {
    background: var(--dp-surface);
    padding: 18px 0;
    border-bottom: 1px solid var(--dp-border);
}
#page .mid-header .container {
    display: flex;
    align-items: center;
    gap: 32px;
}
#page .mid-header .container::before,
#page .mid-header .container::after { content: none; }
#page .mid-header .site-branding { float: none; flex: 0 0 auto; margin: 0; }
#page .mid-header .custom-logo-link { float: none; display: block; }
#page .mid-header .custom-logo { display: block; width: auto; max-height: 84px; }
#page .mid-header .ae-search-holder {
    float: none;
    flex: 1 1 auto;
    width: auto;
    max-width: 760px;
    margin: 0 auto;
}
#page .mid-header .product-search-wrapper,
#page .mid-header .product-search-wrapper form { float: none; width: 100%; }
#page .mid-header .product-search-wrapper form {
    flex-wrap: nowrap;
    align-items: stretch;
    height: 48px;
    border: 1px solid var(--dp-border-strong);
    border-radius: var(--dp-radius);
    background: var(--dp-surface);
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}
#page .mid-header .product-search-wrapper form:focus-within {
    border-color: var(--dp-primary);
    box-shadow: 0 0 0 3px rgba(var(--dp-primary-rgb), .15);
}
#page .mid-header .product-search-wrapper select.product-cat {
    float: none;
    flex: 0 0 auto;
    width: 190px;
    height: 100%;
    margin: 0;
    padding: 0 30px 0 16px;
    border: 0;
    border-right: 1px solid var(--dp-border);
    border-radius: 0;
    background-color: var(--dp-fill-light);
    color: var(--dp-text);
    font-size: 14px;
}
#page .mid-header .product-search-wrapper input.search-field {
    float: none;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 15px;
    color: var(--dp-text);
}
/* The whole search box shows the focus ring (see :focus-within above). */
html body #page .mid-header .product-search-wrapper input.search-field:focus-visible { outline: none !important; }
#page .mid-header .product-search-wrapper button.search-submit {
    position: static;
    flex: 0 0 56px;
    width: 56px;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: var(--dp-action);
    color: var(--dp-on-action);
    transition: background-color .15s ease;
}
#page .mid-header .product-search-wrapper button.search-submit:hover { background: var(--dp-action-hover); }
#page .mid-header .product-search-wrapper button.search-submit i { color: var(--dp-on-action); font-size: 17px; }
/* The theme gives the button a 53 px line-height and the search/call areas a 15 px
   top padding, which put the icon and both areas 3-8 px below the logo's centre. */
html #page .mid-header .product-search-wrapper button.search-submit { display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }
html #page .mid-header .product-search-wrapper button.search-submit i { display: block; line-height: 1; }
html #page .mid-header .ae-search-holder,
html #page .mid-header .ae-cart-wishlist { padding-top: 0; padding-bottom: 0; align-self: center; }
html #page .mid-header .search-box,
html #page .mid-header .product-search-wrapper { position: static; margin: 0; }
#page .mid-header .ae-cart-wishlist {
    float: none;
    flex: 0 0 auto;
    width: auto;
    margin: 0;
}

.dp-hotline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 4px;
    color: var(--dp-text);
    text-decoration: none;
}
.dp-hotline__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--dp-primary-subtle);
    color: var(--dp-primary-ink);
    font-size: 20px;
    transition: background-color .15s ease, color .15s ease;
}
.dp-hotline__text { display: flex; flex-direction: column; line-height: 1.25; }
.dp-hotline__text small { color: var(--dp-text-muted); font-size: 12px; letter-spacing: .02em; }
.dp-hotline__text strong { color: var(--dp-primary-ink); font-size: 19px; font-weight: 700; white-space: nowrap; }
.dp-hotline:hover .dp-hotline__icon,
.dp-hotline:focus-visible .dp-hotline__icon { background: var(--dp-action); color: var(--dp-on-action); }

/* ---------- Main navigation bar ---------- */
#page #masthead {
    background: var(--dp-surface);
    border: 0;
    box-shadow: 0 2px 10px rgba(var(--dp-brand-surface-rgb), .06);
}
#page #masthead .special-menu-container .special-menu,
#page #masthead .special-menu-container > ul > li {
    background: var(--dp-action);
}
#page #masthead .special-menu-container a.special-menu {
    letter-spacing: .04em;
    font-weight: 700;
}
#page #masthead .main-navigation ul.menu > li > a {
    position: relative;
    color: var(--dp-text);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    transition: color .15s ease;
}
#page #masthead .main-navigation ul.menu > li > a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 14px;
    width: 0;
    height: 2px;
    background: var(--dp-accent);
    transform: translateX(-50%);
    transition: width .2s ease;
}
#page #masthead .main-navigation ul.menu > li > a:hover,
#page #masthead .main-navigation ul.menu > li.current-menu-item > a,
#page #masthead .main-navigation ul.menu > li.current_page_item > a,
#page #masthead .main-navigation ul.menu > li.current-menu-ancestor > a { color: var(--dp-primary-ink); }
#page #masthead .main-navigation ul.menu > li > a:hover::after,
#page #masthead .main-navigation ul.menu > li.current-menu-item > a::after,
#page #masthead .main-navigation ul.menu > li.current_page_item > a::after,
#page #masthead .main-navigation ul.menu > li.current-menu-ancestor > a::after { width: calc(100% - 30px); }

#page #masthead .mean-nav ul li a::after { display: none; }

/* Category drop-down under "Danh muc" */
#page .special-menu-container ul.special-sub-menu {
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-top: 0;
    box-shadow: 0 14px 30px rgba(var(--dp-brand-surface-rgb), .12);
}
#page .special-menu-container ul.special-sub-menu > li > a {
    color: var(--dp-text);
    font-size: 13px;
    font-weight: 600;
    transition: background-color .15s ease, color .15s ease, padding-left .15s ease;
}
#page .special-menu-container ul.special-sub-menu > li > a:hover {
    background: var(--dp-primary-subtle);
    color: var(--dp-primary-ink);
}
@media (min-width: 1200px) {
    #page #masthead .special-menu-container,
    #page #masthead .special-menu-container ul.special-menu-wrapper,
    #page #masthead .special-menu-container ul.special-sub-menu { width: 264px; }
    #page .ae-homepage-wrap .feature-slider-widget-area.has-special-menu section.widget { width: calc(100% - 280px); }
}

/* ---------- Page title band ---------- */
#page #breadcrumb.ae-breadcrumb-advanced {
    height: auto;
    border-radius: 0;
    background-position: center 35%;
}
#page #breadcrumb.ae-breadcrumb-advanced::after {
    background: linear-gradient(90deg, rgba(var(--dp-brand-surface-deep-rgb), .88) 0%, rgba(var(--dp-brand-surface-rgb), .72) 45%, rgba(var(--dp-brand-surface-rgb), .35) 100%);
}
#page #breadcrumb.ae-breadcrumb-advanced .breadcrumb-content {
    padding: 52px 0;
    text-align: left;
    text-shadow: none;
}
#page #breadcrumb.ae-breadcrumb-advanced .breadcrumb-content h1.page-title {
    margin: 0 0 8px;
    color: var(--dp-on-brand);
    font-size: clamp(24px, 2.4vw, 36px);
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
}
#page #breadcrumb .breadcrumb-trail { padding: 0; margin: 0; text-align: left; }
#page #breadcrumb .breadcrumb-trail ul.trail-items { padding: 0; margin: 0; }
#page #breadcrumb .breadcrumb-trail,
#page #breadcrumb .breadcrumb-trail a,
#page #breadcrumb .breadcrumb-trail li { color: var(--dp-on-brand); font-size: 14px; }
#page #breadcrumb .breadcrumb-trail a:hover { color: var(--dp-on-brand); }
#page #breadcrumb .breadcrumb-trail li.trail-end,
#page #breadcrumb .breadcrumb-trail li.trail-end span { color: var(--dp-on-brand); }

/* ---------- Content area ---------- */
#page #content.site-content { padding-top: 36px; padding-bottom: 56px; }
#page .ae-homepage-wrap ~ #content.site-content { padding: 0; }

/* Shop and category pages: fixed sidebar + fluid catalogue */
@media (min-width: 768px) {
    body.woocommerce.archive #content > .container > .ae-inner {
        display: grid;
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 28px;
        align-items: start;
    }
    body.woocommerce.archive #content > .container > .ae-inner::before,
    body.woocommerce.archive #content > .container > .ae-inner::after { content: none; }
    html body.woocommerce.archive div#primary.content-area,
    html body.woocommerce.archive aside#sidebar-primary.sidebar {
        float: none;
        width: auto;
        min-width: 0;
        margin: 0;
        padding: 0;
        grid-row: 1;
    }
    html body.woocommerce.archive aside#sidebar-primary.sidebar { grid-column: 1; }
    html body.woocommerce.archive div#primary.content-area { grid-column: 2; }
}
@media (min-width: 1200px) {
    body.woocommerce.archive #content > .container > .ae-inner { grid-template-columns: 280px minmax(0, 1fr); gap: 32px; }
}

/* ---------- Sidebar ---------- */
#page #sidebar-primary .widget {
    margin: 0 0 24px;
    padding: 0;
    overflow: hidden;
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
    box-shadow: var(--dp-shadow);
}
#page #sidebar-primary .widget-title {
    position: relative;
    margin: 0;
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--dp-border);
    color: var(--dp-brand-surface);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .04em;
    text-transform: uppercase;
}
#page #sidebar-primary .widget-title::before {
    /* Accent marker on the card edge, so the title text shares the 20 px body inset. */
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 18px;
    border-radius: 0 2px 2px 0;
    background: var(--dp-accent);
    transform: translateY(-50%);
}
#page #sidebar-primary .widget-title::after { display: none; }
/* Widget body inset. Every direct child except the title gets the same 16/20 px inset,
   so text, forms and empty states line up with the title. Link lists use full-width
   rows instead (the row link carries the 20 px inset), so they get no side padding. */
#page #sidebar-primary .widget > :where(:not(.widget-title)) { margin: 0; padding: 16px 20px; }
#page #sidebar-primary .widget > :where(:not(.widget-title)) ~ :where(:not(.widget-title)) { padding-top: 0; }
#page #sidebar-primary .widget > ul,
#page #sidebar-primary .widget > div > ul.menu,
#page #sidebar-primary .widget ul.product-categories,
#page #sidebar-primary .widget ul.product_list_widget { margin: 0; padding: 6px 0; }
#page #sidebar-primary .widget > div[class*="menu-"] { padding: 0; }
/* Forms and selects draw their own border, so they take the inset as margin, not padding. */
#page #sidebar-primary .widget > form,
#page #sidebar-primary .widget > select,
#page #sidebar-primary .widget > label + select { width: auto; margin: 16px 20px; padding: 0; }
#page #sidebar-primary .widget > select { display: block; width: calc(100% - 40px); }
#page #sidebar-primary .widget ul li {
    margin: 0;
    padding: 0;
    border: 0;
}
#page #sidebar-primary .widget ul ul { margin: 0; padding: 0; }
/* Text-only rows (for example "Không có chuyên mục") get the same inset as link rows. */
#page #sidebar-primary .widget ul:not(.product_list_widget) > li.cat-item-none {
    padding: 10px 20px;
    color: var(--dp-text-muted);
    font-size: 14px;
    line-height: 1.45;
}
#page #sidebar-primary .widget ul:not(.product_list_widget) > li:not(:has(> a)) {
    padding: 10px 20px;
    color: var(--dp-text-muted);
    font-size: 14px;
    line-height: 1.45;
}
#page #sidebar-primary .widget ul:not(.product_list_widget) > li > .post-date,
#page #sidebar-primary .widget ul:not(.product_list_widget) > li > .rss-date {
    display: block;
    padding: 0 20px 10px;
    margin-top: -6px;
    color: var(--dp-text-muted);
    font-size: 13px;
}
#page #sidebar-primary .widget ul ul li a { padding-left: 33px; }
#page #sidebar-primary .widget ul:not(.product_list_widget) li a::before { display: none; }
#page #sidebar-primary .widget ul:not(.product_list_widget) li a {
    position: relative;
    display: block;
    padding: 10px 40px 10px 17px;
    border-left: 3px solid transparent;
    color: var(--dp-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
#page #sidebar-primary .widget ul:not(.product_list_widget) li a::after {
    content: "\f105";
    position: absolute;
    right: 18px;
    top: 50%;
    font-family: FontAwesome;
    color: var(--dp-text-subtle);
    transform: translateY(-50%);
}
#page #sidebar-primary .widget ul:not(.product_list_widget) li a:hover,
#page #sidebar-primary .widget ul:not(.product_list_widget) li.current-cat > a,
#page #sidebar-primary .widget ul:not(.product_list_widget) li.current-menu-item > a {
    background: var(--dp-primary-subtle);
    border-left-color: var(--dp-primary);
    color: var(--dp-primary-ink);
}
#page #sidebar-primary .widget ul:not(.product_list_widget) li.current-cat > a::after,
#page #sidebar-primary .widget ul:not(.product_list_widget) li.current-menu-item > a::after,
#page #sidebar-primary .widget ul:not(.product_list_widget) li a:hover::after { color: var(--dp-primary-ink); }

/* ---------- WordPress search form (sidebar widget, empty results, 404) ---------- */
#page form.search-form {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 640px;
    height: 44px;
    border: 1px solid var(--dp-border-strong);
    border-radius: var(--dp-radius-sm);
    background: var(--dp-surface);
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}
#page #sidebar-primary form.search-form { max-width: none; }
#page form.search-form:focus-within {
    border-color: var(--dp-primary);
    box-shadow: 0 0 0 3px rgba(var(--dp-primary-rgb), .15);
}
#page form.search-form label { display: flex; flex: 1 1 auto; min-width: 0; margin: 0; }
html #page form.search-form .search-field {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    background: var(--dp-surface);
    box-shadow: none;
    color: var(--dp-text);
    font-size: 14px;
}
html body #page form.search-form .search-field:focus-visible { outline: none !important; }
html #page form.search-form .search-submit {
    position: static;
    flex: 0 0 auto;
    width: auto;
    height: 100%;
    margin: 0;
    padding: 0 18px;
    border: 0;
    border-radius: 0;
    background: var(--dp-action);
    color: var(--dp-on-action);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
    line-height: 1;
    transition: background-color .15s ease;
}
html #page form.search-form .search-submit:hover { background: var(--dp-action-hover); }
#page #sidebar-primary .widget ul.product_list_widget li {
    display: flow-root;
    padding: 10px 20px;
    font-size: 14px;
    line-height: 1.45;
}
#page #sidebar-primary .widget ul.product_list_widget li + li { border-top: 1px solid var(--dp-fill); }
#page #sidebar-primary .widget ul.product_list_widget li a { color: var(--dp-text); font-weight: 600; }
#page #sidebar-primary .widget ul.product_list_widget li a:hover { color: var(--dp-primary-ink); }
#page #sidebar-primary .widget ul.product_list_widget li img {
    width: 56px;
    height: 56px;
    margin: 0 0 0 12px;
    object-fit: cover;
    border-radius: var(--dp-radius-sm);
}

/* ---------- Catalogue toolbar ---------- */
body.archive #shop-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
body.archive #shop-wrap > * { flex: 0 0 100%; float: none; margin: 0; }
body.archive #shop-wrap > .woocommerce-result-count { order: 1; flex: 1 1 auto; }
body.archive #shop-wrap > .ae-list-grid-switcher { order: 2; flex: 0 0 auto; }
body.archive #shop-wrap > .woocommerce-ordering { order: 3; flex: 0 0 auto; }
body.archive #shop-wrap > ul.products { order: 4; margin-top: 8px; }
body.archive #shop-wrap > nav.woocommerce-pagination { order: 5; }
body.archive #shop-wrap > .woocommerce-products-header,
body.archive #shop-wrap > .woocommerce-notices-wrapper { order: 0; }
body.archive #shop-wrap > .woocommerce-products-header:empty,
body.archive #shop-wrap > .woocommerce-notices-wrapper:empty { display: none; }
#page .woocommerce-result-count {
    padding: 0;
    color: var(--dp-text-muted);
    font-size: 14px;
    line-height: 40px;
}
#page .ae-list-grid-switcher { display: flex; gap: 6px; }
#page .ae-list-grid-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    float: none;
    width: 40px;
    height: 40px;
    margin: 0;
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius-sm);
    background: var(--dp-surface);
    color: var(--dp-text-muted);
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
#page .ae-list-grid-switcher a i { color: inherit; }
#page .ae-list-grid-switcher a:hover { border-color: var(--dp-primary); color: var(--dp-primary-ink); }
#page .ae-list-grid-switcher a.selected { background: var(--dp-action); border-color: var(--dp-primary); color: var(--dp-on-action); }
#page .woocommerce-ordering select.orderby {
    height: 40px;
    min-width: 220px;
    padding: 0 34px 0 14px;
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius-sm);
    background-color: var(--dp-surface);
    color: var(--dp-text);
    font-size: 14px;
}

/* ---------- Product cards (catalogue, related, home carousels) ---------- */
#shop-wrap:not(.ae-list-view) ul.products,
.woocommerce .related ul.products,
.woocommerce .up-sells ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 24px;
    margin: 0 0 32px;
    padding: 0;
}
#shop-wrap ul.products::before,
#shop-wrap ul.products::after,
.woocommerce .related ul.products::before,
.woocommerce .related ul.products::after,
.woocommerce .up-sells ul.products::before,
.woocommerce .up-sells ul.products::after { content: none; }
#shop-wrap:not(.ae-list-view) ul.products > li.product,
.woocommerce .related ul.products > li.product,
.woocommerce .up-sells ul.products > li.product {
    display: flex;
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}
#page li.product .ae-woo-block-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
    box-shadow: var(--dp-shadow);
    transition: border-color .2s ease, box-shadow .2s ease;
}
#page li.product .ae-woo-block-wrap:hover {
    border-color: var(--dp-card-border-hover);
    box-shadow: var(--dp-shadow-hover);
}
#page li.product .product-thumb-wrap {
    float: none;
    width: 100%;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--dp-fill);
}
#page li.product .product-thumb-wrap::before { display: none; }
html #page li.product .product-thumb-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    object-fit: cover;
    transition: transform .4s ease;
}
#page li.product .ae-woo-block-wrap:hover .product-thumb-wrap img { transform: scale(1.04); }
#page li.product .product-info-wrap {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    float: none;
    width: 100%;
    padding: 16px 18px 18px;
    background: var(--dp-surface);
    text-align: left;
}
#page li.product .product-info-wrap > a { display: block; color: inherit; }
#page li.product .woocommerce-loop-product__title,
#page li.product .product-info-wrap h2,
#page li.product .product-info-wrap h3 {
    /* Full product names: no clamp. Equal card height comes from the grid rows,
       and the button stays at the bottom through margin-top: auto. */
    display: block;
    min-height: 0;
    margin: 0 0 14px;
    padding: 0;
    overflow: visible;
    color: var(--dp-text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
    text-transform: none;
    overflow-wrap: anywhere;
    transition: color .15s ease;
}
#page li.product .ae-woo-block-wrap:hover .woocommerce-loop-product__title,
#page li.product .ae-woo-block-wrap:hover .product-info-wrap h3,
#page li.product .ae-woo-block-wrap:hover .product-info-wrap h4 { color: var(--dp-primary-ink); }
#page li.product .add-to-cart-wrap,
#page li.product .view-details-wrap { margin-top: auto; padding: 0; text-align: left; }
html #page li.product .product-info-wrap a.button:not(.yith-wcqv-button),
html #page li.product .view-details-wrap a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid var(--dp-button-border);
    border-radius: var(--dp-radius-sm);
    background: var(--dp-surface);
    color: var(--dp-primary-ink) !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
html #page li.product .product-info-wrap a.button:not(.yith-wcqv-button)::after {
    content: "\f178";
    font-family: FontAwesome;
    font-size: 12px;
    transition: transform .15s ease;
}
html #page li.product .view-details-wrap a::before { display: none; }
html #page li.product .view-details-wrap a::after { content: "\f178"; font-family: FontAwesome; font-size: 12px; }
html #page li.product .product-info-wrap a.button:not(.yith-wcqv-button):hover,
html #page li.product .view-details-wrap a:hover,
html #page li.product .ae-woo-block-wrap:hover a.button:not(.yith-wcqv-button),
html #page li.product .ae-woo-block-wrap:hover .view-details-wrap a {
    background: var(--dp-action);
    border-color: var(--dp-primary);
    color: var(--dp-on-action) !important;
}
html #page li.product .ae-woo-block-wrap:hover a.button:not(.yith-wcqv-button)::after { transform: translateX(3px); }

/* The YITH quick view eye is removed from cards (see daphuc-nav-carousel.css). */
#page li.product .ae-woo-block-wrap { position: relative; }

/* List view (desktop toggle) */
#page #shop-wrap.ae-list-view ul.products { display: flex; flex-direction: column; gap: 18px; margin: 0 0 32px; }
#page #shop-wrap.ae-list-view ul.products > li.product { float: none; width: 100%; margin: 0; padding: 0; }
#page #shop-wrap.ae-list-view li.product .ae-woo-block-wrap { flex-direction: row; }
#page #shop-wrap.ae-list-view li.product .product-thumb-wrap { flex: 0 0 280px; width: 280px; }
#page #shop-wrap.ae-list-view li.product .product-info-wrap { flex: 1 1 auto; justify-content: center; padding: 24px 28px; }
#page #shop-wrap.ae-list-view li.product .woocommerce-loop-product__title {
    font-size: 18px;
}
/* The theme puts the excerpt after the button inside .add-to-cart-wrap; show it first. */
#page #shop-wrap.ae-list-view li.product .add-to-cart-wrap { display: flex; flex-direction: column; align-items: flex-start; margin-top: 0; }
#page #shop-wrap.ae-list-view li.product .ae-product-excerpt { order: -1; margin: 0 0 16px; color: var(--dp-text-muted); font-size: 14px; line-height: 1.65; }
#page #shop-wrap.ae-list-view li.product .ae-product-excerpt p { margin: 0; }
html #page #shop-wrap.ae-list-view li.product .product-info-wrap a.button:not(.yith-wcqv-button) { width: auto; display: inline-flex; padding: 8px 22px; }

/* ---------- Pagination ---------- */
#page .woocommerce nav.woocommerce-pagination,
#page nav.woocommerce-pagination { text-align: center; }
#page nav.woocommerce-pagination ul {
    display: flex;
    justify-content: center;
    gap: 8px;
    border: 0;
}
#page nav.woocommerce-pagination ul li { float: none; border: 0; overflow: visible; }
html #page nav.woocommerce-pagination ul li .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius-sm);
    background: var(--dp-surface);
    color: var(--dp-text);
    font-weight: 600;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
html #page nav.woocommerce-pagination ul li a.page-numbers:hover { border-color: var(--dp-primary); color: var(--dp-primary-ink); }
html #page nav.woocommerce-pagination ul li span.page-numbers.current {
    background: var(--dp-action);
    border-color: var(--dp-primary);
    color: var(--dp-on-action);
}

/* ---------- Single product ---------- */
@media (min-width: 768px) {
    html body.single-product div#primary.content-area { float: none; width: 100%; margin: 0; padding: 0; }
}
body.single-product #shop-wrap > div.product {
    display: flow-root;
    padding: 32px;
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
    box-shadow: var(--dp-shadow);
}
/* Gallery + summary in a two-column grid; tabs and related products span both. */
@media (min-width: 768px) {
    body.single-product #shop-wrap > div.product {
        display: grid;
        grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
        column-gap: 48px;
        align-items: start;
    }
    body.single-product #shop-wrap > div.product > * { grid-column: 1 / -1; }
    #page.site .woocommerce div.product div.images,
    body.single-product #shop-wrap div.product div.images { grid-column: 1; float: none; width: auto; margin-bottom: 32px; }
    #page.site .woocommerce div.product div.summary,
    body.single-product #shop-wrap div.product div.summary { grid-column: 2; float: none; width: auto; margin-top: 0; margin-bottom: 32px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
    body.single-product #shop-wrap > div.product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; }
}
/* Main image: a bounded 4:3 frame; the whole image stays visible (contain), so tall
   or square photos no longer stretch the page. Zoom and the lightbox are unchanged. */
/* The theme pads slides 2+ by 5px (":nth-child(n+2)"), which makes them smaller than slide 1. */
html body.single-product div.product div.images .woocommerce-product-gallery__image:nth-child(n) { padding: 0; }
body.single-product div.product div.images .woocommerce-product-gallery__image > a {
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--dp-fill);
    border-radius: var(--dp-radius-sm);
    overflow: hidden;
}
html body.single-product div.product div.images .woocommerce-product-gallery__image > a > img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    margin: 0;
    object-fit: contain;
}
/* Summary as an info panel beside the gallery. */
html body.single-product #shop-wrap div.product div.summary {
    padding: 24px 26px;
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
    background: var(--dp-fill-light);
}
body.single-product div.product .summary > :first-child { margin-top: 0; }
body.single-product div.product .summary p.price:empty { display: none; }
body.single-product div.product div.images .flex-viewport,
body.single-product div.product div.images img { border-radius: var(--dp-radius-sm); }
/* FlexSlider caches a pixel height before a responsive resize. Let the fixed
   image ratio size its viewport too, so switching photos cannot move the summary. */
html body.single-product div.product div.images .flex-viewport { height: auto !important; aspect-ratio: 4 / 3; }
/* Thumbnails: equal grid cells (5 per row; 4 in narrow galleries), at least 44px high to tap. */
html body.single-product div.product div.images .flex-control-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; padding: 0; }
html body.single-product div.product div.images .flex-control-thumbs li {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    aspect-ratio: 4 / 3;
    min-height: 44px;
    overflow: hidden;
    border-radius: var(--dp-radius-sm);
}
@media (max-width: 599px), (min-width: 768px) and (max-width: 1023px) {
    html body.single-product div.product div.images .flex-control-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
body.single-product div.product div.images .flex-control-thumbs li img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    opacity: .6;
    transition: opacity .15s ease;
}
body.single-product div.product div.images .flex-control-thumbs li img.flex-active,
body.single-product div.product div.images .flex-control-thumbs li img:hover { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    body.single-product div.product div.images .flex-control-thumbs li img { transition: none; }
}
body.single-product div.product .summary,
body.single-product div.product .summary .woocommerce-product-details__short-description,
html body.single-product div.product .summary .woocommerce-product-details__short-description p {
    color: var(--dp-text);
    font-size: 15px;
    line-height: 1.7;
}
body.single-product div.product .summary ul { padding-left: 20px; }
body.single-product div.product .product_meta {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--dp-border);
    color: var(--dp-text-muted);
    font-size: 14px;
}
body.single-product div.product .product_meta a { color: var(--dp-primary-ink); font-weight: 600; }
html body.single-product div.product .woocommerce-tabs {
    clear: both;
    max-width: 960px;
    margin: 0 auto;
    padding-top: 8px;
}
html body.single-product div.product .woocommerce-tabs ul.tabs {
    margin: 0 0 28px;
    padding: 0;
    border-bottom: 1px solid var(--dp-border);
    overflow: visible;
}
html body.single-product div.product .woocommerce-tabs ul.tabs::before { display: none; }
html body.single-product div.product .woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
html body.single-product div.product .woocommerce-tabs ul.tabs li::before,
html body.single-product div.product .woocommerce-tabs ul.tabs li::after { display: none; }
html body.single-product div.product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 12px 4px;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: var(--dp-text-muted);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}
html body.single-product div.product .woocommerce-tabs ul.tabs li.active a {
    border-bottom-color: var(--dp-accent);
    color: var(--dp-brand-surface);
}
html body.single-product div.product .woocommerce-tabs .woocommerce-Tabs-panel {
    margin: 0 0 8px;
    color: var(--dp-text-soft);
    font-size: 16px;
    line-height: 1.75;
}
body.single-product .woocommerce-Tabs-panel h2,
body.single-product .woocommerce-Tabs-panel h3 {
    margin: 1.6em 0 .6em;
    color: var(--dp-brand-surface);
    font-weight: 700;
    line-height: 1.35;
}
body.single-product .woocommerce-Tabs-panel h2 { font-size: 22px; }
body.single-product .woocommerce-Tabs-panel h3 { font-size: 18px; }
body.single-product .woocommerce-Tabs-panel > h2:first-child { margin-top: 0; }
body.single-product .woocommerce-Tabs-panel img { border-radius: var(--dp-radius-sm); }
body.single-product .woocommerce-Tabs-panel figure { margin-left: auto; margin-right: auto; }
body.single-product .woocommerce-Tabs-panel figcaption { color: var(--dp-text-muted); font-size: 14px; text-align: center; }
body.single-product .woocommerce-Tabs-panel .wp-video { margin: 0 auto; }
body.single-product .related.products,
body.single-product .up-sells.products { clear: both; margin-top: 40px; }
body.single-product .related.products > h2,
body.single-product .up-sells.products > h2 {
    margin: 0 0 20px;
    color: var(--dp-brand-surface);
    font-size: 22px;
    font-weight: 700;
}

/* ---------- Home page ---------- */
.ae-homepage-wrap .feature-slider-widget-area { padding: 24px 0 8px; }
@media (min-width: 769px) {
    #page .feature-slider-wrap:not(.hide-right-slider) .main-slider-wrap { max-width: none; width: calc(68% - 6px); }
    #page .feature-slider-wrap:not(.hide-right-slider) .slider-section-right { max-width: none; width: 32%; }
}
.main-slider .slick-list,
.verticle-slider .slick-list,
.feature-slider-wrap .slick-list { border-radius: var(--dp-radius); overflow: hidden; }
#page .ae-homepage-wrap .special-menu-container ul.special-sub-menu { box-shadow: none; }
#page .main-slider .slider-caption .caption-wrap h2,
#page .main-slider .slider-caption .caption-wrap h3,
#page .main-slider .slider-caption .caption-wrap .slider-title { text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
#page .main-slider .slider-caption .caption-wrap .button {
    border-radius: var(--dp-radius-sm);
    padding: 12px 26px;
    font-weight: 600;
}
#page .ae-homepage-wrap .homepage-fullwidth-widget-area { padding: 24px 0 0; background: transparent; }
/* Additional CSS sets margin-top: 5px !important / margin-bottom: 10px !important on these widgets. */
html #page .ae-homepage-wrap .homepage-fullwidth-widget-area section.widget {
    display: block;
    width: 100%;
    margin: 0 !important;
    padding: 56px 0 40px;
    background: var(--dp-surface);
}
.ae-homepage-wrap .homepage-fullwidth-widget-area .widget,
.ae-homepage-wrap .ae-advance-categories-wrapper { background: transparent; }
#page .ae-homepage-wrap .widget-title {
    position: relative;
    margin: 0 0 24px;
    padding: 0 0 14px;
    /* The theme sets line-height: 1em + overflow: hidden and relied on a 40 px top
       padding for room. Without that padding, the stacked Vietnamese marks above
       capitals (Ả, Ẩ, Ấ, Ờ ...) were cut off. Give the line box room and let marks
       show; the section padding above leaves enough space. */
    overflow: visible;
    color: var(--dp-brand-surface);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .02em;
    text-align: center;
    text-transform: uppercase;
}
/* Legacy side lines on title spans (100 px each side) were hidden by the theme's
   overflow: hidden; they are not part of this design. */
#page .ae-homepage-wrap .widget-title span::before,
#page .ae-homepage-wrap .widget-title span::after { display: none; }
#page .ae-homepage-wrap .widget-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 48px;
    height: 3px;
    border-radius: 2px;
    background: var(--dp-accent);
    transform: translateX(-50%);
}
#page .ae-homepage-wrap .ae-advance-categories-wrapper li.product .product-info-wrap { text-align: center; }
#page .ae-homepage-wrap .ae-advance-categories-wrapper li.product .product-info-wrap > a { text-align: center; }
#page .ae-homepage-wrap .ae-advance-categories-wrapper li.product .product-info-wrap h4.featured-cat-title,
#page .ae-homepage-wrap .ae-advance-categories-wrapper li.product .product-info-wrap h3,
#page .ae-homepage-wrap .ae-advance-categories-wrapper li.product .product-info-wrap h2 {
    margin: 0 0 14px;
    padding: 0;
    color: var(--dp-text);
    font-weight: 600;
    line-height: 1.45;
    min-height: 0;
    font-size: 16px;
    text-align: center;
}
#page .ae-homepage-wrap .slick-dots li button { border-radius: 2px; }
.ae-homepage-wrap .mb-homepage-main { padding: 16px 0 56px; }

/* ---------- Home: latest posts (core/daphuc-content-hooks.php) ---------- */
.dp-home-news { padding: 8px 0 8px; }
.dp-home-news__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 24px;
    margin: 0 0 22px;
}
html #page .ae-homepage-wrap .dp-home-news .dp-home-news__title {
    margin: 0;
    padding: 0 0 12px;
    text-align: left;
}
html #page .ae-homepage-wrap .dp-home-news .dp-home-news__title::after { left: 0; transform: none; }
.dp-home-news__all { color: var(--dp-primary-ink); font-size: 14px; font-weight: 700; white-space: nowrap; }
.dp-home-news__all:hover { color: var(--dp-primary-ink); }
.dp-home-news__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.dp-home-news__item { margin: 0; padding: 0; }
.dp-home-news__card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-radius: var(--dp-radius);
    box-shadow: var(--dp-shadow);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.dp-home-news__card:hover { border-color: var(--dp-card-border-hover); box-shadow: var(--dp-shadow-hover); }
/* Photos are secondary to the text: 16:9, but never taller than 240px in wide cards. */
/* The frame always spans the card: its height comes from the card width through
   padding (16:9, at most 240px). An explicit width with a padding-based height avoids
   a ratio-driven width contraction (aspect-ratio with max-height) where intrinsic
   minimum sizing differs between engines or versions. */
.dp-home-news__thumb {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    height: 0;
    padding-top: 56.25%;
    padding-top: min(56.25%, 240px);
    overflow: hidden;
    background: var(--dp-fill);
}
/* Cover without distortion. The crop keeps the top edge, where headings of infographics are. */
html #page .dp-home-news__thumb img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    object-fit: cover;
    object-position: 50% 0;
}
/* Fewer posts than columns: the cards fill the row; one post is a horizontal card. */
.dp-home-news__list--n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) {
    .dp-home-news__list--n1 { grid-template-columns: minmax(0, 1fr); max-width: 1040px; }
    .dp-home-news__list--n1 .dp-home-news__card { flex-direction: row; }
    .dp-home-news__list--n1 .dp-home-news__thumb { flex: 0 0 42%; width: auto; height: auto; min-height: 220px; padding-top: 0; }
    .dp-home-news__list--n1 .dp-home-news__body { flex: 1 1 auto; justify-content: center; padding: 24px 28px; }
}
.dp-home-news__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 20px; }
.dp-home-news__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; color: var(--dp-text-muted); font-size: 13px; }
.dp-home-news__cat {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--dp-primary-subtle);
    color: var(--dp-primary-ink);
    font-size: 12px;
    font-weight: 700;
}
html #page .dp-home-news__card-title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; text-transform: none; }
html #page .dp-home-news__card-title a { color: var(--dp-brand-surface); }
.dp-home-news__card:hover .dp-home-news__card-title a { color: var(--dp-primary-ink); }
/* Whole card is the title link (real <a>, no JS). */
.dp-home-news__card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--dp-radius); }
html body #page .dp-home-news__card-title a:focus-visible { outline: none !important; }
html body #page .dp-home-news__card-title a:focus-visible::after { outline: 3px solid var(--dp-accent); outline-offset: -3px; }
.dp-home-news__excerpt { margin: 0; color: var(--dp-text-excerpt); font-size: 15px; line-height: 1.65; }
@media (max-width: 991px) { .dp-home-news__list--n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) {
    .dp-home-news__list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .dp-home-news__body { padding: 14px 16px 18px; }
    html #page .dp-home-news__card-title { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .dp-home-news__card { transition: none; } }

/* ---------- Footer ---------- */
#page #footer-widgets {
    width: 100%;
    margin-top: 0;
    border-radius: 0;
    background: var(--dp-brand-surface);
    color: var(--dp-on-brand);
}
#page #footer-widgets .container > .ae-inner { margin: 0 -15px; }
#page #footer-widgets .widget-title {
    position: relative;
    margin-bottom: 22px;
    padding-bottom: 12px;
    color: var(--dp-on-brand);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .05em;
}
#page #footer-widgets .widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    border-radius: 2px;
    background: var(--dp-accent);
}
#page #footer-widgets,
#page #footer-widgets p,
#page #footer-widgets li,
#page #footer-widgets .footer-contact { color: var(--dp-on-brand); font-size: 14px; line-height: 1.8; }
#page #footer-widgets a { color: var(--dp-on-brand); }
#page #footer-widgets a:hover { color: var(--dp-on-brand); text-decoration: underline; }
#page #footer-widgets i { color: var(--dp-on-brand); opacity: .7; }
#page footer#colophon {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    background: var(--dp-brand-surface-deep);
    border-top: 1px solid rgba(var(--dp-on-brand-rgb), .08);
}
#page footer#colophon,
#page footer#colophon .copyright,
#page footer#colophon a { color: var(--dp-on-brand); font-size: 13px; }

/* ---------- Theme "Primary Color" rules -> global token ----------
   The theme prints its Primary Color as inline CSS (core/dynamic.php) after this
   file. These rules make the visible ones follow --dp-primary, so a global override
   in Additional CSS (html:root { --dp-primary: ... }) works without changing that
   setting. By default --dp-primary equals the stored Primary Color: no change. */
html a { color: var(--dp-primary-ink); }                       /* beats the inline "a" rule only */
/* Generic focus/active links use the primary too (the theme used it darkened 10 %),
   so no legacy color shows. Class-based states (menu, footer, buttons) still win. */
html a:focus,
html a:active { color: var(--dp-primary-ink); }
#page .main-slider-wrap .slider-buttons a { background-color: var(--dp-action); color: var(--dp-on-action); }
#page .main-slider-wrap .slider-buttons a:hover { background-color: var(--dp-action-hover); }
#page .product .price,
#page div.product p.price,
#page div.product span.price { color: var(--dp-primary-ink); }
html body #page div.product .woocommerce-tabs ul.tabs::before { border-color: var(--dp-primary); }
#page div.product .woocommerce-tabs ul.tabs li.active a { color: var(--dp-primary-ink); }
#page .related.products > h2::before,
#page .up-sells.products > h2::before { background-color: var(--dp-action); }

/* ---------- Forms (generic) ---------- */
/* Legacy Elementor pages carry their own gold/red colors outside the theme's
   palette. Bring their headings and emphasized text into the same brand roles. */
body.elementor-page #page .elementor-widget-heading .elementor-heading-title { color: var(--dp-primary-ink); }
body.elementor-page #page .elementor-widget-heading p.elementor-heading-title { color: var(--dp-text-muted); }
body.elementor-page #page .elementor-widget-text-editor span[style*="color: red"] { color: var(--dp-primary-ink) !important; }
body.elementor-page #page .elementor-column-wrap:has(> .elementor-widget-wrap > .elementor-widget-icon-list) { background: var(--dp-brand-surface); border-radius: var(--dp-radius); }
body.elementor-page #page .elementor-widget-icon-list .elementor-icon-list-text,
body.elementor-page #page .elementor-widget-icon-list .elementor-icon-list-icon i { color: var(--dp-on-brand); }

#page input[type="text"], #page input[type="search"], #page input[type="email"],
#page input[type="tel"], #page textarea { border-color: var(--dp-border); border-radius: var(--dp-radius-sm); }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    #shop-wrap:not(.ae-list-view) ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
    #page .mid-header .container { gap: 20px; }
    #page .mid-header .product-search-wrapper select.product-cat { width: 160px; }
}
@media (max-width: 991px) {
    #shop-wrap:not(.ae-list-view) ul.products,
    .woocommerce .related ul.products,
    .woocommerce .up-sells ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dp-hotline__text small { display: none; }
}
@media (max-width: 767px) {
    /* Top bar: keep the phone and social links, drop long lines (they are in the footer). */
    #page #top-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    #page #top-bar .container::before,
    #page #top-bar .container::after { content: none; }
    #page #top-bar .top-left,
    #page #top-bar .top-right { float: none; width: auto; margin: 0; }
    #page #top-bar .top-left-inner .address,
    #page #top-bar .top-left-inner .fax { display: none; }
    #page #top-bar .top-left-inner .free-text {
        display: block;
        width: auto;
        padding: 10px 0;
        border: 0;
        text-align: left;
        line-height: 1.4;
    }

    #page div.mid-header { padding: 12px 0 14px; }
    #page .mid-header .container { flex-wrap: wrap; gap: 12px; }
    #page .mid-header .site-branding { flex: 1 1 auto; width: auto; }
    #page .mid-header .custom-logo { max-height: 52px; }
    #page .mid-header .ae-cart-wishlist { order: 2; display: block; }
    #page .mid-header .ae-search-holder { order: 3; flex: 0 0 100%; max-width: none; display: block; }
    #page .mid-header .product-search-wrapper form { height: 46px; }
    #page .mid-header .product-search-wrapper select.product-cat { display: none; }
    #page .mid-header .product-search-wrapper button.search-submit { flex-basis: 50px; width: 50px; }
    .dp-hotline { gap: 8px; padding: 0; }
    .dp-hotline__icon { width: 40px; height: 40px; font-size: 18px; }
    .dp-hotline__text strong { font-size: 15px; }

    #page #breadcrumb.ae-breadcrumb-advanced .breadcrumb-content { padding: 32px 0; }
    #page #content.site-content { padding-top: 24px; padding-bottom: 40px; }
    #page #sidebar-primary { margin-top: 32px; }
    /* Blog/news column: the theme adds a 15 px side gutter on phones; the shell already has one. */
    html body.blog-custom div#primary.content-area { padding-left: 0; padding-right: 0; }

    body.archive #shop-wrap > .woocommerce-ordering { flex: 1 1 100%; }
    #page .woocommerce-ordering select.orderby { width: 100%; min-width: 0; }

    #shop-wrap:not(.ae-list-view) ul.products,
    .woocommerce .related ul.products,
    .woocommerce .up-sells ul.products { gap: 12px; }
    #page li.product .product-info-wrap { padding: 12px 12px 14px; }
    #page li.product .woocommerce-loop-product__title,
    #page li.product .product-info-wrap h2,
    #page li.product .product-info-wrap h3 { font-size: 14px; margin-bottom: 12px; }
    html #page li.product .product-info-wrap a.button:not(.yith-wcqv-button),
    html #page li.product .view-details-wrap a { min-height: 38px; font-size: 13px; padding: 6px 10px; }
    #page #shop-wrap.ae-list-view li.product .product-thumb-wrap { flex-basis: 38%; width: 38%; }
    #page #shop-wrap.ae-list-view li.product .product-info-wrap { padding: 14px; }

    body.single-product #shop-wrap > div.product { padding: 16px; }
    html body.single-product div.product .woocommerce-tabs .woocommerce-Tabs-panel { font-size: 15px; }
    #page #footer-widgets .widget-column { width: 100%; }
}
@media (max-width: 570px) {
    #page .ae-list-grid-switcher { display: none; }
}
@media (max-width: 360px) {
    #shop-wrap:not(.ae-list-view) ul.products { gap: 10px; }
    .dp-hotline__text { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    #page li.product .ae-woo-block-wrap:hover .product-thumb-wrap img { transform: none; }
}
