:root {
    --bg: #f7faf9;
    --surface: #ffffff;
    --text: #10201c;
    --muted: #5e6f6a;
    --line: #dce8e5;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --blue: #0b78d0;
    --green: #16a34a;
    --amber: #b7791f;
    --danger: #dc2626;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e 0%, #0b78d0 58%, #16a34a 100%);
    border-bottom: 0;
    box-shadow: 0 12px 30px rgba(11, 120, 208, 0.2);
    backdrop-filter: blur(14px);
}

.site-header::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #facc15 0%, #ffffff 45%, #7dd3fc 100%);
}

.header-inner {
    position: relative;
    z-index: 1;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand,
.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.site-header .brand {
    color: #ffffff;
    text-shadow: 0 1px 10px rgba(6, 18, 16, 0.18);
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    background: var(--primary);
}

.site-header .brand-mark {
    color: var(--primary-dark);
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(6, 18, 16, 0.18);
}

.top-nav {
    display: none;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #ffffff;
}

.site-header .top-nav a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.top-nav a:hover {
    color: var(--primary-dark);
    background: #ffffff;
}

.mobile-search-header {
    display: none;
}

.hero {
    background: linear-gradient(135deg, #e9fbf7 0%, #eff6ff 52%, #ffffff 100%);
    border-bottom: 1px solid var(--line);
}

.hero-inner {
    display: grid;
    gap: 20px;
    padding: 42px 0 32px;
}

.hero-copy h1 {
    margin: 8px 0 12px;
    font-size: 2.35rem;
    line-height: 1.05;
}

.hero-copy p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.eyebrow {
    display: inline-flex;
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 800;
}

.hero-actions,
.detail-actions,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #ffffff;
    background: var(--primary);
}

.btn-zalo {
    color: #ffffff;
    background: var(--blue);
}

.btn-facebook {
    color: #ffffff;
    background: #1877f2;
}

.btn-call {
    color: #ffffff;
    background: var(--green);
}

.hero-panel {
    display: grid;
    gap: 4px;
    align-content: center;
    min-height: 126px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
}

.hero-panel strong {
    font-size: 1.15rem;
}

.hero-panel span {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--primary-dark);
}

.hero-panel small {
    color: var(--muted);
}

.catalog-section {
    padding: 28px 0 48px;
}

.home-info-section {
    padding: 22px 0 0;
}

.home-info-tabs {
    margin-top: 0;
}

.search-box {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.search-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
}

.search-row {
    display: grid;
    gap: 10px;
}

.search-row input,
.search-row select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    color: var(--text);
    background: #ffffff;
}

.category-strip {
    display: flex;
    gap: 10px;
    margin: 18px 0 24px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.category-strip a {
    flex: 0 0 auto;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    font-weight: 800;
}

.category-strip a.active,
.category-strip a:hover {
    border-color: var(--primary);
    color: #ffffff;
    background: var(--primary);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
}

.section-heading h2 {
    margin: 4px 0 0;
    font-size: 1.55rem;
}

.count-pill {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 8px;
    background: #e8f4ff;
    color: var(--blue);
    font-weight: 800;
}

.product-grid {
    display: grid;
    gap: 16px;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 8px;
    color: #ffffff;
    background: var(--amber);
    font-size: 0.82rem;
    font-weight: 800;
}

.product-image {
    display: block;
    aspect-ratio: 4 / 3;
    background: #eef7f5;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.28s ease, filter 0.28s ease;
}

@media (hover: hover) {
    .product-card:hover,
    .product-card:focus-within {
        transform: translateY(-6px);
        border-color: #7dd3c7;
        background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
        box-shadow: 0 22px 54px rgba(15, 118, 110, 0.18);
    }

    .product-card:hover .product-image img,
    .product-card:focus-within .product-image img {
        transform: scale(1.07);
        filter: saturate(1.08);
    }

    .product-card:hover .product-category,
    .product-card:focus-within .product-category {
        color: #ffffff;
        background: var(--primary);
    }
}

.product-body {
    display: grid;
    gap: 9px;
    padding: 14px;
}

.product-category {
    width: fit-content;
    padding: 5px 9px;
    border-radius: 8px;
    color: var(--primary-dark);
    background: #e9fbf7;
    font-size: 0.82rem;
    font-weight: 800;
}

.product-body h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.3;
}

.product-body h3 a:hover {
    color: var(--primary);
}

.product-body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.price-row,
.detail-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 9px;
}

.price-row strong,
.detail-price strong {
    color: var(--danger);
    font-size: 1.15rem;
}

.detail-price strong {
    font-size: 1.8rem;
}

.price-row del,
.detail-price del {
    color: var(--muted);
}

.sku-line {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.status-pill {
    width: fit-content;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
}

.status-instock {
    color: #166534;
    background: #dcfce7;
}

.status-out {
    color: #9a3412;
    background: #ffedd5;
}

.status-contact {
    color: #075985;
    background: #e0f2fe;
}

.card-actions {
    margin: auto 14px 14px;
}

.card-actions .btn {
    flex: 1 1 120px;
    padding-inline: 12px;
}

.empty-state {
    padding: 34px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
}

.empty-state h1,
.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p {
    margin: 0 0 16px;
    color: var(--muted);
}

.live-empty-state {
    margin-top: 12px;
}

.hidden-by-live-search {
    display: none !important;
}

.product-page {
    padding: 22px 0 50px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-weight: 700;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.product-detail {
    display: grid;
    gap: 22px;
}

.product-gallery,
.product-info,
.content-block,
.detail-tabs {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.product-gallery {
    padding: 12px;
}

.main-photo {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 8px;
    background: #eef7f5;
    touch-action: pan-y;
}

.main-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
}

.gallery-nav,
.zoom-trigger {
    position: absolute;
    z-index: 2;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(15, 32, 28, 0.76);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.gallery-nav {
    top: 50%;
    width: 42px;
    height: 48px;
    transform: translateY(-50%);
    font-size: 2rem;
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

.zoom-trigger {
    right: 10px;
    bottom: 10px;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.gallery-nav:hover,
.zoom-trigger:hover {
    background: var(--primary);
}

.thumb-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.thumb-list button {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.thumb-list button.active {
    border-color: var(--primary);
}

.thumb-list button:hover {
    border-color: #7dd3c7;
}

.thumb-list img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    display: grid;
    gap: 14px;
    align-content: start;
    padding: 18px;
}

.product-info h1 {
    margin: 0;
    font-size: 1.85rem;
    line-height: 1.15;
}

.lead {
    margin: 0;
    color: var(--muted);
}

.detail-actions .btn {
    flex: 1 1 180px;
}

.detail-content,
.detail-tabs {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.single-description {
    grid-template-columns: 1fr;
}

.detail-tabs {
    display: block;
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    background: #f1f7f5;
}

.tab-buttons button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--primary-dark);
    background: #ffffff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.tab-buttons button.active {
    color: #ffffff;
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.2);
}

.tab-panels {
    background: #ffffff;
}

.tab-panel {
    padding: 18px;
}

.tab-panel[hidden] {
    display: none;
}

.tab-panel h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.tab-panel p {
    margin: 0;
    color: var(--muted);
}

.content-block {
    padding: 18px;
}

.content-block h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.rich-text {
    color: #24332f;
}

.spec-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
}

.image-lightbox[hidden] {
    display: none;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 18, 16, 0.86);
}

.lightbox-dialog {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: calc(100vh - 36px);
    display: grid;
    gap: 10px;
}

.lightbox-image-wrap {
    display: grid;
    place-items: center;
    min-height: min(70vh, 720px);
    overflow: auto;
    border-radius: 8px;
    background: #071512;
}

.lightbox-image-wrap img {
    max-width: 100%;
    max-height: 80vh;
    transform: scale(var(--zoom-scale, 1));
    transform-origin: center center;
    transition: transform 0.18s ease;
}

.lightbox-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.lightbox-actions button {
    min-height: 42px;
    min-width: 48px;
    padding: 8px 13px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.lightbox-actions button:hover {
    background: var(--primary);
}

body.lightbox-open {
    overflow: hidden;
}

.related-section {
    padding-bottom: 0;
}

.floating-contact {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 30;
    display: grid;
    gap: 8px;
}

.floating-contact a {
    min-width: 86px;
    min-height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    font-weight: 900;
    box-shadow: var(--shadow);
}

.float-zalo {
    background: var(--blue);
}

.float-facebook {
    background: #1877f2;
}

.float-call {
    background: var(--green);
}

.site-footer {
    padding: 28px 0 84px;
    color: #d8f3ed;
    background: #12332e;
}

.footer-inner {
    display: grid;
    gap: 14px;
}

.footer-inner p {
    margin: 6px 0 0;
    color: #b6d6d0;
}

.footer-contact {
    display: grid;
    gap: 6px;
}

.footer-contact a {
    color: #ffffff;
    font-weight: 800;
}

.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 50;
    transform: translateX(-50%) translateY(16px);
    opacity: 0;
    max-width: min(420px, calc(100% - 32px));
    padding: 12px 14px;
    border-radius: 8px;
    color: #ffffff;
    background: #10201c;
    box-shadow: var(--shadow);
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-align: center;
    font-weight: 800;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 639px) {
    body {
        background: #f5f8f7;
    }

    .container {
        width: min(100% - 18px, 1120px);
    }

    .site-header {
        background: linear-gradient(135deg, #0f766e 0%, #0b78d0 58%, #16a34a 100%);
        border-bottom: 0;
        box-shadow: 0 10px 26px rgba(11, 120, 208, 0.2);
    }

    .header-inner {
        min-height: auto;
        display: grid;
        gap: 8px;
        padding: 8px 0;
    }

    .site-header .brand {
        display: inline-flex;
        font-size: 1rem;
        color: #ffffff;
    }

    .mobile-search-header {
        display: none;
    }

    .site-header .top-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        color: #ffffff;
        font-size: 0.78rem;
    }

    .site-header .top-nav a {
        min-height: 32px;
        display: grid;
        place-items: center;
        border: 1px solid rgba(255, 255, 255, 0.36);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.15);
        color: #ffffff;
        font-weight: 900;
    }

    .hero {
        display: none;
    }

    .home-info-section {
        padding-top: 10px;
    }

    .home-info-tabs {
        border-radius: 6px;
        box-shadow: none;
    }

    .home-info-tabs .tab-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        padding: 6px;
    }

    .home-info-tabs .tab-buttons button {
        min-height: 36px;
        padding: 7px 6px;
        font-size: 0.8rem;
        white-space: normal;
    }

    .home-info-tabs .tab-panel {
        padding: 10px 12px;
        font-size: 0.84rem;
        line-height: 1.45;
    }

    .home-info-tabs .tab-panel h2 {
        font-size: 1rem;
    }

    .catalog-section {
        padding: 10px 0 56px;
    }

    .search-box {
        padding: 10px;
        border-radius: 8px;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    }

    .search-box > label {
        display: block;
        margin-bottom: 7px;
        color: var(--primary-dark);
        font-size: 0.86rem;
    }

    .search-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .search-row input {
        grid-column: 1 / -1;
    }

    .search-row input,
    .search-row select {
        min-height: 40px;
        padding: 8px 9px;
        border-radius: 6px;
        font-size: 0.85rem;
        background: #ffffff;
    }

    .search-row .btn {
        display: none;
    }

    .category-strip {
        margin: 10px 0 12px;
        gap: 7px;
        scrollbar-width: none;
    }

    .category-strip::-webkit-scrollbar {
        display: none;
    }

    .category-strip a {
        padding: 7px 10px;
        border-radius: 6px;
        background: #ffffff;
        font-size: 0.82rem;
    }

    .section-heading {
        align-items: center;
        margin-bottom: 10px;
    }

    .section-heading .eyebrow {
        display: none;
    }

    .section-heading h2 {
        font-size: 1.08rem;
    }

    .count-pill {
        padding: 5px 8px;
        border-radius: 6px;
        color: #ee4d2d;
        background: #fff4ef;
        font-size: 0.78rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .product-card {
        border: 0;
        border-radius: 6px;
        background: #ffffff;
        box-shadow: none;
    }

    .product-card:active,
    .product-card.touch-active {
        transform: translateY(-4px);
        background: linear-gradient(180deg, #ffffff 0%, #fff4ef 100%);
        box-shadow: 0 12px 26px rgba(238, 77, 45, 0.2);
    }

    .product-card:active .product-image img,
    .product-card.touch-active .product-image img {
        transform: scale(1.07);
        filter: saturate(1.08);
    }

    .product-card:active .product-category,
    .product-card.touch-active .product-category {
        color: #ffffff;
        background: #ee4d2d;
    }

    .featured-badge {
        top: 0;
        right: 0;
        left: auto;
        padding: 4px 6px;
        border-radius: 0 6px 0 6px;
        color: #ee4d2d;
        background: #fff1ec;
        font-size: 0.72rem;
    }

    .product-image {
        aspect-ratio: 1 / 1;
        background: #f7f7f7;
    }

    .product-body {
        gap: 5px;
        padding: 8px;
    }

    .product-category {
        max-width: 100%;
        padding: 3px 6px;
        overflow: hidden;
        border-radius: 4px;
        color: #ee4d2d;
        background: #fff4ef;
        font-size: 0.68rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .product-body h3 {
        min-height: 40px;
        display: -webkit-box;
        overflow: hidden;
        font-size: 0.9rem;
        line-height: 1.25;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .price-row {
        gap: 5px;
    }

    .price-row strong {
        color: #ee4d2d;
        font-size: 1.16rem;
        line-height: 1.1;
    }

    .price-row del {
        font-size: 0.72rem;
    }

    .sku-line,
    .product-body p {
        display: none;
    }

    .status-pill {
        padding: 3px 6px;
        border-radius: 4px;
        font-size: 0.7rem;
    }

    .card-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        margin: auto 8px 8px;
    }

    .card-actions .btn-primary {
        display: none;
    }

    .card-actions .btn {
        min-height: 32px;
        padding: 6px 7px;
        border-radius: 5px;
        font-size: 0.74rem;
    }

    .floating-contact {
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
        padding: 6px 8px;
        border-top: 1px solid #e7e7e7;
        background: #ffffff;
        box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
    }

    .floating-contact a {
        min-width: 0;
        min-height: 42px;
        border-radius: 6px;
        box-shadow: none;
        font-size: 0.82rem;
    }

    .site-footer {
        padding-bottom: 82px;
    }
}

@media (min-width: 640px) {
    .top-nav {
        display: flex;
    }

    .search-row {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-inner {
        grid-template-columns: 1fr auto;
        align-items: start;
    }
}

@media (min-width: 920px) {
    .hero-copy h1 {
        font-size: 3.8rem;
    }

    .section-heading h2 {
        font-size: 2.15rem;
    }

    .product-info h1 {
        font-size: 2.65rem;
    }

    .hero-inner {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: end;
        padding: 64px 0 44px;
    }

    .search-row {
        grid-template-columns: 1fr minmax(150px, 190px) minmax(140px, 170px) minmax(160px, 190px) auto;
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .compact-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .product-detail {
        grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
        align-items: start;
    }

    .detail-content {
        grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    }

    .single-description {
        grid-template-columns: 1fr;
    }
}
