/* ============================================================
   BT BeauSans — Self-hosted font (BƯỚC 12)
   Đường dẫn: ../fonts/BT-BeauSans-*.ttf  (relative từ assets/css/)
   ============================================================ */

/* Light 300 */
@font-face {
    font-family: 'BT Beau Sans';
    src: url('../fonts/BT-BeauSans-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* Light Italic 300 */
@font-face {
    font-family: 'BT Beau Sans';
    src: url('../fonts/BT-BeauSans-LightItalic.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

/* Regular 400 — dùng Medium làm fallback nếu không có Regular */
@font-face {
    font-family: 'BT Beau Sans';
    src: url('../fonts/BT-BeauSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Italic 400 */
@font-face {
    font-family: 'BT Beau Sans';
    src: url('../fonts/BT-BeauSans-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

/* Medium 500 */
@font-face {
    font-family: 'BT Beau Sans';
    src: url('../fonts/BT-BeauSans-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Bold 700 */
@font-face {
    font-family: 'BT Beau Sans';
    src: url('../fonts/BT-BeauSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Bold Italic 700 */
@font-face {
    font-family: 'BT Beau Sans';
    src: url('../fonts/BT-BeauSans-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* ExtraBold 800 */
@font-face {
    font-family: 'BT Beau Sans';
    src: url('../fonts/BT-BeauSans-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* ExtraBold Italic 800 */
@font-face {
    font-family: 'BT Beau Sans';
    src: url('../fonts/BT-BeauSans-ExtraBoldItalic.ttf') format('truetype');
    font-weight: 800;
    font-style: italic;
    font-display: swap;
}

/* ============================================================
   Duomita CMS — Premium Creative Studio Theme
   File: assets/css/style.css
   Primary: #267062 | Catholic Design & Print Brand
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Brand Colors */
    --primary: #267062;
    --primary-dark: #1b5249;
    --primary-light: #eaf4f1;
    --primary-mid: #d0ebe5;
    --accent: #c9a84c;
    --accent-light: #fdf6e3;

    /* Neutrals */
    --text: #1c2b27;
    --text-muted: #5c6e69;
    --text-light: #92a29e;
    --bg: #ffffff;
    --bg-cream: #fdfcf9;
    --surface: #ffffff;
    --border: #e2ebe8;
    --border-light: #eef3f1;

    /* Shapes */
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 100px;

    /* Shadows */
    --shadow-xs: 0 1px 3px rgba(26,67,56,.06);
    --shadow-sm: 0 2px 8px rgba(26,67,56,.08);
    --shadow: 0 6px 24px rgba(26,67,56,.10);
    --shadow-lg: 0 16px 48px rgba(26,67,56,.14);
    --shadow-hover: 0 12px 40px rgba(38,112,98,.16);

    /* Type */
    --font-display: 'BT Beau Sans', Arial, sans-serif;
    --font-body: 'BT Beau Sans', Arial, sans-serif;
    --max-w: 1200px;
    --transition: .25s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; background: #ffffff; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
button { cursor: pointer; }

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.display-font { font-family: var(--font-display); }

/* ============================================================
   GOOGLE FONTS IMPORT
   ============================================================ */
/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 200;
    transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 1rem;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
    text-decoration: none;
    flex-shrink: 0;
}
.site-logo:hover { text-decoration: none; }

.logo-mark {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(38,112,98,.3);
}
.logo-img { height: 36px; width: auto; object-fit: contain; }
.logo-img-footer { height: 32px; width: auto; object-fit: contain; filter: brightness(0) invert(1); }

.site-logo span {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: .01em;
}

/* Nav */
.site-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
}
.site-nav a {
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: .45rem .85rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    position: relative;
    white-space: nowrap;
}
.site-nav a:hover,
.site-nav a.active {
    color: var(--primary);
    background: var(--primary-light);
}
.site-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

.nav-cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: all var(--transition);
}
.nav-cart:hover { color: var(--primary); background: var(--primary-light); }
.nav-cart.active { color: var(--primary); }

.nav-cart-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--primary);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.nav-admin {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted) !important;
    border: 1px solid var(--border);
    padding: .35rem .8rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    white-space: nowrap;
}
.nav-admin:hover {
    color: var(--primary) !important;
    border-color: var(--primary);
    background: var(--primary-light);
    text-decoration: none;
}

.nav-account {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted) !important;
    padding: .35rem .7rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    white-space: nowrap;
}
.nav-account:hover,
.nav-account.active {
    color: var(--primary) !important;
    background: var(--primary-light);
    text-decoration: none;
}
.nav-account-name {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 640px) {
    .nav-account-name { display: none; }
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: .4rem;
    color: var(--text);
    border-radius: var(--radius);
    transition: background var(--transition);
}
.nav-toggle:hover { background: var(--primary-light); color: var(--primary); }

/* ============================================================
   MOBILE NAV
   ============================================================ */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .site-nav {
        display: none;
        position: fixed;
        top: var(--site-header-h, 68px);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: .25rem;
        overflow-y: auto;
        z-index: 199;
        border-top: 1px solid var(--border-light);
    }
    .site-nav.open { display: flex; }
    .site-nav a {
        font-size: 1.05rem;
        padding: .9rem 1rem;
        border-radius: var(--radius);
    }
    .site-nav a.active::after { display: none; }
}

/* ============================================================
   CONTENT EDGE FADE — blur overlay at bottom of main content
   ============================================================ */
.content-edge-fade {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    pointer-events: none;
    z-index: 10;
    background: transparent;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 60%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 60%);
}
@media (prefers-reduced-motion: reduce) {
    .content-edge-fade { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ============================================================
   FOOTER — light background
   ============================================================ */

.site-footer {
    background: var(--surface);
    color: var(--text);
    margin-top: 0rem;
    position: relative;
    overflow: hidden;
}
.site-footer .container { position: relative; z-index: 2; }

/* ── CTA block ────────────────────────────────────────────── */
.footer-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 4rem 0 3.5rem;
    text-decoration: none;
    color: var(--text);
    transition: color .28s;
}
.footer-cta-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.15;
    transition: color .28s;
}
.footer-cta-arrow {
    flex-shrink: 0;
    color: var(--text);
    transition: color .28s, transform .35s cubic-bezier(.4,0,.2,1);
}
.footer-cta-arrow svg { display: block; width: 52px; height: 52px; }
.footer-cta:hover { color: var(--primary); }
.footer-cta:hover .footer-cta-arrow { color: var(--primary); transform: translateX(8px); }

/* ── Rule lines ───────────────────────────────────────────── */
.footer-rule {
    width: 100%;
    border: none;
    border-top: 0.5px solid rgba(0,0,0,.1);
    margin: 0;
}

/* ── 4-column grid ────────────────────────────────────────── */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr 1fr;
    gap: 2.5rem;
    padding: 2.75rem 0;
    align-items: start;
}
.footer-col-title {
    font-size: .7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.footer-col-nav { display: flex; flex-direction: column; gap: 0; }
.footer-col-link {
    display: block;
    font-size: .875rem;
    color: var(--text-muted);
    text-decoration: none;
    line-height: 1.95;
    transition: color .22s;
    white-space: nowrap;
}
.footer-col-link:hover { color: var(--primary); }

/* Contact card */
.footer-contact-card { display: flex; flex-direction: column; gap: 0; }
.footer-contact-row {
    display: grid;
    grid-template-columns: 52px 1fr;
    font-size: .82rem;
    line-height: 1.7;
    align-items: baseline;
}
.footer-contact-key { font-size: .72rem; color: var(--text-light); padding-top: .08rem; }
.footer-contact-val { color: var(--text); }
.footer-contact-val a { color: var(--text); text-decoration: none; transition: color .22s; }
.footer-contact-val a:hover { color: var(--primary); }

/* ── Bottom bar ───────────────────────────────────────────── */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 3rem 0;
    flex-wrap: wrap;
}
.footer-copy { font-size: .78rem; color: var(--text-light); }
.footer-platforms { display: flex; align-items: center; gap: 2rem; }
.platform-link {
    display: flex; align-items: center;
    opacity: .82;
    transition: opacity .22s, transform .22s;
}
.platform-link:hover { opacity: 1; transform: translateY(-2px); }
.platform-logo { display: block; width: auto; }
.platform-logo--shopee { height: 35px; }
.platform-logo--tiktok { height: 28px; }

/* ── Scroll to top ────────────────────────────────────────── */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 34px;
    height: 34px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .3s, transform .3s, background .2s;
    z-index: 500;
    box-shadow: 0 3px 12px rgba(38,112,98,.3);
    pointer-events: none;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ── DUOMITA brand zone ───────────────────────────────────── */
.footer-brand-zone {
    overflow: hidden; height: 9vw; min-height: 60px; max-height: 130px;
    position: relative; margin-top: .5rem;
}
.footer-brand-zone span {
    display: block; position: absolute; top: 0; left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(5rem, 19vw, 15rem); line-height: 1;
    letter-spacing: .03em; color: rgba(0,0,0,.055);
    white-space: nowrap; pointer-events: none; user-select: none;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 2.25rem; }
    .footer-brand-zone { height: 10vw; }
}
@media (max-width: 768px) {
    /* Ẩn CTA trên mobile */
    .footer-cta-wrap { display: none; }
}
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
    .footer-grid .footer-col:nth-child(2) { grid-column: 1 / -1; }
    .footer-brand-zone { height: 13vw; min-height: 44px; }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 1.5rem 0;
    }
    .footer-platforms { align-self: flex-start; gap: 1.5rem; }
    .footer-col-title { margin-bottom: .75rem; }
    .footer-contact-row { grid-template-columns: 44px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .footer-cta, .footer-cta-arrow, .footer-col-link,
    .footer-contact-val a, .platform-link, .scroll-top { transition: none !important; }
}

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 3rem 0 2.5rem;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23fff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero-inner { position: relative; z-index: 1; }
.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: .35rem;
}
.page-hero p {
    opacity: .78;
    font-size: .95rem;
    max-width: 560px;
}
.breadcrumb {
    display: flex;
    gap: .4rem;
    align-items: center;
    font-size: .8rem;
    opacity: .65;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}
.breadcrumb a { color: #fff; }
.breadcrumb span { opacity: .6; }

/* ============================================================
   SECTION LAYOUT
   ============================================================ */
.section { padding: 5rem 0; }
.section-sm { padding: 3.5rem 0; }

.section-header { margin-bottom: 2.75rem; }
.section-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.section-eyebrow {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--primary);
    margin-bottom: .6rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.section-eyebrow::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.25rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
}
.section-title span { color: var(--primary); }

.section-subtitle {
    font-size: .95rem;
    color: var(--text-muted);
    margin-top: .6rem;
    max-width: 540px;
    line-height: 1.7;
}

.section-more-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .83rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    padding: .4rem .9rem;
    border: 1px solid var(--primary-mid);
    border-radius: var(--radius-pill);
    transition: all var(--transition);
    flex-shrink: 0;
}
.section-more-link:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.section-footer { text-align: center; margin-top: 3rem; }

.home-section-light { background: var(--bg); }
.home-section-white { background: var(--bg-cream); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.75rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: .9rem;
    border: 2px solid var(--primary);
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(38,112,98,.3);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.75rem;
    background: transparent;
    color: var(--primary);
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: .9rem;
    border: 2px solid var(--primary);
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(38,112,98,.25);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.5rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: .875rem;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-ghost:hover {
    background: var(--primary-mid);
    text-decoration: none;
}

.btn-sm { padding: .5rem 1.1rem !important; font-size: .82rem !important; }

.btn-danger-outline {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1.1rem;
    background: transparent;
    color: #dc3545;
    border: 1.5px solid #dc3545;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: .82rem;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-danger-outline:hover {
    background: #dc3545;
    color: #fff;
}

/* Read more link */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--primary);
    transition: gap var(--transition);
}
.read-more:hover { gap: .6rem; }

/* ============================================================
   CARDS - SHARED BASE
   ============================================================ */
.card-base {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}
.card-base:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

/* Image placeholder */
.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-mid) 100%);
    color: var(--primary);
}
.img-placeholder svg { opacity: .4; }
.img-placeholder span { font-size: .7rem; opacity: .45; font-weight: 500; letter-spacing: .05em; }

/* Badges */
.cat-badge {
    display: inline-flex;
    align-items: center;
    background: var(--primary-light);
    color: var(--primary);
    font-size: .68rem;
    font-weight: 700;
    padding: .22rem .6rem;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    letter-spacing: .03em;
}
.feat-badge {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    padding: .2rem .55rem;
    border-radius: var(--radius-pill);
}

/* ============================================================
   POST CARDS
   ============================================================ */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition);
    text-decoration: none;
    color: inherit;
}
.post-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); text-decoration: none; }

.post-card-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--primary-light);
    position: relative;
    flex-shrink: 0;
}
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-thumb .img-placeholder { position: absolute; inset: 0; }

.post-card-thumb .feat-badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
    z-index: 1;
}

.post-card-body { padding: 1.25rem 1.4rem 1.4rem; display: flex; flex-direction: column; flex: 1; }

.post-card-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .65rem;
    flex-wrap: wrap;
}

.post-date {
    font-size: .75rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: .25rem;
}

.post-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.45;
    margin-bottom: .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}
.post-card:hover .post-card-title { color: var(--primary); }

.post-card-excerpt {
    font-size: .855rem;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    margin-top: 1rem;
    padding-top: .85rem;
    border-top: 1px solid var(--border-light);
}

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.prod-grid {
    display: grid;
    gap: 1.5rem;
}
.prod-grid-4 { grid-template-columns: repeat(4, 1fr); }
.prod-grid-3 { grid-template-columns: repeat(3, 1fr); }
.prod-grid-5 { grid-template-columns: repeat(5, 1fr); }
.prod-grid-tight { gap: .9rem; }
@media (min-width: 1025px) {
    .prod-grid-5.prod-grid-tight { gap: .6rem; }
}
@media (max-width: 1024px) { .prod-grid-4, .prod-grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .prod-grid-4, .prod-grid-3, .prod-grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .prod-grid-4, .prod-grid-3, .prod-grid-5 { grid-template-columns: 1fr; } }

.prod-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition);
}
.prod-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }

.prod-card-link { display: flex; flex-direction: column; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.prod-card-link:hover { text-decoration: none; color: inherit; }

.prod-card-thumb {
    aspect-ratio: 1/1;
    overflow: hidden;
    background: var(--primary-light);
    position: relative;
    flex-shrink: 0;
}
.prod-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.prod-card:hover .prod-card-thumb img { transform: scale(1.06); }
.prod-card-thumb .img-placeholder { position: absolute; inset: 0; }

.prod-badges {
    position: absolute;
    top: .65rem;
    left: .65rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    z-index: 1;
}
.prod-badge {
    display: inline-flex;
    align-items: center;
    font-size: .62rem;
    font-weight: 800;
    padding: .2rem .55rem;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}
.badge-sale { background: #e53e3e; color: #fff; }
.badge-new { background: var(--primary); color: #fff; }
.badge-hot { background: #ed8936; color: #fff; }
.badge-featured { background: var(--accent); color: #fff; }

.prod-shopee-badge {
    position: absolute;
    bottom: .65rem;
    right: .65rem;
    width: 30px;
    height: 30px;
    background: #ee4d2d;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    z-index: 1;
    text-decoration: none;
}

.prod-card-footer {
    margin-top: auto;
    padding-top: .85rem;
    border-top: 1px solid var(--border-light);
}

/* Badge giảm giá — góc trên phải ảnh đại diện, dạng nhãn nhỏ gọn, an toàn không lỗi hình */
.prod-badge-sale-corner {
    position: absolute; top: .5rem; right: .5rem; z-index: 1;
    background: #dc2626; color: #fff;
    font-size: .68rem; font-weight: 800; letter-spacing: .01em; line-height: 1;
    padding: .32rem .5rem; border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.prod-card-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.prod-card-body-tight { padding-top: .65rem; padding-bottom: .4rem; }
.prod-card-title-tight { margin-top: 0; }

.prod-card-title {
    font-size: .925rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.45;
    margin: .45rem 0 .6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}
.prod-card:hover .prod-card-title { color: var(--primary); }

.prod-price-wrap { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .75rem; }
.prod-price-wrap.prod-price-anchor { margin-top: auto; margin-bottom: 0; }
.prod-price-main { font-size: 1.15rem; font-weight: 800; color: var(--primary); line-height: 1.2; }
.prod-price-main.is-sale { color: #e53e3e; }
.prod-price { font-size: 1.05rem; font-weight: 800; color: var(--primary); }
.prod-price-sale { font-size: 1.05rem; font-weight: 800; color: #e53e3e; }
.prod-price-row-sub { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.prod-price-discount-pill {
    display: inline-flex; align-items: center;
    background: #f1f4f8; color: #6b7785;
    font-size: .68rem; font-weight: 700;
    padding: .1rem .4rem; border-radius: 4px;
    line-height: 1.4;
}
.prod-price-old { font-size: .78rem; color: var(--text-light); text-decoration: line-through; }
.prod-price-contact { font-size: .88rem; color: var(--text-muted); font-weight: 600; font-style: italic; }

/* Dòng hành động dưới cùng — kẻ phân cách + "Thêm vào giỏ hàng" dạng dòng phẳng (kiểu Tiki) */
.prod-card-cart-form { padding: .4rem .9rem; margin-top: .2rem; border-top: 1px solid var(--border-light); }
.btn-add-cart-card {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: .4rem;
    padding: 0; border-radius: 0;
    background: none; border: none; color: var(--primary);
    font-family: inherit; font-size: .82rem; font-weight: 700; cursor: pointer;
    transition: var(--transition);
}
.btn-add-cart-card:hover { color: var(--primary-dark, var(--primary)); text-decoration: none; }
@media (min-width: 1025px) {
    .prod-grid-5 .btn-add-cart-card { padding: .35rem .3rem; font-size: .82rem; gap: .4rem; white-space: nowrap; }
    .prod-grid-5 .prod-price-wrap { gap: .25rem; }
    .prod-grid-5 .prod-price-main { font-size: 1rem; }
    .prod-grid-5 .prod-price-old { font-size: .72rem; }
    .prod-grid-5 .prod-price-discount-pill { font-size: .64rem; }
}




/* ── Cart toast (thông báo thêm vào giỏ, không rời trang) ──── */
.cart-toast-stack {
    position: fixed; z-index: 9999;
    right: 1.25rem; bottom: 1.25rem;
    display: flex; flex-direction: column; gap: .6rem;
    pointer-events: none;
}
.cart-toast {
    display: flex; align-items: center; gap: .6rem;
    background: #fff; color: var(--text, #1a1a1a);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: .8rem 1.1rem;
    min-width: 230px; max-width: 320px;
    border-left: 4px solid var(--primary);
    font-size: .85rem; font-weight: 600;
    opacity: 0; transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: auto;
}
.cart-toast.is-visible { opacity: 1; transform: translateY(0); }
.cart-toast.is-error { border-left-color: #e53e3e; }
.cart-toast-icon {
    flex: none; width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.cart-toast.is-error .cart-toast-icon { background: #e53e3e; }
.cart-toast-text { flex: 1; line-height: 1.35; }
.cart-toast-view {
    flex: none; font-size: .78rem; font-weight: 700; color: var(--primary);
    white-space: nowrap;
}
@media (max-width: 560px) {
    .cart-toast-stack { left: 1rem; right: 1rem; bottom: 1rem; }
    .cart-toast { min-width: 0; max-width: none; }
}

/* ============================================================
   PROJECT CARDS
   ============================================================ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 960px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .project-grid { grid-template-columns: 1fr; } }

.project-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition);
    text-decoration: none;
    color: inherit;
}
.project-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); text-decoration: none; }

.project-card-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--primary-light);
    position: relative;
    flex-shrink: 0;
}
.project-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project-card:hover .project-card-thumb img { transform: scale(1.05); }
.project-card-thumb .img-placeholder { position: absolute; inset: 0; }

.project-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(27,82,73,.7) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}
.project-card:hover .project-card-overlay { opacity: 1; }

.project-view-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #fff;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 700;
    padding: .4rem .9rem;
    border-radius: var(--radius-pill);
}

.project-card-body { padding: 1.1rem 1.3rem 1.3rem; display: flex; flex-direction: column; flex: 1; }

.project-card-title {
    font-size: .975rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.45;
    margin: .45rem 0 .45rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}
.project-card:hover .project-card-title { color: var(--primary); }

.project-card-meta {
    display: flex;
    gap: .6rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: auto;
}

.project-meta-item {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .77rem;
    color: var(--text-light);
}

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 960px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .service-grid { grid-template-columns: 1fr; } }

.service-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), transform var(--transition);
    text-decoration: none;
    color: inherit;
}
.service-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); text-decoration: none; }

.service-card-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--primary-light);
    position: relative;
    flex-shrink: 0;
}
.service-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.service-card:hover .service-card-thumb img { transform: scale(1.05); }
.service-card-thumb .img-placeholder { position: absolute; inset: 0; }

.service-icon-overlay {
    position: absolute;
    top: .75rem;
    left: .75rem;
    background: rgba(255,255,255,.92);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.service-thumb-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-mid) 100%);
}
.service-icon-big { font-size: 3rem; }

.service-card-body { padding: 1.25rem 1.4rem 1.4rem; display: flex; flex-direction: column; flex: 1; }

.service-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
    margin: .45rem 0 .55rem;
    transition: color var(--transition);
}
.service-card:hover .service-card-title { color: var(--primary); }

.service-card-excerpt {
    font-size: .855rem;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-card-footer {
    margin-top: 1rem;
    padding-top: .85rem;
    border-top: 1px solid var(--border-light);
}

/* ============================================================
   HOME - HERO
   ============================================================ */
.home-hero {
    background: linear-gradient(135deg, #f0f8f6 0%, var(--bg-cream) 60%, #fdf9f0 100%);
    padding: 5.5rem 0 4.5rem;
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(38,112,98,.08) 0%, transparent 70%);
    pointer-events: none;
}

.home-hero-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
}
@media (max-width: 768px) {
    .home-hero-inner { grid-template-columns: 1fr; }
    .home-hero-deco { display: none; }
}

.home-hero-text { max-width: 600px; }

.home-hero-eyebrow {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.home-hero-eyebrow::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    display: inline-block;
}

.home-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 1.25rem;
}
.home-hero-title .accent-text { color: var(--primary); font-style: italic; }

.home-hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 2.25rem;
    max-width: 480px;
}

.home-hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .875rem 2rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: .95rem;
    transition: all var(--transition);
    box-shadow: 0 6px 24px rgba(38,112,98,.3);
}
.btn-hero-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(38,112,98,.38);
    color: #fff;
    text-decoration: none;
}

.btn-hero-outline {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .875rem 2rem;
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: .95rem;
    transition: all var(--transition);
}
.btn-hero-outline:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
    text-decoration: none;
}

/* Hero Deco */
.home-hero-deco {
    position: relative;
    width: 280px;
    height: 280px;
    flex-shrink: 0;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
}
.deco-1 {
    width: 220px;
    height: 220px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-mid) 100%);
    top: 0;
    right: 0;
}
.deco-2 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--accent-light) 0%, rgba(201,168,76,.12) 100%);
    bottom: 10px;
    left: 10px;
    border: 2px solid rgba(201,168,76,.25);
}
.deco-cross {
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    font-size: 5rem;
    color: var(--primary);
    opacity: .15;
    font-family: serif;
    line-height: 1;
}

/* ============================================================
   HOME - STATS
   ============================================================ */
.home-stats {
    background: var(--primary);
    padding: 2.5rem 0;
}

.stats-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: 0 3.5rem;
    flex: 1;
    max-width: 220px;
}
@media (max-width: 560px) {
    .stat-item { padding: 0 1.5rem; }
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.stat-label {
    font-size: .78rem;
    font-weight: 500;
    color: rgba(255,255,255,.65);
    text-align: center;
    letter-spacing: .03em;
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(255,255,255,.18);
    flex-shrink: 0;
}

/* ============================================================
   HOME - BANNER CTA
   ============================================================ */
.home-banner {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--text) 0%, #2d4a44 100%);
    position: relative;
    overflow: hidden;
}
.home-banner-img {
    background-size: cover;
    background-position: center;
}
.home-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(28,43,39,.9) 0%, rgba(28,43,39,.75) 100%);
}
.home-banner-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    flex-wrap: wrap;
}
.home-banner-text h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 600;
    color: #fff;
    margin-bottom: .5rem;
}
.home-banner-text p {
    color: rgba(255,255,255,.68);
    font-size: .95rem;
    max-width: 480px;
}
.btn-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .9rem 2rem;
    background: #fff;
    color: var(--primary);
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: .95rem;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-banner-cta:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    text-decoration: none;
}

/* ============================================================
   HOME - FOOTER CTA
   ============================================================ */
.home-footer-cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}
.home-footer-cta::before {
    content: '✝';
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12rem;
    color: rgba(255,255,255,.05);
    font-family: serif;
    line-height: 1;
    pointer-events: none;
}
.home-footer-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.home-footer-cta-text h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 600;
    color: #fff;
    margin-bottom: .5rem;
}
.home-footer-cta-text p { color: rgba(255,255,255,.7); font-size: .95rem; max-width: 500px; }

.btn-cta-white {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .9rem 2rem;
    background: #fff;
    color: var(--primary);
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: .95rem;
    flex-shrink: 0;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-cta-white:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    text-decoration: none;
}

/* ============================================================
   HOME NEWS GRID
   ============================================================ */
.home-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 960px) { .home-news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .home-news-grid { grid-template-columns: 1fr; } }

/* Home projects grid */
.home-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 960px) { .home-projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .home-projects-grid { grid-template-columns: 1fr; } }

/* Home services grid */
.home-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
@media (max-width: 960px) { .home-services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .home-services-grid { grid-template-columns: 1fr; } }

/* Home empty state */
.home-empty-state {
    text-align: center;
    padding: 3.5rem 1rem;
    color: var(--text-muted);
}
.home-empty-state p { font-size: .9rem; margin-top: .75rem; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.4rem;
    margin-bottom: 2.25rem;
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: var(--shadow-xs);
}

.filter-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: .5rem .9rem;
    background: var(--bg);
    flex: 1;
    min-width: 180px;
    transition: border-color var(--transition);
}
.filter-search:focus-within { border-color: var(--primary); }
.filter-search input {
    border: none;
    background: none;
    outline: none;
    font-size: .875rem;
    color: var(--text);
    width: 100%;
}
.filter-search svg { color: var(--text-light); flex-shrink: 0; }

.filter-cats { display: flex; gap: .4rem; flex-wrap: wrap; }

.filter-cat-btn {
    padding: .38rem .9rem;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1;
}
.filter-cat-btn:hover,
.filter-cat-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    text-decoration: none;
}

.filter-submit {
    padding: .5rem 1.2rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
    transition: background var(--transition);
    white-space: nowrap;
}
.filter-submit:hover { background: var(--primary-dark); }

.results-info {
    font-size: .82rem;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: .35rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 .8rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    background: var(--surface);
    transition: all var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn.disabled { opacity: .35; pointer-events: none; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 5rem 1rem;
    color: var(--text-muted);
}
.empty-state svg { margin: 0 auto 1.25rem; opacity: .25; }
.empty-state h3 { font-size: 1.1rem; color: var(--text); margin-bottom: .5rem; }
.empty-state p { font-size: .9rem; max-width: 320px; margin: 0 auto 1.25rem; }

/* ============================================================
   DETAIL PAGES
   ============================================================ */

/* Hero image */
.detail-hero-img {
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 2rem;
    aspect-ratio: 16/7;
    background: var(--primary-light);
    position: relative;
}
.detail-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero-img .img-placeholder { position: absolute; inset: 0; border-radius: 0; }

/* Article layout */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
    padding: 3rem 0;
}
@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; gap: 2.5rem; } }

.article-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: .84rem;
    color: var(--text-muted);
}

.article-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.25rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
    margin-bottom: .9rem;
}

.article-excerpt {
    font-size: 1.02rem;
    color: var(--text-muted);
    border-left: 3px solid var(--primary);
    padding-left: 1.1rem;
    margin-bottom: 2rem;
    font-style: italic;
    line-height: 1.8;
    background: var(--primary-light);
    padding: 1rem 1.1rem 1rem 1.4rem;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.article-divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 0 0 2rem;
}

.article-content {
    font-size: .975rem;
    line-height: 1.9;
    color: var(--text);
    overflow-wrap: anywhere;
    word-break: break-word;
}
.article-content h1 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin: 1.8rem 0 .35rem; color: var(--text); line-height: 1.25; }
.article-content h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; margin: 2rem 0 .75rem; color: var(--text); }
.article-content h3 { font-size: 1.1rem; font-weight: 700; margin: 1.75rem 0 .65rem; }
.article-content p { margin-bottom: 1.2rem; }
.article-content ul, .article-content ol { padding-left: 1.6rem; margin-bottom: 1.2rem; }
.article-content li { margin-bottom: .4rem; }
.article-content strong { font-weight: 700; }
.article-content a { color: var(--primary); text-decoration: underline; }
.article-content img { border-radius: var(--radius); margin: 1.5rem 0; }
/* Canh lề do trình soạn thảo (Quill) sinh ra */
.article-content .ql-align-center  { text-align: center; }
.article-content .ql-align-right   { text-align: right; }
.article-content .ql-align-justify { text-align: justify; }
.article-content .ql-align-left    { text-align: left; }
.article-content blockquote {
    border-left: 3px solid var(--primary);
    padding: .9rem 1.2rem .9rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--primary-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-muted);
}

/* Sidebar */
.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-xs);
}
.sidebar-card-title {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-bottom: .7rem;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: .45rem;
}
.sidebar-card-title::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--primary);
    border-radius: 2px;
    display: inline-block;
}

.related-item {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .7rem 0;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
}
.related-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-item:hover { text-decoration: none; }

.rel-thumb {
    width: 62px;
    height: 54px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--primary-light);
    position: relative;
}
.rel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rel-thumb .img-placeholder { border-radius: 0; }

.rel-title {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}
.related-item:hover .rel-title { color: var(--primary); }
.rel-date { font-size: .72rem; color: var(--text-light); margin-top: .2rem; }

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--text-muted);
    font-size: .875rem;
    margin-bottom: 1.5rem;
    text-decoration: none;
    transition: color var(--transition);
    border: 1px solid var(--border-light);
    padding: .4rem .85rem;
    border-radius: var(--radius-pill);
    background: var(--surface);
}
.back-link:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); text-decoration: none; }

/* Product detail specific */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: start;
    padding: 3rem 0;
}
@media (max-width: 768px) { .product-detail-grid { grid-template-columns: 1fr; gap: 2rem; } }

.product-gallery {
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 1/1;
    background: var(--primary-light);
    position: relative;
}
.product-gallery img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery .img-placeholder { position: absolute; inset: 0; border-radius: 0; }

.product-info-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
    margin-bottom: .75rem;
}

.product-price-block {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    margin: 1rem 0 1.5rem;
    flex-wrap: wrap;
}
.product-price-main { font-size: 1.65rem; font-weight: 800; color: var(--primary); }
.product-price-sale { font-size: 1.65rem; font-weight: 800; color: #e53e3e; }
.product-price-orig { font-size: 1rem; color: var(--text-light); text-decoration: line-through; }
.product-price-contact { font-size: 1.1rem; color: var(--text-muted); font-style: italic; font-weight: 600; }
.product-discount-tag {
    background: #e53e3e;
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
    padding: .2rem .6rem;
    border-radius: var(--radius-pill);
}

.product-desc {
    font-size: .93rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.add-to-cart-form { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.5rem; }

.qty-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
}
.qty-btn {
    background: none;
    border: none;
    width: 38px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 700;
}
.qty-btn:hover { background: var(--primary-light); color: var(--primary); }
.qty-input {
    width: 48px;
    height: 42px;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    outline: none;
    background: var(--surface);
}

.btn-add-cart {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem 1.75rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: .95rem;
    transition: all var(--transition);
    cursor: pointer;
    white-space: nowrap;
}
.btn-add-cart:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(38,112,98,.3);
}

.product-meta-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; font-size: .875rem; }
.product-meta-list li { display: flex; gap: .5rem; }
.product-meta-list .meta-key { color: var(--text-muted); min-width: 100px; flex-shrink: 0; }
.product-meta-list .meta-val { font-weight: 600; color: var(--text); }

/* ============================================================
   CART
   ============================================================ */
.cart-section { padding: 3rem 0 5rem; }
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }

.cart-main {}

.cart-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table thead { background: var(--bg); }
.cart-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
}
.cart-table th:last-child { text-align: right; }
.cart-table td {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
.cart-table tr:last-child td { border-bottom: none; }

.cart-product-cell { display: flex; align-items: center; gap: .9rem; }
.cart-thumb {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--primary-light);
    position: relative;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb .img-placeholder { border-radius: 0; }

.cart-prod-name { font-weight: 600; font-size: .9rem; color: var(--text); line-height: 1.4; }
.cart-prod-cat { font-size: .75rem; color: var(--text-light); margin-top: .15rem; }

.cart-qty-wrap {
    display: flex;
    align-items: center;
    gap: .3rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    width: fit-content;
    background: var(--surface);
}
.qty-btn-sm {
    background: none;
    border: none;
    width: 32px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 700;
    transition: all var(--transition);
}
.qty-btn-sm:hover { background: var(--primary-light); color: var(--primary); }
.cart-qty-input {
    width: 44px;
    height: 36px;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    font-size: .875rem;
    font-weight: 600;
    color: var(--text);
    outline: none;
    background: var(--surface);
}

.cart-price { font-weight: 700; color: var(--text); font-size: .95rem; }
.cart-sub { font-weight: 800; color: var(--primary); font-size: .95rem; text-align: right; }

.btn-remove-cart {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: .3rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.btn-remove-cart:hover { color: #e53e3e; background: #fff5f5; }

.cart-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border-top: 1px solid var(--border-light);
    gap: .75rem;
    flex-wrap: wrap;
}
.cart-actions-left { display: flex; gap: .5rem; flex-wrap: wrap; }

.cart-sidebar {}

.cart-summary-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: 90px;
}

.cart-summary-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.25rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.cart-summary-rows { display: flex; flex-direction: column; gap: .65rem; margin-bottom: 1.25rem; }

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: .88rem;
    color: var(--text-muted);
}
.cart-summary-row span:last-child { font-weight: 600; color: var(--text); }

.cart-summary-total {
    padding-top: .75rem;
    border-top: 1px solid var(--border-light);
    font-weight: 700 !important;
    color: var(--text) !important;
    font-size: 1rem !important;
}
.cart-summary-total span:last-child { color: var(--primary) !important; font-size: 1.15rem !important; }

.cart-summary-note {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    font-size: .78rem;
    color: var(--text-light);
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    padding: .9rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none;
    transition: all var(--transition);
}
.btn-checkout:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(38,112,98,.3);
    text-decoration: none;
    color: #fff;
}

/* Cart empty */
.cart-empty-state {
    text-align: center;
    padding: 5rem 2rem;
}
.cart-empty-state svg { margin: 0 auto 1.5rem; color: var(--primary); opacity: .2; }
.cart-empty-state h2 { font-family: var(--font-display); font-size: 1.6rem; color: var(--text); margin-bottom: .5rem; }
.cart-empty-state p { color: var(--text-muted); margin-bottom: 2rem; }

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout-section { padding: 3rem 0 5rem; }
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2.5rem; align-items: start; }
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } }

.checkout-form-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 2rem 2.25rem;
    box-shadow: var(--shadow-xs);
}
.checkout-form-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.75rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: .6rem;
}
.checkout-form-card h2 svg { color: var(--primary); }

.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: .45rem;
    letter-spacing: .02em;
}
.form-control {
    width: 100%;
    padding: .7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .9rem;
    color: var(--text);
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    font-family: var(--font-body);
    line-height: 1.5;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(38,112,98,.12);
}
.form-control.is-invalid { border-color: #e53e3e; }
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { resize: vertical; min-height: 110px; }

.form-error { font-size: .78rem; color: #e53e3e; margin-top: .35rem; display: flex; align-items: center; gap: .25rem; }
.form-hint { font-size: .78rem; color: var(--text-light); margin-top: .35rem; }

.checkout-items-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: 90px;
}
.checkout-items-title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--border-light);
}

.checkout-item {
    display: flex;
    gap: .85rem;
    align-items: center;
    padding: .65rem 0;
    border-bottom: 1px solid var(--border-light);
}
.checkout-item:last-of-type { border-bottom: none; }

.checkout-item-thumb {
    width: 54px;
    height: 54px;
    border-radius: 9px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--primary-light);
    position: relative;
}
.checkout-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.checkout-item-name { font-size: .85rem; font-weight: 600; color: var(--text); flex: 1; line-height: 1.4; }
.checkout-item-qty { font-size: .78rem; color: var(--text-light); margin-top: .15rem; }
.checkout-item-price { font-size: .875rem; font-weight: 700; color: var(--primary); white-space: nowrap; flex-shrink: 0; }

.checkout-total-rows { margin-top: 1.1rem; display: flex; flex-direction: column; gap: .55rem; }
.checkout-total-row {
    display: flex;
    justify-content: space-between;
    font-size: .875rem;
    color: var(--text-muted);
}
.checkout-total-row span:last-child { font-weight: 600; color: var(--text); }
.checkout-grand-total {
    padding-top: .75rem;
    border-top: 1px solid var(--border-light);
    font-weight: 800 !important;
    font-size: 1rem !important;
}
.checkout-grand-total span:last-child { color: var(--primary) !important; font-size: 1.15rem !important; }

.btn-place-order {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-family: var(--font-body);
}
.btn-place-order:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(38,112,98,.32);
}

/* Order success */
.order-success {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 520px;
    margin: 0 auto;
}
.order-success-icon {
    width: 72px;
    height: 72px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
}
.order-success h2 { font-family: var(--font-display); font-size: 1.75rem; color: var(--text); margin-bottom: .6rem; }
.order-success p { color: var(--text-muted); line-height: 1.75; margin-bottom .35rem; }
.order-code-box {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
    font-size: 1.05rem;
    padding: .6rem 1.4rem;
    border-radius: var(--radius);
    margin: 1.25rem 0 1.75rem;
    letter-spacing: .05em;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section { padding: 3rem 0 5rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

.contact-form-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 2.25rem;
    box-shadow: var(--shadow-xs);
}
.contact-form-card h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .5rem;
}
.contact-form-card > p { font-size: .9rem; color: var(--text-muted); margin-bottom: 1.75rem; }

.contact-info-section {}
.contact-info-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .5rem;
}
.contact-info-intro { font-size: .9rem; color: var(--text-muted); margin-bottom: 2rem; }

.contact-info-items { display: flex; flex-direction: column; gap: 1.1rem; margin-bottom: 2rem; }
.contact-info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.contact-info-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}
.contact-info-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-light); margin-bottom: .2rem; }
.contact-info-value { font-size: .9rem; color: var(--text); font-weight: 500; }
.contact-info-value a { color: var(--primary); }

/* ============================================================
   ALERTS & FLASH
   ============================================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .9rem 1.2rem;
    border-radius: var(--radius);
    font-size: .875rem;
    line-height: 1.55;
    margin-bottom: 1.25rem;
}
.alert-success { background: #f0faf7; border: 1px solid #b7e4d5; color: #155e44; }
.alert-danger, .alert-error { background: #fff5f5; border: 1px solid #fed7d7; color: #c53030; }
.alert-warning { background: #fffbf0; border: 1px solid #feebc8; color: #92400e; }
.alert-info { background: var(--primary-light); border: 1px solid var(--primary-mid); color: var(--primary-dark); }

/* ============================================================
   404 / NOT FOUND
   ============================================================ */
.not-found-wrap {
    text-align: center;
    padding: 6rem 1rem;
}
.not-found-code {
    font-family: var(--font-display);
    font-size: 8rem;
    font-weight: 700;
    color: var(--primary-light);
    line-height: 1;
    margin-bottom: .5rem;
}
.not-found-wrap h2 { font-size: 1.6rem; color: var(--text); margin-bottom: .75rem; }
.not-found-wrap p { color: var(--text-muted); max-width: 360px; margin: 0 auto 2rem; }

/* ============================================================
   UTILITY
   ============================================================ */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============================================================
   RESPONSIVE MISC
   ============================================================ */
@media (max-width: 768px) {
    .section { padding: 3.5rem 0; }
    .home-hero { padding: 3.5rem 0 3rem; }
    .home-stats { padding: 1.75rem 0; }
    .stats-grid { flex-wrap: wrap; }
    .stat-divider { display: none; }
    .stat-item { border-right: 1px solid rgba(255,255,255,.18); padding: .75rem 1.5rem; }
    .stat-item:last-child { border-right: none; }
    .home-banner-inner, .home-footer-cta-inner { flex-direction: column; text-align: center; }
    .home-banner-text p, .home-footer-cta-text p { margin-left: auto; margin-right: auto; }
    .section-header-row { flex-direction: column; align-items: flex-start; }
    .page-hero { padding: 2rem 0 1.75rem; }
    .article-layout { padding: 2rem 0; }
    .cart-section, .checkout-section, .contact-section { padding: 2rem 0 4rem; }
    .checkout-form-card { padding: 1.5rem; }
    .contact-form-card { padding: 1.5rem; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .footer-brand p { max-width: 100%; }
}

@media (max-width: 480px) {
    .home-hero-cta { flex-direction: column; align-items: stretch; }
    .btn-hero-primary, .btn-hero-outline { justify-content: center; }
    .cart-table th:nth-child(3),
    .cart-table td:nth-child(3) { display: none; }
    .product-detail-grid { gap: 1.5rem; }
    .contact-grid { gap: 2rem; }
}

/* Scrolled header shadow */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================================================
   SERVICE DETAIL
   ============================================================ */
.service-detail-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2.5rem;
    align-items: start;
    padding: 2.5rem 0 4rem;
}
@media (max-width: 960px) { .service-detail-wrap { grid-template-columns: 1fr; } }

.service-detail-main {}

.service-hero-img {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    background: var(--bg-alt);
}
.service-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.service-detail-sidebar {}

.service-info-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.service-info-list dt {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-light);
    margin-top: 1rem;
}
.service-info-list dt:first-child { margin-top: 0; }
.service-info-list dd {
    font-size: .9rem;
    color: var(--text);
    font-weight: 500;
    margin: .2rem 0 0;
}

/* ============================================================
   PROJECT DETAIL
   ============================================================ */
.project-detail-wrap {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
    align-items: start;
    padding: 2.5rem 0 4rem;
}
@media (max-width: 960px) { .project-detail-wrap { grid-template-columns: 1fr; } }

.project-detail-main {}
.project-detail-sidebar {}

.project-hero-img {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    background: var(--bg-alt);
}
.project-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.project-hero-ph {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 3rem;
}

.project-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.project-info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding: .6rem 0;
    border-bottom: 1px solid var(--border);
    font-size: .875rem;
}
.project-info-list li:last-child { border-bottom: none; }
.project-info-list .info-label {
    color: var(--text-light);
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.project-info-list .info-value {
    color: var(--text);
    font-weight: 500;
    text-align: right;
}

/* ============================================================
   PROJECT DETAIL — PD-TOP (header 2 cột: tiêu đề/mô tả — info)
   ============================================================ */
.pd-top {
    background: #fff;
    padding: 2.75rem 0 3rem;
}
.pd-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    align-items: center;
    font-size: .8rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}
.pd-breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.pd-breadcrumb a:hover { color: var(--primary); }
.pd-breadcrumb span { opacity: .5; font-size: .72rem; }
.pd-breadcrumb span:last-child { opacity: 1; color: var(--text-muted); font-size: .8rem; }

.pd-header-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 372px;
    gap: 4rem;
    align-items: start;
}
@media (max-width: 960px) {
    .pd-header-grid { grid-template-columns: 1fr; gap: 2.25rem; }
}

.pd-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.85rem, 3.4vw, 2.75rem);
    line-height: 1.18;
    letter-spacing: -.01em;
    color: var(--text);
    margin-bottom: 1.35rem;
    max-width: 720px;
    overflow-wrap: anywhere;
}
.pd-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 560px;
}

/* ── Cột phải: card thông tin dự án ── */
.pd-info-card {
    background: transparent;
}
.pd-info-row {
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border-light);
}
.pd-info-row:first-child { padding-top: 0; }
.pd-info-row:last-child { border-bottom: none; }
.pd-info-text { flex: 1; min-width: 0; }
.pd-info-label {
    font-size: .68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-light);
    margin-bottom: .12rem;
}
.pd-info-value {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.55;
    overflow-wrap: anywhere;
}
@media (max-width: 480px) {
    .pd-info-row { padding: .9rem 0; }
}

/* ============================================================
   PROJECT DETAIL — PD-GALLERY (ảnh/gif/video full màn hình)
   ============================================================ */
.pd-gallery {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: var(--bg-alt);
}
.pd-gallery-item {
    width: 100%;
    line-height: 0;
}
.pd-gallery-item img,
.pd-gallery-item video {
    width: 100%;
    height: auto;
    display: block;
}

.pd-content-single {
    max-width: 820px;
    margin: 0 auto;
}

/* Ảnh/video chèn trực tiếp trong "Nội dung chi tiết" (trình soạn thảo)
   cũng full màn hình giống khối Thư viện — đồng bộ phong cách toàn trang.
   Không có khoảng cách giữa các ảnh/video liên tiếp (giống pd-gallery). */
.pd-content-single .article-content img,
.pd-content-single .article-content video {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
    display: block;
    height: auto;
}
/* Quill bọc ảnh/video trong <p> — bỏ margin của thẻ p đó để ảnh liền kề nhau */
.pd-content-single .article-content p:has(> img:only-child),
.pd-content-single .article-content p:has(> video:only-child) {
    margin-bottom: 0;
}

/* ============================================================
   POST / ARTICLE DETAIL
   ============================================================ */
.post-detail-wrap {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
    align-items: start;
    padding: 2.5rem 0 4rem;
}
@media (max-width: 960px) { .post-detail-wrap { grid-template-columns: 1fr; } }

.post-article {}
.post-sidebar {}

.article-hero {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    background: var(--bg-alt);
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.article-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 1rem;
}

.post-date {
    font-size: .8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: .35rem;
}

/* ============================================================
   BT BeauSans — Áp dụng toàn bộ frontend
   ============================================================ */
body,
button,
input,
textarea,
select {
    font-family: 'BT Beau Sans', Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6,
.site-nav,
.btn,
.btn-primary-f,
.btn-outline,
.btn-hero-primary,
.btn-hero-outline,
.card-title,
.post-card-title,
.product-card-name,
.service-card-title,
.project-card-title,
.section-title,
.article-title,
.page-hero h1 {
    font-family: 'BT Beau Sans', Arial, sans-serif;
}

/* ============================================================
   CONTACT PAGE — ct-* namespace (layout: left hero+info / right form)
   ============================================================ */

@keyframes ct-fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ct-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .55s cubic-bezier(.22,.61,.36,1), transform .55s cubic-bezier(.22,.61,.36,1);
}
.ct-reveal.ct-visible { opacity: 1; transform: translateY(0); }
.ct-reveal-d1 { transition-delay: .06s; }
.ct-reveal-d2 { transition-delay: .12s; }
.ct-reveal-d3 { transition-delay: .18s; }
.ct-reveal-d4 { transition-delay: .24s; }
.ct-reveal-d5 { transition-delay: .30s; }

/* ── Hiệu ứng riêng cho tiêu đề: fade + slide-in nhẹ, sang trọng ── */
.ct-title-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .8s cubic-bezier(.16,.84,.44,1),
                transform .8s cubic-bezier(.16,.84,.44,1);
}
.ct-title-reveal.ct-visible { opacity: 1; transform: translateY(0); }
.ct-breadcrumb.ct-title-reveal { transition-delay: 0s; }
.ct-hero-title.ct-title-reveal { transition-delay: .1s; }
.ct-hero-sub.ct-title-reveal   { transition-delay: .22s; }

/* ── Section wrapper ──────────────────────────────────────── */
.ct-section {
    background: #fff;
    padding: 3.5rem 0;
    position: relative;
    overflow: hidden;
}
.ct-container {
    /* Không override max-width/padding riêng — kế thừa nguyên từ .container
       (max-width: var(--max-w); padding: 0 1.5rem;) để thẳng lề với header/nav */
    position: relative;
}

/* ── Chữ trang trí "DUOMITA" — lớp nền trong khoảng trống ──── */
/* ── Chữ trang trí "DUOMITA" — SVG, gradient stroke chạy liên tục ── */
.ct-decor-wrap {
    position: absolute;
    left: 0;
    top: 210px; /* hạ xuống gần box thông tin hơn, đúng vùng đường đánh dấu */
    margin: 0;
    height: clamp(86px, 9.5vw, 153px);
    overflow: visible; /* cho phép chữ tràn sang phải, bị form che một phần */
    pointer-events: none;
    z-index: 1; /* thấp hơn form và info-box, cao hơn nền trang */
}
.ct-decor-svg {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: auto;
    max-width: none; /* không bị bóp theo chiều rộng cột trái */
    overflow: visible;
    display: block;
}
.ct-decor-svg-text {
    font-family: 'BT Beau Sans', Arial, sans-serif;
    font-size: 150px;
    font-weight: 700;
    letter-spacing: -.04em;

    fill: transparent;
    stroke: url(#ctDecorGradient);
    stroke-width: .8px;

    opacity: .8;
    transition: fill .35s ease, opacity .35s ease, transform .35s ease, stroke .35s ease;
    transform-box: fill-box;
    transform-origin: left center;
}
.ct-decor-wrap:hover .ct-decor-svg-text {
    pointer-events: auto;
    fill: url(#ctDecorGradientHover); /* gradient động khi hover, thay vì màu tĩnh */
    stroke: transparent;
    opacity: 1;
    transform: skewX(-6deg) rotate(-2deg);
}
.ct-decor-wrap { pointer-events: auto; } /* cho phép hover trên vùng chữ */

@media (max-width: 768px) {
    .ct-decor-wrap { display: none; }
}

/* ── Phân lớp z-index: form luôn nổi trên chữ trang trí ──── */
.ct-right-col { position: relative; z-index: 4; }
.ct-left-col  { position: relative; z-index: 1; }


/* ── Layout 2 cột 50/50 ───────────────────────────────────── */
.ct-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: stretch;
}
@media (max-width: 900px) {
    .ct-layout { grid-template-columns: 1fr; gap: 2rem; }
    .ct-left-col { height: auto; }
    .ct-info-box { margin-top: 0; }
}

/* ════════════════════════════════════════════════════════════
   CỘT TRÁI
   ════════════════════════════════════════════════════════════ */
.ct-left-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
    position: relative;
}

/* ── Tiêu đề trang: không còn box xanh, chữ nằm trực tiếp trên nền ── */
.ct-hero-box {
    padding: 0 0 .25rem;
}
.ct-breadcrumb {
    font-size: .78rem;
    color: var(--text-light);
    display: flex;
    gap: .4rem;
    align-items: center;
    margin-bottom: .9rem;
}
.ct-breadcrumb a { color: var(--text-light); }
.ct-breadcrumb a:hover { color: var(--primary); }
.ct-hero-title {
    font-size: clamp(1.6rem, 2.8vw, 2.1rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: .65rem;
    letter-spacing: -.01em;
    color: var(--primary); /* chữ "Liên hệ" màu xanh brand */
}
.ct-hero-sub {
    font-size: .92rem;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 440px;
}

/* ── Khối thông tin liên hệ — đẩy xuống đáy, khớp đáy form ── */
.ct-info-box {
    background: #fafbfa;
    border: 1px solid #eef1f0;
    border-radius: 16px;
    padding: 1.75rem 1.75rem 1.5rem;
    margin-top: auto; /* bám đáy cột trái — ngang hàng đáy form bên phải */
    position: relative;
    z-index: 2; /* nổi trên chữ trang trí DUOMITA */
}
.ct-info-intro {

    font-size: .875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* Grid 2x2 cho 4 card */
.ct-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 480px) {
    .ct-info-grid { grid-template-columns: 1fr; }
}

.ct-info-item {
    display: flex;
    gap: .75rem;
    align-items: center;
    background: #fff;
    border: 1px solid #eaefed;
    border-radius: 12px;
    padding: .85rem .9rem;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.ct-info-item:hover {
    box-shadow: 0 4px 16px rgba(38,112,98,.1);
    transform: translateY(-2px);
    border-color: rgba(38,112,98,.2);
}
.ct-info-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eaf4f1;
    color: #267062;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ct-info-text { display: flex; flex-direction: column; gap: .08rem; min-width: 0; }
.ct-info-label {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}
.ct-info-value {
    font-size: .78rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.4;
    word-break: break-word;
}
a.ct-info-value { color: var(--text-muted); }
a.ct-info-value:hover { color: var(--primary); }

/* Divider + social */
.ct-divider {
    border: none;
    border-top: 1px solid #e5ecea;
    margin: 0 0 1rem;
}
.ct-social-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.ct-social-label {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text);
}
.ct-social-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.ct-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: .68rem;
    font-weight: 800;
    transition: transform .2s, box-shadow .2s, background .2s;
}
.ct-social-btn:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 6px 16px rgba(38,112,98,.32);
    background: var(--primary-dark);
}
.ct-social-btn:active { transform: scale(.95); }
.ct-social-btn--text { letter-spacing: -.5px; font-size: .62rem; }

/* ════════════════════════════════════════════════════════════
   CỘT PHẢI — Form card
   ════════════════════════════════════════════════════════════ */
.ct-form-card {
    background: #fff;
    border-radius: 18px;
    padding: 2rem 2rem 2.25rem;
    box-shadow: 0 4px 24px rgba(8,33,25,.08), 0 1px 4px rgba(8,33,25,.04);
    border: 1px solid rgba(38,112,98,.08);
    border-top: 3px solid var(--primary);
}
.ct-form-heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .35rem;
    line-height: 1.3;
}
.ct-form-sub {
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

.ct-alert {
    display: flex; align-items: center; gap: .6rem;
    padding: .8rem 1rem; border-radius: 10px;
    font-size: .85rem; margin-bottom: 1.2rem; line-height: 1.5;
}
.ct-alert-error { background: #fff5f5; border: 1px solid #fed7d7; color: #c53030; }

/* Form fields */
.ct-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 540px) { .ct-row-2 { grid-template-columns: 1fr; } }
.ct-field { margin-bottom: 1.1rem; }
.ct-label {
    display: block; font-size: .8rem; font-weight: 600;
    color: var(--text); margin-bottom: .35rem; letter-spacing: .01em;
}
.ct-req { color: var(--primary); }
.ct-input {
    width: 100%; padding: .65rem .9rem;
    border: 1.5px solid #e0e9e6; border-radius: 9px;
    background: #f6f9f8; font-size: .88rem; color: var(--text);
    transition: border-color .18s, box-shadow .18s, background .18s;
    outline: none; box-sizing: border-box; font-family: inherit;
}
.ct-input::placeholder { color: var(--text-light); }
.ct-input:focus {
    border-color: var(--primary); background: #fff;
    box-shadow: 0 0 0 3px rgba(38,112,98,.12);
}
.ct-textarea { resize: vertical; min-height: 130px; }
.ct-field--error .ct-input { border-color: #e53e3e; background: #fff5f5; }
.ct-field--error .ct-input:focus { box-shadow: 0 0 0 3px rgba(229,62,62,.12); }
.ct-field-error { display: block; font-size: .76rem; color: #e53e3e; margin-top: .28rem; }

.ct-privacy-note {
    display: flex; align-items: center; gap: .4rem;
    font-size: .76rem; color: var(--text-light);
    margin-bottom: 1.15rem; line-height: 1.5;
}

/* Submit button */
.ct-btn-send {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--primary); color: #fff; border: none;
    border-radius: 9px; padding: .75rem 1.75rem;
    font-size: .88rem; font-weight: 600; cursor: pointer;
    transition: background .2s, transform .18s, box-shadow .2s;
    font-family: inherit; letter-spacing: .01em;
    position: relative; overflow: hidden;
}
.ct-btn-send::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.15) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .45s ease;
}
.ct-btn-send:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(38,112,98,.32);
}
.ct-btn-send:hover::after { transform: translateX(100%); }
.ct-btn-send:active { transform: translateY(0); box-shadow: none; }

/* Success card */
.ct-success-card {
    background: #fff; border-radius: 18px; padding: 3rem 1.75rem;
    box-shadow: 0 4px 24px rgba(8,33,25,.08);
    border: 1px solid rgba(38,112,98,.1);
    border-top: 3px solid var(--primary);
    text-align: center;
    animation: ct-fadeUp .5s ease both;
}
.ct-success-icon {
    width: 64px; height: 64px; background: var(--primary-light);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--primary); margin: 0 auto 1.1rem;
}
.ct-success-title { font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: .5rem; }
.ct-success-msg {
    font-size: .88rem; color: var(--text-muted); line-height: 1.65;
    margin-bottom: 1.5rem; max-width: 340px; margin-left: auto; margin-right: auto;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 540px) {
    .ct-section    { padding: 2rem 0; }
    .ct-hero-box   { padding: 1.5rem 1.5rem 1.75rem; }
    .ct-hero-title { font-size: 1.5rem; }
    .ct-info-box   { padding: 1.5rem 1.25rem; }
    .ct-form-card  { padding: 1.5rem 1.25rem; }
}

/* ════════════════════════════════════════════════════════════
   BLOG / POSTS PAGE — Editorial minimal (Duomita)
   File section: posts.php
   ════════════════════════════════════════════════════════════ */

.blog-page { background: var(--surface); min-height: 70vh; padding-bottom: 5rem; }

.blog-hero {
    padding: 3.5rem 0 2rem;
}
.blog-breadcrumb {
    font-size: .78rem;
    color: var(--text-light);
    display: flex;
    gap: .4rem;
    align-items: center;
    margin-bottom: .9rem;
}
.blog-breadcrumb a { color: var(--text-light); }
.blog-breadcrumb a:hover { color: var(--primary); }
@keyframes blogFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.blog-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.3rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: .65rem;
    animation: blogFadeUp .6s cubic-bezier(.16,1,.3,1) both;
}
.blog-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 560px;
    animation: blogFadeUp .6s cubic-bezier(.16,1,.3,1) .08s both;
}

/* ── Toolbar: search + categories ─────────────────────────── */
.blog-toolbar-sentinel {
    height: 1px;
    margin-bottom: -1px;
}
.blog-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.4rem;
    flex-wrap: nowrap;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 1rem calc((100vw - min(100vw, var(--max-w))) / 2 + 1.5rem) 1.15rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: var(--site-header-h, 68px);
    z-index: 190;
    background: var(--surface);
    animation: blogFadeUp .6s cubic-bezier(.16,1,.3,1) .16s both;
    transition: box-shadow .3s ease;
}
.blog-toolbar.is-stuck {
    box-shadow: 0 10px 24px -14px rgba(15,28,24,.22);
}
.blog-toolbar-divider {
    width: 1px;
    height: 26px;
    background: var(--border);
    flex-shrink: 0;
}

.blog-search-form { flex-shrink: 0; }

.blog-search {
    display: flex;
    align-items: center;
    gap: .2rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: .2rem .8rem .2rem .2rem;
    height: 42px;
    width: 400px;
    flex-shrink: 0;
    transition: box-shadow var(--transition), border-color var(--transition), background var(--transition);
}
.blog-search:focus-within {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(38,112,98,.1);
}
.blog-search-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), color var(--transition), transform .15s ease;
}
.blog-search-btn:hover { background: var(--primary-light); color: var(--primary); }
.blog-search-btn svg { width: 15px; height: 15px; transition: transform .25s cubic-bezier(.16,1,.3,1); }
.blog-search:focus-within .blog-search-btn svg { transform: scale(1.1) rotate(-8deg); }
.blog-search-btn:active { transform: scale(.9); }
.blog-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: .85rem;
    font-weight: 500;
    min-width: 0;
}
.blog-search-input::placeholder { color: var(--text-light); }

.blog-categories {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: nowrap;
    flex: 1 1 0;
    min-width: 0;
}
.blog-cat-visible-row {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: nowrap;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}
.blog-cat-link {
    font-size: .82rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: .38rem .8rem;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    flex-shrink: 0;
    transition: all var(--transition);
}
.blog-cat-link:hover { color: var(--primary); font-weight: 700; background: var(--primary-light); }
.blog-cat-link:active { transform: scale(.94); }
.blog-cat-link.is-active { color: #fff; font-weight: 700; background: var(--primary); }

/* Dropdown "Danh mục khác" ─ danh sách xổ xuống thật ─────── */
.blog-cat-more-wrap { position: relative; flex-shrink: 0; }
.blog-cat-more-check { display: none; }
.blog-cat-more-label {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .82rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    white-space: nowrap;
    padding: .38rem .8rem;
    border-radius: var(--radius-pill);
    border: 1px dashed var(--border);
    transition: all var(--transition);
}
.blog-cat-more-label:hover,
.blog-cat-more-check:checked ~ .blog-cat-more-label {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}
.blog-cat-more-label svg { width: 12px; height: 12px; transition: transform var(--transition); flex-shrink: 0; }
.blog-cat-more-check:checked ~ .blog-cat-more-label svg { transform: rotate(180deg); }

.blog-cat-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 145;
    cursor: default;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.blog-cat-more-check:checked ~ .blog-cat-backdrop { opacity: 1; pointer-events: auto; }

.blog-cat-dropdown {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    position: absolute;
    top: calc(100% + .6rem);
    right: 0;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: .5rem;
    z-index: 146;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(.98);
    transform-origin: top right;
    transition: opacity .22s cubic-bezier(.16,1,.3,1), transform .22s cubic-bezier(.16,1,.3,1), visibility .22s;
}
.blog-cat-more-check:checked ~ .blog-cat-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}
.blog-cat-dropdown .blog-cat-link {
    display: block;
    width: 100%;
    border-radius: var(--radius);
    text-align: left;
}

.blog-clear-filter {
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    transition: color var(--transition), transform .15s ease;
}
.blog-clear-filter:active { transform: scale(.95); }
.blog-clear-filter:hover { color: var(--primary); }


/* ── Grid ─────────────────────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 2rem;
    margin-bottom: 3.5rem;
}
.blog-card {
    display: block;
    position: relative;
    color: inherit;
    cursor: pointer;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1);
    transition-delay: calc(var(--i, 0) * 70ms);
}
.blog-card.is-visible { opacity: 1; transform: translateY(0); }
.blog-card:active { transform: scale(.985); transition-delay: 0s; }
.blog-card.is-visible:active { transform: scale(.985); }
.blog-card-cover {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: var(--radius-lg);
}
.blog-card-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #eef1f0;
    margin-bottom: 0.5rem;
}
.blog-card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .55s cubic-bezier(.4,0,.2,1);
}
.blog-card:hover .blog-card-image img { transform: scale(1.06); }
.blog-card-image--empty {
    background: linear-gradient(140deg, var(--text) 0%, #0e1a17 60%, var(--primary-dark) 130%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.35);
}
.blog-card-image--empty svg { width: 34px; height: 34px; }
.blog-card-badge {
    position: absolute;
    top: .8rem; left: .8rem;
    background: var(--accent);
    color: var(--text);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: .3rem .65rem;
    border-radius: var(--radius-pill);
}
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .78rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: .2rem;
}
.blog-card-meta .blog-dot { opacity: .6; }
.blog-card-meta svg { width: 12px; height: 12px; margin-right: -.15rem; vertical-align: -1px; }
.blog-card-cat-link {
    position: relative;
    z-index: 2;
    color: var(--text-light);
    transition: color var(--transition);
}
.blog-card-cat-link:hover { color: var(--primary); font-weight: 700; }
.blog-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
    transition: color var(--transition), transform var(--transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.blog-card:hover .blog-card-title { color: var(--primary); }

/* ── Results info / empty state ──────────────────────────── */
.blog-results-info {
    font-size: .85rem;
    color: var(--text-light);
    margin: -1.25rem 0 1.75rem;
}
.blog-empty {
    text-align: center;
    padding: 5rem 1.5rem;
    color: var(--text-muted);
}
.blog-empty svg { color: var(--border); margin-bottom: 1.25rem; }
.blog-empty h3 { font-size: 1.2rem; color: var(--text); margin-bottom: .4rem; font-weight: 700; }
.blog-empty p { font-size: .92rem; margin-bottom: 1.25rem; }

/* ── Pagination ───────────────────────────────────────────── */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    margin: 1rem auto 0;
}
.blog-page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: .88rem;
    font-weight: 600;
    font-family: inherit;
    transition: all var(--transition);
}
.blog-page-btn:hover { color: var(--primary); background: var(--primary-light); transform: translateY(-1px); }
.blog-page-btn:active { transform: scale(.9); }
.blog-page-btn.is-active {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}
.blog-page-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 38px;
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: .04em;
}
.blog-page-btn svg { width: 14px; height: 14px; }
.blog-page-btn--prev {
    border: 1.5px solid var(--border);
    color: var(--text-light);
}
.blog-page-btn--prev:hover { border-color: var(--primary); color: var(--primary); background: transparent; }
.blog-page-btn--next {
    border: 1.5px solid var(--border);
    color: var(--text-light);
}
.blog-page-btn--next:hover { border-color: var(--primary); color: var(--primary); background: transparent; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 980px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
}

@media (max-width: 720px) {
    .blog-hero { padding: 2.25rem 0 1.5rem; }
    .blog-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        margin-bottom: 2rem;
        position: relative;
        top: 0;
    }
    .blog-toolbar-divider { display: none; }
    .blog-clear-filter { margin-left: 0; align-self: flex-start; }
    .blog-search { min-width: 0; width: 100%; }
    .blog-categories { gap: .35rem; }
    .blog-cat-dropdown { left: 0; right: auto; min-width: min(280px, 80vw); }
    .blog-grid { grid-template-columns: 1fr; gap: 2rem; }
    .blog-pagination { max-width: 100%; width: 100%; flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 420px) {
    .blog-search-btn { width: 38px; height: 38px; }
}

/* ── Tôn trọng người dùng tắt hiệu ứng chuyển động ─────────── */
@media (prefers-reduced-motion: reduce) {
    .blog-title,
    .blog-subtitle,
    .blog-toolbar {
        animation: none !important;
    }
    .blog-card {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .blog-card-image img,
    .blog-cat-link,
    .blog-page-btn,
    .blog-search-btn svg,
    .blog-cat-more-label svg,
    .blog-cat-dropdown,
    .blog-cat-backdrop,
    .blog-clear-filter {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* ============================================================
   PROJECTS — Grid tràn màn hình, tự co giãn số cột theo kích thước
   (dùng kỹ thuật width:100vw + margin âm để tràn màn hình MÀ VẪN
   nằm bên trong .container — bắt buộc để .blog-toolbar sticky phía
   trên còn "khung chứa" đủ cao mà bám dính xuyên suốt khi cuộn qua
   hết phần lưới dự án bên dưới)
   ============================================================ */
.projects-wide-wrap {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0 1.5rem;
}
.projects-flow-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem 1.25rem;
    margin-bottom: 3.5rem;
}
@media (max-width: 980px) {
    .projects-flow-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
}
@media (max-width: 560px) {
    .projects-flow-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ============================================================
   POST DETAIL — REDESIGN (single column, wide breakout hero)
   ============================================================ */
.post-page { padding: 2.25rem 0 0; }

.container-narrow {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.container-wide {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Breadcrumb */
.post-breadcrumb-wrap { margin-bottom: 1.1rem; }
.post-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    color: var(--text-light);
}
.post-breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.post-breadcrumb a:hover { color: var(--primary); }
.post-breadcrumb span.sep { opacity: .45; font-size: .7rem; }
.post-breadcrumb span.current { color: var(--text-muted); }

/* Top: category + date */
.post-top-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: 1.6rem;
}
.post-top-badges { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cat-badge-lg {
    font-size: .72rem;
    font-weight: 700;
    padding: .4rem 1rem .4rem .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    transition: background var(--transition), color var(--transition);
}
.cat-badge-lg:hover { background: var(--primary); color: #fff; }
.cat-badge-lg:hover .cat-badge-dot { background: #fff; }
.cat-badge-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--primary);
    margin-right: .5rem;
    flex-shrink: 0;
}

.post-date-line {
    font-size: .82rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    white-space: nowrap;
}
.post-date-line svg { width: 14px; height: 14px; opacity: .7; }
.post-date-line .sep { opacity: .55; }

/* Title + lead */
.post-heading { margin-bottom: 2.4rem; }
.post-title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4.4vw, 2.85rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 1.3rem;
    letter-spacing: -.02em;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.post-lead {
    font-family: var(--font-body);
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: .92rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-muted);
}


/* Wide breakout hero — fixed ratio box, image always cover-fit */
.post-hero-wide {
    width: 100%;
    aspect-ratio: 21 / 9;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-mid) 100%);
    margin-bottom: 2.75rem;
    box-shadow: var(--shadow-lg);
}
.post-hero-wide img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 900px) {
    .post-hero-wide { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); margin-bottom: 2.25rem; }
}
@media (max-width: 560px) {
    .post-hero-wide { aspect-ratio: 4 / 3; }
}

/* Body content */
.post-body { font-size: 1rem; line-height: 1.9; color: var(--text); margin-bottom: 2.5rem; overflow-wrap: anywhere; word-break: break-word; }
/* Canh lề do trình soạn thảo (Quill) sinh ra — thiếu định nghĩa này thì
   canh giữa/canh phải/canh đều đều bị bỏ qua trên trang công khai */
.post-body .ql-align-center  { text-align: center; }
.post-body .ql-align-right   { text-align: right; }
.post-body .ql-align-justify { text-align: justify; }
.post-body .ql-align-left    { text-align: left; }
.post-body img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 1.75rem 0;
    box-shadow: var(--shadow-sm);
}
.post-body h1 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin: 1.8rem 0 .35rem; color: var(--text); line-height: 1.25; }
.post-body h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin: 1.8rem 0 .35rem; color: var(--text); line-height: 1.3; }
.post-body h3 { font-size: 1.15rem; font-weight: 700; margin: 1.5rem 0 .3rem; color: var(--text); line-height: 1.3; }
.post-body p { margin-bottom: 1.25rem; }
.post-body ul, .post-body ol { padding-left: 1.6rem; margin-bottom: 1.25rem; }
.post-body li { margin-bottom: .45rem; }
.post-body strong { font-weight: 700; }
.post-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.post-body blockquote {
    border-left: 3px solid var(--primary);
    background: var(--primary-light);
    padding: 1rem 1.3rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-muted);
    margin: 1.75rem 0;
}
.post-body-empty { color: var(--text-light); font-style: italic; }

/* Divider */
.post-divider { border: none; border-top: 1px solid var(--border); margin: 5rem 0 1.4rem; }

/* Tags (left) + copy link (right) */
.post-tags-share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3.5rem;
}
.post-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.post-tag {
    display: inline-flex;
    align-items: center;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: .38rem .85rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: var(--transition);
}
.post-tag:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); text-decoration: none; }

.post-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: .5rem 1.05rem;
    border-radius: var(--radius-pill);
    transition: var(--transition);
    flex-shrink: 0;
}
.post-copy-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.post-copy-btn.is-copied { color: #fff; border-color: var(--primary); background: var(--primary); }
.post-copy-btn svg { flex-shrink: 0; }

@media (max-width: 560px) {
    .post-top-meta { flex-direction: column; align-items: flex-start; }
    .post-tags-share { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
}

/* Related posts — full-width grid section */
.related-posts-section {
    padding: 3.25rem 0 5rem;
    background: var(--bg);
    margin-top: 1rem;
}
.related-posts-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.9rem;
    text-align: center;
}

/* ============================================================
   TRANG SẢN PHẨM — Bố cục kiểu sàn TMĐT (BƯỚC redesign products.php)
   ============================================================ */

/* ── Thanh tìm kiếm full-width + gợi ý từ khóa (dính khi cuộn — "menu thứ 2") ── */
.shop-topbar {
    position: sticky;
    top: var(--site-header-h, 68px);
    z-index: 190;
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-xs);
    padding: .85rem 0 .75rem;
}

/* Khối bọc chung: search + từ khóa gợi ý — khớp chiều rộng với header/banner (toàn bộ .container) */
.shop-search-block { width: 100%; }

/* Ô tìm kiếm — gọn, không kéo hết chiều ngang */
.shop-search-form {
    position: relative; display: flex; align-items: center; width: 100%; overflow: hidden;
    background: #fff; border-radius: var(--radius-pill); border: 1.5px solid var(--border);
    box-shadow: var(--shadow-xs); transition: var(--transition);
}
.shop-search-form:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(38,112,98,.1); }
.shop-search-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 18px; margin-left: 1rem; color: var(--text-light); transition: var(--transition); }
.shop-search-form:focus-within .shop-search-icon { color: var(--primary); }
.shop-search-form input {
    flex: 1; min-width: 0; padding: .68rem .3rem .68rem .6rem; border: none; background: transparent;
    font-family: inherit; font-size: .9rem; color: var(--text); outline: none;
}
.shop-search-form input::placeholder { color: var(--text-light); }
.shop-search-form button {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    align-self: stretch; padding: 0 1.4rem;
    background: none; color: var(--primary); border: none; border-left: 1.5px solid var(--border);
    font-family: inherit; font-size: .9rem; font-weight: 700;
    cursor: pointer; transition: var(--transition);
}
.shop-search-form button:hover { color: var(--primary-dark); background: var(--primary-light); }

/* Hàng từ khóa gợi ý bên dưới — giới hạn đúng bằng chiều rộng ô tìm kiếm, không tràn ra ngoài */
.shop-trending {
    display: flex; align-items: center; flex-wrap: wrap; row-gap: .35rem; column-gap: 1.1rem;
    margin-top: .6rem; padding: 0 .3rem;
    max-height: 60px; opacity: 1; overflow: hidden;
    transition: max-height .2s ease, opacity .15s ease, margin-top .2s ease;
}
.shop-topbar.is-scrolled .shop-trending { max-height: 0; opacity: 0; margin-top: 0; }
.shop-trending-link {
    font-size: .8rem; color: var(--text-muted); text-decoration: none; white-space: nowrap;
    transition: var(--transition);
}
.shop-trending-link:hover { color: var(--primary); font-weight: 700; text-decoration: none; }

@media (max-width: 640px) {
    .shop-search-block { max-width: 100%; }
    .shop-search-icon { margin-left: .9rem; }
    .shop-trending { display: none; }
}

/* ── Khối 3 banner đầu trang ────────────────────────────────── */
.hero-banner-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; margin: 1.75rem 0rem; }
.hero-carousel { position: relative; border-radius: var(--radius-lg); overflow: hidden;
    height: 300px; background: var(--primary-light); box-shadow: var(--shadow-sm); }
.hero-carousel-track { display: flex; height: 100%; transition: transform .55s cubic-bezier(.4,0,.2,1); }
.hero-carousel-slide { flex: 0 0 100%; height: 100%; }
.hero-carousel-slide a, .hero-carousel-slide { display: block; width: 100%; height: 100%; }
.hero-carousel-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.hero-carousel-dots { position: absolute; bottom: .9rem; left: 50%; transform: translateX(-50%); display: flex; gap: .4rem; z-index: 2; }
.hero-carousel-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); border: none; cursor: pointer; padding: 0; transition: var(--transition); }
.hero-carousel-dot.active { background: #fff; width: 20px; border-radius: 4px; }
.hero-side-col { height: 300px; display: flex; flex-direction: column; gap: 1rem; }
.hero-side-banner { flex: 1 1 0; min-height: 0; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); display: block; background: var(--primary-light); }
.hero-side-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
@media (max-width: 860px) {
    .hero-banner-grid { grid-template-columns: 1fr; }
    .hero-carousel { height: 220px; }
    .hero-side-col { height: auto; flex-direction: row; }
    .hero-side-banner { height: 120px; }
}
@media (max-width: 560px) {
    .hero-side-col { flex-direction: column; }
    .hero-side-banner { height: 100px; }
}

/* ── Grid danh mục (icon tròn) ──────────────────────────────── */
/* ── Khối danh mục: 1 khung bao quanh, cuộn ngang 1 dòng, hé lộ mục kế tiếp ── */
.cat-icon-box {
    background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs); padding: 1.35rem 1.5rem; margin: 1.75rem 0;
}
.cat-icon-grid {
    display: flex; flex-wrap: nowrap; gap: .6rem; overflow-x: auto; scroll-behavior: smooth;
    padding-bottom: 2px;
}
.cat-icon-grid::-webkit-scrollbar { height: 0; }
.cat-icon-item {
    flex: 0 0 auto; width: 88px; display: flex; flex-direction: column; align-items: center;
    gap: .55rem; text-decoration: none; text-align: center; padding: .35rem .2rem;
}
.cat-icon-thumb {
    width: 68px; height: 68px; border-radius: 20px; overflow: hidden; background: var(--primary-light);
    display: flex; align-items: center; justify-content: center; padding: 14px;
    transition: var(--transition);
}
.cat-icon-item:hover .cat-icon-thumb { box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.cat-icon-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cat-icon-thumb svg { color: var(--primary); }
.cat-icon-name {
    font-size: .78rem; color: var(--text); font-weight: 500; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.cat-icon-item:hover .cat-icon-name { color: var(--primary); }
@media (max-width: 560px) {
    .cat-icon-box { padding: 1rem 1rem; }
    .cat-icon-item { width: 76px; }
    .cat-icon-thumb { width: 60px; height: 60px; border-radius: 16px; padding: 11px; }
}

/* ── Banner dài ─────────────────────────────────────────────── */
.long-banner { display: block; height: 300px; border-radius: var(--radius-lg); overflow: hidden; margin: 2rem 0; box-shadow: var(--shadow-sm); }
.long-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
@media (max-width: 640px) { .long-banner { height: 160px; } }

/* ── Bố cục chính: sidebar (sticky) + nội dung ─────────────────── */
.shop-layout { display: grid; grid-template-columns: 240px 1fr; gap: 1.75rem; align-items: start; margin: 2rem 0; }
.shop-results { transition: opacity .15s ease; min-height: 160px; }
.shop-results.shop-loading { opacity: .5; pointer-events: none; }
.shop-results.shop-loading-in { opacity: 0; }
.shop-sidebar { position: sticky; top: calc(var(--site-header-h, 68px) + var(--shop-topbar-h, 68px) + 1rem); }
.shop-sidebar-card { background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.shop-sidebar-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: .8rem; }
.shop-sidebar-title.shop-cat-toggle { display: flex; align-items: center; justify-content: space-between; cursor: default; user-select: none; }
.shop-cat-chevron { display: none; flex-shrink: 0; transition: transform .2s ease; }
.shop-cat-list { display: flex; flex-direction: column; gap: .15rem; }
.shop-cat-link { display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .5rem .5rem; border-radius: 8px; text-decoration: none; color: var(--text); font-size: .87rem; transition: var(--transition); }
.shop-cat-link:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.shop-cat-link.active { background: var(--primary); color: #fff; font-weight: 600; }
.shop-cat-count { font-size: .72rem; opacity: .7; }
.shop-cat-link-label { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.shop-cat-link-icon { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; background: none; }
@media (max-width: 900px) {
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { position: static; }
    .shop-sidebar-card { }
}

/* ── Thanh sắp xếp / bộ lọc nhanh ───────────────────────────── */
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem;
    background: var(--bg-cream); border: 1px solid var(--border-light); border-radius: var(--radius); padding: .85rem 1.1rem; margin-bottom: 1.25rem; }
.shop-sort { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.shop-sort-label { font-size: .82rem; color: var(--text-muted); }
.shop-sort-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.shop-sort-tab { padding: .42rem .9rem; border-radius: var(--radius-pill); border: 1px solid var(--border);
    background: #fff; color: var(--text); font-size: .82rem; text-decoration: none; transition: var(--transition); }
.shop-sort-tab:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.shop-sort-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.shop-sort-select { padding: .42rem .8rem; border-radius: var(--radius-pill); border: 1px solid var(--border);
    background: #fff; font-size: .82rem; color: var(--text); font-family: inherit; cursor: pointer; }
.shop-sort-select.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.shop-page-quick { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--text-muted); }
.shop-page-quick-btn {
    display: flex; align-items: center; justify-content: center; width: 26px; height: 26px;
    border-radius: 50%; border: 1px solid var(--border); background: #fff; color: var(--text);
    transition: var(--transition); flex-shrink: 0;
}
.shop-page-quick-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; text-decoration: none; }
.shop-page-quick-btn.disabled { opacity: .35; pointer-events: none; }

/* ── Banner cuối trang (3 cột) ──────────────────────────────── */
.bottom-banner-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 3.5rem 0 2.5rem; }
.bottom-banner-grid a, .bottom-banner-grid > div { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: block; height: 140px; }
.bottom-banner-grid img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
@media (max-width: 768px) { .bottom-banner-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .bottom-banner-grid a, .bottom-banner-grid > div { height: 120px; } }

/* ── Nhãn giảm giá / giá trên thẻ sản phẩm mới (dùng lại prod-card) */
.shop-new-scroll { display: grid; grid-template-columns: repeat(5, 1fr); gap: .9rem; margin: 0; }
@media (max-width: 1024px) { .shop-new-scroll { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .shop-new-scroll { grid-template-columns: repeat(2, 1fr); } }

/* Khối "Sản phẩm mới" — khung nổi bật kiểu banner deal, dùng grid-area để dễ đổi thứ tự theo màn hình */
.new-arrivals-box {
    position: relative; overflow: hidden;
    background: linear-gradient(160deg, var(--accent-light) 0%, #fff 55%);
    border: 1px solid rgba(201,168,76,.3); border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem 1.6rem; margin: 1.75rem 0 2rem;
    box-shadow: var(--shadow-xs);
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "title  more" "grid   grid";
    column-gap: 1rem; row-gap: 1rem;
    align-items: center;
}
.new-arrivals-title-row { grid-area: title; }
.new-arrivals-more { grid-area: more; }
.new-arrivals-box .shop-new-scroll { grid-area: grid; }

/* ============================================================
   CHI TIẾT SẢN PHẨM — Gallery nhiều ảnh/video + biến thể
   ============================================================ */
.pd-gallery-main { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1/1; background: var(--bg-cream); }
.pd-gallery-main img, .pd-gallery-main video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-gallery-thumbs { display: flex; gap: .55rem; margin-top: .7rem; flex-wrap: wrap; }
.pd-gallery-thumb { width: 66px; height: 66px; border-radius: 8px; overflow: hidden; border: 2px solid transparent;
    cursor: pointer; background: var(--bg-cream); position: relative; flex-shrink: 0; }
.pd-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-gallery-thumb.active { border-color: var(--primary); }
.pd-gallery-thumb.is-video::after { content: '▶'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #fff; background: rgba(0,0,0,.35); font-size: .8rem; }

.pd-variant-block { margin: 1.1rem 0; }
.pd-variant-label { font-size: .82rem; font-weight: 600; color: var(--text); margin-bottom: .55rem; display: block; }
.pd-variant-options { display: flex; flex-wrap: wrap; gap: .55rem; }
.pd-variant-btn { padding: .5rem 1rem; border-radius: var(--radius-pill); border: 1.5px solid var(--border);
    background: #fff; color: var(--text); font-size: .85rem; cursor: pointer; transition: var(--transition); font-family: inherit; }
.pd-variant-btn:hover { border-color: var(--primary); color: var(--primary); }
.pd-variant-btn.active { border-color: var(--primary); background: var(--primary); color: #fff; font-weight: 600; }
.pd-variant-btn:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

/* ============================================================
   CHI TIẾT SẢN PHẨM — Breadcrumb gọn, giá/tồn kho, chia sẻ, Mua ngay
   (bổ sung cho bản thiết kế lại theo mẫu Shopee)
   ============================================================ */
.pd-breadcrumb-bar { padding: .9rem 0 0; background: var(--bg); }

.pd-gallery-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,.92); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 3; color: var(--text); box-shadow: var(--shadow-xs);
    transition: var(--transition);
}
.pd-gallery-arrow:hover { background: #fff; color: var(--primary); }
.pd-gallery-arrow.prev { left: .7rem; }
.pd-gallery-arrow.next { right: .7rem; }

.pd-share-row { display: flex; align-items: center; gap: .6rem; margin-top: .85rem; flex-wrap: wrap; }
.pd-share-label { font-size: .85rem; color: var(--text); }
.pd-share-icons { display: flex; gap: .5rem; }
.pd-share-icon {
    width: 26px; height: 26px; border-radius: 50%; padding: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; border: 0; cursor: pointer; flex-shrink: 0;
}
.pd-share-icon.messenger { background: linear-gradient(135deg,#00c6ff,#0078ff); }
.pd-share-icon.fb { background: #1877f2; }
.pd-share-icon.pin { background: #e60023; }
.pd-share-icon.x { background: #000; }
.pd-copy-link {
    background: none; border: 0; padding: 0; cursor: pointer;
    color: var(--text-muted); font-size: .85rem; font-family: inherit;
    text-decoration: underline; text-underline-offset: 2px;
}
.pd-copy-link:hover { color: var(--primary); }

.pd-price-box { background: var(--bg-cream); border-radius: var(--radius); padding: .9rem 1.1rem; margin: .9rem 0; }

.pd-stock-badge {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .82rem; font-weight: 600; color: var(--primary);
    background: var(--primary-light); border: 1px solid var(--primary-mid);
    padding: .3rem .8rem; border-radius: var(--radius-pill); margin-bottom: .5rem;
}
.pd-stock-badge.out { color: #c0392b; background: #fdecea; border-color: #f5c6c0; }
.pd-return-note { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--text-muted); margin: 0 0 1rem; }

.pd-cta-row { display: flex; gap: .75rem; width: 100%; margin-top: .25rem; }
.btn-buy-now {
    flex: 1; min-width: 150px; display: inline-flex; align-items: center; justify-content: center;
    gap: .5rem; padding: .75rem 1.75rem; border: none; border-radius: var(--radius-pill);
    background: var(--accent); color: #fff; font-weight: 700; font-size: .95rem;
    cursor: pointer; white-space: nowrap; transition: all var(--transition); font-family: inherit;
}
.btn-buy-now:hover { background: #b3903f; transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-buy-now:disabled, .btn-add-cart:disabled { opacity: .6; cursor: wait; transform: none; }

/* ============================================================
   MOBILE ONLY — trang Sản phẩm (không ảnh hưởng desktop/tablet)
   ============================================================ */
@media (max-width: 640px) {
    /* Chặn tràn ngang toàn trang do flex/grid item mặc định không tự co (min-width:auto) */
    .shop-layout, .shop-sidebar, .shop-content, .shop-sidebar-card { min-width: 0; }
    .shop-layout { overflow-x: hidden; }

    /* Khoảng cách giữa các khối gọn lại */
    .hero-banner-grid   { margin: 1rem 0; }
    .cat-icon-box       { margin: 1rem 0; }
    .new-arrivals-box   { margin: 1rem 0 1.25rem; padding: 1.1rem 1.1rem 1.25rem; }
    .long-banner        { margin: 1.25rem 0; }
    .shop-layout        { margin: 1.25rem 0; gap: 1rem; }
    .bottom-banner-grid { display: none; }

    /* "Sản phẩm mới": chỉ hiện 4 sản phẩm trên điện thoại (desktop vẫn 5) */
    .shop-new-scroll > *:nth-child(n+5) { display: none; }

    /* "Sản phẩm mới": đưa nút Xem thêm xuống dưới cùng lưới sản phẩm */
    .new-arrivals-box {
        grid-template-columns: 1fr;
        grid-template-areas: "title" "grid" "more";
        row-gap: .8rem;
    }
    .new-arrivals-more { justify-self: center; }

    /* Bỏ thanh sắp xếp/lọc trên điện thoại */
    .shop-toolbar { display: none; }

    /* Danh mục: dạng sổ xuống (accordion) — thu gọn mặc định, bấm "Danh mục" để mở */
    .shop-sidebar-card { padding: .85rem .9rem .95rem; }
    .shop-sidebar-title.shop-cat-toggle { cursor: pointer; padding: .1rem 0; }
    .shop-cat-chevron { display: inline-flex; }
    .shop-cat-toggle.is-open .shop-cat-chevron { transform: rotate(180deg); }
    .shop-cat-list {
        flex-direction: column; overflow: hidden; max-height: 0; opacity: 0;
        transition: max-height .28s ease, opacity .2s ease, margin-top .2s ease;
        margin-top: 0;
    }
    .shop-cat-list.is-open { max-height: 1400px; opacity: 1; margin-top: .5rem; }
    .shop-cat-link { justify-content: space-between; white-space: normal; }
}
