/*
 * Giao diện front end Vua Cám Koi (dùng cùng Bootstrap 5).
 * Mọi CSS front end đặt tại đây theo class — không viết style trực tiếp trong view (xem CLAUDE.md).
 */

:root {
    /* Màu chủ đạo giống #pmc-main-header của pharmacity.vn (hsl(var(--primary-500))) */
    --color-primary: #1b51a3;
    --color-primary-dark: #0f377d;
    --color-primary-deep: #0b2a61;
    --color-primary-light: #2a83e9;
    --color-on-primary: #fff;
    /* Màu cam đỏ của cá Koi trong logo — dùng làm điểm nhấn (nút gọi, gạch chân menu) */
    --color-accent: #ff6b2c;
    --color-accent-dark: #e8501a;
    --color-price: #dc2626;
    /* Xanh đậm cho chữ tiêu đề thẻ tin, nút mạng xã hội (theo shopdongho) */
    --color-heading: #1a2b52;
    /* Vàng của logo (viền, vương miện) */
    --color-gold: #f2c75c;
    --font-brand: 'Playfair Display', Georgia, serif;
    --font-body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ease: cubic-bezier(.4, 0, .2, 1);
}

body {
    font-family: var(--font-body);
}

/* ======================================================================
   HEADER
   ====================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    color: var(--color-on-primary);
}

/* --- Dải cam kết trên cùng --- */
.site-topbar {
    background: var(--color-primary-deep);
    font-size: .8125rem;
    max-height: 40px;
    overflow: hidden;
    transition: max-height .3s var(--ease), opacity .3s var(--ease);
}
.site-topbar__list {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin: 0;
    padding: .5rem 0;
    list-style: none;
}
.site-topbar__item {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: rgba(255, 255, 255, .9);
}
.site-topbar__link {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: inherit;
    text-decoration: none;
}
.site-topbar__link:hover,
.site-topbar__link:focus-visible {
    color: #fff;
    text-decoration: underline;
}
.site-topbar__icon {
    width: 16px;
    height: 16px;
    color: var(--color-accent);
}

/* --- Thanh chính: nền xanh chuyển màu như mặt hồ --- */
.site-nav {
    position: relative;
    padding: .625rem 0;
    background:
        radial-gradient(circle at 12% -40%, rgba(255, 255, 255, .22), transparent 45%),
        radial-gradient(circle at 85% 140%, rgba(40, 98, 186, .9), transparent 50%),
        linear-gradient(100deg, var(--color-primary-dark) 0%, var(--color-primary) 45%, var(--color-primary-light) 100%);
    transition: padding .3s var(--ease);
}

/* --- Logo + tên shop --- */
.site-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-right: 2rem;
    padding: 0;
}
.site-brand__logo {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 3px 8px rgba(4, 22, 58, .45));
    transition: width .3s var(--ease), height .3s var(--ease), transform .5s var(--ease);
}
.site-brand:hover .site-brand__logo {
    transform: rotate(-6deg) scale(1.06);
}
.site-brand__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.site-brand__name {
    font-family: var(--font-brand);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .05em;
    color: var(--color-on-primary);
    text-shadow: 0 2px 8px rgba(4, 22, 58, .35);
}
.site-brand__tagline {
    display: flex;
    align-items: center;
    gap: .45em;
    margin-top: .4rem;
    font-size: max(.62rem, 10px);   /* chữ trang trí, không dưới 10px để vẫn đọc được trên điện thoại */
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-gold);
}
.site-brand__tagline::before,
.site-brand__tagline::after {
    content: '';
    width: 1.1em;
    height: 1px;
    background: currentColor;
    opacity: .8;
}

/* --- Menu: gạch chân màu cam trượt ra khi rê chuột --- */
.site-menu {
    gap: .5rem;
}
.navbar-dark .site-menu__link {
    position: relative;
    padding: .5rem .25rem;
    margin: 0 .5rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-on-primary);
    white-space: nowrap;
}
.site-menu__link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 3px;
    background: var(--color-accent);
    transform: scaleX(0);
    transition: transform .25s var(--ease);
}
.navbar-dark .site-menu__link:hover,
.navbar-dark .site-menu__link:focus,
.navbar-dark .site-menu__link.active {
    color: var(--color-on-primary);
}
.site-menu__link:hover::after,
.site-menu__link:focus-visible::after,
.site-menu__link.active::after {
    transform: scaleX(1);
}

/* --- Danh mục con (menu xổ xuống) --- */
.site-menu__item {
    position: relative;
}
.site-menu__row {
    display: flex;
    align-items: center;
}
.has-children .site-menu__link {
    margin-right: 0;
}
.site-menu__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: .25rem;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--color-on-primary);
}
.site-menu__toggle:focus-visible {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .6);
    outline: 0;
}
.site-menu__toggle-icon {
    width: 16px;
    height: 16px;
    transition: transform .2s var(--ease);
}
.site-menu__item.is-open .site-menu__toggle-icon {
    transform: rotate(180deg);
}
.site-submenu {
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-submenu__link {
    display: block;
    padding: .6rem .9rem;
    border-radius: 8px;
    color: var(--color-heading);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.site-submenu__link:hover,
.site-submenu__link:focus-visible,
.site-submenu__link.active {
    background: #eef5ff;
    color: var(--color-primary);
}
@media (min-width: 992px) {
    /* Máy tính: hộp trắng xổ xuống khi rê chuột / dùng bàn phím / bấm nút ▾ */
    .site-submenu {
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        min-width: 240px;
        padding: .5rem;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 12px 32px rgba(15, 55, 125, .18);
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
    }
    .site-menu__item:hover > .site-submenu,
    .site-menu__item:focus-within > .site-submenu,
    .site-menu__item.is-open > .site-submenu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .site-menu__item:hover .site-menu__toggle-icon {
        transform: rotate(180deg);
    }
}
@media (max-width: 991.98px) {
    /* Điện thoại: danh mục con thụt vào dưới danh mục cha, mở bằng nút ▾ (vùng bấm 44px) */
    .site-menu__row { justify-content: space-between; }
    .site-menu__row .site-menu__link { flex: 1; }
    .site-menu__toggle { width: 44px; height: 44px; margin-right: 0; }
    .site-menu__toggle-icon { width: 20px; height: 20px; }
    .site-submenu {
        display: none;
        padding: 0 0 .5rem 1rem;
    }
    .site-menu__item.is-open > .site-submenu { display: block; }
    .site-submenu__link {
        padding: .65rem 1rem;
        color: rgba(255, 255, 255, .9);
        font-weight: 500;
    }
    .site-submenu__link:hover,
    .site-submenu__link:focus-visible,
    .site-submenu__link.active {
        background: rgba(255, 255, 255, .1);
        color: #fff;
    }
}
@media (prefers-reduced-motion: reduce) {
    .site-submenu, .site-menu__toggle-icon { transition: none; }
}

/* --- Nút bên phải --- */
.site-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-left: auto;
}

/* Hotline: nút cam nổi bật, icon điện thoại rung */
.site-hotline {
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    padding: .3rem 1.1rem .3rem .3rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: var(--color-on-primary);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(232, 80, 26, .45);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.site-hotline:hover,
.site-hotline:focus {
    color: var(--color-on-primary);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(232, 80, 26, .55);
}
.site-hotline__ring {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-on-primary);
    color: var(--color-accent-dark);
}
.site-hotline__ring::before {
    /* Vòng sóng lan ra quanh icon */
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .8);
    animation: hotline-pulse 1.8s ease-out infinite;
}
.site-hotline__icon {
    width: 20px;
    height: 20px;
    animation: hotline-shake 1.8s ease-in-out infinite;
}
.site-hotline__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.site-hotline__label {
    font-size: .7rem;
    font-weight: 500;
    opacity: .9;
}
.site-hotline__number {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: .02em;
    white-space: nowrap;
}

/* Giỏ hàng: nút trắng bo tròn, icon + chữ "Giỏ hàng" + số lượng */
.site-cart {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    height: 46px;
    padding: 0 1.1rem 0 .4rem;
    border-radius: 999px;
    background: var(--color-on-primary);
    color: var(--color-primary);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.site-cart:hover,
.site-cart:focus {
    color: var(--color-primary-dark);
    transform: translateY(-1px);
    background: #eef4ff;
}
.site-cart__ring {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eef4ff;
}
.site-cart__icon {
    width: 22px;
    height: 22px;
}
.site-cart__label {
    font-size: .95rem;
    font-weight: 700;
    white-space: nowrap;
}
.site-cart__count {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    border: 2px solid var(--color-on-primary);
    background: var(--color-price);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}
.site-cart__count.is-empty {
    background: var(--color-primary-light);
}

/* Nút mở menu trên điện thoại */
.site-toggler {
    display: none;
    padding: 0;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: var(--color-on-primary);
}
.site-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .35);
}
.site-toggler__icon {
    width: 24px;
    height: 24px;
}

/* --- Thu gọn khi cuộn trang --- */
.site-header.is-scrolled .site-topbar {
    max-height: 0;
    opacity: 0;
}
.site-header.is-scrolled .site-nav {
    padding: .3rem 0;
}
.site-header.is-scrolled .site-brand__logo {
    width: 50px;
    height: 50px;
}

@keyframes hotline-pulse {
    0%   { transform: scale(1); opacity: .9; }
    100% { transform: scale(1.6); opacity: 0; }
}
@keyframes hotline-shake {
    0%, 50%, 100% { transform: rotate(0); }
    10%, 30% { transform: rotate(-14deg); }
    20%, 40% { transform: rotate(14deg); }
}
@media (prefers-reduced-motion: reduce) {
    .site-hotline__ring::before,
    .site-hotline__icon { animation: none; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    /* Máy tính nhỏ: 4 mục menu + hotline + giỏ không đủ chỗ → thu khoảng cách, hotline và giỏ hàng chỉ còn icon (số hotline vẫn ở nút gọi và chân trang) */
    .site-menu { gap: 0; }
    .navbar-dark .site-menu__link { margin: 0 .3rem; font-size: .95rem; }
    .site-menu__toggle { margin-right: 0; }
    .site-hotline__text { display: none; }
    .site-hotline { padding: .25rem; }
    .site-cart { padding: .25rem; }
    .site-cart__label { display: none; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
    /* Khung 1140px: giữ số hotline (quan trọng để chốt đơn), giỏ hàng chỉ còn icon + số lượng */
    .navbar-dark .site-menu__link { margin: 0 .35rem; }
    .site-cart { padding: .25rem; }
    .site-cart__label { display: none; }
}
/* --- Màn hình nhỏ --- */
@media (max-width: 991.98px) {
    .site-toggler { display: flex; align-items: center; justify-content: center; }
    .site-menu-wrap {
        order: 10;
        flex-basis: 100%;
    }
    .site-menu {
        margin-top: .75rem;
        padding: .5rem;
        gap: 0;
        border-radius: 12px;
        background: rgba(11, 42, 97, .35);
    }
    .navbar-dark .site-menu__link {
        margin: 0;
        padding: .75rem 1rem;
        border-radius: 8px;
    }
    .navbar-dark .site-menu__link:hover,
    .navbar-dark .site-menu__link.active {
        background: rgba(255, 255, 255, .1);
    }
    .site-menu__link::after { left: 1rem; right: auto; width: 24px; bottom: .35rem; }
    .site-topbar__list { gap: 1.25rem; }
}
@media (max-width: 767.98px) {
    .site-topbar { display: none; }
}
@media (max-width: 575.98px) {
    .site-brand { margin-right: .5rem; gap: .5rem; }
    .site-brand__logo { width: 50px; height: 50px; }
    .site-brand__name { font-size: 1.15rem; }
    .site-brand__tagline { font-size: 10px; letter-spacing: -.01em; }   /* chữ trang trí: không nhỏ hơn 10px */
    .site-brand__tagline::before, .site-brand__tagline::after { display: none; }
    .site-actions { gap: .4rem; }
    .site-hotline { padding: .25rem; }
    .site-hotline__text { display: none; }   /* điện thoại: chỉ hiện icon gọi */
    .site-hotline__ring { width: 36px; height: 36px; }
    .site-toggler { width: 42px; height: 42px; }
    .site-cart { height: 42px; padding: .25rem; }
    .site-cart__label { display: none; }     /* điện thoại: không đủ chỗ cho chữ, chỉ hiện icon */
}

/* ======================================================================
   SLIDE TRANG CHỦ — 2 ảnh/khung trên desktop, 1 ảnh trên điện thoại.
   Nền kiểu Pharmacity: xanh da trời ở nửa trên, nhạt dần về trắng ở đáy.
   Vẽ bằng CSS gradient thay vì ảnh nền (nhẹ hơn, nét ở mọi kích thước).
   ====================================================================== */
.home-slider {
    --slider-gap: 1rem;
    --slider-radius: 14px;
    --slider-sky: #67deff;
    padding: 1.25rem 0 1.5rem;
    background: linear-gradient(
        to bottom,
        var(--slider-sky) 0%,
        var(--slider-sky) 46%,
        #93e7ff 58%,
        #c2f2ff 69%,
        #e5f9ff 81%,
        #fff 100%
    );
}
.home-slider__inner {
    position: relative;
}
/* Trước khi Owl chạy: hiện sẵn ảnh đúng bố cục để không nhảy layout (CSS gốc của Owl ẩn hẳn .owl-carousel) */
.home-slider__track:not(.owl-loaded) {
    display: flex;
    gap: var(--slider-gap);
    overflow: hidden;
}
.home-slider__track:not(.owl-loaded) .home-slider__slide {
    flex: 0 0 calc((100% - var(--slider-gap)) / 2);
}
.home-slider__link {
    display: block;
}
.home-slider__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 630;   /* khung chung của slide: ảnh khác tỉ lệ sẽ được cắt vừa (object-fit: cover) */
    object-fit: cover;
    border-radius: var(--slider-radius);
    background: #e2e8f0;
}

/* Nút trước / sau: tròn trắng, nằm đè lên mép slide */
.home-slider__nav {
    position: absolute;
    top: calc(50% - 10px);      /* giữa ảnh, trừ phần chấm ở dưới */
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #dbe4f3;
    border-radius: 50%;
    background: var(--color-on-primary);
    color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(15, 55, 125, .18);
    transform: translateY(-50%);
    transition: background-color .2s var(--ease), color .2s var(--ease);
}
.home-slider__nav:hover,
.home-slider__nav:focus-visible {
    background: var(--color-primary);
    color: var(--color-on-primary);
}
.home-slider__nav--prev { left: -10px; }
.home-slider__nav--next { right: -10px; }
.home-slider__nav-icon {
    width: 22px;
    height: 22px;
}

/* Đủ chỗ hiện hết ảnh thì không cần nút (chấm do .carousel-dots.disabled ẩn) */
.home-slider.is-static .home-slider__nav {
    display: none;
}

@media (max-width: 991.98px) {
    .home-slider__track:not(.owl-loaded) .home-slider__slide { flex-basis: 100%; }
    .home-slider__nav--prev { left: 4px; }
    .home-slider__nav--next { right: 4px; }
}
@media (max-width: 575.98px) {
    .home-slider { --slider-radius: 10px; }
    .home-slider__nav { width: 36px; height: 36px; }
}

/* ======================================================================
   TIÊU ĐỀ KHỐI NỘI DUNG (dùng chung: Sản phẩm nổi bật, Tin tức…)
   ====================================================================== */
.section-title {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    color: var(--color-primary);
}
@media (max-width: 575.98px) {
    .section-title { font-size: 1.25rem; margin-bottom: 1rem; }
}

/* Khoảng cách giữa các khối trên trang chủ */
.home-section + .home-section {
    margin-top: 3rem;
}
@media (max-width: 575.98px) {
    .home-section + .home-section { margin-top: 2rem; }
}

/* Chấm chuyển trang của mọi carousel (Owl: dotsClass / dotClass) */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0;
    padding-top: .35rem;
}
.carousel-dots.disabled {
    display: none;
}
/* Nút là vùng bấm 32px, chấm nhìn thấy vẽ bằng ::before để vẫn gọn mắt */
.carousel-dots__dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: none;
}
.carousel-dots__dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: width .25s var(--ease), background-color .25s var(--ease);
}
.carousel-dots__dot.active::before {
    width: 22px;
    background: var(--color-primary);
}

/* ======================================================================
   REVIEW SẢN PHẨM (REELS) — thẻ video dọc 9:16
   ====================================================================== */
.reel-list {
    --reel-gap: 12px;
    --reel-per-view: 2;
}
/* Trước khi Owl chạy: xếp sẵn đúng số thẻ mỗi hàng để không nhảy layout */
.reel-list:not(.owl-loaded) {
    display: flex;
    gap: var(--reel-gap);
    overflow: hidden;
}
.reel-list:not(.owl-loaded) > .reel-card {
    flex: 0 0 calc((100% - var(--reel-gap) * (var(--reel-per-view) - 1)) / var(--reel-per-view));
}
@media (min-width: 576px)  { .reel-list { --reel-per-view: 3; } }
@media (min-width: 992px)  { .reel-list { --reel-per-view: 4; } }
@media (min-width: 1200px) { .reel-list { --reel-per-view: 5; --reel-gap: 16px; } }

.reel-card__media {
    position: relative;
    display: block;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 12px;
    background: #0f172a;
}
.reel-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;           /* ảnh YouTube 4:3 → cắt giữa thành khung dọc của Shorts */
    transition: transform .4s var(--ease);
}
.reel-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}
.reel-card__media::after {
    /* Phủ tối phía dưới để khung sản phẩm và chữ trắng luôn đọc được trên mọi ảnh */
    content: '';
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, .6));
    pointer-events: none;
}
.reel-card__media:hover .reel-card__img,
.reel-card__media:focus-visible .reel-card__img {
    transform: scale(1.05);
}
/* Nút play: tròn tối mờ, tam giác trắng (theo mẫu public/view/reels.png) */
.reel-card__play {
    position: absolute;
    top: 45%;
    left: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(20, 20, 20, .65);
    color: #fff;
    transform: translate(-50%, -50%);
    transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.reel-card__media:hover .reel-card__play {
    background: rgba(20, 20, 20, .8);
    transform: translate(-50%, -50%) scale(1.1);
}
.reel-card__play-icon {
    width: 26px;
    height: 26px;
    margin-left: 3px;            /* tam giác lệch tâm thị giác, đẩy nhẹ sang phải cho cân */
    fill: currentColor;
}
/* Lượt xem: nhãn tối góc trên bên phải */
.reel-card__views {
    position: absolute;
    top: .5rem;
    right: .5rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .15rem .45rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
}
.reel-card__views-icon {
    width: 16px;
    height: 16px;
}

/* Khung sản phẩm đè lên đáy video */
.reel-product {
    position: absolute;
    right: .6rem;
    bottom: .6rem;
    left: .6rem;
    z-index: 2;
    padding: .5rem;
    border-radius: 10px;
    /* Nền trong suốt, không làm mờ: vẫn nhìn thấy video phía sau; bóng chữ giữ tên và giá đọc được trên nền sáng */
    background: rgba(20, 20, 20, .4);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.reel-product__info {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin-bottom: .45rem;
}
/* Selector dài hơn để thắng CSS gốc của Owl nạp sau (.owl-carousel .owl-item img { width: 100% }) */
.owl-carousel .owl-item .reel-product__img,
.reel-product__img {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #fff;
    object-fit: cover;
}
.reel-product__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}
.reel-product__name {
    display: -webkit-box;
    overflow: hidden;
    padding: .2rem 0;
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.reel-product__name:hover,
.reel-product__name:focus-visible {
    color: var(--color-gold);
}
.reel-product__old-price {
    color: #cbd5e1;
    font-size: .8125rem;
}
.reel-product__price {
    color: var(--color-accent);
    font-size: .95rem;
    font-weight: 800;
}
.reel-product__buy {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 6px;
    background: var(--color-accent);
    color: #fff;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s var(--ease);
}
.reel-product__buy:hover,
.reel-product__buy:focus-visible {
    background: var(--color-accent-dark);
    color: #fff;
}
@media (max-width: 575.98px) {
    /* Thẻ hẹp (2 thẻ/màn hình): bỏ ảnh nhỏ để tên và giá đủ chỗ; nút cao 40px cho dễ bấm */
    .reel-product { right: .4rem; bottom: .4rem; left: .4rem; padding: .4rem; }
    .owl-carousel .owl-item .reel-product__img,
    .reel-product__img { display: none; }
    .reel-product__buy { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
    .reel-card__img, .reel-card__play { transition: none; }
}

/* Hộp phát video */
.reel-modal__dialog {
    max-width: 400px;
}
.reel-modal__content {
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    background: #000;
}
.reel-modal__header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .5rem .5rem 1rem;
    color: #fff;
}
.reel-modal__title {
    flex: 1;
    margin: 0;
    overflow: hidden;
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.reel-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
}
.reel-modal__close-icon {
    width: 22px;
    height: 22px;
}
.reel-modal__player {
    aspect-ratio: 9 / 16;
    max-height: calc(100vh - 120px);
    margin: 0 auto;
}
.reel-modal__frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ======================================================================
   TIN TỨC — thẻ bài viết (giống shopdongho) + trang chi tiết
   ====================================================================== */
/* --- Khối tin tức trang chủ: 1 bài lớn bên trái + 4 bài nhỏ bên phải --- */
.home-news__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;   /* bài lớn cao bằng cột 4 bài nhỏ */
}
.news-featured,
.news-item {
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(20, 30, 60, .08);
    transition: box-shadow .2s var(--ease);
}
.news-featured:hover,
.news-item:hover {
    box-shadow: 0 6px 20px rgba(20, 30, 60, .14);
}
.news-featured__media,
.news-item__media {
    display: block;
    overflow: hidden;
    background: #f1f5f9;
}
.news-featured__media {
    aspect-ratio: 1200 / 630;
}
.news-featured__img,
.news-item__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s var(--ease);
}
.news-featured:hover .news-featured__img,
.news-item:hover .news-item__img {
    transform: scale(1.04);
}
.news-featured__body {
    padding: 1rem 1.1rem 1.15rem;
}
.news-featured__title {
    margin: 0 0 .4rem;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
}
.news-featured__link,
.news-item__link {
    color: var(--color-heading);
    text-decoration: none;
}
.news-featured__link:hover,
.news-featured__link:focus-visible,
.news-item__link:hover,
.news-item__link:focus-visible {
    color: var(--color-primary);
}
.news-featured__meta {
    margin: 0 0 .5rem;
    color: #94a3b8;
    font-size: .875rem;
}
.news-featured__excerpt {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #475569;
    font-size: .92rem;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.news-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.news-item {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: center;
}
/* Ảnh nhỏ giữ đúng tỉ lệ ảnh bài viết 1200x630, không cắt méo */
.news-item__media {
    aspect-ratio: 1200 / 630;
}
.news-item__body {
    padding: .75rem .9rem;
}
.news-item__title {
    display: -webkit-box;
    margin: 0 0 .3rem;
    overflow: hidden;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.news-item__excerpt {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #64748b;
    font-size: .875rem;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.home-news__more {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
    margin-top: 1.5rem;
}
.home-news__more-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 1.25rem;
    border: 1px solid var(--color-primary);
    border-radius: 10px;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s var(--ease), color .2s var(--ease);
}
.home-news__more-link:hover,
.home-news__more-link:focus-visible {
    background: var(--color-primary);
    color: var(--color-on-primary);
}
@media (max-width: 991.98px) {
    .home-news__grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .news-featured__title { font-size: 1.05rem; }
    .news-item { grid-template-columns: 140px minmax(0, 1fr); }
    .news-item__body { padding: .6rem .7rem; }
    .news-item__title { font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
    .news-featured__img, .news-item__img { transition: none; }
    .news-featured:hover .news-featured__img, .news-item:hover .news-item__img { transform: none; }
}

.news-card {
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(20, 30, 60, .08);
    transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.news-card:hover {
    box-shadow: 0 6px 18px rgba(20, 30, 60, .14);
    transform: translateY(-2px);
}
.news-card__link {
    display: block;
    color: var(--color-heading);
    text-decoration: none;
}
.news-card__media {
    display: block;
    aspect-ratio: 1200 / 630;
    overflow: hidden;
    background: #fafafa;
}
.news-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.news-card__title {
    display: -webkit-box;
    margin: 0;
    padding: 9px 10px 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    min-height: calc(14px * 1.5 * 2 + 9px);  /* luôn đủ 2 dòng để các thẻ cao bằng nhau */
    margin-bottom: 11px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.news-card__link:hover .news-card__title {
    color: var(--color-primary);
}

.article-detail__date {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #64748b;
    font-size: .875rem;
}
.article-detail__date-icon {
    width: 15px;
    height: 15px;
}

/* ======================================================================
   MẠNG XÃ HỘI (giống shopdongho) — nút bo tròn, icon màu theo nền tảng
   ====================================================================== */
.socials {
    padding-top: 1rem;
    border-top: 1px solid #eee;
}
.social-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.social-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 6px 18px 6px 6px;
    border: 1px solid #e6e6e6;
    border-radius: 999px;
    background: #fff;
    text-decoration: none;
    transition: box-shadow .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.social-pill:hover,
.social-pill:focus-visible {
    border-color: #d8d8d8;
    box-shadow: 0 4px 14px rgba(20, 30, 60, .12);
    transform: translateY(-1px);
}
.social-pill__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 32px;                 /* 28px của shopdongho + viền nút ≈ vùng bấm 44px trên mobile */
    height: 32px;
    border-radius: 50%;
    color: #fff;
}
.social-pill__svg {
    width: 17px;
    height: 17px;
}
.social-pill__icon--facebook { background: #1877f2; }
.social-pill__icon--tiktok   { background: #000; }
.social-pill__icon--youtube  { background: #ff0000; }
.social-pill__icon--zalo     { background: #0068ff; }
.social-pill__icon--other    { background: #6b7280; }
.social-pill__text {
    color: var(--color-heading);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .2px;
    text-transform: uppercase;
    white-space: nowrap;
}
@media (max-width: 767.98px) {
    /* Mobile: một hàng vuốt ngang thay vì xuống nhiều dòng */
    .social-pills {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 2px 2px 6px;
        scrollbar-width: none;
    }
    .social-pills::-webkit-scrollbar { display: none; }
    .social-pills > li { flex-shrink: 0; }
}

.site-breadcrumb {
    margin-bottom: 1rem;
    font-size: .875rem;
}
.site-breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}
.article-detail {
    max-width: 820px;
    margin: 0 auto;
}
.article-detail__title {
    margin-bottom: .5rem;
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.3;
    color: #0f172a;
}
.article-detail__summary {
    margin: 1rem 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #334155;
}
.article-detail__cover {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 630;   /* ảnh admin tải lên khác tỉ lệ vẫn giữ khung, không nhảy layout */
    margin: 1rem 0 1.5rem;
    object-fit: cover;
    border-radius: 12px;
    background: #e2e8f0;
}
.article-detail__content {
    max-width: none;
    margin-top: 1rem;
    font-size: 1rem;
    line-height: 1.75;
    color: #1e293b;
}
.article-detail__content h2 {
    margin: 2.25rem 0 .75rem;
    color: var(--color-primary);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.35;
    scroll-margin-top: 110px;   /* chừa chỗ header cố định khi bấm mục lục */
}
.article-detail__content h3 {
    scroll-margin-top: 110px;
}
.article-detail__content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
/* Ảnh có chú thích (CKEditor: figure.image > img + figcaption) */
.article-detail__content figure.image {
    margin: 1.5rem 0;
}
.article-detail__content figure.image img {
    display: block;
    width: 100%;
    border-radius: 12px;
    background: #f1f5f9;
}
.article-detail__content figcaption {
    margin-top: .5rem;
    color: #64748b;
    font-size: .875rem;
    text-align: center;
}
/* Bảng rộng cuộn ngang trong khung, không làm cả trang cuộn ngang trên điện thoại */
.article-detail__content figure.table {
    margin: 1.25rem 0;
    overflow-x: auto;
}
.article-detail__content figure.table table {
    min-width: 520px;
    margin-bottom: 0;
}
.article-detail__content thead th {
    background: var(--color-primary);
    color: var(--color-on-primary);
}
/* Hộp mẹo / lưu ý (CKEditor: blockquote) */
.article-detail__content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--color-accent);
    border-radius: 0 12px 12px 0;
    background: #fff7ed;
    color: #431407;
}
.article-detail__content blockquote p {
    margin-bottom: .5rem;
}
.article-detail__content blockquote > :last-child {
    margin-bottom: 0;
}
.article-detail__empty {
    color: #94a3b8;
}
@media (max-width: 575.98px) {
    .article-detail__title { font-size: 1.4rem; }
    .article-detail__content h2 { font-size: 1.2rem; }
    .article-detail__content blockquote { padding: .85rem 1rem; }
}

/* ======================================================================
   ĐÁNH GIÁ SẢN PHẨM: sao (tô theo --rating), tổng hợp, form chọn sao, danh sách
   ====================================================================== */
.stars {
    display: inline-block;
    font-size: 1rem;
    line-height: 1;
    letter-spacing: 2px;
}
/* 5 ngôi sao xám, phần trăm đầu tô vàng theo --rating (0–5), hỗ trợ sao lẻ như 4,6 */
.stars::before {
    content: '★★★★★';
    background: linear-gradient(90deg, #f59e0b calc(var(--rating, 0) / 5 * 100%), #cbd5e1 0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stars--lg {
    font-size: 1.5rem;
}
.product-detail__rating {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 32px;
    margin-bottom: .5rem;
    color: #475569;
    font-size: .95rem;
    text-decoration: none;
}
.product-detail__rating:hover {
    color: var(--color-primary);
}
.product-reviews {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    scroll-margin-top: 110px;
}
.product-reviews__grid {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}
.review-summary {
    padding: 1.25rem;
    border-radius: 16px;
    background: #f1f7ff;
    text-align: center;
}
.review-summary__score {
    margin: 0;
    color: var(--color-heading);
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.1;
}
.review-summary__max {
    color: #94a3b8;
    font-size: 1.1rem;
    font-weight: 600;
}
.review-summary__count {
    margin: .35rem 0 1rem;
    color: #64748b;
}
.review-summary__empty {
    margin-bottom: .5rem;
    color: var(--color-heading);
    font-weight: 700;
}
.review-summary__hint {
    margin: 0;
    color: #64748b;
    font-size: .95rem;
}
.review-bars {
    margin: 0;
    padding: 0;
    list-style: none;
}
.review-bars__row {
    display: grid;
    grid-template-columns: 2.5rem 1fr 2rem;
    gap: .5rem;
    align-items: center;
    font-size: .85rem;
    color: #475569;
}
.review-bars__row + .review-bars__row {
    margin-top: .3rem;
}
.review-bars__track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f59e0b var(--percent, 0%), #e2e8f0 0);
}
.review-bars__total {
    text-align: right;
}
.review-form {
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
}
.review-form__title {
    margin-bottom: .75rem;
    color: var(--color-heading);
    font-size: 1.1rem;
    font-weight: 800;
}
.review-form__success {
    padding: .75rem 1rem;
    border-radius: 10px;
    background: #dcfce7;
    color: #166534;
}
.review-form__stars {
    margin-bottom: 1rem;
    border: 0;
    padding: 0;
}
.review-form__error {
    margin: .25rem 0 0;
    color: #dc2626;
    font-size: .875rem;
}
.review-form__note {
    margin: .5rem 0 0;
    color: #94a3b8;
    font-size: .875rem;
}
/* Ô bẫy bot: đẩy ra ngoài màn hình (không dùng display:none để bot vẫn thấy và điền) */
.review-form__trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
/* Chọn sao: radio 5→1 xếp ngược, hover/checked tô cả các sao phía trước bằng ~ */
.star-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: .15rem;
}
.star-input__radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.star-input__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #cbd5e1;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color .15s var(--ease), transform .15s var(--ease);
}
.star-input__label:hover,
.star-input__label:hover ~ .star-input__label,
.star-input__radio:checked ~ .star-input__label {
    color: #f59e0b;
}
.star-input__label:hover {
    transform: scale(1.1);
}
.star-input__radio:focus-visible + .star-input__label {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 8px;
}
.review-list {
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}
.review-item {
    padding: 1rem 0;
    border-top: 1px solid #f1f5f9;
}
.review-item__head {
    display: flex;
    gap: .75rem;
    align-items: center;
}
.review-item__avatar {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-weight: 700;
}
.review-item__name {
    margin: 0;
    color: var(--color-heading);
    font-weight: 700;
}
.review-item__date {
    margin-left: .5rem;
    color: #94a3b8;
    font-size: .8rem;
}
.review-item__content {
    margin: .5rem 0 0;
    color: #334155;
}
@media (prefers-reduced-motion: reduce) {
    .star-input__label { transition: none; }
}
@media (max-width: 767.98px) {
    .product-reviews__grid { grid-template-columns: minmax(0, 1fr); }
}

/* ======================================================================
   TRANG 404: thông báo + nút đi tiếp, bên dưới gợi ý sản phẩm và bài viết
   ====================================================================== */
.error-page {
    max-width: 640px;
    margin: 1.5rem auto 2.5rem;
    text-align: center;
}
.error-page__code {
    margin: 0;
    color: var(--color-primary);
    font-size: 6rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.02em;
    opacity: .15;
}
.error-page__title {
    margin: -.75rem 0 .75rem;
    color: var(--color-heading);
    font-size: 1.75rem;
    font-weight: 800;
}
.error-page__text {
    margin-bottom: 1.5rem;
    color: #64748b;
    font-size: 1.05rem;
}
.error-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
}
@media (max-width: 575.98px) {
    .error-page__code { font-size: 4.5rem; }
    .error-page__title { font-size: 1.35rem; }
}

/* ======================================================================
   DANH SÁCH SẢN PHẨM
   ====================================================================== */
.product-card__img {
    height: auto;               /* bỏ chiều cao cố định từ thuộc tính height="400" (chỉ dùng để chống nhảy layout) */
    aspect-ratio: 1;
    object-fit: cover;
    background: #f1f5f9;
}
.product-card__name {
    font-size: 1rem;
}
.product-card__price {
    font-weight: 700;
    color: var(--color-price);
}
/* Size hạt: nhãn nhỏ viền xanh dưới tên sản phẩm */
.product-card__sizes {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin: 0 0 .6rem;
    padding: 0;
    list-style: none;
}
.product-card__size {
    padding: .1rem .5rem;
    border: 1px solid #bfd6f6;
    border-radius: 999px;
    background: #eef5ff;
    color: var(--color-primary);
    font-size: .8125rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Tên sản phẩm là link (stretched-link phủ cả thẻ) */
.product-card {
    transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.product-card:hover {
    box-shadow: 0 8px 22px rgba(15, 55, 125, .12);
    transform: translateY(-2px);
}
.product-card__link {
    display: -webkit-box;
    overflow: hidden;
    color: inherit;
    line-height: 1.5rem;
    text-decoration: none;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.product-card:hover .product-card__link {
    color: var(--color-primary);
}
.product-card__old-price {
    font-size: .875rem;
    color: #94a3b8;
}
.product-card__badge {
    position: absolute;
    top: .5rem;
    left: .5rem;
    z-index: 1;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: var(--color-price);
    color: #fff;
    font-size: .8125rem;
    font-weight: 700;
}
@media (prefers-reduced-motion: reduce) {
    .product-card, .product-card:hover { transition: none; transform: none; }
}

/* Link "Xem tất cả" dưới khối sản phẩm trang chủ */
.section-more {
    margin-top: 1.5rem;
    text-align: center;
}
.section-more__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 1.5rem;
    border: 2px solid var(--color-primary);
    border-radius: 999px;
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s var(--ease), color .2s var(--ease);
}
.section-more__link:hover,
.section-more__link:focus-visible {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

/* --- Trang danh sách (/san-pham, trang danh mục) --- */
.product-listing__empty {
    padding: 2rem 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    text-align: center;
}

/* Dải lọc danh mục + sắp xếp: nút bo tròn; trên điện thoại vuốt ngang thay vì xuống nhiều dòng */
.listing-filter__list,
.listing-sort__list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.listing-filter {
    margin-bottom: .75rem;
}
.listing-filter__item,
.listing-sort__item {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: var(--color-heading);
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.listing-filter__item:hover,
.listing-filter__item:focus-visible,
.listing-sort__item:hover,
.listing-sort__item:focus-visible {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.listing-filter__item.is-active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-on-primary);
}
.listing-sort {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.listing-sort__label {
    flex-shrink: 0;
    color: #64748b;
    font-size: .9rem;
}
.listing-sort__item {
    min-height: 40px;
    font-size: .9rem;
    font-weight: 500;
}
.listing-sort__item.is-active {
    border-color: var(--color-accent);
    background: #fff4ee;
    color: var(--color-accent-dark);
}
@media (max-width: 575.98px) {
    .listing-filter__list,
    .listing-sort__list {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    .listing-filter__list::-webkit-scrollbar,
    .listing-sort__list::-webkit-scrollbar { display: none; }
    .listing-sort__list { min-width: 0; }   /* cho phép co lại để cuộn ngang trong khối, không làm tràn trang */
    .listing-sort__item { min-height: 44px; }
}

/* Phân trang */
.site-pagination {
    margin-top: 2rem;
}
.site-pagination__list {
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
    margin: 0;
}
.site-pagination__list {
    --bs-pagination-color: var(--color-primary);
    --bs-pagination-hover-color: var(--color-primary-dark);
    --bs-pagination-focus-color: var(--color-primary-dark);
    --bs-pagination-active-bg: var(--color-primary);
    --bs-pagination-active-border-color: var(--color-primary);
}
/* Ô tách rời nhau (gap) nên bỏ lề âm và góc bo riêng ô đầu/cuối của Bootstrap */
.site-pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    margin-left: 0;
    border-radius: 10px;
    font-weight: 600;
}

/* ======================================================================
   DÙNG CHUNG CHO TRANG SẢN PHẨM / GIỎ HÀNG / ĐẶT HÀNG
   ====================================================================== */
.page-title {
    margin-bottom: 1.25rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-heading);
}
@media (max-width: 575.98px) {
    .page-title { font-size: 1.3rem; }
}

/* Thông báo (thêm giỏ hàng, cập nhật, lỗi) */
.site-alert {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 1rem;
    font-size: .95rem;
}
.site-alert__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.site-alert__link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 .85rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}
.site-alert__link--primary {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #fff;
}

/* Nút chính màu cam (Mua ngay, Đặt hàng) và nút viền xanh (Thêm vào giỏ) */
.btn-buy-now,
.btn-cart-add {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: .4rem 1rem;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn-buy-now {
    border: 0;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: #fff;
    text-transform: uppercase;
    box-shadow: 0 6px 16px rgba(232, 80, 26, .28);
}
.btn-buy-now:hover,
.btn-buy-now:focus-visible {
    color: #fff;
    box-shadow: 0 8px 20px rgba(232, 80, 26, .4);
}
.btn-buy-now:disabled {
    opacity: .7;
}
.btn-buy-now--inline {
    width: auto;
    padding: .4rem 1.75rem;
}
.btn-buy-now__sub {
    font-size: .8125rem;
    font-weight: 500;
    text-transform: none;
    opacity: .9;
}
.btn-cart-add {
    flex-direction: row;
    gap: .5rem;
    border: 2px solid var(--color-primary);
    background: #fff;
    color: var(--color-primary);
}
.btn-cart-add:hover,
.btn-cart-add:focus-visible {
    background: var(--color-primary);
    color: #fff;
}
.btn-cart-add__icon {
    width: 22px;
    height: 22px;
}

/* Ô số lượng có nút − / + */
.qty-stepper {
    display: inline-flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
}
.qty-stepper__btn {
    width: 44px;
    border: 0;
    background: #f1f5f9;
    color: var(--color-heading);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
}
.qty-stepper__btn:hover {
    background: #e2e8f0;
}
.qty-stepper__input {
    width: 60px;
    height: 44px;
    border: 0;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}
.qty-stepper__input::-webkit-outer-spin-button,
.qty-stepper__input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}
.qty-stepper__input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}
.qty-stepper--sm .qty-stepper__btn { width: 40px; }
.qty-stepper--sm .qty-stepper__input { width: 48px; height: 40px; }

/* ======================================================================
   TRANG CHI TIẾT SẢN PHẨM
   ====================================================================== */
.product-detail__media {
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}
.product-detail__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}
.product-detail__badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 1;
    padding: .3rem .75rem;
    border-radius: 999px;
    background: var(--color-price);
    color: #fff;
    font-weight: 700;
}
.product-detail__title {
    margin-bottom: .75rem;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--color-heading);
}
.product-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1.25rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    color: #64748b;
    font-size: .9rem;
}
.product-detail__meta strong {
    color: #334155;
}
.product-detail__stock {
    color: #16a34a;
}
.product-detail__stock--out {
    color: var(--color-price);
}
.product-detail__price-box {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .25rem .75rem;
    margin-bottom: 1rem;
    padding: .9rem 1rem;
    border-radius: 12px;
    background: #fff5f0;
}
.product-detail__price {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--color-price);
}
.product-detail__old-price {
    color: #94a3b8;
    font-size: 1rem;
}
.product-detail__save {
    padding: .1rem .5rem;
    border-radius: 6px;
    background: var(--color-price);
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
}
.product-detail__summary {
    margin-bottom: 1rem;
    color: #334155;
    line-height: 1.65;
}

/* Album ảnh: dải ảnh vuốt ngang, mỗi lần dừng đúng 1 ảnh */
.product-gallery__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}
.product-gallery__track::-webkit-scrollbar {
    display: none;
}
.product-gallery__track:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}
.product-gallery__slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}
.product-gallery__nav {
    position: absolute;
    top: 50%;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: var(--color-primary);
    box-shadow: 0 2px 10px rgba(15, 23, 42, .15);
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity .2s var(--ease), background-color .2s var(--ease);
}
.product-gallery__nav--prev { left: .75rem; }
.product-gallery__nav--next { right: .75rem; }
.product-detail__media:hover .product-gallery__nav,
.product-gallery__nav:focus-visible {
    opacity: 1;
}
.product-gallery__nav:hover {
    background: var(--color-primary);
    color: #fff;
}
.product-gallery__nav-icon {
    width: 22px;
    height: 22px;
}
.product-gallery__counter {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    padding: .15rem .6rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .6);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
}
.product-gallery__thumbs {
    display: flex;
    gap: .5rem;
    margin-top: .75rem;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}
.product-gallery__thumb {
    flex: 0 0 72px;
    padding: 0;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    transition: border-color .15s var(--ease);
}
.product-gallery__thumb:hover {
    border-color: var(--color-primary-light);
}
.product-gallery__thumb.is-active {
    border-color: var(--color-accent);
}
.product-gallery__thumb-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}
/* Màn cảm ứng không có rê chuột: luôn hiện nút ‹ › mờ nhẹ */
@media (hover: none) {
    .product-gallery__nav { opacity: .85; }
}
@media (max-width: 575.98px) {
    .product-gallery__thumb { flex-basis: 60px; }
}

/* Form mua hàng */
.product-buy__group {
    margin: 0 0 1rem;
    padding: 0;
    border: 0;
}
.product-buy__label {
    display: block;
    float: none;
    margin-bottom: .5rem;
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-heading);
}
.product-buy__required {
    color: var(--color-price);
}
.product-buy__error {
    margin: .4rem 0 0;
    color: var(--color-price);
    font-size: .875rem;
    font-weight: 500;
}
.product-buy__actions {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: .75rem;
    margin-top: 1.25rem;
}
.product-buy__out {
    padding: .75rem 1rem;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-weight: 600;
}

/* Chọn size hạt: radio ẩn, nhãn dạng nút */
.size-picker {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.size-picker__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.size-picker__option {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 1.1rem;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s var(--ease), color .15s var(--ease), background-color .15s var(--ease);
}
.size-picker__option:hover {
    border-color: var(--color-primary-light);
}
.size-picker__input:checked + .size-picker__option {
    border-color: var(--color-primary);
    background: #eef5ff;
    color: var(--color-primary);
}
.size-picker__input:focus-visible + .size-picker__option {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Gọi đặt hàng + cam kết */
.product-hotline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 48px;
    margin-top: .75rem;
    padding: .5rem 1rem;
    border: 1px dashed var(--color-accent);
    border-radius: 10px;
    color: var(--color-accent-dark);
    text-decoration: none;
}
.product-hotline:hover {
    background: #fff5f0;
    color: var(--color-accent-dark);
}
.product-hotline--inline {
    display: inline-flex;
    margin-top: 0;
}
.product-hotline__icon {
    width: 20px;
    height: 20px;
}
.product-usp {
    display: grid;
    gap: .5rem;
    margin: 1.25rem 0 0;
    padding: 1rem;
    border-radius: 12px;
    background: #f1f7ff;
    list-style: none;
    font-size: .9rem;
    color: #334155;
}
.product-usp__item {
    display: flex;
    align-items: center;
    gap: .6rem;
}
.product-usp__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

/* Nội dung chi tiết */
.product-content {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}
.product-content__title {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-primary);
}
.product-content__body {
    max-width: 860px;
}
.product-content__body h3 {
    margin: 1.75rem 0 .75rem;
    color: var(--color-heading);
    font-size: 1.2rem;
    font-weight: 700;
}
.product-content__body h4 {
    margin: 1.25rem 0 .4rem;
    color: var(--color-heading);
    font-size: 1.02rem;
    font-weight: 700;
}
.product-content__body > :first-child {
    margin-top: 0;
}
.product-content__body th {
    width: 40%;
    background: #f1f7ff;
    color: var(--color-heading);
    font-weight: 600;
}
.product-content__body thead th {
    width: auto;
}
.product-content__body ul {
    padding-left: 1.25rem;
}
.product-content__body li + li {
    margin-top: .35rem;
}
.product-content__body :is(h2, h3) > a {
    display: inline-block;
    padding: .5rem 0;
}
.product-content__body a {
    color: var(--color-primary);
    font-weight: 600;
}
@media (max-width: 575.98px) {
    .product-content__body { font-size: .95rem; }
    .product-content__body h3 { font-size: 1.08rem; }
    .product-content__body h4 { font-size: .98rem; }
    .product-content__body th, .product-content__body td { padding: .45rem .6rem; }
}
.product-content__body table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}
.product-content__body th,
.product-content__body td {
    padding: .5rem .75rem;
    border: 1px solid #e2e8f0;
}
.product-related {
    margin-top: 3rem;
}

/* Thanh mua hàng cố định đáy màn hình — chỉ trên điện thoại */
.product-buybar {
    display: none;
}
@media (max-width: 767.98px) {
    .product-detail__title { font-size: 1.3rem; }
    .product-detail__price { font-size: 1.6rem; }
    .product-content { margin-top: 2rem; }

    .product-buybar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1030;
        display: flex;
        align-items: center;
        gap: .5rem;
        padding: .5rem 16px calc(.5rem + env(safe-area-inset-bottom));
        border-top: 1px solid #e2e8f0;
        background: #fff;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, .08);
    }
    .product-buybar__price {
        flex: 1;
        min-width: 0;
        color: var(--color-price);
        font-size: 1.15rem;
        font-weight: 800;
    }
    .product-buybar__cart {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        border: 2px solid var(--color-primary);
        border-radius: 10px;
        background: #fff;
        color: var(--color-primary);
    }
    .product-buybar__icon {
        width: 22px;
        height: 22px;
    }
    .product-buybar__buy {
        min-height: 48px;
        padding: 0 1.5rem;
        border: 0;
        border-radius: 10px;
        background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
        color: #fff;
        font-weight: 700;
        text-transform: uppercase;
    }
    /* Chừa chỗ để thanh cố định không che chân trang */
    .has-buybar { padding-bottom: 72px; }
}
@media (max-width: 575.98px) {
    .btn-buy-now, .btn-cart-add { font-size: .95rem; padding: .4rem .6rem; }
    .btn-cart-add { white-space: nowrap; }
    .btn-cart-add__icon { width: 20px; height: 20px; }
}
@media (max-width: 359.98px) {
    .product-buy__actions { grid-template-columns: 1fr; }
}

/* ======================================================================
   GIỎ HÀNG
   ====================================================================== */
.cart-empty {
    padding: 3rem 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    text-align: center;
}
.cart-empty__icon {
    width: 64px;
    height: 64px;
    color: #94a3b8;
}
.cart-empty__text {
    margin: 1rem 0 1.25rem;
    color: #64748b;
    font-size: 1.05rem;
}
/* Trang giỏ hàng + đặt hàng: một cột (sản phẩm, tiền → form người nhận, nút đặt); máy tính giới hạn bề ngang cho dễ đọc */
.cart-page {
    max-width: 760px;
    margin: 0 auto;
}
.cart-page .cart-page__totals {   /* thêm .cart-page để thắng margin của .order-summary__rows viết phía sau */
    margin: 1rem 0 0;
    padding: .5rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}
/* Form người nhận: chừa chỗ cho header cố định khi nhảy tới #thong-tin-dat-hang (nút Mua ngay) */
.cart-checkout {
    margin-top: 1rem;
    margin-bottom: 0;
    scroll-margin-top: 110px;
}
.cart-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}
.cart-item {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 1rem;
    align-items: start;
    padding: 1rem;
}
.cart-item + .cart-item {
    border-top: 1px solid #f1f5f9;
}
.cart-item__img {
    display: block;
    width: 96px;
    height: 96px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    object-fit: cover;
    background: #f8fafc;
}
.cart-item__info {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}
.cart-item__name {
    color: var(--color-heading);
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}
.cart-item__name:hover {
    color: var(--color-primary);
}
.cart-item__size {
    color: #64748b;
    font-size: .875rem;
}
.cart-item__price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .5rem;
    color: #334155;
    font-size: .9rem;
}
.cart-item__old-price {
    color: #94a3b8;
    font-size: .85rem;
}
.cart-item__discount {
    padding: .05rem .4rem;
    border-radius: 999px;
    background: var(--color-price);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
}
.cart-item__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin-top: .5rem;
}
.cart-item__qty-form {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.cart-item__update {
    min-height: 40px;
    padding: 0 .75rem;
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    background: #fff;
    color: var(--color-primary);
    font-size: .875rem;
}
.cart-item__remove {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    min-height: 40px;
    padding: 0 .5rem;
    border: 0;
    background: none;
    color: #64748b;
    font-size: .875rem;
}
.cart-item__remove:hover {
    color: var(--color-price);
}
.cart-item__remove-icon {
    width: 16px;
    height: 16px;
}
.cart-item__total {
    color: var(--color-price);
    font-weight: 700;
    white-space: nowrap;
}
.cart-continue {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    min-height: 44px;
    margin-top: .75rem;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
}
.cart-continue__icon {
    width: 18px;
    height: 18px;
}
@media (max-width: 575.98px) {
    .cart-item { grid-template-columns: 72px 1fr; gap: .75rem; }
    .cart-item__img { width: 72px; height: 72px; }
    /* Thành tiền xuống dưới, thẳng hàng phần thông tin */
    .cart-item__total { grid-column: 2; }
}

/* Khung tạm tính (giỏ hàng + đặt hàng) */
.order-summary {
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}
@media (min-width: 992px) {
    .order-summary--sticky { position: sticky; top: 96px; }
}
.order-summary__rows {
    margin: 0 0 1rem;
}
.order-summary__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .5rem 0;
    font-size: .95rem;
}
.order-summary__row dt {
    font-weight: 500;
    color: #64748b;
}
.order-summary__row dd {
    margin: 0;
    color: #1e293b;
    font-weight: 600;
    text-align: right;
}
.order-summary__row--total {
    margin-top: .25rem;
    padding-top: .75rem;
    border-top: 1px solid #e2e8f0;
}
.order-summary__row--total dd {
    color: var(--color-price);
    font-size: 1.3rem;
    font-weight: 800;
}
.order-summary__row--savings dt,
.order-summary__row--savings dd {
    color: #16a34a;
    font-weight: 700;
}
.order-summary__note {
    color: #64748b;
    font-size: .875rem;
    font-weight: 500;
}
.order-summary__hint {
    margin: .75rem 0 0;
    color: #64748b;
    font-size: .85rem;
    text-align: center;
}

/* ======================================================================
   TRANG ĐẶT HÀNG
   ====================================================================== */
.checkout-card {
    margin-bottom: 1.25rem;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}
.checkout-card__title {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-heading);
}
.checkout-field {
    margin-bottom: 1rem;
}
.checkout-field__label {
    display: block;
    margin-bottom: .35rem;
    font-size: .9rem;
    font-weight: 600;
    color: #334155;
}
.checkout-field__optional {
    color: #94a3b8;
    font-weight: 400;
}
.checkout-field__input {
    min-height: 46px;
    font-size: 1rem;   /* ≥16px để iPhone không tự phóng to khi nhập */
}
.cod-notice {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: .75rem;
    padding: .85rem 1rem;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    background: #f0fdf4;
}
.cod-notice__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: .1rem;
    color: #16a34a;
}
.cod-notice__text {
    margin: 0;
    color: #475569;
    font-size: .875rem;
    line-height: 1.5;
}
.cod-notice__title {
    display: block;
    color: #166534;
    font-size: .95rem;
}
.summary-items {
    margin: 0 0 .5rem;
    padding: 0;
    list-style: none;
}
.summary-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: .75rem;
    align-items: center;
    padding: .6rem 0;
}
.summary-item + .summary-item {
    border-top: 1px solid #f1f5f9;
}
.summary-item--plain {
    grid-template-columns: 1fr auto;
}
.summary-item__media {
    position: relative;
}
.summary-item__img {
    display: block;
    width: 56px;
    height: 56px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    object-fit: cover;
}
.summary-item__qty {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}
.summary-item__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.summary-item__name {
    display: -webkit-box;
    overflow: hidden;
    color: #1e293b;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.summary-item__total {
    font-weight: 700;
    white-space: nowrap;
}

/* Trang đặt hàng thành công */
.order-success {
    max-width: 720px;
    margin: 0 auto;
}
.order-success__head {
    margin-bottom: 1.5rem;
    text-align: center;
}
.order-success__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 2.25rem;
    font-weight: 700;
}
.order-success__title {
    margin-bottom: .5rem;
}
.order-success__lead {
    color: #334155;
    line-height: 1.7;
}
.order-success__code {
    color: var(--color-primary);
}
.order-success__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
}

/* ======================================================================
   CHÂN TRANG (bố cục giống shopdongho: nền tối, 4 cột, dải thông tin cuối)
   Nền xanh đen thay cho đen của shopdongho để hợp màu header; gạch chân tiêu đề vàng logo.
   ====================================================================== */
.site-footer {
    --footer-bg: #0a1f45;
    --footer-bg-bottom: #071733;
    --footer-text: #aab4c8;
    padding-top: 2.5rem;
    background: var(--footer-bg);
    color: var(--footer-text);
    font-size: 14px;
}
.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.3fr 1fr;
    gap: 32px;
    padding-bottom: 32px;
}
.site-footer__logo {
    display: inline-block;
    margin-bottom: 8px;
}
.site-footer__logo-img {
    display: block;
    width: auto;
    height: 56px;
}
.site-footer__desc {
    margin: 0;
    color: #8f9ab0;
    font-size: 14px;
    line-height: 1.7;
}
.site-footer__heading {
    display: inline-block;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-gold);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}
.site-footer__links,
.site-footer__contact {
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-footer__link {
    display: block;
    padding: 4px 0;
    color: var(--footer-text);
    line-height: 1.5;
    text-decoration: none;
    transition: color .15s var(--ease);
}
.site-footer__link:hover,
.site-footer__link:focus-visible {
    color: var(--color-gold);
}
.site-footer__link--inline {
    display: inline;
    padding: 0;
}
.site-footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
    line-height: 1.6;
}
.site-footer__contact-icon {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    margin-top: 3px;
    color: var(--color-gold);
}
.site-footer__bottom {
    padding: 16px 0 12px;
    background: var(--footer-bg-bottom);
}
.site-footer__bottom-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #6f7a91;
    font-size: 13px;
}

@media (max-width: 991.98px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px 24px; }
    /* màn cảm ứng (điện thoại, tablet): vùng bấm tối thiểu 44px */
    .site-footer__link { display: flex; align-items: center; min-height: 44px; padding: 0; }
    .site-footer__link--inline { display: inline-flex; min-height: 44px; }
}
@media (max-width: 575.98px) {
    /* Mobile vẫn giữ đủ các cột (Google đọc bản mobile), chỉ xếp lại: giới thiệu và liên hệ full ngang */
    .site-footer { padding-top: 2rem; }
    .site-footer__grid { gap: 24px 16px; }
    .site-footer__col--brand { grid-column: 1 / -1; }
    .site-footer__col:last-child { grid-column: 1 / -1; }
    .site-footer__bottom-inner { text-align: center; }
}
.site-footer__link--child {
    font-size: 14px;
}
.site-footer__link--child::before {
    content: '› ';
}

/* ======================================================================
   TRANG NỘI DUNG (Giới thiệu, chính sách, Liên hệ) + TRANG KIẾN THỨC
   ====================================================================== */
.static-page {
    max-width: 820px;
    margin: 0 auto;
}
.static-page__content {
    color: #1e293b;
    font-size: 1rem;
    line-height: 1.75;
}
.static-page__content h2 {
    margin: 1.75rem 0 .75rem;
    color: var(--color-heading);
    font-size: 1.25rem;
    font-weight: 700;
}
.static-page__content > :first-child {
    margin-top: 0;
}
.static-page__content ul {
    padding-left: 1.25rem;
}
.static-page__content li + li {
    margin-top: .35rem;
}
.static-page__content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.static-page__content a {
    color: var(--color-primary);
    font-weight: 600;
}
@media (max-width: 575.98px) {
    .static-page__content { font-size: .95rem; }
    .static-page__content h2 { font-size: 1.1rem; }
}

/* Khối liên lạc ở trang Liên hệ */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}
.contact-card {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    height: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    color: var(--color-heading);
    text-decoration: none;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
a.contact-card:hover,
a.contact-card:focus-visible {
    border-color: var(--color-primary);
    box-shadow: 0 6px 18px rgba(15, 55, 125, .12);
}
.contact-card__icon {
    width: 26px;
    height: 26px;
    margin-bottom: .35rem;
    color: var(--color-primary);
}
.contact-card--phone .contact-card__icon { color: var(--color-accent); }
.contact-card--zalo .contact-card__icon { color: #0068ff; }
.contact-card__label {
    color: #64748b;
    font-size: .875rem;
}
.contact-card__value {
    font-size: 1.05rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.contact-map {
    margin-top: 1.5rem;
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 9;
    background: #f1f5f9;
}
.contact-map__frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Hộp "Cần hỗ trợ?" cuối trang chính sách */
.help-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    border: 1px solid #bfd6f6;
    border-radius: 14px;
    background: #eef5ff;
}
.help-box__text {
    margin: 0;
    color: var(--color-heading);
}
.help-box__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.help-box__btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 1.1rem;
    border: 2px solid var(--color-primary);
    border-radius: 999px;
    background: #fff;
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
}
.help-box__btn--call {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #fff;
}
.help-box__btn:hover,
.help-box__btn:focus-visible {
    filter: brightness(.95);
}

/* Bài viết liên quan (cuối trang chi tiết bài viết) */
.article-related {
    margin-top: 3rem;
}

/* ======================================================================
   KHỐI NỘI DUNG SEO CUỐI TRANG (trang chủ, danh mục) — mục lục + "Xem thêm"
   Thân bài dùng chung kiểu chữ .product-content__body (bảng, h3, danh sách)
   ====================================================================== */
.seo-content {
    margin-top: 3rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
}
/* Mục lục tự sinh từ h2/h3 (khối SEO cuối trang + bài viết) */
.toc {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: #f1f7ff;
}
.toc__title {
    margin: 0 0 .5rem;
    color: var(--color-heading);
    font-weight: 800;
}
.toc__list {
    margin: 0;
    padding-left: 1.25rem;
}
.toc__item--h3 {
    margin-left: 1rem;
    list-style-type: circle;
}
/* Mục lục thu gọn (chỉ bật khi JS chạy): ẩn từ mục thứ 5 */
.toc.is-collapsed .toc__item--extra {
    display: none;
}
.toc__more {
    min-height: 40px;
    margin-top: .35rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-primary);
    font-weight: 700;
}
.toc__more::after {
    content: ' ▾';
}
.toc__more[aria-expanded="true"]::after {
    content: ' ▴';
}
.toc__more:hover,
.toc__more:focus-visible {
    text-decoration: underline;
}
.toc__item {
    padding: .2rem 0;
}
/* inline (không inline-block): tên mục dài xuống dòng thì số thứ tự vẫn nằm ở dòng đầu */
.toc__link {
    color: var(--color-primary);
    text-decoration: none;
}
.toc__link:hover,
.toc__link:focus-visible {
    text-decoration: underline;
}
.seo-content__body {
    max-width: none;
}
.seo-content__body h2 {
    margin: 1.75rem 0 .75rem;
    color: var(--color-primary);
    font-size: 1.3rem;
    font-weight: 800;
    scroll-margin-top: 110px;   /* chừa chỗ header cố định khi bấm mục lục */
}
.seo-content__body h3 {
    scroll-margin-top: 110px;
}
/* Thu gọn: chỉ bật khi JS chạy (Google và trình duyệt tắt JS vẫn thấy đủ bài) */
.seo-content__body.is-collapsed {
    max-height: 280px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 70%, transparent);
    mask-image: linear-gradient(#000 70%, transparent);
}
.seo-content__more {
    display: block;
    min-height: 44px;
    margin: 1rem auto 0;
    padding: 0 1.75rem;
    border: 2px solid var(--color-primary);
    border-radius: 999px;
    background: #fff;
    color: var(--color-primary);
    font-weight: 700;
}
.seo-content__more:hover,
.seo-content__more:focus-visible {
    background: var(--color-primary);
    color: var(--color-on-primary);
}
@media (max-width: 575.98px) {
    .seo-content { margin-top: 2rem; padding: 1rem; }
    .seo-content__body h2 { font-size: 1.12rem; }
}

/* ======================================================================
   TRANG KIẾN THỨC (/tin-tuc, /blog-cam-koi): chuyên mục bên trái + danh sách bài dạng hàng
   ====================================================================== */
.news-page {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}
.news-nav {
    position: sticky;
    top: 96px;
    padding: .6rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}
.news-nav__list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.news-nav__link {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: 44px;
    padding: .5rem .75rem;
    border-radius: 10px;
    color: var(--color-heading);
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s var(--ease), color .2s var(--ease);
}
.news-nav__link:hover,
.news-nav__link:focus-visible {
    background: #f1f7ff;
    color: var(--color-primary);
}
.news-nav__link.is-active {
    background: #fff4ee;
    color: var(--color-accent-dark);
}
.news-nav__icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}
.news-page__title {
    margin-bottom: .5rem;
}
.news-rows {
    margin: 0;
    padding: 0;
    list-style: none;
}
.news-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}
.news-row__media {
    display: block;
    overflow: hidden;
    aspect-ratio: 1200 / 630;
    border-radius: 10px;
    background: #f1f5f9;
}
.news-row__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s var(--ease);
}
.news-row:hover .news-row__img {
    transform: scale(1.04);
}
.news-row__title {
    display: -webkit-box;
    margin: 0 0 .35rem;
    overflow: hidden;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.news-row__link {
    color: var(--color-heading);
    text-decoration: none;
}
.news-row__link:hover,
.news-row__link:focus-visible {
    color: var(--color-primary);
}
.news-row__excerpt {
    display: -webkit-box;
    margin: 0 0 .5rem;
    overflow: hidden;
    color: #64748b;
    font-size: .92rem;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.news-row__meta {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin: 0;
    color: #94a3b8;
    font-size: .85rem;
}
.news-row__meta-icon {
    width: 15px;
    height: 15px;
}
@media (max-width: 991.98px) {
    /* Máy tính bảng / điện thoại: chuyên mục thành dải nút vuốt ngang phía trên danh sách */
    /* minmax(0, 1fr): dải nút không xuống dòng không được kéo cột rộng hơn màn hình */
    .news-page { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
    .news-nav { position: static; padding: 0; border: 0; background: none; }
    .news-nav__list {
        display: flex;
        gap: .5rem;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    .news-nav__list::-webkit-scrollbar { display: none; }
    .news-nav__link {
        border: 1px solid #cbd5e1;
        border-radius: 999px;
        background: #fff;
        white-space: nowrap;
    }
    .news-nav__link.is-active { border-color: var(--color-accent); }
}
@media (max-width: 575.98px) {
    .news-row { grid-template-columns: 130px minmax(0, 1fr); gap: .75rem; padding: .85rem 0; }
    .news-row__title { font-size: 1rem; }
    .news-row__excerpt { font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) {
    .news-row__img { transition: none; }
    .news-row:hover .news-row__img { transform: none; }
}

/* Bảng giá cám chèn trong bài viết ([bang-gia-cam]) */
.price-table th {
    white-space: nowrap;
}
.price-table td {
    vertical-align: middle;
}
.price-table__price {
    display: block;
    color: var(--color-accent-dark);
    white-space: nowrap;
}
.price-table__old {
    color: #64748b;
    font-size: .875rem;
    white-space: nowrap;
}
.price-table__note {
    display: block;
    color: #b91c1c;
    font-size: .875rem;
}
/* Điện thoại: mỗi sản phẩm thành một thẻ để giá và giá/kg luôn thấy được, không phải vuốt ngang */
@media (max-width: 575.98px) {
    .article-detail__content figure.price-table table {
        display: block;
        min-width: 0;
    }
    .price-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }
    .price-table tbody {
        display: block;
    }
    .price-table tr {
        display: grid;
        grid-template-columns: auto 1fr 1fr;
        gap: .25rem .75rem;
        padding: .75rem 0;
        border-bottom: 1px solid #e2e8f0;
    }
    .article-detail__content .price-table td {
        display: block;
        padding: 0;
        border: 0;
    }
    .price-table td:first-child {
        grid-column: 1 / -1;
    }
    .price-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        color: #64748b;
        font-size: .8125rem;
    }
}

/* Công cụ tính thể tích hồ chèn trong bài viết ([tinh-the-tich-ho]) */
.pond-calc {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border: 1px solid #cfe0f5;
    border-radius: 12px;
    background: #f5f9ff;
}
.article-detail__content .pond-calc__title {
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-size: 1.125rem;
    font-weight: 700;
}
.pond-calc__fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}
.pond-calc__field--full {
    grid-column: 1 / -1;
}
.pond-calc__field[hidden] {
    display: none;
}
.pond-calc__label {
    display: block;
    margin-bottom: .25rem;
    color: #334155;
    font-size: .875rem;
    font-weight: 600;
}
/* 16px để iPhone không tự phóng to khi bấm vào ô nhập */
.pond-calc__input {
    width: 100%;
    min-height: 44px;
    padding: .5rem .75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 1rem;
}
.pond-calc__input:focus {
    border-color: var(--color-primary);
    outline: 2px solid rgba(27, 81, 163, .2);
}
.pond-calc__result {
    margin: 1.25rem 0 0;
    border-top: 1px solid #cfe0f5;
}
.pond-calc__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .6rem 0;
    border-bottom: 1px solid #e2e8f0;
}
.pond-calc__row dt {
    color: #475569;
    font-weight: 500;
}
.pond-calc__row dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
}
.pond-calc__row--main dd {
    color: var(--color-accent-dark);
    font-size: 1.125rem;
}
.article-detail__content .pond-calc__note {
    margin: .75rem 0 0;
    color: #64748b;
    font-size: .875rem;
}
@media (max-width: 575.98px) {
    .pond-calc {
        padding: 1rem;
    }
    .pond-calc__fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .pond-calc__row {
        flex-direction: column;
        gap: .15rem;
    }
    .pond-calc__row dd {
        text-align: left;
    }
}

/* Khung lưu ý tham khảo cuối bài về bệnh, thuốc (cờ has_disclaimer) */
.article-disclaimer {
    margin: 2rem 0 0;
    padding: 1rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--color-primary);
    border-radius: 0 12px 12px 0;
    background: #f8fafc;
    color: #475569;
    font-size: .9375rem;
}
.article-disclaimer p {
    margin-bottom: .5rem;
}
.article-disclaimer > :last-child {
    margin-bottom: 0;
}
.article-disclaimer__title {
    color: #1e293b;
    font-weight: 700;
}
.article-disclaimer a {
    color: var(--color-primary);
    font-weight: 600;
}
@media (max-width: 575.98px) {
    .article-disclaimer {
        padding: .85rem 1rem;
    }
}
