:root {
    color-scheme: light;
    --paper: #f8f6f1;
    --surface: #fffdf9;
    --ink: #17221e;
    --muted: #606962;
    --line: #e5e1d8;
    --accent: #fbb74f;
    --accent-dark: #97431d;
    --green: #17382c;
    --green-bright: #2c644a;
    --round: 20px;
    --shadow: 0 12px 28px #2031270d;
    font-family: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #36815e; outline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
svg { display: block; width: 1.2em; height: 1.2em; flex-shrink: 0; }

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.header-inner, .hero-inner, .shop-layout, .footer-inner {
    width: min(1232px, calc(100% - 72px));
    margin-inline: auto;
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand, .header-actions, .header-categories, .hero-actions, .hero-benefits {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid #e6a345;
    border-radius: 14px;
    background: var(--accent);
    color: #36260e;
    font-weight: 900;
}

.brand-text { display: grid; gap: 2px; }
.brand-mark.has-image { border-color: transparent; background: transparent; }
.brand-logo { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-size: 1rem; font-weight: 850; letter-spacing: -.035em; }
.brand-text small { color: var(--muted); font-size: .73rem; font-weight: 600; }
.header-actions { gap: 20px; }
.header-link { font-size: .88rem; color: var(--muted); font-weight: 650; }
.header-link:hover { color: var(--ink); }

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: .87rem;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    transition: background-color 150ms, border-color 150ms, color 150ms;
}

.button-primary { color: #fffdf4; background: var(--green); }
.button-primary:hover:not(:disabled) { background: var(--green-bright); }
.button-quiet { color: var(--green); background: var(--surface); border-color: var(--line); }
.button-quiet:hover:not(:disabled) { background: #f4f2eb; border-color: #c7cbc0; }
.cart-trigger { white-space: nowrap; }
.cart-trigger .cart-count {
    min-width: 20px;
    padding: 2px 5px;
    border-radius: 6px;
    color: #342813;
    background: var(--accent);
    font-size: .73rem;
}

.hero {
    position: relative;
    width: min(1304px, calc(100% - 32px));
    margin: 22px auto 0;
    border-radius: 26px;
    overflow: clip;
    color: #fff9ea;
    background: #122f24;
    isolation: isolate;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    width: calc(100% - 80px);
    min-height: 338px;
}

.hero-copy { z-index: 1; padding: 44px 0; }
.hero-copy h1 {
    max-width: 620px;
    font-size: clamp(2.25rem, 5.35vw, 4.35rem);
    letter-spacing: -.071em;
    font-weight: 850;
    line-height: 1.055;
    text-wrap: balance;
}

.hero-copy h1 span, .hero-copy h1 em { color: var(--accent); font-style: normal; }
.hero-description { max-width: 445px; margin-top: 17px; color: #d4e1d3; font-size: 1rem; line-height: 1.65; }
.hero-actions { margin-top: 24px; flex-wrap: wrap; }
.hero-actions .button { min-height: 45px; padding-inline: 17px; }
.hero-actions .button-primary { color: #2d210e; background: var(--accent); }
.hero-actions .button-primary:hover { background: #ffd18b; }
.hero-actions .button-quiet { color: #fff8e7; background: #ffffff12; border-color: #ffffff38; }
.hero-actions .button-quiet:hover { background: #ffffff25; border-color: #ffffff68; }
.hero-benefits { flex-wrap: wrap; margin-top: 20px; color: #cedbca; font-size: .79rem; gap: 10px 17px; }
.hero-benefits > * { display: inline-flex; align-items: center; gap: 6px; }
.hero-benefits svg { color: var(--accent); }

.hero-media {
    position: absolute;
    inset: 0 -40px 0 48%;
    display: grid;
    place-items: center;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 69% 50%, #abc15d46 0%, transparent 59%),
        radial-gradient(ellipse at 102% 90%, #476f4f80 0%, transparent 58%);
    mask-image: linear-gradient(to right, transparent, #000 15%);
}

.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media:not(:has(img))::before {
    content: "";
    position: absolute;
    inset: -30%;
    rotate: -13deg;
    opacity: .7;
    background-image:
        radial-gradient(circle at 59% 34%, #ffeac7 0 1px, transparent 3px),
        radial-gradient(circle at 69% 67%, #ffeac7 0 2px, transparent 4px),
        radial-gradient(circle at 43% 53%, #f5c27b 0 1px, transparent 3px),
        radial-gradient(circle at 82% 40%, #fff4bb 0 1px, transparent 3px),
        linear-gradient(#bfe8b02b 1px, transparent 1px),
        linear-gradient(90deg, #bfe8b02b 1px, transparent 1px);
    background-size: auto, auto, auto, auto, 38px 38px, 38px 38px;
    mask-image: radial-gradient(ellipse at center, #000 12%, transparent 63%);
}

.hero-media:not(:has(img))::after {
    content: "";
    position: absolute;
    width: clamp(145px, 20vw, 240px);
    aspect-ratio: 1;
    left: 48%;
    top: 45%;
    translate: -30% -50%;
    border: 1px solid #ffe6ad;
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 35% 28%, #fff8cb 0%, #ffda84 25%, transparent 53%),
        radial-gradient(ellipse at 68% 82%, #e87421 5%, #f8a842 49%, #ffcf73 80%);
    box-shadow: inset 0 -12px 24px #a63e274c, 0 0 48px #ffc34f53, 0 0 0 24px #ffe4ab0d, 0 0 0 25px #ffe4ab28;
}

.shop-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
    padding-block: 36px 64px;
}

.catalog-sidebar {
    position: sticky;
    top: 18px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: var(--round);
    background: var(--surface);
}

.sidebar-heading {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 9px 12px;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted);
}

.category-list { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; }
.category-link {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 39px;
    padding: 7px 9px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    text-align: left;
    font-size: .86rem;
    font-weight: 660;
    color: var(--ink);
}

.category-link:hover { background: #f1f3eb; }
.category-link[aria-current]:not([aria-current="false"]), .category-link.is-active, .category-link[aria-pressed="true"] {
    color: var(--green);
    background: #e4eddf;
}

.category-icon {
    display: inline-grid;
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
    place-items: center;
    border-radius: 6px;
    color: var(--green);
    background: #edf0e7;
}

.category-count { margin-left: auto; color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.category-icon img, .section-icon img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.catalog-main { min-width: 0; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 23px; }
.catalog-title h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -.055em; line-height: 1.15; font-weight: 840; }
.search-box {
    display: flex;
    align-items: center;
    gap: 9px;
    width: min(100%, 295px);
    min-height: 43px;
    padding-inline: 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    color: var(--muted);
}

.search-box:focus-within { border-color: #6e9475; box-shadow: 0 0 0 3px #6e947525; }
.search-box input {
    min-width: 0;
    width: 100%;
    align-self: stretch;
    padding: 8px 0;
    outline: none;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: .87rem;
}

.parent-section + .parent-section { margin-top: 34px; }
.parent-section { scroll-margin-top: 18px; }
.section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-icon {
    display: grid;
    flex: 0 0 37px;
    width: 37px;
    height: 37px;
    place-items: center;
    border-radius: 10px;
    background: #e4eddf;
    color: var(--green);
}
.section-title { font-size: 1.33rem; font-weight: 820; letter-spacing: -.042em; }
.section-description { margin-top: 5px; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.product-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: border-color 150ms, box-shadow 150ms;
}

.product-card:hover { border-color: #bdc7b7; box-shadow: 0 12px 28px #20312715; }
.product-media {
    --tile: #e4eedf;
    --glyph: #477c54;
    position: relative;
    display: grid;
    place-items: center;
    min-height: 110px;
    overflow: hidden;
    color: var(--glyph);
    background: radial-gradient(circle at 50% 40%, #ffffff92, transparent 70%), var(--tile);
}

[data-category-id="nick"] .product-media { --tile: #e1eaf6; --glyph: #45658a; }
[data-category-id="vang-ngoc"] .product-media { --tile: #fbebc8; --glyph: #946129; }
[data-category-id="kich-diem"] .product-media { --tile: #f8eadb; --glyph: #a65732; }
[data-category-id="do-dac"] .product-media { --tile: #f0e8f4; --glyph: #74568d; }
[data-category-id="san-de"] .product-media { --tile: #f6e1db; --glyph: #a45847; }
.product-media:not(:has(img))::before {
    content: "";
    position: absolute;
    width: 100px;
    aspect-ratio: 1;
    border: 1px solid currentColor;
    border-radius: 28px;
    rotate: 37deg;
    opacity: .12;
    box-shadow: 0 0 0 12px;
}

.product-media img { width: 100%; height: 120px; padding: 5px; object-fit: contain; }
.product-media > svg { width: 42px; height: 42px; }
.product-media > span { position: relative; font-size: 2rem; }
.product-media > span svg { width: 42px; height: 42px; }
.product-body { display: flex; flex: 1; flex-direction: column; gap: 5px; padding: 13px; }
.product-title { font-size: 1rem; letter-spacing: -.025em; font-weight: 790; overflow-wrap: anywhere; }
.product-description { color: var(--muted); font-size: .82rem; line-height: 1.5; overflow-wrap: anywhere; }
.product-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 7px; margin-top: auto; padding-top: 11px; }
.product-price { color: var(--accent-dark); font-size: .98rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.product-unit { color: var(--muted); font-weight: 500; font-size: .74rem; }
.product-footer .button { min-height: 35px; padding: 7px 9px; font-size: .77rem; }
.empty-state, .catalog-empty { padding: 20px; border: 1px dashed #cbd3c5; border-radius: 12px; color: var(--muted); }

.support-section { padding: 0 0 36px; }
.support-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 14px;
    width: min(1232px, calc(100% - 72px));
    margin-inline: auto;
}

.bank-panel, .contact-panel { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--round); background: var(--surface); }
.support-heading { margin-bottom: 11px; font-size: 1.15rem; letter-spacing: -.045em; font-weight: 800; }
.bank-details { display: grid; gap: 8px; margin: 0 0 12px; }
.bank-detail { display: grid; grid-template-columns: minmax(92px, .65fr) 1fr; gap: 7px; font-size: .85rem; }
.bank-detail dt { color: var(--muted); }
.bank-detail dd { margin: 0; font-weight: 720; overflow-wrap: anywhere; }
.bank-copy-status { color: var(--green); font-size: .82rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: 7px; }

.site-footer {
    padding: 25px max(20px, calc((100% - 1232px) / 2));
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: .85rem;
}

.footer-inner { display: flex; justify-content: space-between; gap: 12px; margin: 0; width: 100%; }
.footer-brand, .footer-links { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-brand .brand-mark { width: 30px; height: 30px; flex-basis: 30px; border-radius: 8px; }
.site-footer a:hover { color: var(--green); text-decoration: underline; }

.shop-dialog {
    width: min(100% - 28px, 570px);
    max-height: min(90vh, 760px);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 20px;
    color: var(--ink);
    background: var(--surface);
    box-shadow: 0 18px 85px #14271a50;
}

.shop-dialog::backdrop { background: #102219a6; backdrop-filter: blur(3px); }
.dialog-header, .dialog-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 21px; }
.dialog-header { border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 1.3rem; letter-spacing: -.045em; }
.dialog-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    color: var(--ink);
}

.dialog-close:hover { background: var(--paper); }
.dialog-body { padding: 18px 21px; }
.dialog-footer { border-top: 1px solid var(--line); }
.cart-list { list-style: none; display: grid; gap: 12px; margin: 0; padding: 0; }
.cart-item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; }
.cart-item-details { display: grid; gap: 4px; font-size: .87rem; }
.cart-item-details small { color: var(--muted); }
.cart-controls, .quantity-controls { display: flex; align-items: center; gap: 6px; }
.cart-controls button, .quantity-button {
    min-width: 31px;
    min-height: 31px;
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    color: var(--green);
}

.cart-controls input, .quantity-input { width: 54px; padding: 5px; border: 1px solid var(--line); border-radius: 6px; text-align: center; color: var(--ink); background: white; }
.remove-button { border: 0; background: transparent; padding: 4px; color: var(--accent-dark); font-size: .82rem; }
.remove-button:hover { text-decoration: underline; }
.cart-summary { font-variant-numeric: tabular-nums; font-weight: 760; }
.cart-fields { display: grid; gap: 6px; margin-top: 15px; font-size: .85rem; }
.cart-fields label { font-weight: 710; }
.order-note { width: 100%; padding: 8px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--paper); }
.order-message {
    display: block;
    width: 100%;
    min-height: 220px;
    resize: vertical;
    margin: 11px 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow: auto;
    background: var(--paper);
    color: var(--ink);
    font-size: .82rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.order-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-toast {
    position: fixed;
    z-index: 5;
    max-width: calc(100% - 24px);
    bottom: 18px;
    right: 18px;
    padding: 10px 15px;
    border-radius: 10px;
    background: var(--green);
    color: #fffdf4;
    box-shadow: var(--shadow);
    opacity: 0;
    translate: 0 8px;
    pointer-events: none;
    transition: opacity 150ms, translate 150ms;
}

.shop-toast.is-visible { opacity: 1; translate: 0; }
.sr-only, .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width: 990px) {
    .header-inner, .shop-layout, .support-inner { width: calc(100% - 46px); }
    .header-categories { display: none; }
    .shop-layout { grid-template-columns: 178px minmax(0, 1fr); gap: 16px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 690px) {
    .header-inner, .shop-layout, .support-inner { width: calc(100% - 28px); }
    .header-inner { min-height: 66px; }
    .header-actions { gap: 8px; }
    .header-link, .brand-text small { display: none; }
    .brand { gap: 7px; }
    .brand-mark { width: 35px; height: 35px; flex-basis: 35px; border-radius: 10px; }
    .brand-name { font-size: .86rem; }
    .cart-trigger { min-height: 37px; padding-inline: 9px; font-size: .78rem; }
    .hero { width: calc(100% - 20px); margin-top: 11px; border-radius: 17px; }
    .hero-inner { display: block; width: calc(100% - 34px); min-height: unset; }
    .hero-copy { position: relative; padding: 29px 0 25px; }
    .hero-copy h1 { max-width: 440px; font-size: clamp(2rem, 8vw, 3.4rem); }
    .hero-description { max-width: min(92%, 420px); margin-top: 11px; font-size: .88rem; }
    .hero-actions { margin-top: 17px; }
    .hero-benefits { margin-top: 13px; }
    .hero-media { inset: 0 -17px 0 31%; opacity: .3; }
    .shop-layout { display: block; padding-block: 20px 35px; }
    .catalog-sidebar { position: static; padding: 9px; margin-bottom: 17px; border-radius: 13px; }
    .sidebar-heading { padding: 3px 4px 6px; }
    .category-list { display: flex; flex-wrap: wrap; gap: 4px; }
    .category-link { width: auto; min-height: 32px; padding: 4px 6px; gap: 5px; font-size: .77rem; }
    .category-icon { width: 18px; height: 18px; flex-basis: 18px; }
    .category-count { margin-left: 0; }
    .catalog-toolbar { align-items: stretch; flex-direction: column; gap: 10px; margin-bottom: 17px; }
    .search-box { width: 100%; }
    .product-grid { gap: 8px; }
    .product-body { padding: 9px; }
    .product-media { min-height: 84px; }
    .product-media img { height: 93px; }
    .parent-section + .parent-section { margin-top: 24px; }
    .support-inner { grid-template-columns: 1fr; }
    .footer-inner { flex-wrap: wrap; }
}

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