/* ============================================
   ROSSY LUXE — design tokens
   Warm, rounded, soft-shadowed — the boutique
   identity (serif display, cognac accent, no
   logo) carried forward into a softer language.
   ============================================ */

:root {
    --color-bg: #F7ECE4;
    --color-surface: #FFFFFF;
    --color-ink: #2B211B;
    --color-ink-secondary: #8C7A6B;
    --color-border: #EFE1D6;
    --color-ink-inverse: #FBF3EC;
    --color-accent: #8B5A34;
    --color-accent-soft: #F0DCC9;

    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --radius-pill: 999px;

    --shadow-card: 0 6px 20px rgba(43, 33, 27, 0.08);
    --shadow-card-hover: 0 10px 28px rgba(43, 33, 27, 0.12);
    --shadow-nav: 0 -4px 20px rgba(43, 33, 27, 0.07);

    --nav-height-desktop: 64px;
    --nav-height-mobile-bottom: 64px;
    --nav-height-mobile-top: 52px;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 32px;
    --space-6: 48px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}

body {
    padding-top: calc(var(--nav-height-mobile-top) + env(safe-area-inset-top));
    padding-bottom: calc(var(--nav-height-mobile-bottom) + var(--space-3) + env(safe-area-inset-bottom));
}

@media (min-width: 900px) {
    body {
        padding-top: var(--nav-height-desktop);
        padding-bottom: var(--space-6);
    }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, video { max-width: 100%; display: block; }

:focus-visible {
    outline: 2px solid var(--color-ink);
    outline-offset: 2px;
}

.eyebrow {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-ink-secondary);
}

/* ============================================
   MOTION
   ============================================ */

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

@keyframes badgePop {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

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

/* ============================================
   TOP NAV — desktop, text links (never icons)
   ============================================ */

.nav-top {
    display: none;
}

@media (min-width: 900px) {
    .nav-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: var(--nav-height-desktop);
        padding: 0 var(--space-6);
        background: var(--color-surface);
        box-shadow: 0 2px 12px rgba(43, 33, 27, 0.05);
        z-index: 100;
    }

    .nav-top .wordmark {
        font-family: var(--font-display);
        font-size: 20px;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .nav-top .nav-links {
        display: flex;
        gap: var(--space-5);
        align-items: center;
    }

    .nav-top .nav-links a {
        font-size: 13px;
        letter-spacing: 0.03em;
        color: var(--color-ink-secondary);
        transition: color 0.15s ease;
    }

    .nav-top .nav-links a:hover,
    .nav-top .nav-links a.active {
        color: var(--color-ink);
    }
}

/* ============================================
   MOBILE TOP BAR — wordmark only
   ============================================ */

.nav-top-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height-mobile-top) + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    background: var(--color-surface);
    box-shadow: 0 2px 12px rgba(43, 33, 27, 0.05);
    z-index: 100;
}

.nav-top-mobile .wordmark {
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@media (min-width: 900px) {
    .nav-top-mobile { display: none; }
}

/* ============================================
   BOTTOM NAV — mobile only, icons stay here
   (a real usability need on small screens, not
   a style choice), softened to match the rest.
   ============================================ */

.nav-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    height: calc(var(--nav-height-mobile-bottom) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--color-surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-nav);
    z-index: 100;
}

@media (min-width: 900px) {
    .nav-bottom { display: none; }
}

.nav-bottom a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--color-ink-secondary);
    position: relative;
    transition: color 0.15s ease;
}

.nav-bottom a.active {
    color: var(--color-ink);
}

.nav-bottom a.active::before {
    content: "";
    position: absolute;
    top: 2px;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-pill);
    background: var(--color-accent-soft);
    z-index: -1;
}

.nav-bottom svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
}

.nav-bottom a.active svg {
    fill: currentColor;
    stroke: none;
}

.nav-bottom .nav-label {
    font-size: 10px;
    letter-spacing: 0.03em;
}

.nav-badge {
    position: absolute;
    top: -4px;
    right: calc(50% - 20px);
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: var(--radius-pill);
    background: var(--color-accent);
    color: var(--color-ink-inverse);
    font-size: 9px;
    line-height: 15px;
    text-align: center;
}

.nav-badge.pop {
    animation: badgePop 0.28s ease;
}

.nav-badge:empty,
.nav-badge[data-count="0"] {
    display: none;
}

/* ============================================
   LAYOUT / CONTAINER
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-3);
}

@media (min-width: 900px) {
    .container { padding: 0 var(--space-6); }
}

/* ============================================
   CATEGORY CHIPS — soft pills, shadow instead
   of a hard outline
   ============================================ */

.category-rail {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding: var(--space-3) var(--space-3);
    scrollbar-width: none;
}

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

@media (min-width: 900px) {
    .category-rail { padding: var(--space-4) var(--space-6); }
}

.chip {
    flex: none;
    padding: 8px 18px;
    border: none;
    border-radius: var(--radius-pill);
    font-size: 12px;
    letter-spacing: 0.02em;
    color: var(--color-ink-secondary);
    background: var(--color-surface);
    box-shadow: 0 2px 8px rgba(43, 33, 27, 0.06);
    white-space: nowrap;
    transition: box-shadow 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.chip:hover:not(.active) {
    color: var(--color-ink);
    box-shadow: 0 4px 12px rgba(43, 33, 27, 0.1);
}

.chip.active {
    background: var(--color-ink);
    color: var(--color-ink-inverse);
    box-shadow: 0 4px 14px rgba(43, 33, 27, 0.18);
}

/* ============================================
   PRODUCT GRID — real cards now: rounded,
   shadowed, image + text inside one frame
   ============================================ */

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3) var(--space-3);
    padding: var(--space-2) var(--space-3) var(--space-6);
}

@media (min-width: 640px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-5);
        padding: var(--space-3) var(--space-6) var(--space-6);
    }
}

.product-card {
    display: block;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-2);
    box-shadow: var(--shadow-card);
    animation: fadeInUp 0.45s ease both;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
}

.thumb {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
}

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

.thumb.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-ink-secondary);
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.product-card .name {
    margin-top: var(--space-2);
    padding: 0 4px;
    font-size: 13px;
    letter-spacing: 0.01em;
}

.product-card .price {
    margin-top: 2px;
    padding: 0 4px;
    font-size: 13px;
    color: var(--color-ink-secondary);
}

.empty-state {
    padding: var(--space-6) var(--space-3);
    text-align: center;
    color: var(--color-ink-secondary);
    font-size: 14px;
}

/* ============================================
   PRODUCT DETAIL — the signature gallery
   ============================================ */

.product-detail {
    padding: var(--space-3);
}

@media (min-width: 900px) {
    .product-detail {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        gap: var(--space-6);
        padding: var(--space-5) var(--space-6);
    }
}

.gallery-viewer {
    width: 100%;
    aspect-ratio: 4 / 5;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-viewer img,
.gallery-viewer video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.16s ease;
}

.gallery-viewer.is-transitioning img,
.gallery-viewer.is-transitioning video {
    opacity: 0;
}

.gallery-thumbs {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding: var(--space-3) 2px;
    scrollbar-width: none;
}

.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumbs .thumb-btn {
    flex: none;
    width: 56px;
    height: 70px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    box-shadow: 0 2px 8px rgba(43, 33, 27, 0.06);
    padding: 0;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.15s ease, opacity 0.15s ease;
    opacity: 0.7;
}

.gallery-thumbs .thumb-btn:hover {
    opacity: 1;
}

.gallery-thumbs .thumb-btn img,
.gallery-thumbs .thumb-btn video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs .thumb-btn.active {
    box-shadow: 0 0 0 2px var(--color-accent);
    opacity: 1;
}

.gallery-thumbs .thumb-btn.video-thumb::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--color-surface);
}

.product-info {
    padding-top: var(--space-4);
}

@media (min-width: 900px) {
    .product-info { padding-top: 0; }
}

.product-info h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 28px;
    letter-spacing: 0.01em;
    margin: 0 0 var(--space-2);
}

.product-info .price {
    font-size: 16px;
    margin-bottom: var(--space-4);
}

.product-info .description {
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-ink-secondary);
    margin-bottom: var(--space-5);
}

.qty-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.qty-control {
    display: flex;
    align-items: center;
    background: var(--color-surface);
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 8px rgba(43, 33, 27, 0.06);
    padding: 2px;
}

.qty-control button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-pill);
    background: none;
    font-size: 16px;
    transition: background 0.15s ease;
}

.qty-control button:hover {
    background: var(--color-bg);
}

.qty-control span {
    min-width: 32px;
    text-align: center;
    font-size: 14px;
}

/* ============================================
   BUTTONS — true pills, soft-shadow lift
   ============================================ */

.btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--color-ink);
    color: var(--color-ink-inverse);
    border: none;
    border-radius: var(--radius-pill);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    box-shadow: 0 6px 16px rgba(43, 33, 27, 0.18);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(43, 33, 27, 0.24);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--color-surface);
    color: var(--color-ink);
    border: 1.5px solid var(--color-ink);
    border-radius: var(--radius-pill);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    margin-top: var(--space-2);
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-secondary:hover {
    background: var(--color-ink);
    color: var(--color-ink-inverse);
}

.confirm-note {
    margin-top: var(--space-2);
    font-size: 12px;
    color: var(--color-accent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.confirm-note.visible {
    opacity: 1;
}

/* ============================================
   SELECTION / CHECKOUT PAGE
   ============================================ */

.selection-list {
    padding: var(--space-3);
}

@media (min-width: 900px) {
    .selection-list { padding: var(--space-4) var(--space-6); max-width: 700px; margin: 0 auto; }
}

.selection-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3);
    margin-bottom: var(--space-2);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.selection-item .thumb {
    width: 72px;
    height: 90px;
    flex: none;
    border-radius: var(--radius-sm);
}

.selection-item .details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.selection-item .name { font-size: 14px; }
.selection-item .price { font-size: 13px; color: var(--color-ink-secondary); margin-top: 2px; }

.selection-item .row-bottom {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remove-link {
    font-size: 12px;
    color: var(--color-ink-secondary);
    text-decoration: underline;
    transition: color 0.15s ease;
}

.remove-link:hover {
    color: var(--color-ink);
}

.selection-summary {
    padding: var(--space-4) var(--space-3);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: var(--space-1) 0;
}

.summary-row.total {
    font-size: 16px;
    margin-top: var(--space-2);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
}

.note-field {
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: 0 2px 8px rgba(43, 33, 27, 0.06);
    font-family: inherit;
    font-size: 13px;
    margin-bottom: var(--space-3);
    resize: vertical;
    min-height: 60px;
    transition: box-shadow 0.15s ease;
}

.note-field:focus {
    box-shadow: 0 0 0 2px var(--color-ink);
    outline: none;
}

.invoice-result {
    padding: var(--space-4);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-align: center;
    margin-top: var(--space-4);
    animation: fadeInUp 0.35s ease both;
}

.invoice-code {
    font-family: var(--font-display);
    font-size: 28px;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    margin: var(--space-2) 0 var(--space-3);
}

.copy-btn {
    width: auto;
    display: inline-block;
    padding: 8px 22px;
    margin-bottom: var(--space-3);
}