:root {
    --bg: #0b1020;
    --bg-soft: #101730;
    --panel: rgba(15, 22, 45, 0.82);
    --panel-strong: #121a34;
    --text: #edf2ff;
    --text-soft: #b7c0d8;
    --line: rgba(255, 255, 255, 0.1);
    --primary: #62b0ff;
    --primary-strong: #3892f2;
    --accent: #8b7dff;
    --success: #2bc27f;
    --danger: #ff5f7a;
    --warning: #ffbd59;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.26);
    --radius: 22px;
    --radius-sm: 14px;
    --container: 1180px;
}

html[data-theme="light"] {
    --bg: #f4f7fb;
    --bg-soft: #ffffff;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: #ffffff;
    --text: #152033;
    --text-soft: #58657c;
    --line: rgba(21, 32, 51, 0.12);
    --primary: #1d74d8;
    --primary-strong: #155db0;
    --accent: #6e5cff;
    --success: #1f9f66;
    --danger: #d94761;
    --warning: #cf8b12;
    --shadow: 0 18px 60px rgba(18, 38, 63, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(98, 176, 255, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(139, 125, 255, 0.14), transparent 26%),
        linear-gradient(180deg, var(--bg), var(--bg-soft));
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input,
textarea {
    font: inherit;
}

.container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    border-bottom: 1px solid var(--line);
}

.navbar {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.brand-badge {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 800;
    box-shadow: var(--shadow);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-text strong {
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.brand-text small {
    color: var(--text-soft);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.nav-links a,
.theme-toggle {
    color: var(--text-soft);
    padding: 0.8rem 1rem;
    border-radius: 999px;
    transition: 0.2s ease;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
}

.nav-links a:hover,
.theme-toggle:hover {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
}


.nav-cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-badge {
    min-width: 24px;
    height: 24px;
    padding: 0 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(23, 61, 128, 0.22);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    background: transparent;
    border: 0;
    padding: 0.35rem;
    cursor: pointer;
}

.nav-toggle span {
    width: 26px;
    height: 2px;
    background: var(--text);
    border-radius: 999px;
}

.hero,
.page-hero {
    padding: 4rem 0 2rem;
}

.page-hero.compact {
    padding: 3rem 0 1rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: center;
}

.hero-copy h1,
.page-hero h1 {
    font-size: clamp(2.3rem, 4.5vw, 4.3rem);
    line-height: 1.04;
    margin: 0.7rem 0 1rem;
    letter-spacing: -0.03em;
}

.hero-copy p,
.page-hero p,
.section-heading p,
.content-panel p,
.auth-card p {
    color: var(--text-soft);
    line-height: 1.7;
}

.hero-actions,
.admin-actions,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.78rem 1.2rem;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: 0.2s ease;
    cursor: pointer;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.btn-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #ff5f7a, #d94761);
}

.btn-small {
    min-height: 38px;
    padding: 0.55rem 0.95rem;
    font-size: 0.92rem;
}

.section-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(98, 176, 255, 0.12);
    color: var(--primary);
    border: 1px solid rgba(98, 176, 255, 0.22);
    font-size: 0.9rem;
    font-weight: 700;
}

.hero-badges,
.stats-grid,
.feature-grid,
.admin-columns {
    display: grid;
    gap: 1rem;
}

.hero-badges {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 2rem;
}

.mini-stat,
.stat-card,
.feature-card,
.content-card,
.content-panel,
.auth-card,
.hero-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.mini-stat,
.stat-card {
    padding: 1rem 1.1rem;
}

.mini-stat strong,
.stat-card strong {
    display: block;
    margin-bottom: 0.35rem;
}

.mini-stat span,
.stat-card span {
    color: var(--text-soft);
    font-size: 0.94rem;
}

.card-glow {
    position: relative;
    overflow: hidden;
}

.card-glow::before {
    content: "";
    position: absolute;
    inset: -20% auto auto -20%;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(98, 176, 255, 0.22), transparent 65%);
    pointer-events: none;
}

.hero-card {
    padding: 1.5rem;
}

.hero-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-soft);
    margin-bottom: 1rem;
}

.dot-live {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 6px rgba(43, 194, 127, 0.18);
}

.feature-checks {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.feature-checks li {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
}

.feature-checks li:last-child {
    border-bottom: 0;
}

.section {
    padding: 2rem 0 3rem;
}

.soft-section {
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.02), transparent);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-heading.left {
    align-items: start;
    flex-direction: column;
}

.section-heading h1,
.section-heading h2 {
    margin: 0.6rem 0 0;
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
}

.text-link {
    color: var(--primary);
    font-weight: 700;
}

.card-grid {
    display: grid;
    gap: 1.2rem;
}

.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 1rem;
}

.marketplace-grid {
    min-height: 0;
}

.content-card {
    overflow: hidden;
}

.image-card img,
.card-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.03);
}

.product-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
        var(--panel);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.product-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(98, 176, 255, 0.09), transparent 32%, transparent 70%, rgba(139, 125, 255, 0.08));
    opacity: 0;
    transition: opacity 0.22s ease;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(98, 176, 255, 0.24);
    box-shadow: 0 26px 60px rgba(4, 10, 28, 0.34);
}

.product-card:hover::after {
    opacity: 1;
}

.product-card .card-image {
    position: relative;
    height: 220px;
    padding: 0.8rem;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at top, rgba(98, 176, 255, 0.14), transparent 56%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018));
}

.product-card .card-image img,
.product-card-full .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: calc(var(--radius) - 10px);
    transition: transform 0.28s ease, filter 0.28s ease;
}

.product-card:hover .card-image img {
    transform: scale(1.045);
    filter: saturate(1.05) contrast(1.02);
}

.image-open {
    padding: 0;
    border: 0;
    background: transparent;
    width: 100%;
    cursor: zoom-in;
}

.card-body {
    padding: 0.95rem 0.95rem 1rem;
}

.card-body h3 {
    margin: 0 0 0.55rem;
    font-size: 1.15rem;
}

.card-body p,
.muted {
    color: var(--text-soft);
    line-height: 1.65;
}

.product-topline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.75rem;
    min-height: 3.6rem;
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
    min-height: 0;
}

.product-card .product-topline h3 {
    margin: 0;
    line-height: 1.3;
    min-height: calc(1.3em * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.product-short {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.58;
    min-height: calc(1.58em * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .muted,
.product-description {
    margin: 0;
    line-height: 1.58;
    min-height: calc(1.58em * 2.4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description.is-empty {
    visibility: hidden;
}

.product-card .card-actions {
    margin-top: auto;
    padding-top: 0.15rem;
    align-self: flex-start;
}

.product-card .card-actions .btn {
    min-width: 170px;
    min-height: 42px;
    box-shadow: 0 10px 28px rgba(3, 9, 28, 0.14);
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.product-card:hover .card-actions .btn {
    transform: translateY(-1px);
    border-color: rgba(98, 176, 255, 0.18);
    box-shadow: 0 14px 30px rgba(4, 12, 30, 0.2);
}

.price-tag {
    flex-shrink: 0;
    align-self: start;
    justify-self: end;
    white-space: nowrap;
    display: inline-flex;
    padding: 0.48rem 0.78rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(43, 194, 127, 0.15), rgba(98, 176, 255, 0.11));
    border: 1px solid rgba(43, 194, 127, 0.28);
    color: #6ce3aa;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .price-tag {
    color: #177a4d;
}

.product-card-full .card-image img {
    height: 100%;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.8rem;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-link,
.pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 46px;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-weight: 700;
}

.pagination-link.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.pagination-link.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.social-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.social-links.large a {
    min-width: 140px;
}

.empty-state {
    text-align: center;
    padding: 2.2rem 1.4rem;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.empty-state h3 {
    margin-top: 0;
}

.flash-wrapper {
    padding-top: 1rem;
}

.flash {
    padding: 1rem 1.1rem;
    border-radius: 16px;
    margin-bottom: 0.8rem;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.flash-success {
    background: rgba(43, 194, 127, 0.12);
    border-color: rgba(43, 194, 127, 0.28);
}

.flash-danger {
    background: rgba(255, 95, 122, 0.12);
    border-color: rgba(255, 95, 122, 0.28);
}

.flash-warning {
    background: rgba(255, 189, 89, 0.12);
    border-color: rgba(255, 189, 89, 0.28);
}

.flash-info {
    background: rgba(98, 176, 255, 0.12);
    border-color: rgba(98, 176, 255, 0.28);
}

.narrow-content {
    width: min(100% - 2rem, 780px);
    margin-inline: auto;
}

.content-panel,
.auth-card {
    padding: 1.5rem;
}

.form-grid {
    display: grid;
    gap: 1rem;
}

.form-field {
    display: grid;
    gap: 0.45rem;
}

.form-field span,
.checkbox-field span {
    font-weight: 700;
}

.form-field input,
.form-field textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    outline: none;
}

.form-field textarea {
    min-height: 130px;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: rgba(98, 176, 255, 0.45);
    box-shadow: 0 0 0 4px rgba(98, 176, 255, 0.12);
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.current-image-preview img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid var(--line);
}

.admin-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.admin-table th {
    color: var(--text-soft);
    font-size: 0.92rem;
}

.table-thumb {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 16px;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.table-actions form {
    margin: 0;
}

.status-pill {
    display: inline-flex;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 800;
}

.status-pill.active {
    color: #6ce3aa;
    background: rgba(43, 194, 127, 0.14);
    border: 1px solid rgba(43, 194, 127, 0.28);
}

.status-pill.inactive {
    color: #ff9fb1;
    background: rgba(255, 95, 122, 0.12);
    border: 1px solid rgba(255, 95, 122, 0.28);
}

.admin-columns {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 1.5rem;
}

.admin-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}

.admin-list li:last-child {
    border-bottom: 0;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding-top: 1.4rem;
    background: rgba(0, 0, 0, 0.06);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.7fr 0.8fr;
    gap: 1.4rem;
    padding-bottom: 1.2rem;
}

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

.footer-list li + li {
    margin-top: 0.55rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0 1.4rem;
    border-top: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 0.92rem;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(5, 9, 18, 0.88);
    display: none;
    place-items: center;
    padding: 1rem;
    z-index: 100;
}

.lightbox.open {
    display: grid;
}

.lightbox img {
    max-width: min(92vw, 1100px);
    max-height: 78vh;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.lightbox p {
    color: #fff;
    margin-top: 1rem;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
}

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

@media (max-width: 980px) {
    body.nav-open {
        overflow: hidden;
    }

    .hero-grid,
    .admin-columns,
    .footer-grid,
    .social-box,
    .account-layout,
    .two-columns-form,
    .cart-layout {
        grid-template-columns: 1fr;
        display: grid;
    }

    .hero-badges,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .navbar {
        position: relative;
        min-height: 78px;
        padding-block: 0.8rem;
        gap: 0.75rem;
    }

    .brand {
        min-width: 0;
        flex: 1 1 auto;
        max-width: calc(100% - 64px);
    }

    .brand-text {
        min-width: 0;
    }

    .brand-text strong,
    .brand-text small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        margin-left: auto;
        border-radius: 14px;
        border: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.04);
        padding: 0;
        z-index: 61;
    }

    .nav-toggle span {
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 0.65rem);
        left: 0;
        right: 0;
        z-index: 60;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
        padding: 0.9rem;
        border-radius: 24px;
        border: 1px solid var(--line);
        background: color-mix(in srgb, var(--bg-soft) 92%, transparent);
        backdrop-filter: blur(18px);
        box-shadow: 0 24px 60px rgba(2, 8, 24, 0.34);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-10px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
        max-height: min(70vh, 560px);
        overflow-y: auto;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links a,
    .theme-toggle {
        width: 100%;
        min-height: 48px;
        justify-content: flex-start;
        padding: 0.9rem 1rem;
        border-radius: 16px;
        text-align: left;
    }

    .nav-cart-link {
        justify-content: space-between;
        width: 100%;
    }

    .nav-highlight-link {
        justify-content: center !important;
        text-align: center;
    }

    .hero,
    .page-hero,
    .section {
        padding-top: 2rem;
    }

    .section-heading,
    .footer-bottom,
    .admin-header,
    .hero-actions,
    .cart-item-header,
    .cart-item-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-copy p,
    .page-hero p {
        max-width: 68ch;
    }

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

    .cart-summary {
        position: static;
    }
}

@media (max-width: 760px) {
    .product-card .product-topline h3 {
        min-height: auto;
    }

    .product-short,
    .product-card .muted {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 1rem, var(--container));
    }

    .site-header {
        position: sticky;
    }

    .navbar {
        min-height: 72px;
    }

    .brand {
        gap: 0.7rem;
        max-width: calc(100% - 58px);
    }

    .brand-badge {
        width: 44px;
        height: 44px;
        border-radius: 15px;
        font-size: 0.95rem;
    }

    .brand-text strong {
        font-size: 0.96rem;
    }

    .brand-text small {
        display: none;
    }

    .hero,
    .page-hero,
    .section {
        padding-top: 1.35rem;
        padding-bottom: 2rem;
    }

    .hero-copy h1,
    .page-hero h1,
    .section-heading h2 {
        font-size: clamp(2rem, 10vw, 2.65rem);
        line-height: 1.06;
    }

    .hero-actions,
    .admin-actions,
    .card-actions {
        width: 100%;
    }

    .hero-actions .btn,
    .admin-actions .btn,
    .card-actions .btn,
    .cart-summary-actions .btn,
    .checkout-form .btn {
        width: 100%;
    }

    .image-card img,
    .card-image img,
    .product-card-full .card-image img {
        height: 220px;
    }

    .product-grid,
    .hero-badges {
        grid-template-columns: 1fr;
    }

    .product-card .card-image,
    .product-card-full .card-image {
        height: 210px;
        aspect-ratio: auto;
    }

    .product-topline {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .price-tag {
        justify-self: start;
    }

    .social-box,
    .content-panel,
    .auth-card,
    .auth-card-wide,
    .hero-card {
        padding: 1.1rem;
    }

    .footer-bottom {
        font-size: 0.88rem;
    }

    .admin-table th:nth-child(3),
    .admin-table td:nth-child(3),
    .admin-table th:nth-child(4),
    .admin-table td:nth-child(4) {
        display: none;
    }
}

@media (min-width: 768px) {
    .product-card .btn {
        min-width: 0;
    }
}


.add-to-cart-form {
    width: 100%;
}

.card-actions-stack {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compact-actions {
    margin-top: auto;
}

.product-card .card-actions.card-actions-stack {
    align-self: stretch;
    margin-top: auto;
    padding-top: 0.25rem;
}

.product-card .card-actions.card-actions-stack .btn {
    width: 100%;
}

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

.cart-list {
    display: grid;
    gap: 1rem;
}

.cart-item-card {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.cart-item-image {
    border-radius: calc(var(--radius) - 8px);
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    min-height: 168px;
}

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

.cart-item-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.cart-item-header h3,
.cart-summary h3 {
    margin: 0;
}

.cart-item-short,
.cart-item-description {
    margin: 0.45rem 0 0;
    color: var(--text-soft);
    line-height: 1.6;
}

.cart-item-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
}

.cart-subtotal {
    font-size: 0.95rem;
}

.cart-item-footer {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.cart-quantity-form {
    display: flex;
    align-items: end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cart-quantity-form label,
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    color: var(--text-soft);
}

.cart-quantity-form input,
.form-field input,
.form-field textarea {
    min-height: 46px;
    padding: 0.8rem 0.95rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.cart-quantity-form input {
    width: 110px;
}

.form-field textarea {
    min-height: 120px;
    resize: vertical;
}

.cart-summary {
    padding: 1.15rem;
    position: sticky;
    top: 104px;
}

.summary-lines {
    display: grid;
    gap: 0.85rem;
    margin: 1rem 0 1.2rem;
}

.summary-lines div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--line);
}

.summary-lines div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.cart-summary-actions,
.checkout-form {
    display: grid;
    gap: 0.8rem;
}

.checkout-form {
    margin-top: 1rem;
}

.empty-inline-note {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 189, 89, 0.24);
    background: rgba(255, 189, 89, 0.08);
    color: #ffd89a;
    line-height: 1.55;
}

.empty-inline-note code {
    font-weight: 800;
}


@media (max-width: 980px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 720px) {
    .cart-item-card {
        grid-template-columns: 1fr;
    }

    .cart-item-image {
        min-height: 220px;
    }

    .cart-item-header,
    .cart-item-prices,
    .cart-item-footer {
        align-items: stretch;
    }

    .cart-item-header,
    .cart-item-footer {
        flex-direction: column;
    }

    .cart-item-prices {
        align-items: flex-start;
    }

    .cart-quantity-form,
    .cart-quantity-form label {
        width: 100%;
    }

    .cart-quantity-form input {
        width: 100%;
    }
}

.nav-highlight-link {
    background: linear-gradient(135deg, rgba(98, 176, 255, 0.16), rgba(139, 125, 255, 0.16));
    border-color: rgba(98, 176, 255, 0.2) !important;
    color: var(--text) !important;
}

.auth-card-wide {
    padding: 1.8rem;
}

.auth-heading {
    margin-bottom: 1.4rem;
}

.auth-inline-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    color: var(--text-soft);
}

.auth-inline-links a {
    color: var(--primary);
    font-weight: 800;
}

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

.full-width {
    grid-column: 1 / -1;
}

.account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 1.2rem;
}

.account-card h3 {
    margin-top: 0;
}

.account-info-list {
    display: grid;
    gap: 0.95rem;
}

.account-info-list div {
    display: grid;
    gap: 0.25rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.account-info-list span {
    color: var(--text-soft);
    font-size: 0.92rem;
}

.account-actions-grid {
    display: grid;
    gap: 0.8rem;
}

.checkout-account-note {
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(98, 176, 255, 0.22);
    background: rgba(98, 176, 255, 0.08);
    color: var(--text-soft);
}

.checkout-account-note strong {
    color: var(--text);
}

@media (max-width: 980px) {
    .account-layout,
    .two-columns-form {
        grid-template-columns: 1fr;
    }
}


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

    .page-hero.compact {
        padding-top: 2rem;
    }

    .cart-item-card {
        grid-template-columns: 132px minmax(0, 1fr);
        gap: 0.85rem;
    }

    .cart-item-image {
        min-height: 132px;
    }
}

@media (max-width: 720px) {
    .cart-item-card {
        grid-template-columns: 1fr;
    }

    .cart-item-image {
        min-height: 220px;
    }

    .cart-item-header,
    .cart-item-prices,
    .cart-item-footer {
        align-items: stretch;
    }

    .cart-item-prices {
        align-items: flex-start;
    }

    .cart-quantity-form,
    .cart-quantity-form label {
        width: 100%;
    }

    .cart-quantity-form input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container,
    .narrow-content {
        width: min(100% - 0.9rem, var(--container));
    }

    .site-header {
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .nav-links {
        top: calc(100% + 0.5rem);
        padding: 0.75rem;
        border-radius: 20px;
        max-height: min(72vh, 520px);
    }

    .nav-links a,
    .theme-toggle {
        min-height: 46px;
        padding: 0.8rem 0.9rem;
        font-size: 0.98rem;
    }

    .hero-copy h1,
    .page-hero h1,
    .section-heading h2 {
        font-size: 1.85rem;
    }

    .product-card .card-image,
    .product-card-full .card-image,
    .cart-item-image {
        height: 200px;
        min-height: 200px;
    }

    .product-card .card-body,
    .card-body,
    .cart-item-card,
    .content-panel,
    .auth-card,
    .auth-card-wide,
    .hero-card,
    .social-box {
        padding: 1rem;
    }

    .product-card .card-actions .btn,
    .product-card .card-actions.card-actions-stack .btn {
        min-width: 0;
        min-height: 40px;
    }

    .footer-grid {
        gap: 1rem;
    }
}


.social-icons {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.social-icon {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.social-icon svg {
    width: 24px;
    height: 24px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.social-icon-tiktok svg,
.social-icon-facebook svg {
    fill: currentColor;
    stroke: none;
}

.social-icon .social-dot {
    fill: currentColor;
    stroke: none;
}

.social-icon:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2);
}

.social-icon-instagram:hover {
    color: #ff7a59;
    background: linear-gradient(135deg, rgba(131, 58, 180, 0.22), rgba(253, 29, 29, 0.18), rgba(252, 176, 69, 0.22));
}

.social-icon-tiktok:hover {
    color: #8ef5ff;
    background: linear-gradient(135deg, rgba(0, 242, 234, 0.16), rgba(255, 0, 80, 0.1));
}

.social-icon-facebook:hover {
    color: #7cb4ff;
    background: linear-gradient(135deg, rgba(24, 119, 242, 0.18), rgba(24, 119, 242, 0.08));
}
