:root {
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 18px 40px rgba(15, 23, 42, 0.08);
    --transition-fast: 180ms ease;
}

html[data-theme="dark"] {
    --bg: #08111f;
    --bg-alt: #0d1727;
    --panel: rgba(12, 22, 37, 0.82);
    --panel-strong: #111f34;
    --panel-soft: rgba(255, 255, 255, 0.04);
    --line: rgba(255, 255, 255, 0.09);
    --text: #eef4ff;
    --muted: #9fb0c8;
    --accent: #7dd3fc;
    --accent-strong: #38bdf8;
    --accent-soft: #d7f4ff;
    --success: #73d29d;
    --danger: #ff897d;
    --info: #7dd3fc;
    --surface-glow: rgba(56, 189, 248, 0.12);
    --backdrop: linear-gradient(180deg, #09111d 0%, #06101d 100%);
}

html[data-theme="light"] {
    --bg: #f6f8fc;
    --bg-alt: #edf2f8;
    --panel: rgba(255, 255, 255, 0.82);
    --panel-strong: #ffffff;
    --panel-soft: rgba(7, 18, 33, 0.04);
    --line: rgba(11, 23, 39, 0.08);
    --text: #0c1728;
    --muted: #58708c;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-soft: #dbeafe;
    --success: #1f9d61;
    --danger: #d14343;
    --info: #0f8cc9;
    --surface-glow: rgba(37, 99, 235, 0.1);
    --backdrop: linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, var(--surface-glow), transparent 28%),
        radial-gradient(circle at top right, rgba(125, 211, 252, 0.08), transparent 26%),
        var(--backdrop);
    color: var(--text);
    font: 16px/1.6 "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
    transition: background var(--transition-fast), color var(--transition-fast);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--accent) 10%, transparent) 0, transparent 18%),
        radial-gradient(circle at 80% 12%, color-mix(in srgb, var(--accent-strong) 9%, transparent) 0, transparent 16%),
        linear-gradient(to right, color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px),
        linear-gradient(to bottom, color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px);
    background-size: auto, auto, 28px 28px, 28px 28px;
    mask-image: radial-gradient(circle at center, black 35%, transparent 88%);
    opacity: 0.5;
    z-index: 0;
}

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

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

button,
input,
select,
textarea {
    font: inherit;
}

button[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--panel-soft);
    color: var(--text);
    padding: 0.92rem 1rem;
    outline: none;
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(56, 189, 248, 0.34);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

textarea {
    resize: vertical;
}

select option {
    color: #09111d;
}

code,
pre {
    font-family: Consolas, monospace;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

main {
    flex: 1;
}

.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.narrow {
    width: min(720px, calc(100% - 2rem));
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: color-mix(in srgb, var(--panel) 86%, transparent);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.nav-row,
.product-meta,
.product-footer,
.price-row,
.summary-row,
.summary-line,
.order-card-head,
.order-item-line,
.footer-grid,
.button-group,
.inline-links,
.split-inputs {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.nav-row {
    align-items: center;
    padding: 0.95rem 0;
    position: relative;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
}

.brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    object-fit: cover;
    background: #fff;
    box-shadow: var(--shadow-card);
}

.brand-copy strong {
    display: block;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.brand-copy small {
    display: block;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.72rem;
}

.theme-toggle,
.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.72rem 1rem;
    background: var(--panel-soft);
    color: var(--text);
    cursor: pointer;
    transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.menu-toggle {
    display: none;
}

.theme-toggle:hover,
.menu-toggle:hover,
.button-link:hover,
.category-card:hover,
.mini-product:hover {
    transform: translateY(-2px);
}

.theme-toggle-icon {
    display: inline-grid;
    place-items: center;
    width: 1.2rem;
    height: 1.2rem;
    font-size: 1rem;
    line-height: 1;
}

.nav-links {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    margin-left: auto;
}

.nav-primary,
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-primary {
    flex-direction: row-reverse;
}

.nav-links a {
    color: var(--muted);
}

.nav-links a:hover,
.text-link:hover {
    color: var(--text);
}

.nav-utility {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.72rem 0.95rem;
    border-radius: 999px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
}

.nav-utility-accent {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 24%, transparent), color-mix(in srgb, var(--accent-strong) 18%, transparent));
    color: var(--text);
}

.nav-icon {
    width: 1.1rem;
    display: inline-grid;
    place-items: center;
}

.nav-badge,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel-strong) 88%, var(--accent) 12%);
    border: 1px solid color-mix(in srgb, var(--line) 60%, var(--accent) 40%);
    color: var(--text);
    font-size: 0.78rem;
}

.badge.success {
    background: color-mix(in srgb, var(--success) 76%, var(--panel-strong) 24%);
    color: #f8fbff;
}

.badge.danger {
    background: color-mix(in srgb, var(--danger) 76%, var(--panel-strong) 24%);
    color: #f8fbff;
}

.hero,
.section,
.auth-section,
.empty-state {
    padding: 4.75rem 0;
}

.hero-grid,
.cart-layout,
.dashboard-layout,
.catalog-layout,
.product-layout,
.auth-grid,
.moderator-grid {
    display: grid;
    gap: 1.6rem;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
    align-items: center;
    min-height: 74vh;
}

.hero-copy h1,
.section-heading h1,
.section-heading h2,
.auth-copy h1,
.panel h1,
.hero-note h3 {
    margin: 0.4rem 0 0.8rem;
    line-height: 1.06;
}

.hero-copy h1 {
    font-size: clamp(2.8rem, 5vw, 5rem);
    max-width: 11ch;
}

.lead,
.hero-copy p,
.auth-copy p,
.panel p,
.hero-note p {
    color: var(--muted);
}

.eyebrow {
    display: inline-block;
    color: var(--accent);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.76rem;
    font-weight: 700;
}

.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0 1.8rem;
}

.feature-pills span {
    border: 1px solid var(--line);
    background: var(--panel-soft);
    border-radius: 999px;
    padding: 0.58rem 0.9rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.hero-surface {
    display: grid;
    gap: 1rem;
}

.hero-card,
.panel,
.stat-card,
.category-card,
.product-card,
.mini-product,
.cart-item,
.order-card,
.moderation-card {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.hero-card,
.panel {
    padding: 1.8rem;
}

.hero-card-primary {
    position: relative;
    overflow: hidden;
}

.hero-card-primary::after {
    content: "";
    position: absolute;
    inset: auto -36px -36px auto;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: radial-gradient(circle, var(--surface-glow), transparent 68%);
}

.hero-card-top {
    margin-bottom: 1rem;
}

.hero-card-top span {
    display: block;
    color: var(--muted);
    margin-top: 0.35rem;
}

.hero-note {
    background: color-mix(in srgb, var(--panel) 92%, var(--accent-soft) 8%);
}

.demo-panel {
    margin-top: 1.5rem;
    display: grid;
    gap: 0.35rem;
}

.form-hint {
    margin: -0.35rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.stats-grid,
.category-grid,
.product-grid,
.product-grid.compact,
.footer-grid {
    display: grid;
    gap: 1rem;
}

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

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

.stat-card {
    padding: 1.45rem;
    background: color-mix(in srgb, var(--panel-strong) 82%, transparent);
}

.stat-card strong {
    display: block;
    font-size: 1.48rem;
    margin-bottom: 0.35rem;
}

.stat-card span {
    color: var(--muted);
}

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

.section-muted {
    background: color-mix(in srgb, var(--panel-soft) 65%, transparent);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

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

.category-card {
    padding: 1.55rem;
    min-height: 190px;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: "";
    position: absolute;
    inset: auto -24px -28px auto;
    width: 110px;
    height: 110px;
    border-radius: 28px;
    background: var(--accent, var(--accent));
    opacity: 0.15;
    transform: rotate(18deg);
}

.category-card strong,
.product-body h3,
.mini-product h3,
.panel h2 {
    display: block;
    margin: 0.4rem 0 0.65rem;
}

.category-card span,
.product-body p,
.mini-product p,
.product-meta,
.product-footer,
.summary-line,
.order-item-line,
.footer-grid a,
.footer-grid p {
    color: var(--muted);
}

.product-card .product-meta {
    font-size: 0.84rem;
}

.product-card .product-body h3 {
    margin: 0;
    font-size: 1.02rem;
}

.product-card .product-body h3 a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.product-card .product-body p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
}

.product-card .product-footer {
    gap: 0.75rem;
    align-items: center;
}

.product-card .product-footer strong {
    font-size: 1.08rem;
}

.product-card .badge {
    padding: 0.24rem 0.58rem;
    border-radius: 999px;
    font-weight: 700;
}

.product-card .badge.success {
    background: color-mix(in srgb, var(--success) 82%, var(--panel-strong) 18%);
}

.product-card .badge.danger {
    background: color-mix(in srgb, var(--danger) 82%, var(--panel-strong) 18%);
}

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

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

.product-card {
    overflow: hidden;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: column;
}

.product-card:hover,
.category-card:hover,
.mini-product:hover {
    border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.product-thumb {
    position: relative;
    flex: 0 0 60%;
    min-height: 180px;
    background: color-mix(in srgb, var(--bg-alt) 84%, #ffffff 16%);
    overflow: hidden;
}

.product-thumb img {
    transition: transform 320ms ease;
    transform-origin: center center;
}

.product-card:hover .product-thumb img,
.product-card:focus-within .product-thumb img {
    transform: scale(1.1);
}

.product-thumb img,
.mini-product img,
.cart-item img,
.product-main-image img,
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-hover-meta {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(8, 17, 31, 0.18) 0%, rgba(8, 17, 31, 0.76) 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.product-badges {
    position: absolute;
    left: 0.9rem;
    top: 0.9rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: calc(100% - 1.8rem);
}

.product-badges .badge {
    width: fit-content;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.product-card:hover .product-hover-meta,
.product-card:focus-within .product-hover-meta {
    opacity: 1;
}

.product-hover-top,
.product-hover-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.product-hover-bottom {
    align-items: end;
}

.product-hover-bottom strong,
.product-hover-bottom span {
    color: #f8fbff;
}

.product-hover-bottom strong {
    max-width: 14ch;
    line-height: 1.2;
}

.product-body {
    padding: 0.72rem 0.85rem 0.82rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 0 0 auto;
}

.price-stack {
    display: grid;
    gap: 0.15rem;
    align-items: start;
}

.sale-price {
    font-size: 1.2rem;
    color: var(--success);
}

.old-price {
    color: var(--muted);
    font-size: 0.84rem;
}

.badge-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.mini-product {
    display: flex;
    gap: 1rem;
    padding: 1.1rem;
    align-items: center;
}

.mini-product img {
    width: 110px;
    height: 110px;
    border-radius: 18px;
}

.catalog-layout {
    grid-template-columns: 300px 1fr;
}

.sticky {
    position: sticky;
    top: 6.2rem;
}

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

.stack-form label span {
    display: block;
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 0.45rem;
}

.split-inputs {
    align-items: start;
}

.split-inputs > * {
    flex: 1;
}

.button-link,
.button-link:visited {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 0.92rem 1.3rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #f8fbff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-fast), filter var(--transition-fast);
}

.button-link::before {
    content: "";
    position: absolute;
    inset: -140% -30%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.38) 0, rgba(255, 255, 255, 0) 58%);
    transform: translateX(-55%) scale(0.65);
    opacity: 0;
    transition: transform 380ms ease, opacity 380ms ease;
}

.button-link.secondary {
    background: var(--panel-soft);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
}

.button-link:hover::before,
.button-link:focus-visible::before {
    transform: translateX(28%) scale(1);
    opacity: 1;
}

.button-link.compact,
.button-link.small {
    padding: 0.65rem 0.9rem;
    border-radius: 14px;
    font-size: 0.88rem;
}

.button-group {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.button-group.slim {
    gap: 0.5rem;
}

.text-link {
    color: var(--accent);
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.text-link.danger {
    color: var(--danger);
}

.product-layout {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
}

.product-main-image {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-alt) 88%, #fff 12%);
}

.thumb-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.thumb {
    width: 92px;
    height: 92px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
    opacity: 0.65;
}

.thumb.active {
    opacity: 1;
    border-color: color-mix(in srgb, var(--accent) 55%, white);
}

.spec-box {
    margin-top: 1.5rem;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.spec-box pre,
.code-block {
    white-space: pre-wrap;
    color: var(--muted);
    background: var(--panel-soft);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.cart-layout,
.dashboard-layout {
    grid-template-columns: 1.3fr 0.9fr;
    align-items: start;
}

.dashboard-layout,
.moderator-grid {
    grid-template-columns: 1fr;
}

.dashboard-layout > *,
.moderator-grid > * {
    min-width: 0;
}

.cart-items,
.order-list,
.mini-list {
    display: grid;
    gap: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1.2rem;
    align-items: center;
}

.cart-item img {
    width: 120px;
    height: 120px;
    border-radius: 18px;
}

.cart-item-body {
    flex: 1;
}

.cart-actions {
    min-width: 180px;
    display: grid;
    gap: 0.8rem;
}

.summary-panel {
    display: grid;
    gap: 1rem;
}

.align-right {
    text-align: right;
}

.summary-row {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--line);
}

.summary-row.total {
    font-size: 1.08rem;
    border-bottom: 0;
}

.flash {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: opacity 180ms ease, transform 180ms ease;
}

.flash.is-closing {
    opacity: 0;
    transform: translateY(-6px);
}

.flash-close {
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: var(--panel-soft);
    color: var(--text);
    cursor: pointer;
}

.flash-success {
    background: color-mix(in srgb, var(--success) 14%, transparent);
    border-color: color-mix(in srgb, var(--success) 30%, transparent);
}

.flash-error {
    background: color-mix(in srgb, var(--danger) 14%, transparent);
    border-color: color-mix(in srgb, var(--danger) 30%, transparent);
}

.flash-info {
    background: color-mix(in srgb, var(--info) 14%, transparent);
    border-color: color-mix(in srgb, var(--info) 28%, transparent);
}

.auth-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    align-items: center;
    min-height: calc(100vh - 130px);
}

.auth-panel {
    max-width: 620px;
    margin-inline: auto;
}

.inline-links {
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-row input {
    width: auto;
}

.panel-space > * + * {
    margin-top: 1.5rem;
}

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

.moderation-card,
.mini-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.moderation-card:last-child,
.mini-list-item:last-child {
    border-bottom: 0;
}

.table-wrap {
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 0.9rem 0.7rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.data-table th {
    color: var(--muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.action-cell,
.inline-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    max-width: 100%;
}

.inline-form {
    align-items: stretch;
}

.inline-form select,
.inline-form input[type="text"] {
    min-width: 0;
    flex: 1 1 160px;
    max-width: 100%;
}

.inline-form .button-link,
.inline-form .text-link {
    align-self: center;
}

.button-link.small,
.button-link.compact,
.text-link {
    white-space: nowrap;
}

.color-input {
    min-height: 4.35rem;
    padding: 0.35rem;
    border-radius: 18px;
    cursor: pointer;
    background: none;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: 0;
    border-radius: 14px;
}

.color-input::-moz-color-swatch {
    border: 0;
    border-radius: 14px;
}

.pagination {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.pagination a {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    color: var(--muted);
    background: var(--panel);
}

.pagination a.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #f8fbff;
    border-color: transparent;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 2rem 0;
    background: color-mix(in srgb, var(--panel) 78%, transparent);
}

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

.footer-grid h3,
.footer-grid h4 {
    margin-top: 0;
}

.footer-mail {
    color: var(--text);
    font-weight: 700;
}

.muted-panel {
    background: var(--panel-soft);
    border: 1px dashed var(--line);
}

.account-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.account-tab {
    padding: 0.8rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: var(--muted);
}

.account-tab.active {
    color: var(--text);
    background: color-mix(in srgb, var(--accent) 16%, var(--panel-soft));
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
}

.empty-cart-card {
    display: grid;
    gap: 1rem;
    padding: 1.35rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel-soft);
}

.seller-gallery-preview,
.order-preview-item,
.order-detail-item {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel-soft);
}

.seller-gallery-preview {
    padding: 0.8rem;
}

.seller-gallery-preview img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 16px;
}

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

.order-card-rich {
    padding: 1.4rem;
}

.order-hero-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
}

.order-preview-list,
.order-detail-list {
    display: grid;
    gap: 0.9rem;
}

.order-preview-item,
.order-detail-item {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 1rem;
    padding: 0.85rem;
}

.order-preview-item img,
.order-detail-item img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 14px;
}

.order-detail-body {
    display: grid;
    gap: 0.6rem;
}

.top-gap {
    margin-top: 1.5rem;
}

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

}

@media (max-width: 960px) {
    .hero-grid,
    .catalog-layout,
    .cart-layout,
    .dashboard-layout,
    .product-layout,
    .auth-grid,
    .moderator-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    body::before {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .nav-row {
        flex-wrap: wrap;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 0.7rem);
        left: 1rem;
        right: 1rem;
        padding: 1rem;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: color-mix(in srgb, var(--panel-strong) 92%, transparent);
        display: none;
        flex-direction: column;
        align-items: stretch;
        box-shadow: var(--shadow-soft);
    }

    .nav-primary,
    .nav-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links.open {
        display: flex;
    }

    .category-grid,
    .product-grid,
    .product-grid.compact,
    .seller-stats,
    .footer-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .split-inputs,
    .cart-item,
    .moderation-card,
    .mini-list-item,
    .section-heading,
    .summary-line,
    .summary-row,
    .order-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .order-preview-item,
    .order-detail-item {
        grid-template-columns: 1fr;
    }

    .hero-copy h1 {
        font-size: 2.55rem;
    }

    .cart-actions {
        min-width: 0;
    }
}
