:root {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--panel);
    --floating-action-bottom: max(20px, calc(env(safe-area-inset-bottom) + 10px));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.55; }
img { display: block; max-width: 100%; object-fit: contain; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
h1[tabindex="-1"]:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
h1 { line-height: 1.15; letter-spacing: -.024em; }
main { min-height: 55vh; }
.container { width: min(1190px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 50; top: 8px; left: 12px; transform: translateY(-150%); padding: 8px 16px; color: var(--button-ink); background: var(--button-bg); }
.skip-link:focus { transform: none; }

.site-header { background: var(--panel); position: relative; z-index: 3; }
.header-main { min-height: 126px; display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 22px; }
.logo { width: fit-content; display: grid; align-items: center; min-height: 66px; }
.logo img { width: 68px; height: 68px; object-fit: contain; }
.header-search { display: flex; border: 1px solid var(--control-border); border-radius: 4px; min-height: 44px; }
.header-search:focus-within { box-shadow: 0 0 0 3px var(--green-light); }
.header-search input { flex: 1; min-width: 0; border: 0; padding: 0 16px; background: transparent; color: inherit; font-size: .9rem; }
.header-search input:focus { outline: none; }
.header-search button { border: 0; padding-inline: 16px; background: var(--accent); color: var(--on-accent); font-weight: 700; border-radius: 0 3px 3px 0; }
.header-search button:hover { background: var(--accent); }
.header-actions, .hotline { display: flex; align-items: center; gap: 12px; }
.hotline { font-size: .85rem; line-height: 1.25; }
.hotline strong { display: block; color: var(--green-strong); font-size: 1.08rem; }
.social, .icon-button, .mobile-menu { display: inline-grid; place-items: center; flex: 0 0 auto; }
.social { width: 36px; height: 36px; border-radius: 50%; transition: transform .18s ease, box-shadow .18s ease; }
.social:hover { transform: translateY(-2px); box-shadow: 0 3px 12px #142a1e26; }
.social svg { width: 19px; height: 19px; }
.messenger { color: #fff; background: linear-gradient(145deg, #8036c5, #3455e9); }
.zalo { background: #edf6ff; color: #124fbc; border: 1px solid #d5e4ff; font-weight: 750; font-size: .7rem; }
.phone { background: var(--button-bg); color: var(--button-ink); }
.icon-button { border: 0; border-radius: 50%; width: 42px; height: 42px; background: var(--green-light); color: var(--green-ink); transition: background .18s ease, transform .18s ease; }
.icon-button:hover { background: var(--selected); transform: translateY(-1px); }
.header-cart { position: relative; }
.cart-count { position: absolute; top: -5px; right: -6px; min-width: 19px; height: 19px; padding-inline: 4px; display: grid; place-items: center; border-radius: 12px; background: var(--button-bg); color: var(--button-ink); font-size: .69rem; line-height: 1; font-weight: bold; border: 1px solid var(--panel); }
.mobile-menu, .mobile-search { display: none; }
.site-nav { background: var(--accent); }
.nav-links { display: flex; justify-content: space-between; min-height: 50px; }
.nav-links a {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 12px clamp(4px, .85vw, 10px);
    text-align: center;
    color: var(--green-ink);
    text-transform: uppercase;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.25;
    transition: background .17s ease;
}
.nav-links a:hover, .nav-links a.active { background: var(--green-light); }

.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 18px; min-height: 360px; padding: 38px 20px 26px; }
.hero-copy { animation: rise-in .45s ease both; }
.hero-copy h1 { color: var(--green-ink); font-size: clamp(2.25rem, 3.05vw, 2.8rem); margin-bottom: 18px; }
.hero-copy p { max-width: 565px; color: var(--text); font-size: 1.12rem; line-height: 1.58; }
.hero-art { width: 100%; max-height: 294px; animation: rise-in .55s ease both; }
.hero-button { margin-top: 30px; text-transform: uppercase; }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 45px; padding: 10px 20px; border: 1px solid transparent; border-radius: 4px; font-weight: 700; font-size: .92rem; text-align: center; transition: background .2s ease, transform .2s ease, border-color .2s ease; }
.button svg { width: 19px; height: 19px; flex-shrink: 0; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.primary { color: var(--on-accent); background: var(--accent); }
.primary:hover { background: var(--accent); }
.outline { color: var(--green-ink); background: var(--panel); border-color: var(--control-border); }
.outline:hover { background: var(--green-light); }
.wide-banner { display: block; margin: 8px 10px 0; overflow: hidden; border-radius: 4px; }
.wide-banner img { width: 100%; height: auto; }
.home-section { padding-top: 38px; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: center; text-align: center; gap: 26px; margin: 0 10px 14px; text-transform: uppercase; font-size: .98rem; font-weight: 700; }
.section-heading::before, .section-heading::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.showcase, .catalog-layout { display: grid; grid-template-columns: 234px minmax(0, 1fr); align-items: start; }
.catalog-sidebar { border-left: 1px solid var(--line); }
.catalog-sidebar h2 { min-height: 49px; display: flex; align-items: center; padding: 10px 16px; color: var(--on-accent); background: var(--accent); font-size: 1.04rem; text-transform: uppercase; }
.catalog-sidebar a { display: block; border-bottom: 1px solid var(--line); padding: 12px 17px; font-size: .8rem; color: var(--text); transition: background .18s ease, color .18s ease; }
.showcase-sidebar a { text-transform: uppercase; }
.catalog-sidebar a:hover, .catalog-sidebar a.selected { color: var(--green-ink); background: var(--green-light); }
.catalog-sidebar a.selected { font-weight: 700; }
.showcase-toolbar { min-height: 49px; display: flex; align-items: center; justify-content: flex-end; padding: 0 20px; border: 1px solid var(--line); border-bottom: 0; background: var(--surface); }
.showcase-toolbar a { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; }
.showcase-toolbar a:hover { color: var(--green-strong); }
.showcase-toolbar svg, .details-link svg { width: 16px; height: 16px; flex-shrink: 0; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.product-card { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); transition: box-shadow .2s ease; }
.product-card:hover, .product-card:focus-within { position: relative; z-index: 1; box-shadow: 0 4px 14px #22452115; }
.product-image { padding: 14px; display: block; aspect-ratio: 1; overflow: hidden; }
.product-image img { width: 100%; height: 100%; transition: transform .24s ease; }
.product-card:hover .product-image img { transform: scale(1.045); }
.product-card-info { display: flex; flex: 1; flex-direction: column; gap: 9px; padding: 0 15px 15px; }
.product-name { font-size: .94rem; line-height: 1.36; font-weight: 700; overflow-wrap: anywhere; }
.product-name:hover { color: var(--green-strong); }
.product-price { color: var(--green-strong); font-size: 1rem; font-weight: 700; }
.card-actions { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 6px; min-height: 38px; }
.details-link { display: inline-flex; align-items: center; gap: 4px; color: var(--green-strong); width: fit-content; font-size: .9rem; font-weight: 700; }
.details-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.add-button { width: 36px; height: 36px; border-radius: 5px; }
.add-button svg { width: 19px; height: 19px; }
.stock-label { color: var(--danger); background: var(--danger-bg); padding: 2px 6px; border-radius: 4px; font-size: .73rem; }

.partners-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; align-items: center; padding: 18px 10px; }
.partners-grid img { width: 100%; height: 90px; }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 10px 0; }
.feature-grid a { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; }
.feature-grid img { width: 100%; aspect-ratio: 2.9; object-fit: cover; transition: transform .2s ease; }
.feature-grid a:hover img { transform: scale(1.04); }
.news-section { padding-bottom: 50px; }
.news-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.news-tabs a { padding: 8px 14px; font-weight: 700; color: var(--green-ink); border: 1px solid var(--line); border-radius: 4px; }
.news-tabs a:hover, .news-tabs a.active { background: var(--green-light); }
.article-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.article-card { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel); transition: box-shadow .22s ease; }
.article-card:hover { box-shadow: 0 4px 18px #2245211a; }
.article-image { display: block; overflow: hidden; }
.article-image img { width: 100%; aspect-ratio: 1.63; object-fit: cover; transition: transform .24s ease; }
.article-card:hover img { transform: scale(1.045); }
.article-info { padding: 15px; }
.article-info time, .reading-page time { color: var(--muted); font-size: .83rem; }
.article-info h3 { margin: 5px 0 8px; font-size: 1rem; line-height: 1.38; }
.article-info h3 a:hover { color: var(--green-strong); }
.article-info p { color: var(--muted); font-size: .87rem; }

.inner-page { padding: 22px 0 60px; }
.inner-page h1 { font-size: clamp(1.95rem, 4vw, 2.55rem); margin: 8px 0 24px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); margin-bottom: 17px; font-size: .86rem; }
.breadcrumb a:hover { color: var(--green-strong); text-decoration: underline; }
.breadcrumb svg { width: 13px; height: 13px; }
.catalog-layout { gap: 18px; }
.catalog-toolbar { min-height: 49px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 13px; border: 1px solid var(--line); border-bottom: 0; background: var(--surface); font-size: .88rem; }
.catalog-toolbar select { margin-left: 5px; border: 1px solid var(--control-border); border-radius: 4px; padding: 5px; background: var(--panel); color: var(--text); }

.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 36px; }
.detail-image { border: 1px solid var(--line); border-radius: 6px; height: clamp(280px, 37vw, 500px); overflow: hidden; }
.detail-image-empty { display: grid; place-content: center; text-align: center; color: var(--muted); }
.detail-image img { width: 100%; height: 100%; max-height: 100%; object-fit: contain; animation: rise-in .22s ease both; }
.thumbnails {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    overflow-x: auto;
    overflow-y: hidden;
}
.thumbnails button {
    flex: 0 0 68px;
    inline-size: 68px;
    block-size: 68px;
    padding: 3px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
}
.thumbnails button.selected {
    border-color: var(--green-strong);
    box-shadow: inset 0 0 0 1px var(--green-strong);
}
.thumbnails img { width: 100%; height: 100%; object-fit: contain; }
.detail-price { font-size: 1.65rem; margin-bottom: 9px; }
.availability { display: inline-block; padding: 3px 10px; border-radius: 4px; background: var(--green-light); color: var(--green-ink); font-size: .83rem; }
.availability.unavailable { background: var(--danger-bg); color: var(--danger); }
.product-summary { color: var(--muted); margin: 17px 0 22px; }
.buy-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.stepper { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--control-border); border-radius: 4px; min-height: 44px; width: fit-content; }
.stepper button { border: 0; min-width: 34px; min-height: 42px; background: var(--surface); color: var(--green-ink); }
.stepper button:hover:not(:disabled) { background: var(--green-light); }
.stepper output { min-width: 33px; text-align: center; font-variant-numeric: tabular-nums; }
.product-facts, .related-products { margin-top: 36px; }
.product-facts dl { display: grid; grid-template-columns: minmax(95px, 1fr) 2fr; margin: 0 0 12px; border: 1px solid var(--line); }
.product-facts dt, .product-facts dd { margin: 0; padding: 8px 13px; border-bottom: 1px solid var(--line); }
.product-facts dt { font-weight: 700; background: var(--surface); }

.empty-state { text-align: center; padding: 46px 20px; border: 1px solid var(--line); border-radius: 6px; }
.empty-state h2 { margin-bottom: 14px; }
.empty-icon { width: 56px; height: 56px; display: grid; place-items: center; margin: 0 auto 10px; color: var(--green-ink); background: var(--green-light); border-radius: 50%; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; margin-bottom: 20px; }
.cart-lines { border: 1px solid var(--line); border-radius: 6px; }
.cart-line { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 12px; }
.cart-line + .cart-line { border-top: 1px solid var(--line); }
.cart-line-info { display: flex; flex-direction: column; align-items: start; gap: 4px; }
.text-button { background: transparent; border: 0; padding: 3px 0; color: var(--danger); text-decoration: underline; font-size: .85rem; }
.cart-totals, .contact-panel { border: 1px solid var(--line); border-radius: 6px; padding: 20px; background: var(--green-light); }
.cart-totals h2, .contact-panel h2 { font-size: 1.2rem; margin-bottom: 10px; }
.cart-totals p, .contact-panel p { margin: 12px 0; color: var(--muted); font-size: .91rem; }
.cart-totals .button { display: flex; width: 100%; margin-top: 8px; }
.total { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.reading-page { max-width: 850px; }
.reading-page > p { margin: 15px 0; }
.editorial-image { max-height: 440px; width: 100%; margin: 14px 0; background: var(--surface); }

.benefits { background: var(--green-light); border-top: 1px solid var(--line); }
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-block: 22px; }
.benefits-grid div { display: flex; align-items: center; gap: 11px; color: var(--green-ink); font-weight: 700; }
.benefits-grid svg { flex: 0 0 25px; }
.site-footer { background: #f7f9fa; padding: 30px 0 12px; color: var(--text); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 26px; }
.footer-grid h2 { font-size: 1rem; margin-bottom: 5px; }
.footer-grid a, .footer-grid p { display: block; margin-bottom: 5px; }
.footer-grid a:hover, .footer-credit a:hover { color: var(--green-strong); text-decoration: underline; }
.footer-brand { color: var(--green-ink); font-weight: 700; font-size: 1.2rem; }
.footer-credit { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 10px; font-size: .81rem; }

.floating-contact {
    position: fixed;
    z-index: 2;
    inset-block-end: var(--floating-action-bottom);
    inset-inline-start: max(15px, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.floating-contact .social {
    position: relative;
    box-shadow: 0 2px 7px #0b23182c;
}

.floating-contact .messenger { --contact-ring: #6a4ffe; --ring-delay: 0s; }
.floating-contact .zalo { --contact-ring: #2196f3; --ring-delay: -.35s; }
.floating-contact .phone { --contact-ring: var(--button-bg); --ring-delay: -.7s; }

.floating-contact .social::before,
.floating-contact .social::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 2px solid var(--contact-ring);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: contact-ring 2.3s ease-out var(--ring-delay) infinite;
}

.floating-contact .social::after { animation-delay: calc(var(--ring-delay) - 1.15s); }

@keyframes contact-ring {
    0% { opacity: .65; transform: scale(1); }
    70%, 100% { opacity: 0; transform: scale(1.55); }
}

html:has(.cart-drawer[open]) { overflow: hidden; }

@media (max-width: 1020px) {
    .header-main { grid-template-columns: 90px minmax(0, 1fr) auto; gap: 15px; }
    .nav-links a { padding-inline: 5px; font-size: .68rem; }
    .showcase, .catalog-layout { grid-template-columns: 185px minmax(0, 1fr); }
    .product-grid, .article-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .hero { min-height: 320px; }
}

@media (max-width: 850px) {
    .container { width: calc(100% - 30px); }
    .header-main { display: flex; justify-content: space-between; min-height: 84px; }
    .logo img { width: 62px; height: 62px; }
    .header-search { display: none; position: absolute; top: 100%; left: 15px; right: 15px; background: var(--panel); z-index: 4; }
    .header-search.is-open { display: flex; }
    .header-actions > .social, .header-actions .hotline { display: none; }
    .mobile-search { display: inline-grid; background: none; color: var(--text); }
    .mobile-menu { display: inline-grid; width: 55px; height: 84px; border: 0; background: var(--accent); color: var(--green-ink); }
    .site-header { border-bottom: 1px solid var(--line); }
    .site-nav { display: none; position: absolute; width: 100%; top: 100%; box-shadow: 0 6px 14px #19351726; }
    .site-nav.is-open { display: block; }
    .nav-links { display: grid; gap: 0; padding: 4px 0; }
    .nav-links a { justify-content: flex-start; text-align: left; padding: 11px 4px; font-size: .81rem; }
    .cart-layout { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .hero { grid-template-columns: 1fr; gap: 20px; padding: 20px 20px 8px; }
    .hero-copy h1 { font-size: clamp(2rem, 10vw, 2.7rem); margin-bottom: 16px; }
    .hero-copy p { font-size: 1.125rem; }
    .hero-art { max-height: 205px; margin-top: 12px; }
    .hero-button { margin-top: 30px; }
    .home-section { padding-top: 30px; }
    .section-heading { gap: 9px; font-size: .88rem; }
    .showcase, .catalog-layout { display: block; }
    .showcase-links { display: none; }
    .showcase-toolbar { min-height: 43px; }
    .catalog-layout .catalog-sidebar { margin-bottom: 13px; border: 0; }
    .catalog-layout .catalog-sidebar h2 { font-size: .9rem; border-radius: 4px 4px 0 0; }
    .catalog-layout .catalog-sidebar a { display: inline-block; padding: 8px; }
    .product-grid, .article-grid, .feature-grid, .benefits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-card-info { padding: 0 9px 10px; }
    .product-name { font-size: .88rem; }
    .product-image { padding: 8px; }
    .card-actions { align-items: center; flex-wrap: wrap; }
    .details-link { font-size: .81rem; }
    .add-button { width: 31px; height: 31px; }
    .partners-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 7px 2px; gap: 9px; }
    .partners-grid img { height: 65px; }
    .article-grid { gap: 10px; }
    .article-info { padding: 9px; }
    .benefits-grid div { font-size: .82rem; }
    .product-detail { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .cart-line { grid-template-columns: 70px 1fr; gap: 8px 12px; }
    .cart-line img { height: auto; }
    .cart-line .stepper { grid-column: 2; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 14px; font-size: .87rem; }
    .footer-grid > :first-child { grid-column: 1 / -1; }
}

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