:root {
    --primary: #2874f0;
    --primary-dark: #1a56bb;
    --accent: #00a86b;
    --accent-dark: #0c7d55;
    --ink: #172337;
    --muted: #64748b;
    --line: #dde5f0;
    --bg: #f1f3f6;
    --surface: #ffffff;
    --soft: #f8fbff;
    --yellow: #ffd814;
    --shadow: 0 14px 32px rgba(20, 37, 64, 0.08);
}

/* Customer account and account menu */
.account-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 10px;
    border: 1px solid #d7e4f5;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
    box-shadow: 0 6px 14px rgba(27, 85, 187, 0.06);
    color: #334155 !important;
    font-size: 0.84rem;
    font-weight: 600;
}

.account-chip-avatar,
.account-avatar,
.account-home-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 800;
}

.account-chip-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.76rem;
}

.header-menu-wrap {
    position: relative;
}

.header-more-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #d7e4f5;
    border-radius: 10px;
    background: #fff;
    color: #334155;
    box-shadow: 0 6px 14px rgba(27, 85, 187, 0.05);
    cursor: pointer;
}

.header-more-dots {
    font-size: 1rem;
    line-height: 1;
}

.header-more-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 286px;
    min-width: 286px;
    display: none;
    padding: 6px 0;
    border-radius: 16px;
    border: 1px solid #d8e2ef;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    z-index: 80;
}

.header-menu-wrap.is-open .header-more-dropdown {
    display: block;
}

.header-more-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px 9px;
    border-bottom: 1px solid #eef2f7;
    margin-bottom: 2px;
}

.header-more-inline-copy {
    font-size: 0.83rem;
    color: #4b5563;
    line-height: 1.3;
    font-weight: 500;
}

.header-more-inline-link {
    color: var(--primary-dark);
    font-size: 0.84rem;
    font-weight: 700;
}

.header-more-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 0;
    color: #334155;
    font-weight: 500;
    font-size: 0.84rem;
}

.header-more-item-icon {
    width: 18px;
    height: 18px;
    color: #3f4755;
    flex: 0 0 18px;
}

.header-more-item-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.header-more-item-label {
    display: block;
    line-height: 1.25;
}

.header-more-item:hover {
    background: #f5f8fc;
    color: #111827;
}

.header-more-item:hover .header-more-item-icon {
    color: #111827;
}

.mobile-top-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.mobile-more-toggle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.mobile-more-dropdown {
    right: 0;
    left: auto;
    width: 258px;
    min-width: 258px;
}

.customer-auth-shell {
    display: grid;
    gap: 18px;
}

.account-flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #dfe7f3;
    background: #fff;
    color: #334155;
}

.account-flash a {
    color: var(--primary-dark);
    font-weight: 700;
}

.account-flash--success {
    border-color: rgba(22, 163, 74, 0.16);
    background: rgba(240, 253, 244, 0.92);
}

.account-flash--error {
    border-color: rgba(220, 38, 38, 0.16);
    background: rgba(254, 242, 242, 0.96);
}

.account-flash--info {
    border-color: rgba(40, 116, 240, 0.15);
    background: rgba(239, 246, 255, 0.96);
}

.customer-auth-layout,
.account-shell {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.customer-auth-intro,
.customer-auth-panel,
.account-sidebar,
.account-panel-head,
.account-home-card,
.account-empty-state,
.account-order-card,
.account-address-card,
.account-form-card,
.account-wishlist-card {
    background: #fff;
}

.customer-auth-intro {
    padding: 26px;
}

.customer-auth-intro h1 {
    margin: 0 0 10px;
    font-size: clamp(1.7rem, 2.5vw, 2.15rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.customer-auth-intro p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.customer-auth-points {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.customer-auth-points article {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #e4ebf5;
    background: linear-gradient(135deg, rgba(40, 116, 240, 0.05), rgba(0, 168, 107, 0.08));
    display: grid;
    gap: 4px;
}

.customer-auth-points strong {
    font-size: 0.98rem;
}

.customer-auth-points span {
    font-size: 0.88rem;
    color: #4b5a71;
    line-height: 1.55;
}

.customer-auth-panel {
    padding: 20px;
    display: grid;
    gap: 16px;
}

.customer-auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 6px;
    border-radius: 14px;
    background: #eaf1fb;
}

.customer-auth-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 10px;
    color: #5b6b84;
    font-weight: 800;
}

.customer-auth-tabs a.active {
    background: #fff;
    color: #172337;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.customer-auth-form,
.account-form-grid {
    display: grid;
    gap: 14px;
}

.customer-auth-form h2,
.account-form-card h2,
.account-empty-state h2 {
    margin: 0;
    font-size: 1.08rem;
    letter-spacing: -0.025em;
}

.customer-auth-form p,
.account-empty-state p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.customer-auth-form label,
.account-form-grid label {
    display: grid;
    gap: 7px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #172337;
}

.customer-auth-form input,
.account-form-grid input,
.account-form-grid textarea,
.account-form-grid select {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #d6dfec;
    border-radius: 12px;
    background: #fff;
    color: #172337;
}

.account-form-grid textarea {
    min-height: 108px;
    resize: vertical;
}

.full-width-btn {
    width: 100%;
}

.account-sidebar {
    padding: 18px;
    position: sticky;
    top: 126px;
    display: grid;
    gap: 18px;
}

.account-sidebar-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-avatar {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

.account-sidebar-head div {
    display: grid;
    gap: 2px;
}

.account-sidebar-head span:last-child {
    color: var(--muted);
    font-size: 0.84rem;
}

.account-nav {
    display: grid;
    gap: 6px;
}

.account-nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    color: #4b5a71;
    font-weight: 700;
}

.account-nav-link:hover,
.account-nav-link.active {
    background: rgba(40, 116, 240, 0.07);
    color: var(--primary-dark);
}

.account-main {
    display: grid;
    gap: 16px;
}

.account-panel-head {
    padding: 20px 22px;
}

.account-panel-head h1 {
    margin: 0 0 6px;
    font-size: clamp(1.5rem, 2.4vw, 1.9rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.account-panel-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.account-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.account-home-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.account-home-card-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    font-size: 0.88rem;
}

.account-home-card div {
    display: grid;
    gap: 5px;
}

.account-home-card strong {
    font-size: 0.94rem;
}

.account-home-card p,
.account-home-card span {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.account-section-stack,
.account-address-list,
.account-settings-grid {
    display: grid;
    gap: 16px;
}

.account-settings-grid,
.account-address-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.account-empty-state,
.account-form-card,
.account-order-card,
.account-address-card {
    padding: 18px;
    border-radius: 18px;
}

.account-order-head,
.account-address-head,
.account-order-foot,
.account-inline-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.account-order-head > div,
.account-order-meta,
.account-order-foot > div {
    display: grid;
    gap: 4px;
}

.account-order-head span,
.account-order-foot span,
.account-address-card p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0;
}

.account-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(0, 168, 107, 0.1);
    color: #0c7d55;
    font-size: 0.78rem;
    font-weight: 800;
}

.account-order-items {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #edf2f8;
}

.account-order-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.account-order-item img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #edf2f8;
}

.account-order-item div {
    display: grid;
    gap: 4px;
}

.account-text-link {
    border: 0;
    background: transparent;
    color: var(--primary-dark);
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.account-text-link--danger {
    color: #dc2626;
}

.account-checkbox {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 600 !important;
}

.account-checkbox input {
    width: 18px;
    min-height: 18px;
    height: 18px;
    padding: 0;
}

.account-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.account-wishlist-card {
    padding: 12px;
    border-radius: 18px;
}

.account-wishlist-remove {
    margin-top: 10px;
}

@media (max-width: 1100px) {
    .customer-auth-layout,
    .account-shell,
    .account-address-layout,
    .account-settings-grid {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        position: static;
    }
}

@media (max-width: 900px) {
    .mobile-top-row {
        grid-template-columns: 86px minmax(0, 1fr) auto !important;
        gap: 6px;
    }

    .mobile-top-actions {
        gap: 6px;
    }

    .mobile-more-toggle {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .mobile-auth .header-btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .account-card-grid,
    .account-wishlist-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .header-more-dropdown {
        width: 240px;
        min-width: 240px;
        border-radius: 14px;
    }

    .header-more-dropdown-head {
        padding: 9px 14px 8px;
    }

    .header-more-inline-copy,
    .header-more-inline-link,
    .header-more-item {
        font-size: 0.8rem;
    }

    .header-more-item {
        min-height: 40px;
        padding: 0 14px;
        gap: 10px;
    }

    .header-more-item-icon,
    .header-more-item-icon svg {
        width: 16px;
        height: 16px;
    }

    .account-flash {
        flex-direction: column;
        align-items: flex-start;
    }

    .customer-auth-intro,
    .customer-auth-panel,
    .account-sidebar,
    .account-panel-head,
    .account-home-card,
    .account-empty-state,
    .account-order-card,
    .account-address-card,
    .account-form-card,
    .account-wishlist-card {
        padding: 14px;
        border-radius: 16px;
    }

    .account-order-item {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .account-order-item strong:last-child {
        grid-column: 2;
    }

    .account-order-head,
    .account-address-head,
    .account-order-foot,
    .account-inline-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Inter", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
button, input, select, textarea { font: inherit; }

.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(23, 35, 55, 0.07);
}

.mobile-header {
    display: none;
}

.header-main {
    height: 131px;
    display: flex;
    align-items: center;
}

.header-shell {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 22px;
    align-items: center;
    width: 100%;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    min-width: 0;
}

.header-top-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 98px;
    height: 98px;
    width: 210px;
    padding: 6px 10px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fffdf8, #f6f0e8);
    border: 1px solid #eadfce;
    box-shadow: var(--shadow);
}

.brand-logo img {
    display: block;
    max-height: 86px;
    max-width: 100%;
    width: auto;
    height: auto;
}

.header-note {
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: 2%;
}

.header-links {
    display: flex;
    gap: 18px;
    align-items: center;
    white-space: nowrap;
    font-weight: 600;
    justify-content: flex-end;
}

.header-links a {
    color: #334155;
}

.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 15px;
    border-radius: 12px;
    border: 1px solid #dbe4f2;
    background: #fff;
    box-shadow: 0 8px 18px rgba(27, 85, 187, 0.05);
}

.login-btn {
    color: var(--primary-dark);
}

.seller-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff !important;
    border-color: transparent;
}

.cart-link-header {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
    border: 1px solid #d7e4f5;
    box-shadow: 0 8px 18px rgba(27, 85, 187, 0.08);
}

.cart-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 0.82rem;
}

.search-bar {
    display: grid;
    grid-template-columns: minmax(150px, 220px) 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 7px 10px;
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: 14px;
    width: 100%;
}

.search-bar input,
.search-bar select {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.search-category-select {
    border-right: 1px solid var(--line) !important;
    border-radius: 0;
    padding: 0 10px 0 6px;
    color: #334155 !important;
    font-weight: 600;
}

.search-bar button,
.btn,
.card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 700;
}

.search-bar button {
    min-width: 94px;
    height: 40px;
    padding: 0 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 0.95rem;
}

.btn.primary,
.card-btn.primary {
    padding: 11px 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.btn.secondary,
.card-btn.secondary {
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
}

.card-btn.cart {
    background: linear-gradient(135deg, #f6b000, #ffd65a);
    color: #1b2234;
}

.card-btn.buy {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
}

.category-rail {
    min-height: 70px;
    display: flex;
    align-items: center;
    background: #fff;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.category-rail-shell {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 8px;
}

.category-list {
    display: flex;
    gap: 4px;
    align-items: stretch;
    overflow-x: auto;
    white-space: nowrap;
    scroll-behavior: smooth;
    padding: 6px 2px 7px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-list::-webkit-scrollbar,
.mobile-menu-line::-webkit-scrollbar {
    display: none;
    height: 0;
}

.category-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 88px;
    max-width: 98px;
    padding: 3px 5px 6px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #334155;
    text-align: center;
    white-space: normal;
    line-height: 1.18;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.category-link.active,
.category-link:hover {
    color: var(--primary-dark);
    background: rgba(40, 116, 240, 0.05);
}

.category-link-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
    border: 1px solid #dbe4f2;
    font-size: 0.98rem;
    box-shadow: 0 4px 10px rgba(15, 39, 77, 0.05);
}

.category-link-label {
    display: block;
    max-width: 100%;
    letter-spacing: -0.01em;
}

.category-scroll-btn {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9e2f1;
    border-radius: 999px;
    background: #fff;
    color: #4b5a71;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(15, 39, 77, 0.06);
    cursor: pointer;
}

.category-scroll-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 220;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(23, 35, 55, 0.08);
}

.mobile-header-main {
    padding: 4px 0 4px;
}

.mobile-top-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px;
    align-items: center;
    margin-bottom: 4px;
}

.mobile-logo {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 58px;
    max-width: 156px;
    overflow: hidden;
}

.mobile-logo img {
    height: 58px;
    width: auto;
    max-width: none;
    transform: scale(1.35);
    transform-origin: left center;
}

.mobile-auth {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 4px 0 2px;
    overflow: hidden;
    max-height: 48px;
    transition: max-height 0.2s ease, opacity 0.2s ease, padding 0.2s ease;
}

.mobile-auth.is-hidden-on-scroll {
    max-height: 0;
    opacity: 0;
    padding: 0;
    pointer-events: none;
}

.mobile-search-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: 10px;
}

.mobile-search-bar input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.mobile-search-bar button {
    min-width: 70px;
    height: 34px;
    padding: 0 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
}

.mobile-menu-line {
    display: flex;
    gap: 8px;
    align-items: stretch;
    overflow-x: auto;
    padding: 4px 2px 2px;
    margin-top: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-line .category-link {
    flex: 0 0 auto;
    min-width: 74px;
    max-width: 86px;
    padding: 4px 4px 6px;
    border-radius: 12px;
    background: transparent;
    gap: 4px;
    scroll-snap-align: start;
}

.mobile-menu-line .category-link:hover,
.mobile-menu-line .category-link.active {
    background: rgba(40, 116, 240, 0.06);
}

.mobile-menu-line .category-link-icon {
    width: 24px;
    height: 24px;
    font-size: 0.82rem;
}

.mobile-menu-line .category-link-label {
    font-size: 0.66rem;
    line-height: 1.15;
}

.page {
    padding: 14px 0 26px;
}

.panel,
.hero-section,
.search-results,
.product-detail,
.admin-panel {
    background: var(--surface);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.hero-section,
.panel,
.search-results,
.product-detail,
.admin-panel {
    padding: 16px;
    margin-bottom: 14px;
}

.section-title {
    margin: 0 0 6px;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.section-subtitle {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.hero-grid,
.feature-grid,
.product-grid,
.admin-grid,
.upload-grid,
.recommend-grid,
.detail-layout,
.search-layout {
    display: grid;
    gap: 14px;
}

.hero-grid {
    grid-template-columns: 1.4fr 1fr;
}

.hero-banner {
    min-height: 320px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, rgba(40, 116, 240, 0.96), rgba(0, 168, 107, 0.96));
}

.hero-banner img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
}

.hero-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(16, 25, 46, 0.82), rgba(16, 25, 46, 0.22));
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 58%;
    color: #fff;
    padding: 26px;
}

.hero-copy h1 {
    margin: 0 0 12px;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.12;
}

.hero-copy p {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
    line-height: 1.65;
}

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

.feature-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, #f8fbff);
}

.feature-card strong {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.94rem;
    font-weight: 700;
    min-height: 58px;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.55;
}

.feature-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(40, 116, 240, 0.14), rgba(0, 168, 107, 0.14));
    flex: 0 0 34px;
}

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

.product-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    padding: 10px;
    background: #fff;
    min-height: 438px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(40, 116, 240, 0.35);
    box-shadow: 0 8px 20px rgba(15, 39, 77, 0.11);
}

.product-media,
.product-image-wrap {
    width: 100%;
    height: 220px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
    flex: 0 0 220px;
}

.product-media img,
.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-body,
.product-info {
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.product-brand {
    color: #475569;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
}

.product-body h3 {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.32;
    min-height: 3.96em;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-body h3 a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.muted { color: var(--muted); }
.price { font-size: 1.14rem; font-weight: 700; }
.monthly { color: var(--accent-dark); font-weight: 600; font-size: 0.81rem; line-height: 1.35; }

.product-rating-line,
.related-rating-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    color: #475569;
    font-size: 0.76rem;
    line-height: 1.2;
}

.product-rating-value,
.related-rating-value {
    font-weight: 700;
    color: #0f172a;
}

.product-rating-count,
.related-rating-count {
    color: #64748b;
}

.product-rating-line,
.related-rating-line,
.detail-copy > .meta-line:first-of-type,
.results-list .result-card > div > .meta-line:first-of-type {
    display: none !important;
}

.product-deal-badge,
.related-deal-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 6px;
    background: #c2185b;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
}

.product-price-line,
.related-price-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.product-discount,
.related-discount {
    color: #b42318;
    font-size: 0.94rem;
    font-weight: 700;
}

.product-list-price,
.related-mrp {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.25;
}

.product-list-price span,
.related-mrp span {
    text-decoration: line-through;
}

.product-delivery,
.related-delivery {
    color: #111827;
    font-size: 0.8rem;
    line-height: 1.32;
    font-weight: 600;
}

.product-monthly {
    font-size: 0.72rem;
    line-height: 1.3;
}

.badge-row,
.card-actions,
.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
}

.badge.green {
    background: rgba(0, 168, 107, 0.12);
    color: var(--accent-dark);
}

.badge.blue {
    background: rgba(40, 116, 240, 0.12);
    color: var(--primary-dark);
}

.card-actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.card-btn {
    padding: 9px 11px;
    border-radius: 8px;
    font-size: 0.84rem;
}

.search-layout {
    grid-template-columns: 240px 1fr;
}

.filter-panel {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
    padding: 14px;
    position: sticky;
    top: 190px;
    align-self: start;
    max-height: calc(100vh - 210px);
    overflow: auto;
}

.filter-group { margin-bottom: 18px; }
.filter-group strong { display: block; margin-bottom: 10px; }
.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #334155;
    font-size: 0.9rem;
}

.results-list {
    display: grid;
    gap: 14px;
}

.result-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.result-image,
.recommend-card .media {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    height: 220px;
    padding: 0;
    overflow: hidden;
}

.result-image img,
.recommend-card .media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.result-card h2,
.detail-copy h1 {
    margin: 0 0 8px;
    letter-spacing: -0.03em;
    font-weight: 700;
    line-height: 1.35;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.88rem;
}

.stars { color: #f59e0b; }

.result-price,
.detail-price {
    font-size: 1.55rem;
    font-weight: 700;
    margin: 10px 0 6px;
}

.detail-layout {
    grid-template-columns: 1.05fr 1.25fr 320px;
    align-items: start;
}

.detail-gallery {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 12px;
}

.thumbs {
    display: grid;
    gap: 10px;
    max-height: 560px;
    overflow-y: auto;
    padding-right: 4px;
}

.thumb-box,
.main-image-box {
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfdff, #f3f7fd);
    color: #64748b;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 700;
}

.thumb-box {
    width: 84px;
    min-height: 84px;
    padding: 8px;
    font-size: 0.78rem;
    cursor: pointer;
}

.thumb-box img {
    width: 100%;
    height: 70px;
    object-fit: contain;
    display: block;
}

.thumb-box.active {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}

.main-image-box { height: 560px; padding: 18px; overflow: hidden; }
.main-image-box img { width: 100%; height: 100%; object-fit: contain; display: block; }

.detail-copy .store-link,
.detail-copy .small-note { color: #334155; font-weight: 600; font-size: 0.9rem; }

.offers-grid,
.service-grid,
.variant-grid {
    display: grid;
    gap: 12px;
}

.offers-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0; }
.service-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 16px 0; }
.variant-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.product-variant-selector {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.variant-option-group {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(209, 220, 234, 0.9);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.variant-option-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.variant-option-group strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    line-height: 1.4;
}

.variant-option-selected {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.variant-option-help {
    margin-top: -2px;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.45;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.variant-option {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: #172337;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    min-width: 76px;
    line-height: 1.35;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.variant-option:hover,
.variant-option.active {
    border-color: var(--primary);
    background: rgba(40, 116, 240, 0.05);
    box-shadow: 0 0 0 2px rgba(40, 116, 240, 0.12), 0 8px 18px rgba(40, 116, 240, 0.08);
    color: var(--primary-dark);
}

.variant-option-text {
    display: inline-block;
}

.variant-option-swatch {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    flex: 0 0 16px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.variant-sku-line {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
}

.variant-sku-line span:first-child,
.variant-stock-buy {
    color: var(--accent-dark);
}

.offer-card,
.service-card,
.variant-card,
.buy-box,
.admin-box,
.recommend-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.offer-card,
.variant-card,
.admin-box,
.recommend-card {
    padding: 14px;
}

.service-card {
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    color: #475569;
    font-size: 0.88rem;
}

.service-card-icon,
.offer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
}

.service-card-icon {
    font-size: 1rem;
}

.offer-icon {
    margin-right: 6px;
}

.detail-fixed-note {
    color: #475569;
    line-height: 1.55;
}

.zoomable-product-image {
    cursor: zoom-in;
}

.image-zoom-chip {
    position: absolute;
    left: 18px;
    bottom: 16px;
    z-index: 2;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 8px 12px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

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

.image-lightbox img {
    max-width: min(92vw, 1200px);
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 18px;
    background: #fff;
    padding: 12px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
}

.image-lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

body.lightbox-open {
    overflow: hidden;
}

.buy-box {
    padding: 18px;
    position: sticky;
    top: 150px;
}

.buy-box .card-btn { width: 100%; margin-top: 10px; }

.mobile-sticky-buybar {
    display: none;
}

.mobile-sticky-btn.is-disabled,
.card-btn.is-disabled {
    opacity: 0.55;
    pointer-events: none;
    box-shadow: none;
}

.detail-copy ul,
.guide-list {
    margin: 14px 0 0;
    padding-left: 18px;
    color: #334155;
    line-height: 1.8;
}

.recommend-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

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

.recommend-card h4 {
    margin: 10px 0 8px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.45;
}

.admin-grid {
    grid-template-columns: 1.1fr 0.9fr;
}

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

.admin-form-grid {
    display: grid;
    gap: 12px;
}

.field,
.upload-slot,
.textarea-field {
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #fff;
    color: #64748b;
    font-weight: 700;
    padding: 14px;
    min-height: 56px;
}

.textarea-field { min-height: 140px; }
.upload-slot {
    min-height: 110px;
    display: grid;
    place-items: center;
    text-align: center;
}

.site-footer {
    background: #10213e;
    color: rgba(255, 255, 255, 0.88);
    margin-top: 18px;
    padding-top: 30px;
}

@media (min-width: 1400px) {
    .product-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 1320px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 22px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fffdf8, #f6f0e8);
    border: 1px solid rgba(234, 223, 206, 0.4);
}

.footer-brand img {
    display: block;
    max-width: 220px;
    width: 100%;
    height: auto;
}
.site-footer h3 { margin: 0 0 12px; }
.site-footer p, .site-footer li, .site-footer a {
    color: rgba(255, 255, 255, 0.74);
    line-height: 1.8;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 20px;
    padding: 14px 0 22px;
    font-size: 0.92rem;
}

.clothing-page .panel {
    overflow: hidden;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(0, 168, 107, 0.12);
    color: var(--accent-dark);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.clothing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 16px;
    align-items: stretch;
    background:
        radial-gradient(circle at top left, rgba(0, 168, 107, 0.16), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f5fbff 54%, #ecfdf5 100%);
    border: 1px solid rgba(40, 116, 240, 0.08);
}

.clothing-hero-copy {
    display: flex;
    min-height: 230px;
    flex-direction: column;
    justify-content: center;
    padding: 16px 8px;
}

.clothing-hero-copy h1 {
    max-width: 720px;
    margin: 0 0 10px;
    color: var(--ink);
    font-size: clamp(1.7rem, 3vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.clothing-hero-copy p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.7;
}

.clothing-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.clothing-feature-card {
    position: relative;
    display: flex;
    min-height: 230px;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    overflow: hidden;
    border-radius: 20px;
    padding: 18px;
    color: #fff;
    isolation: isolate;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.clothing-feature-card::before {
    content: "";
    position: absolute;
    inset: auto -36px -50px auto;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    z-index: -1;
}

.clothing-feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.28));
    z-index: -1;
}

.clothing-feature-card.women {
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.94), rgba(22, 163, 74, 0.9)),
        url("images/SufiCart%20Background.png") center / cover;
}

.clothing-feature-card.men {
    background:
        linear-gradient(135deg, rgba(29, 78, 216, 0.94), rgba(15, 23, 42, 0.9)),
        url("images/SufiCart%20Background.png") center / cover;
}

.clothing-feature-card span {
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.clothing-feature-card strong {
    max-width: 240px;
    font-size: 1.12rem;
    line-height: 1.25;
}

.clothing-subcategory-section {
    margin-top: 14px;
}

.clothing-subcategory-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 10px;
}

.clothing-tile {
    display: flex;
    min-height: 104px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    text-align: center;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.clothing-tile:hover {
    transform: translateY(-2px);
    border-color: rgba(40, 116, 240, 0.32);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.clothing-tile-icon {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(40, 116, 240, 0.12), rgba(0, 168, 107, 0.12));
    font-size: 1.05rem;
}

.clothing-tile-name {
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.18;
}

.clothing-tile-meta {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 600;
}

.category-page .panel {
    overflow: hidden;
}

.category-hero {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    background:
        radial-gradient(circle at top right, rgba(40, 116, 240, 0.12), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f7fbff 55%, #eefbf6 100%);
}

.category-hero-copy {
    display: grid;
    gap: 10px;
}

.category-hero-copy h1 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.category-hero-copy p {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    line-height: 1.7;
}

.category-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.subcategory-tile {
    display: flex;
    min-height: 94px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.subcategory-tile:hover,
.subcategory-tile.active {
    transform: translateY(-2px);
    border-color: rgba(40, 116, 240, 0.35);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.subcategory-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(40, 116, 240, 0.12), rgba(0, 168, 107, 0.12));
    font-size: 1rem;
}

.subcategory-name {
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
}

@media (max-width: 1100px) {
    .hero-grid,
    .admin-grid,
    .detail-layout,
    .search-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .subcategory-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .clothing-subcategory-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .feature-grid,
    .offers-grid,
    .recommend-grid,
    .service-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .buy-box { position: static; }
}

@media (max-width: 900px) {
    .desktop-header {
        display: none;
    }

    .mobile-header {
        display: block;
    }

    .site-header {
        position: static;
    }

    .container {
        padding: 0 12px;
    }

    .header-shell,
    .result-card,
    .detail-gallery {
        grid-template-columns: 1fr;
    }

    .header-btn,
    .cart-link-header {
        padding: 8px 12px;
        border-radius: 12px;
        font-size: 0.92rem;
    }

    .hero-copy { max-width: 82%; }
    .feature-grid,
    .product-grid,
    .admin-form-grid,
    .upload-grid,
    .service-grid,
    .offers-grid,
    .recommend-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .clothing-hero {
        grid-template-columns: 1fr;
    }

    .category-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .clothing-hero-copy {
        min-height: auto;
    }

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

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

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

    .thumb-box {
        width: 100%;
        min-height: 72px;
    }

    .product-card {
        min-height: 360px;
        padding: 10px;
    }

    .product-media,
    .product-image-wrap {
        height: 190px;
        flex-basis: 190px;
    }

    .page {
        padding-top: 108px;
    }
}

@media (max-width: 580px) {
    .container { padding: 0 8px; }
    .hero-copy { max-width: 100%; }
    .hero-copy h1 { font-size: 2rem; }
    .header-links,
    .card-actions,
    .result-actions,
    .footer-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .header-note {
        white-space: normal;
    }

    .mobile-logo {
        max-width: 124px;
    }

    .mobile-logo img {
        height: 44px;
        transform: scale(1.28);
    }

    .mobile-top-row {
        grid-template-columns: 124px 1fr;
    }

    .feature-grid,
    .admin-form-grid,
    .upload-grid,
    .service-grid,
    .offers-grid,
    .recommend-grid,
    .variant-grid {
        grid-template-columns: 1fr;
    }

    .clothing-hero {
        padding: 14px;
    }

    .clothing-hero-grid {
        grid-template-columns: 1fr;
    }

    .clothing-feature-card {
        min-height: 150px;
    }

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

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

    .clothing-tile {
        min-height: 92px;
        border-radius: 14px;
        padding: 10px 6px;
    }

    .clothing-tile-name {
        font-size: 0.72rem;
    }

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

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

    .card-btn {
        padding: 9px 10px;
        font-size: 0.86rem;
        border-radius: 10px;
    }
    .product-media,
    .product-image-wrap {
        height: 165px;
        flex-basis: 165px;
    }

    .product-card {
        min-height: 340px;
    }

    .main-image-box { height: 340px; }
}

.cart-count-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--yellow);
    color: #172337;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.cart-count-badge.is-empty {
    opacity: 0.8;
}

.mobile-cart-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #d7e4f5;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
    box-shadow: 0 8px 18px rgba(27, 85, 187, 0.08);
}

.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 400;
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.toast-item {
    min-width: 240px;
    max-width: 320px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(23, 35, 55, 0.96);
    color: #fff;
    box-shadow: 0 16px 32px rgba(23, 35, 55, 0.16);
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.toast-item.error {
    background: rgba(163, 24, 24, 0.96);
}

.toast-item.is-leaving {
    transform: translateY(12px);
    opacity: 0;
}

.section-head-inline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.cart-page-grid,
.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 18px;
    align-items: start;
}

.cart-items-card,
.cart-summary-card,
.checkout-form-card,
.empty-state-card {
    background: linear-gradient(180deg, #fff, #fbfdff);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.cart-items-card,
.cart-summary-card,
.checkout-form-card,
.empty-state-card {
    padding: 18px;
}

.cart-item-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) auto;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.cart-item-row:last-child {
    border-bottom: 0;
}

.cart-item-image {
    height: 112px;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-copy h3 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

.cart-item-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.84rem;
}

.cart-item-price {
    margin-top: 10px;
    font-size: 1.02rem;
    font-weight: 700;
}

.cart-item-qty {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.cart-item-qty button {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 0;
    background: #eef4ff;
    color: var(--primary-dark);
    font-weight: 800;
    cursor: pointer;
}

.cart-item-side {
    display: grid;
    justify-items: end;
    align-content: space-between;
    gap: 12px;
    min-width: 96px;
}

.text-button,
.ghost-action-btn {
    border: 0;
    background: transparent;
    color: var(--primary-dark);
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.cart-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.cart-summary-card h2,
.checkout-form-card h2,
.empty-state-card h2 {
    margin: 0 0 14px;
    font-size: 1.12rem;
    font-weight: 700;
}

.summary-line,
.checkout-line-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.summary-line.total {
    font-size: 1rem;
    font-weight: 700;
    border-bottom: 0;
}

.summary-note,
.checkout-note {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.full-width-btn {
    width: 100%;
    margin-top: 16px;
}

.checkout-mode-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(0, 168, 107, 0.12);
    color: var(--accent-dark);
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

.checkout-form {
    display: grid;
    gap: 16px;
}

.checkout-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.checkout-form label {
    display: grid;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
}

.checkout-form textarea {
    min-height: 118px;
    resize: vertical;
}

.payment-selector {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.payment-selector label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.payment-selector input {
    width: auto;
}

.summary-line strong {
    white-space: nowrap;
}

.checkout-item-title {
    display: block;
    font-size: 0.95rem;
    line-height: 1.45;
    font-weight: 600;
    white-space: normal;
    overflow-wrap: anywhere;
}

.checkout-item-price {
    white-space: nowrap;
    font-size: 0.96rem;
    font-weight: 700;
}

.checkout-line-item span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.84rem;
}

.empty-state-card {
    display: grid;
    gap: 12px;
    justify-items: start;
}

.empty-state-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(40, 116, 240, 0.12), rgba(0, 168, 107, 0.12));
    color: var(--primary-dark);
    font-weight: 800;
}

@media (max-width: 900px) {
    .mobile-top-row {
        grid-template-columns: auto auto 1fr;
    }

    .section-head-inline,
    .cart-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-page-grid,
    .checkout-grid,
    .checkout-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 580px) {
    .mobile-top-row {
        grid-template-columns: 108px auto 1fr;
    }

    .mobile-cart-link {
        min-height: 40px;
        padding: 6px 8px;
    }

    .cart-item-row {
        grid-template-columns: 82px 1fr;
    }

    .cart-item-image {
        height: 82px;
    }

    .cart-item-side {
        grid-column: 1 / -1;
        justify-items: start;
    }

    .toast-stack {
        right: 10px;
        left: 10px;
        bottom: 10px;
    }

    .toast-item {
        max-width: none;
        min-width: 0;
    }
}

/* Production storefront refinements */
html,
body {
    overflow-x: hidden;
}

.product-detail,
.detail-layout,
.detail-layout > *,
.detail-copy,
.detail-gallery,
.buy-box,
.panel,
.recommend-card,
.recommend-card-link,
.product-gallery-stage,
.product-gallery-thumbs {
    min-width: 0;
}

.page {
    padding-top: calc(var(--site-header-offset, 0px) + 14px);
}

.header-main {
    height: 112px;
}

.header-shell {
    grid-template-columns: 180px 1fr;
    gap: 18px;
}

.brand-logo {
    width: 180px;
    min-height: 82px;
    height: 82px;
    padding: 4px 8px;
    border-radius: 12px;
}

.brand-logo img {
    max-height: 70px;
}

.header-content {
    gap: 8px;
}

.header-note {
    font-size: 0.84rem;
    font-weight: 600;
    margin-left: 0;
}

.header-links {
    gap: 12px;
}

.header-btn,
.cart-link-header {
    padding: 8px 13px;
    border-radius: 11px;
}

.search-bar {
    grid-template-columns: minmax(132px, 190px) 1fr auto;
    min-height: 44px;
    padding: 6px 9px;
    border-radius: 13px;
}

.search-bar button {
    min-width: 88px;
    height: 38px;
    border-radius: 12px;
    font-size: 0.92rem;
}

.category-rail {
    min-height: 60px;
}

.category-link {
    min-width: 78px;
    max-width: 92px;
    gap: 5px;
    padding: 2px 4px 5px;
    font-size: 0.68rem;
}

.category-link-icon {
    width: 28px;
    height: 28px;
    font-size: 0.88rem;
}

.buy-box {
    top: 126px;
}

.product-gallery-carousel {
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-areas: "thumbs stage";
    gap: 14px;
}

.product-gallery-thumbs {
    grid-area: thumbs;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 560px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.product-gallery-stage {
    grid-area: stage;
    position: relative;
    min-width: 0;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #1e293b;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    z-index: 2;
}

.gallery-prev {
    left: 14px;
}

.gallery-next {
    right: 14px;
}

.gallery-count {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.related-products-panel {
    overflow: hidden;
}

.related-card-carousel {
    display: block;
}

.related-card-viewport {
    overflow: hidden;
    min-width: 0;
}

.related-card-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 220px);
    gap: 14px;
    overflow-x: auto;
    padding: 4px 0 10px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.related-card-track::-webkit-scrollbar {
    display: none;
}

.related-card-arrow {
    width: 42px;
    height: 42px;
    border: 1px solid #d9e2f1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-size: 0.94rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.related-card-arrow:disabled {
    opacity: 0.45;
    cursor: default;
}

.related-product-card,
.related-grid-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.related-product-card {
    min-width: 0;
    scroll-snap-align: start;
}

.related-product-link,
.related-grid-link {
    display: block;
    height: 100%;
    padding: 10px;
    color: inherit;
}

.related-product-media,
.related-grid-media {
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-product-media img,
.related-grid-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.related-brand {
    color: #475569;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 10px;
}

.related-product-copy h4,
.related-grid-copy h4 {
    margin: 6px 0 6px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 2.6em;
}

.related-product-copy .price,
.related-grid-copy .price {
    margin-top: 0;
    font-size: 1.02rem;
    font-weight: 800;
}

.related-grid-shelf {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.legacy-related-grid {
    display: none !important;
}

.related-slider-shell {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 12px;
    align-items: center;
}

.related-products-viewport {
    overflow: hidden;
    min-width: 0;
}

.related-products-track {
    display: block;
    width: 100%;
}

.related-slide {
    display: none;
    width: 100%;
}

.related-slide.is-active {
    display: block;
}

.related-slide-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.related-slider-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #d9e2f1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-size: 0.92rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.related-slider-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.related-slider-status {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.related-products-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 1fr);
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
    -ms-overflow-style: none;
    scrollbar-width: thin;
}

.related-products-carousel::-webkit-scrollbar,
.product-gallery-thumbs::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.related-products-carousel::-webkit-scrollbar-thumb,
.product-gallery-thumbs::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.55);
    border-radius: 999px;
}

.recommend-card {
    min-height: 100%;
}

.recommend-card-link {
    display: block;
    color: inherit;
    height: 100%;
}

.recommend-card-link .media {
    height: 210px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, #fbfdff, #f3f7fd);
    display: flex;
    align-items: center;
    justify-content: center;
}

.recommend-card-link .media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.recommend-card-link h4 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    min-height: 3.9em;
}

.recommend-card-link .monthly {
    margin-top: 8px;
    color: var(--accent-dark);
    font-size: 0.82rem;
    font-weight: 700;
}

.about-item-card {
    padding: 16px 0 0;
}

.about-item-list {
    margin: 12px 0 0;
    padding-left: 20px;
    color: #334155;
    line-height: 1.65;
    font-size: 0.95rem;
}

.about-item-list li + li {
    margin-top: 6px;
}

.about-item-description {
    margin: 12px 0 0;
    color: #475569;
    line-height: 1.72;
    font-size: 0.94rem;
}

.about-item-extra {
    margin-top: 4px;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.about-item-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary-dark);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.about-item-toggle .about-toggle-icon {
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .page-product-detail {
        padding-bottom: calc(124px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-header-main {
        padding: 2px 0 3px;
    }

    .mobile-top-row {
        grid-template-columns: 86px 42px minmax(0, 1fr);
        gap: 6px;
        margin-bottom: 2px;
    }

    .mobile-logo {
        max-width: 86px;
        min-height: 46px;
    }

    .mobile-logo img {
        height: 46px;
        transform: none;
    }

    .mobile-cart-link {
        min-height: 38px;
        padding: 6px 8px;
        justify-content: center;
    }

    .mobile-search-bar {
        padding: 4px 8px;
        gap: 6px;
        border-radius: 12px;
    }

    .mobile-search-bar input {
        font-size: 0.82rem;
    }

    .mobile-search-bar button {
        min-width: 62px;
        height: 32px;
        border-radius: 10px;
        font-size: 0.82rem;
    }

    .mobile-auth {
        gap: 6px;
        padding: 2px 0 1px;
        max-height: 40px;
    }

    .mobile-auth .header-btn {
        padding: 6px 10px;
        border-radius: 10px;
        font-size: 0.76rem;
    }

    .mobile-menu-line {
        gap: 8px;
        padding: 3px 2px 2px;
        margin-top: 2px;
    }

    .mobile-menu-line .category-link {
        min-width: 70px;
        max-width: 82px;
        padding: 4px 4px 6px;
        gap: 4px;
    }

    .mobile-menu-line .category-link-icon {
        width: 22px;
        height: 22px;
        font-size: 0.78rem;
    }

    .mobile-menu-line .category-link-label {
        font-size: 0.62rem;
        line-height: 1.12;
        font-weight: 600;
    }

    .page {
        padding-top: calc(var(--site-header-offset, 0px) + 12px);
    }

    .product-detail,
    .panel {
        padding: 12px;
        border-radius: 16px;
    }

    .detail-layout {
        gap: 10px;
    }

    .detail-copy {
        display: grid;
        gap: 10px;
    }

    .detail-copy h1 {
        font-size: 1.22rem;
        line-height: 1.42;
        word-break: break-word;
    }

    .detail-price {
        font-size: 1.36rem;
    }

    .meta-line,
    .detail-copy .store-link,
    .detail-copy .small-note,
    .variant-sku-line {
        font-size: 0.82rem;
    }

    .offers-grid {
        grid-template-columns: 1fr;
    }

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

    .offer-card,
    .service-card,
    .buy-box {
        border-radius: 14px;
    }

    .offer-card {
        padding: 12px;
    }

    .service-card {
        min-height: 52px;
        padding: 10px 8px;
        font-size: 0.82rem;
        line-height: 1.35;
    }

    .service-card-icon {
        font-size: 0.95rem;
    }

    .product-variant-selector {
        gap: 10px;
        margin-top: 10px;
    }

    .variant-option-group {
        padding: 10px;
        border-radius: 14px;
        gap: 7px;
    }

    .variant-option-selected {
        font-size: 0.72rem;
        padding: 4px 9px;
    }

    .variant-option-help {
        font-size: 0.72rem;
    }

    .buy-box {
        padding: 14px;
    }

    .page-product-detail .buy-box .card-btn {
        display: none;
    }

    .mobile-sticky-buybar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 45;
        display: grid;
        gap: 10px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid rgba(209, 220, 234, 0.92);
        box-shadow: 0 -14px 32px rgba(15, 23, 42, 0.12);
        backdrop-filter: blur(10px);
    }

    .mobile-sticky-buybar-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .mobile-sticky-price {
        font-size: 1.08rem;
        font-weight: 800;
        color: #0f172a;
    }

    .mobile-sticky-stock {
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--accent-dark);
    }

    .mobile-sticky-buybar-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .mobile-sticky-btn {
        min-height: 42px;
        border-radius: 14px;
        font-size: 0.9rem;
        justify-content: center;
        margin-top: 0;
    }

    .detail-gallery.product-gallery-carousel {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .product-gallery-stage {
        order: 1;
        height: min(86vw, 430px);
        padding: 14px 14px 24px;
    }

    .product-gallery-thumbs {
        order: 2;
        flex-direction: row;
        gap: 8px;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 2px 2px 6px;
    }

    .product-gallery-thumbs .thumb-box {
        flex: 0 0 72px;
        width: 72px;
        min-height: 72px;
        padding: 6px;
    }

    .product-gallery-thumbs .thumb-box img {
        height: 58px;
    }

    .related-products-carousel {
        grid-auto-columns: minmax(170px, 72vw);
    }

    .related-card-carousel {
        padding: 0;
    }

    .related-card-track {
        grid-auto-columns: minmax(180px, 54vw);
        gap: 8px;
        padding: 4px 0 10px;
    }

    .related-product-media,
    .related-grid-media {
        height: 140px;
    }

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

    .related-slider-shell {
        grid-template-columns: 34px minmax(0, 1fr) 34px;
        gap: 8px;
    }

    .related-slider-btn {
        width: 34px;
        height: 34px;
        font-size: 0.82rem;
    }

    .recommend-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .recommend-head .muted {
        max-width: 100%;
        font-size: 0.8rem;
        line-height: 1.45;
    }

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

    .recommend-card-link .media {
        height: 160px;
    }
}

@media (max-width: 580px) {
    .page-product-detail {
        padding-bottom: calc(116px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-top-row {
        grid-template-columns: 78px 40px minmax(0, 1fr);
    }

    .mobile-logo {
        max-width: 78px;
        min-height: 42px;
    }

    .mobile-logo img {
        height: 42px;
    }

    .mobile-search-bar input {
        font-size: 0.78rem;
    }

    .mobile-search-bar button {
        min-width: 56px;
        height: 30px;
        font-size: 0.78rem;
    }

    .mobile-menu-line .category-link {
        min-width: 66px;
        max-width: 78px;
        padding: 3px 3px 5px;
    }

    .mobile-menu-line .category-link-icon {
        width: 20px;
        height: 20px;
        font-size: 0.72rem;
    }

    .mobile-menu-line .category-link-label {
        font-size: 0.58rem;
        line-height: 1.08;
    }

    .page {
        padding-top: calc(var(--site-header-offset, 0px) + 10px);
    }

    .product-detail,
    .panel {
        padding: 10px;
        border-radius: 14px;
    }

    .detail-copy h1 {
        font-size: 1.08rem;
        line-height: 1.38;
    }

    .detail-price {
        font-size: 1.24rem;
    }

    .monthly {
        font-size: 0.82rem;
        line-height: 1.5;
    }

    .variant-option {
        min-width: 64px;
        padding: 8px 10px;
        font-size: 0.8rem;
        gap: 7px;
        border-radius: 12px;
    }

    .variant-option-group strong {
        font-size: 0.86rem;
    }

    .variant-option-selected {
        width: 100%;
        justify-content: center;
        white-space: normal;
    }

    .variant-option-swatch {
        width: 14px;
        height: 14px;
        flex-basis: 14px;
    }

    .about-item-list,
    .about-item-description {
        font-size: 0.88rem;
        line-height: 1.66;
    }

    .about-item-toggle {
        font-size: 0.86rem;
    }

    .product-gallery-stage,
    .main-image-box {
        height: min(82vw, 340px);
    }

    .gallery-nav {
        width: 34px;
        height: 34px;
    }

    .gallery-prev {
        left: 10px;
    }

    .gallery-next {
        right: 10px;
    }

    .gallery-count {
        right: 10px;
        bottom: 10px;
        padding: 6px 9px;
        font-size: 0.72rem;
    }

    .image-zoom-chip {
        left: 10px;
        bottom: 10px;
        padding: 6px 10px;
        font-size: 0.72rem;
    }

    .mobile-sticky-buybar {
        gap: 8px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-sticky-price {
        font-size: 1rem;
    }

    .mobile-sticky-stock {
        font-size: 0.76rem;
    }

    .mobile-sticky-buybar-actions {
        gap: 8px;
    }

    .mobile-sticky-btn {
        min-height: 40px;
        border-radius: 12px;
        font-size: 0.84rem;
        padding: 10px 8px;
    }

    .related-products-carousel {
        grid-auto-columns: minmax(156px, 78vw);
        gap: 10px;
    }

    .related-card-carousel {
        padding: 0;
    }

    .related-card-track {
        grid-auto-columns: minmax(148px, 46vw);
        gap: 8px;
    }

    .related-product-link,
    .related-grid-link {
        padding: 8px;
    }

    .related-product-media,
    .related-grid-media {
        height: 132px;
        border-radius: 12px;
    }

    .related-product-copy h4,
    .related-grid-copy h4 {
        margin: 8px 0 6px;
        min-height: 2.6em;
        font-size: 0.78rem;
        line-height: 1.28;
        -webkit-line-clamp: 2;
    }

    .related-product-copy .price,
    .related-grid-copy .price {
        margin-top: 6px;
        font-size: 1.04rem;
    }

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

    .product-card {
        min-height: 348px;
    }

    .product-body {
        gap: 6px;
    }

    .product-body h3 {
        min-height: 3.84em;
        font-size: 0.78rem;
        line-height: 1.28;
    }

    .product-brand,
    .product-rating-line,
    .product-list-price,
    .product-delivery,
    .product-monthly {
        font-size: 0.7rem;
        line-height: 1.22;
    }

    .product-grid .card-actions {
        display: none;
    }

    .product-deal-badge {
        font-size: 0.66rem;
        padding: 4px 7px;
    }

    .product-price-line .price {
        font-size: 1.02rem;
    }

    .product-discount {
        font-size: 0.86rem;
    }

    .related-slider-shell {
        grid-template-columns: 30px minmax(0, 1fr) 30px;
        gap: 6px;
    }

    .related-slider-btn {
        width: 30px;
        height: 30px;
        font-size: 0.76rem;
    }

    .recommend-head .muted {
        display: none;
    }

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

    .recommend-card-link .media {
        height: 138px;
        border-radius: 12px;
    }

    .recommend-card-link h4 {
        min-height: 3.5em;
        font-size: 0.82rem;
    }
}
