:root {
    --charcoal: #0d0c0a;
    --graphite: #171511;
    --panel: rgba(22, 20, 17, 0.8);
    --panel-strong: rgba(246, 241, 232, 0.1);
    --porcelain: #f6f1e8;
    --muted: #aca39a;
    --line: rgba(246, 241, 232, 0.16);
    --brass: #b99a63;
    --brass-soft: rgba(185, 154, 99, 0.18);
    --wine: #6f6659;
    --forest: #3a3832;
    --danger: #c94c4c;
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

body.light-theme {
    --charcoal: #eee7dc;
    --graphite: #faf7f0;
    --panel: rgba(250, 247, 240, 0.8);
    --panel-strong: rgba(21, 17, 11, 0.08);
    --porcelain: #171511;
    --muted: #6c645b;
    --line: rgba(21, 17, 11, 0.16);
    --brass: #9a7a47;
    --brass-soft: rgba(154, 122, 71, 0.16);
    --wine: #9b9286;
    --forest: #c7bfb2;
    --danger: #b23f3f;
    --shadow: 0 24px 60px rgba(89, 72, 42, 0.18);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    color: var(--porcelain);
    background:
        radial-gradient(ellipse at 50% -12%, rgba(185, 154, 99, 0.18), transparent 42%),
        linear-gradient(112deg, transparent 0 21%, rgba(246, 241, 232, 0.035) 21.1% 21.35%, transparent 21.5% 56%, rgba(185, 154, 99, 0.055) 56.1% 56.35%, transparent 56.5%),
        linear-gradient(165deg, rgba(37, 34, 29, 0.62), rgba(13, 12, 10, 0.92) 54%, rgba(6, 6, 5, 0.98)),
        var(--charcoal);
    background-size: 140% 140%, 120% 120%, 100% 100%, auto;
    animation: premiumBackdrop 24s ease-in-out infinite alternate;
    font-family: "Inter", Arial, sans-serif;
}

body.light-theme {
    color: var(--porcelain);
    background:
        radial-gradient(ellipse at 50% -12%, rgba(154, 122, 71, 0.18), transparent 42%),
        linear-gradient(112deg, transparent 0 21%, rgba(21, 17, 11, 0.055) 21.1% 21.35%, transparent 21.5% 56%, rgba(154, 122, 71, 0.075) 56.1% 56.35%, transparent 56.5%),
        linear-gradient(165deg, rgba(250, 247, 240, 0.98), rgba(238, 231, 220, 0.92) 54%, rgba(218, 210, 198, 0.9)),
        var(--charcoal);
    background-size: 140% 140%, 120% 120%, 100% 100%, auto;
}

body::before {
    content: "";
    position: fixed;
    inset: -12%;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 88px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 88px),
        repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 18px);
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    animation: premiumGrain 32s linear infinite;
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    inset: -10%;
    z-index: -1;
    background:
        radial-gradient(ellipse at center, transparent 0 48%, rgba(0, 0, 0, 0.52) 100%),
        linear-gradient(72deg, transparent 0 14%, rgba(185, 154, 99, 0.08) 14.1% 14.35%, transparent 14.5% 78%, rgba(246, 241, 232, 0.045) 78.1% 78.32%, transparent 78.5%);
    animation: premiumLight 18s ease-in-out infinite alternate;
    pointer-events: none;
}

body.light-theme::before {
    background:
        linear-gradient(90deg, rgba(21, 17, 11, 0.035) 0 1px, transparent 1px 88px),
        linear-gradient(0deg, rgba(21, 17, 11, 0.025) 0 1px, transparent 1px 88px),
        repeating-linear-gradient(115deg, rgba(21, 17, 11, 0.02) 0 1px, transparent 1px 18px);
}

body.light-theme::after {
    background:
        radial-gradient(ellipse at center, transparent 0 52%, rgba(95, 82, 63, 0.2) 100%),
        linear-gradient(72deg, transparent 0 14%, rgba(154, 122, 71, 0.1) 14.1% 14.35%, transparent 14.5% 78%, rgba(21, 17, 11, 0.04) 78.1% 78.32%, transparent 78.5%);
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

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

[hidden] {
    display: none !important;
}

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

.app-shell {
    position: relative;
    display: grid;
    grid-template-rows: 76px minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    height: 100dvh;
    padding: 16px;
}

.topbar {
    position: relative;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    min-height: 76px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(13, 12, 10, 0.76);
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(22px);
}

body.light-theme .topbar,
body.light-theme .commerce-frame,
body.light-theme .hero-copy,
body.light-theme .spotlight-panel,
body.light-theme .catalog-copy,
body.light-theme .admin-form,
body.light-theme .admin-list-shell {
    background: rgba(255, 250, 242, 0.78);
}

.brand,
.top-actions,
.nav-tabs,
.hero-actions,
.form-actions,
.admin-actions,
.pager,
.cart-controls {
    display: flex;
    align-items: center;
}

.brand {
    min-width: 0;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 1rem;
    letter-spacing: 0;
}

.brand-copy small {
    color: var(--muted);
    font-size: 0.72rem;
}

.nav-tabs {
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.nav-tab,
.text-btn,
.icon-btn,
.cart-button,
.primary-btn,
.secondary-btn,
.mini-btn,
.stage-arrow,
.quantity-btn {
    border: 0;
    border-radius: 8px;
    color: var(--porcelain);
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.nav-tab {
    padding: 11px 18px;
    background: transparent;
    color: var(--muted);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: capitalize;
}

.nav-tab.active,
.nav-tab:hover {
    background: var(--porcelain);
    color: #15110b;
}

body.light-theme .nav-tab.active,
body.light-theme .nav-tab:hover {
    color: #fffaf2;
}

.top-actions {
    justify-content: flex-end;
    gap: 10px;
}

.icon-btn,
.mini-btn,
.stage-arrow,
.quantity-btn {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
}

body.light-theme .icon-btn,
body.light-theme .mini-btn,
body.light-theme .stage-arrow,
body.light-theme .quantity-btn,
body.light-theme .secondary-btn,
body.light-theme .text-btn,
body.light-theme .category-filter button,
body.light-theme .sort-buttons button {
    background: rgba(21, 17, 11, 0.05);
}

.icon-btn:hover,
.mini-btn:hover,
.stage-arrow:hover,
.quantity-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(185, 154, 99, 0.55);
}

.cart-button {
    gap: 10px;
    padding: 10px 12px 10px 16px;
    background: var(--porcelain);
    color: #15110b;
}

body.light-theme .cart-button {
    color: #fffaf2;
}

.cart-button strong {
    display: grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #15110b;
    color: var(--porcelain);
    font-size: 0.82rem;
}

body.light-theme .cart-button strong {
    background: #fffaf2;
    color: #15110b;
}

.profile-btn {
    width: auto;
    min-width: 58px;
    padding: 0 12px;
    color: var(--brass);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-btn.signed-up {
    border-color: rgba(185, 154, 99, 0.7);
    background: var(--brass);
    color: #15110b;
}

.theme-toggle {
    position: relative;
    overflow: hidden;
}

.theme-toggle::after {
    content: "";
    position: absolute;
    inset: auto 9px 8px auto;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--brass);
    opacity: 0.8;
    transition: transform 220ms ease, opacity 220ms ease;
}

.theme-toggle:hover::after {
    transform: translate(-16px, -16px);
    opacity: 1;
}

.theme-icon {
    position: relative;
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: transform 260ms ease, box-shadow 260ms ease, background 260ms ease;
}

.theme-icon-sun {
    background:
        radial-gradient(circle at center, var(--brass) 0 36%, transparent 38%),
        conic-gradient(
            from 0deg,
            transparent 0 8%,
            var(--brass) 8% 12%,
            transparent 12% 20%,
            var(--brass) 20% 24%,
            transparent 24% 32%,
            var(--brass) 32% 36%,
            transparent 36% 44%,
            var(--brass) 44% 48%,
            transparent 48% 56%,
            var(--brass) 56% 60%,
            transparent 60% 68%,
            var(--brass) 68% 72%,
            transparent 72% 80%,
            var(--brass) 80% 84%,
            transparent 84% 92%,
            var(--brass) 92% 96%,
            transparent 96% 100%
        );
    box-shadow: 0 0 18px rgba(185, 154, 99, 0.38);
}

.theme-icon-moon {
    background: transparent;
    box-shadow: inset 8px -5px 0 1px var(--brass);
    transform: rotate(-18deg);
}

.theme-toggle:hover .theme-icon {
    transform: rotate(16deg) scale(1.06);
}

.theme-toggle:hover .theme-icon-moon {
    transform: rotate(-6deg) scale(1.06);
}

.commerce-frame {
    position: relative;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 30%),
        rgba(13, 12, 10, 0.62);
    box-shadow: var(--shadow);
}

.view-panel {
    position: absolute;
    inset: 0;
    min-height: 0;
    padding: 28px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px) scale(0.99);
    transition: opacity 360ms ease, transform 360ms ease;
}

.view-panel.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.hero-panel {
    display: grid;
    grid-template-columns: 1.02fr 1.22fr 0.78fr;
    gap: 24px;
    align-items: stretch;
}

.silk-line {
    position: absolute;
    inset: auto -14% 12% -14%;
    height: 44%;
    border-top: 1px solid rgba(185, 154, 99, 0.2);
    border-bottom: 1px solid rgba(111, 102, 89, 0.22);
    background: linear-gradient(100deg, transparent, rgba(185, 154, 99, 0.08), rgba(70, 67, 60, 0.11), transparent);
    transform: rotate(-8deg);
    animation: silkFloat 10s ease-in-out infinite alternate;
    pointer-events: none;
}

.silk-two {
    inset: 4% -18% auto -18%;
    height: 32%;
    transform: rotate(7deg);
    opacity: 0.55;
    animation-duration: 13s;
}

.hero-copy,
.spotlight-panel,
.catalog-copy,
.admin-form,
.admin-list-shell {
    position: relative;
    z-index: 1;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    backdrop-filter: blur(24px);
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 34px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--brass);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2 {
    font-family: "Playfair Display", Georgia, serif;
    letter-spacing: 0;
}

.hero-copy h1 {
    margin-bottom: 18px;
    font-size: clamp(3.2rem, 5vw, 4.8rem);
    line-height: 0.9;
}

.lead {
    max-width: 520px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.hero-actions {
    gap: 12px;
    flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
    min-height: 46px;
    padding: 12px 18px;
    font-weight: 800;
}

.primary-btn {
    background: linear-gradient(135deg, var(--brass), #d8bf8b);
    color: #171511;
}

.secondary-btn {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
}

.primary-btn:hover,
.secondary-btn:hover,
.text-btn:hover {
    transform: translateY(-2px);
}

.full-width {
    width: 100%;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 34px;
}

.hero-stats div {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.hero-stats strong,
.hero-stats span {
    display: block;
}

.hero-stats strong {
    color: var(--porcelain);
    font-size: 1.1rem;
}

.hero-stats span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.78rem;
}

.product-stage {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.stage-ring {
    position: absolute;
    width: 430px;
    max-width: 78%;
    aspect-ratio: 1;
    border: 1px solid rgba(185, 154, 99, 0.28);
    border-radius: 50%;
    animation: slowRotate 22s linear infinite;
}

.stage-ring::before,
.stage-ring::after {
    content: "";
    position: absolute;
    inset: 12%;
    border: 1px solid rgba(246, 241, 232, 0.12);
    border-radius: 50%;
}

.stage-ring::after {
    inset: 28%;
    border-color: rgba(111, 102, 89, 0.34);
}

.featured-product {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    width: 410px;
    max-width: 86%;
    height: min(74%, 560px);
    min-height: 390px;
    overflow: hidden;
    border: 1px solid rgba(246, 241, 232, 0.2);
    border-radius: 8px;
    background: #171511;
    box-shadow: 0 34px 85px rgba(0, 0, 0, 0.5);
    animation: stageLift 760ms ease both;
}

body.light-theme .featured-product,
body.light-theme .product-card,
body.light-theme .spotlight-item,
body.light-theme .cart-item,
body.light-theme .admin-row,
body.light-theme .drawer,
body.light-theme .modal-card {
    background: rgba(255, 250, 242, 0.9);
}

.featured-product img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-product .feature-copy {
    padding: 18px;
    background: linear-gradient(180deg, rgba(22, 20, 17, 0.76), rgba(22, 20, 17, 0.98));
}

body.light-theme .featured-product .feature-copy {
    background: linear-gradient(180deg, rgba(255, 250, 242, 0.78), rgba(255, 250, 242, 0.98));
}

.featured-product h3,
.product-card h3,
.admin-row h3 {
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.25;
}

.featured-product p,
.product-card p {
    display: -webkit-box;
    margin-bottom: 14px;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.feature-meta,
.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.feature-meta strong,
.product-meta strong,
.modal-copy strong {
    color: var(--brass);
}

.orbit-chip {
    position: absolute;
    z-index: 1;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 158px;
    padding: 8px;
    border: 1px solid rgba(246, 241, 232, 0.16);
    border-radius: 8px;
    background: rgba(22, 20, 17, 0.82);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.35);
    animation: orbitFloat 5.8s ease-in-out infinite alternate;
}

.orbit-chip img {
    width: 46px;
    height: 46px;
    border-radius: 6px;
    object-fit: cover;
}

.orbit-chip span {
    display: block;
    overflow: hidden;
    font-size: 0.78rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.orbit-chip small {
    color: var(--muted);
}

.orbit-chip.orbit-0 {
    top: 8%;
    left: 8%;
}

.orbit-chip.orbit-1 {
    right: 4%;
    top: 26%;
    animation-delay: 700ms;
}

.orbit-chip.orbit-2 {
    left: 4%;
    bottom: 10%;
    animation-delay: 1100ms;
}

.stage-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(13, 12, 10, 0.7);
}

.stage-arrow:hover {
    transform: translateY(-50%) scale(1.04);
}

.stage-prev {
    left: 10px;
}

.stage-next {
    right: 10px;
}

.spotlight-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    padding: 18px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-heading span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.text-btn {
    padding: 8px 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    color: var(--porcelain);
    font-size: 0.82rem;
    font-weight: 800;
}

.spotlight-list,
.admin-list,
.cart-items {
    min-height: 0;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(185, 154, 99, 0.55) transparent;
}

.spotlight-list {
    display: grid;
    gap: 10px;
}

.spotlight-item,
.cart-item,
.admin-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.spotlight-item img,
.cart-item img,
.admin-row img {
    width: 58px;
    height: 58px;
    border-radius: 6px;
    object-fit: cover;
}

.spotlight-item h3,
.cart-item h3 {
    margin: 0 0 4px;
    overflow: hidden;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spotlight-item span,
.cart-item span,
.admin-row span {
    color: var(--muted);
    font-size: 0.78rem;
}

.products-panel {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 20px;
}

.catalog-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px;
}

.catalog-copy h2,
.admin-form h2 {
    margin-bottom: 22px;
    font-size: 2.1rem;
    line-height: 1.05;
}

.search-bar {
    position: relative;
    margin-bottom: 18px;
}

.search-bar input,
.admin-form input,
.admin-form textarea,
.signup-fields input,
.signup-fields textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
    background: rgba(255, 255, 255, 0.08);
    color: var(--porcelain);
}

.search-bar input {
    height: 48px;
    padding: 0 48px 0 14px;
}

.search-bar input:focus,
.admin-form input:focus,
.admin-form textarea:focus,
.signup-fields input:focus,
.signup-fields textarea:focus {
    border-color: rgba(185, 154, 99, 0.72);
}

.search-bar .mini-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 36px;
    height: 36px;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.category-filter button {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    padding: 10px 12px;
    font-weight: 800;
}

.category-filter button.active,
.category-filter button:hover {
    border-color: transparent;
    background: var(--brass);
    color: #15110b;
}

.sort-control {
    display: grid;
    gap: 9px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.sort-control span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.sort-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sort-buttons button {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    padding: 10px 12px;
    font-size: 0.8rem;
    font-weight: 900;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.sort-buttons button.active,
.sort-buttons button:hover {
    border-color: transparent;
    background: var(--porcelain);
    color: #15110b;
    transform: translateY(-1px);
}

body.light-theme .sort-buttons button.active,
body.light-theme .sort-buttons button:hover {
    color: #fffaf2;
}

.catalog-stage {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) 54px;
    gap: 14px;
    min-width: 0;
    min-height: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
    min-height: 0;
}

.product-card {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(17, 21, 19, 0.82);
    animation: cardIn 420ms ease both;
    animation-delay: var(--delay, 0ms);
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(185, 154, 99, 0.55);
}

.product-media {
    position: relative;
    min-height: 0;
    overflow: hidden;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 420ms ease;
}

.product-card:hover img {
    transform: scale(1.06);
}

.product-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(13, 12, 10, 0.68);
    color: var(--porcelain);
    font-size: 0.68rem;
    font-weight: 800;
}

.image-count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(13, 12, 10, 0.7);
    color: var(--porcelain);
    font-size: 0.68rem;
    font-weight: 900;
}

.product-copy {
    padding: 14px;
}

.product-copy small,
.modal-copy span {
    display: block;
    margin-bottom: 8px;
    color: var(--brass);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.add-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: var(--porcelain);
    color: #15110b;
    font-weight: 900;
}

body.light-theme .add-btn {
    color: #fffaf2;
}

.empty-state {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    min-height: 180px;
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    text-align: center;
}

.catalog-stage > .empty-state {
    position: absolute;
    inset: 0 0 68px;
    min-height: 0;
}

.empty-state strong {
    color: var(--porcelain);
}

.pager {
    justify-content: center;
    gap: 14px;
}

.pager span {
    min-width: 112px;
    color: var(--muted);
    text-align: center;
    font-size: 0.88rem;
}

.admin-panel {
    display: grid;
    grid-template-columns: 430px minmax(0, 1fr);
    gap: 20px;
}

.admin-form,
.admin-list-shell {
    min-height: 0;
    padding: 22px;
    overflow: auto;
}

.admin-form {
    display: grid;
    align-content: start;
    gap: 14px;
}

.admin-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.admin-form input,
.admin-form textarea,
.signup-fields input,
.signup-fields textarea {
    min-height: 44px;
    padding: 12px;
}

.admin-form textarea,
.signup-fields textarea {
    resize: none;
}

.file-drop {
    border: 1px dashed rgba(185, 154, 99, 0.5);
    border-radius: 8px;
    padding: 13px;
    background: rgba(185, 154, 99, 0.08);
}

.file-drop input {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
}

.admin-preview {
    display: flex;
    gap: 8px;
    min-height: 58px;
}

.admin-preview img {
    width: 58px;
    height: 58px;
    border: 1px solid var(--line);
    border-radius: 6px;
    object-fit: cover;
}

.form-actions {
    gap: 10px;
}

.admin-head {
    align-items: flex-start;
}

.admin-head strong {
    display: block;
    margin-top: 4px;
    color: var(--porcelain);
}

.admin-actions {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-list {
    display: grid;
    gap: 10px;
}

.admin-row {
    grid-template-columns: 68px minmax(0, 1fr) auto;
}

.admin-row img {
    width: 68px;
    height: 68px;
}

.admin-row h3 {
    margin: 0 0 6px;
}

.admin-row p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.row-actions {
    display: flex;
    gap: 8px;
}

.danger-btn {
    border-color: rgba(201, 76, 76, 0.45);
    color: #ffd9d9;
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(8px);
}

.drawer {
    position: fixed;
    top: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 70;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(420px, calc(100vw - 32px));
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(14, 13, 11, 0.96);
    box-shadow: var(--shadow);
    transform: translateX(calc(100% + 24px));
    transition: transform 300ms ease;
}

body.light-theme .drawer {
    background: rgba(255, 250, 242, 0.96);
}

.drawer.open {
    transform: translateX(0);
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.drawer-head span,
.drawer-head strong {
    display: block;
}

.drawer-head span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.cart-items {
    display: grid;
    align-content: start;
    gap: 10px;
}

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

.cart-controls {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 8px;
}

.quantity-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-btn {
    min-width: 32px;
    height: 32px;
}

.cart-footer {
    display: grid;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.total-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.total-row span {
    color: var(--muted);
}

.checkout-note {
    margin: -4px 0 0;
    color: var(--brass);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.45;
}

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms ease;
}

.product-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    width: min(840px, 94vw);
    max-height: 86vh;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(15, 14, 12, 0.98);
    box-shadow: var(--shadow);
    transform: translateY(16px) scale(0.98);
    transition: transform 240ms ease;
}

body.light-theme .modal-card {
    background: rgba(255, 250, 242, 0.98);
}

.product-modal.open .modal-card {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: rgba(13, 12, 10, 0.72);
}

.modal-image-wrap {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px;
    min-height: 460px;
}

.modal-image-wrap > img {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 6px;
    object-fit: cover;
}

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

.modal-thumbnails button {
    aspect-ratio: 1;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
}

.modal-thumbnails button.active {
    border-color: var(--brass);
    box-shadow: 0 0 0 1px rgba(185, 154, 99, 0.28);
}

.modal-thumbnails img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px;
}

.modal-copy h2 {
    margin-bottom: 14px;
    font-size: 2rem;
    line-height: 1.05;
}

.modal-copy p {
    margin: 18px 0 24px;
    color: var(--muted);
    line-height: 1.65;
}

.customer-modal {
    z-index: 90;
}

.signup-card {
    grid-template-columns: 0.9fr 1.1fr;
    width: min(900px, 94vw);
}

.signup-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 520px;
    overflow: hidden;
    padding: 34px;
    background:
        radial-gradient(circle at 22% 18%, rgba(185, 154, 99, 0.25), transparent 30%),
        linear-gradient(145deg, rgba(185, 154, 99, 0.2), transparent 42%),
        linear-gradient(160deg, rgba(21, 19, 15, 0.9), rgba(55, 50, 43, 0.78));
}

.signup-visual::before,
.signup-visual::after {
    content: "";
    position: absolute;
    inset: 14%;
    border: 1px solid rgba(246, 241, 232, 0.12);
    border-radius: 50%;
    animation: slowRotate 28s linear infinite;
}

.signup-visual::after {
    inset: 28%;
    border-color: rgba(185, 154, 99, 0.32);
    animation-duration: 18s;
    animation-direction: reverse;
}

.signup-visual > * {
    position: relative;
    z-index: 1;
}

.signup-visual h2 {
    margin-bottom: 16px;
    font-size: 2.7rem;
    line-height: 1;
}

.signup-visual p {
    max-width: 360px;
    color: rgba(246, 241, 232, 0.74);
    line-height: 1.7;
}

.signup-status {
    width: fit-content;
    margin-top: 24px;
    padding: 10px 12px;
    border: 1px solid rgba(185, 154, 99, 0.4);
    border-radius: 8px;
    background: rgba(13, 12, 10, 0.44);
    color: #f6f1e8;
    font-size: 0.78rem;
    font-weight: 800;
}

.signup-fields {
    display: grid;
    align-content: center;
    gap: 14px;
    padding: 34px;
}

.signup-fields label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.contact-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.contact-tabs button {
    min-height: 40px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-weight: 900;
}

.contact-tabs button.active {
    background: var(--porcelain);
    color: #15110b;
}

body.light-theme .contact-tabs button.active {
    color: #fffaf2;
}

.phone-input {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.phone-input span {
    padding: 0 12px;
    color: var(--brass);
    font-weight: 900;
}

.phone-input input {
    border: 0;
    background: transparent;
}

.signup-note {
    min-height: 20px;
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.signup-note.success {
    color: var(--brass);
}

.signup-note.error {
    color: #ffb3b3;
}

body.light-theme .signup-note.error {
    color: #9d2f2f;
}

@keyframes premiumBackdrop {
    from {
        background-position: 48% 0, 0 0, center, center;
    }
    to {
        background-position: 58% 4%, 4% 0, center, center;
    }
}

@keyframes premiumGrain {
    from {
        transform: translate3d(-1.5%, -1%, 0) rotate(-0.35deg);
    }
    to {
        transform: translate3d(1.5%, 1%, 0) rotate(0.35deg);
    }
}

@keyframes premiumLight {
    from {
        opacity: 0.72;
        transform: translate3d(-1%, 0, 0) scale(1);
    }
    to {
        opacity: 1;
        transform: translate3d(1%, -1%, 0) scale(1.025);
    }
}

@keyframes silkFloat {
    from {
        transform: translateY(-10px) rotate(-8deg);
    }
    to {
        transform: translateY(14px) rotate(-5deg);
    }
}

@keyframes slowRotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes stageLift {
    from {
        opacity: 0;
        transform: translateY(20px) rotateX(8deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

@keyframes orbitFloat {
    from {
        transform: translateY(-8px);
    }
    to {
        transform: translateY(10px);
    }
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1180px) {
    .hero-panel {
        grid-template-columns: 1fr 1fr;
    }

    .spotlight-panel {
        grid-column: 1 / -1;
        grid-template-rows: auto 1fr;
        min-height: 132px;
    }

    .spotlight-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow: hidden;
    }

    .products-panel,
    .admin-panel {
        grid-template-columns: 300px minmax(0, 1fr);
    }

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

@media (max-width: 820px) {
    .app-shell {
        grid-template-rows: 112px minmax(0, 1fr);
        gap: 8px;
        padding: 8px;
    }

    .topbar {
        grid-template-rows: 48px 42px;
        grid-template-columns: 1fr auto;
        gap: 6px 8px;
        min-height: 112px;
        padding: 6px;
    }

    .brand-copy small,
    #searchJump {
        display: none;
    }

    .brand-copy strong {
        font-size: 0.98rem;
    }

    .brand {
        grid-column: 1;
        grid-row: 1;
    }

    .top-actions {
        grid-column: 2;
        grid-row: 1;
        gap: 6px;
    }

    .topbar .icon-btn {
        min-width: 38px;
        height: 38px;
    }

    .profile-btn {
        min-width: 48px;
        padding: 0 9px;
        font-size: 0.68rem;
    }

    .cart-button {
        gap: 6px;
        padding: 7px 8px;
        font-size: 0.78rem;
    }

    .cart-button strong {
        min-width: 23px;
        height: 23px;
        font-size: 0.76rem;
    }

    .nav-tabs {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: space-between;
        width: 100%;
        padding: 4px;
        background: rgba(9, 11, 10, 0.92);
        backdrop-filter: blur(18px);
    }

    .nav-tab {
        flex: 1;
        padding: 9px 8px;
        font-size: 1rem;
    }

    .commerce-frame {
        border-radius: 8px;
    }

    .view-panel {
        padding: 10px;
        transform: translateX(100%);
    }

    .view-panel[data-view-panel="atelier"] {
        transform: translateX(-100%);
    }

    .view-panel.active {
        transform: translateX(0);
    }

    .hero-panel {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 10px;
    }

    .hero-copy {
        justify-content: flex-start;
        padding: 15px;
    }

    .hero-copy .eyebrow {
        margin-bottom: 8px;
        font-size: 0.66rem;
    }

    .hero-copy h1 {
        margin-bottom: 8px;
        font-size: 2.65rem;
    }

    .lead {
        margin-bottom: 12px;
        font-size: 0.86rem;
        line-height: 1.45;
    }

    .hero-actions {
        gap: 8px;
    }

    .primary-btn,
    .secondary-btn {
        min-height: 42px;
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .hero-stats,
    .spotlight-panel,
    .orbit-chip {
        display: none;
    }

    .featured-product {
        width: 100%;
        max-width: 100%;
        min-height: 0;
        height: 100%;
    }

    .products-panel,
    .admin-panel {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 8px;
    }

    .catalog-copy,
    .admin-form,
    .admin-list-shell {
        padding: 10px;
    }

    .catalog-copy h2,
    .admin-form h2 {
        display: none;
    }

    .catalog-copy .eyebrow {
        display: none;
    }

    .search-bar {
        margin-bottom: 8px;
    }

    .search-bar input {
        height: 42px;
        font-size: 0.88rem;
    }

    .search-bar .mini-btn {
        top: 4px;
        right: 4px;
        min-width: 34px;
        height: 34px;
    }

    .category-filter {
        flex-wrap: nowrap;
        overflow: auto;
        margin-top: 0;
        gap: 6px;
        padding-bottom: 3px;
    }

    .sort-control {
        display: grid;
        gap: 7px;
        margin-top: 7px;
        padding-top: 7px;
    }

    .sort-control span {
        font-size: 0.64rem;
    }

    .sort-buttons {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow: visible;
        gap: 6px;
        padding-bottom: 0;
    }

    .sort-buttons button {
        min-width: 0;
        padding: 8px 6px;
        font-size: 0.69rem;
        white-space: nowrap;
    }

    .category-filter button {
        padding: 8px 10px;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .catalog-stage {
        grid-template-rows: minmax(0, 1fr) 42px;
        gap: 8px;
    }

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

    .product-card p,
    .product-badge {
        display: none;
    }

    .product-grid,
    .product-card {
        touch-action: none;
    }

    .product-card.description-open p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
    }

    .product-copy {
        padding: 9px;
    }

    .product-copy small {
        margin-bottom: 5px;
        font-size: 0.66rem;
    }

    .product-card h3 {
        margin-bottom: 6px;
        font-size: 0.82rem;
    }

    .product-meta {
        gap: 8px;
    }

    .product-meta strong {
        font-size: 0.78rem;
    }

    .add-btn {
        width: 34px;
        height: 34px;
    }

    .image-count {
        right: 8px;
        bottom: 8px;
        padding: 4px 7px;
        font-size: 0.64rem;
    }

    .pager {
        gap: 10px;
    }

    .pager .icon-btn {
        min-width: 40px;
        height: 40px;
    }

    .pager span {
        min-width: 92px;
        font-size: 0.78rem;
    }

    .admin-panel {
        grid-template-rows: minmax(0, 0.95fr) minmax(0, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-card {
        grid-template-columns: 1fr;
        width: min(420px, 94vw);
        max-height: 86vh;
    }

    .signup-card {
        width: min(430px, 94vw);
        overflow: auto;
    }

    .signup-visual {
        min-height: 210px;
        padding: 24px;
    }

    .signup-visual h2 {
        font-size: 2rem;
    }

    .signup-visual p {
        margin-bottom: 0;
        line-height: 1.5;
    }

    .signup-status {
        margin-top: 16px;
    }

    .signup-fields {
        padding: 18px;
    }

    .modal-image-wrap {
        min-height: 260px;
        height: 36vh;
    }

    .modal-thumbnails {
        gap: 5px;
    }

    .modal-copy {
        padding: 20px;
    }

    .modal-copy h2 {
        font-size: 1.55rem;
    }
}

@media (max-height: 720px) {
    .hero-stats,
    .admin-preview {
        display: none;
    }

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

    .lead {
        line-height: 1.45;
    }

    .catalog-copy h2 {
        font-size: 1.7rem;
    }
}

@media (max-width: 820px) and (max-height: 720px) {
    .hero-copy h1 {
        font-size: 2.35rem;
    }

    .lead {
        margin-bottom: 10px;
        font-size: 0.8rem;
    }

    .primary-btn,
    .secondary-btn {
        min-height: 38px;
        padding: 8px 12px;
    }
}

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