/* ============================================================
   RIAH'S ART — Minimal Art-Gallery Editorial
   Palette: cream, warm beige, soft greys, near-black
   Fonts:  Cormorant (serif headings) + Inter (sans body)
   ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cream:        #f5f0eb;
    --beige:        #e8e0d6;
    --beige-light:  #f0ebe4;
    --grey-warm:    #b8b0a6;
    --grey-mid:     #8a8279;
    --grey-dark:    #5a544e;
    --near-black:   #1a1816;
    --white:        #fdfcfa;
    --accent:       #9c8b78;

    --font-serif:   'Cormorant', Georgia, serif;
    --font-sans:    'Inter', -apple-system, sans-serif;

    --nav-height:   72px;
    --section-pad:  clamp(60px, 10vw, 120px);
    --side-pad:     clamp(20px, 5vw, 80px);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.7;
    color: var(--near-black);
    background: var(--cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
}

/* --- LOADING OVERLAY --- */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.loading-name {
    display: inline-flex;
    gap: 2px;
    font-family: var(--font-serif);
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--near-black);
}

.loading-spacer {
    width: 0.4em;
}

.loading-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(14px);
    animation: letterReveal 0.5s ease forwards;
    animation-delay: calc(var(--i) * 0.07s + 0.2s);
}

.loading-line {
    width: 60px;
    height: 1px;
    background: var(--grey-warm);
    margin: 18px auto 0;
    transform: scaleX(0);
    transform-origin: left;
    animation: lineGrow 0.8s ease forwards 1.1s;
}

@keyframes letterReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lineGrow {
    to {
        transform: scaleX(1);
    }
}

/* Loading logo (when logo_image is set) */
.loading-logo {
    opacity: 0;
    transform: scale(0.7);
    animation: logoReveal 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards 0.3s;
    padding: 0 24px;
}

.loading-logo img {
    max-width: clamp(260px, 55vw, 480px);
    height: auto;
    /* Invert to dark on the cream loading background */
    filter: invert(1) brightness(0.25);
}

@keyframes logoReveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-letter {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .loading-logo {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .loading-line {
        transform: scaleX(1);
        animation: none;
    }
    .loading-overlay {
        transition-duration: 0.2s;
    }
}

/* --- NAVIGATION --- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

.site-nav.scrolled {
    background: rgba(245, 240, 235, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.site-nav nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    padding: 0 var(--side-pad);
    max-width: 1440px;
    margin: 0 auto;
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.05em;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.nav-logo-img {
    height: 44px;
    width: auto;
    display: block;
    transition: filter 0.35s ease;
}

/* Light signature is visible on the dark hero — but on the
   cream/white scrolled nav it disappears.  Invert it to dark. */
.site-nav.scrolled .nav-logo-img {
    filter: invert(1) brightness(0.25);
}

@media (max-width: 768px) and (min-width: 601px) {
    .nav-logo-img {
        height: 36px;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--near-black);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cart {
    display: flex;
    align-items: center;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    padding: 4px 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--near-black);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(3.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-3.25px) rotate(-45deg);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(320px, 85vw);
        flex-direction: column;
        justify-content: center;
        gap: 28px;
        padding: 60px 40px;
        background: var(--cream);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 13px;
        letter-spacing: 0.18em;
    }
}

/* --- HERO --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    will-change: transform;
}

.hero-bg picture,
.hero-bg img {
    width: 100%;
    height: 120%;
    object-fit: cover;
    object-position: center;
}

.hero-bg .hero-placeholder {
    width: 100%;
    height: 120%;
    background: var(--beige);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 24, 22, 0.15) 0%,
        rgba(26, 24, 22, 0.35) 100%
    );
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 var(--side-pad);
}

.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(40px, 8vw, 88px);
    font-weight: 300;
    letter-spacing: 0.06em;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-size: clamp(12px, 1.6vw, 15px);
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(253, 252, 250, 0.8);
}

/* --- SECTION HEADERS --- */
.section-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--grey-mid);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

/* --- FEATURED / STAGGERED GRID --- */
.featured-section {
    padding: var(--section-pad) var(--side-pad);
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(40px, 6vw, 80px);
}

.staggered-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(24px, 4vw, 48px);
}

.staggered-item {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Staggered offset: odd items pushed down */
.staggered-item:nth-child(even) {
    margin-top: clamp(40px, 8vw, 100px);
}

.item-number {
    position: absolute;
    top: -8px;
    left: -4px;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: var(--grey-mid);
    z-index: 2;
}

.item-image-wrap {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--beige);
}

.item-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.staggered-item:hover .item-image-wrap img {
    transform: scale(1.04);
}

.item-meta {
    padding: 16px 0 0;
}

.item-title {
    font-family: var(--font-serif);
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}

.item-link {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--grey-mid);
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
}

.item-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--grey-warm);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.staggered-item:hover .item-link::after {
    transform: scaleX(1);
}

/* 3-col on wider screens */
@media (min-width: 1024px) {
    .staggered-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .staggered-item:nth-child(even) {
        margin-top: 0;
    }

    .staggered-item:nth-child(3n+2) {
        margin-top: clamp(50px, 8vw, 100px);
    }

    .staggered-item:nth-child(3n+3) {
        margin-top: clamp(25px, 4vw, 50px);
    }
}

/* Mobile staggered grid handled in the main mobile block below */

/* --- ABOUT SECTION --- */
.about-section {
    padding: var(--section-pad) var(--side-pad);
    background: var(--white);
}

.about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 6vw, 80px);
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

.about-body {
    margin-top: 20px;
    color: var(--grey-dark);
    line-height: 1.85;
}

.about-body p + p {
    margin-top: 1em;
}

.about-image-wrap {
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--beige);
}

.about-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-placeholder {
    width: 100%;
    height: 100%;
    background: var(--beige);
}

@media (max-width: 768px) {
    .about-inner {
        grid-template-columns: 1fr;
    }

    .about-image-wrap {
        order: -1;
        aspect-ratio: 3 / 2;
    }
}

/* --- CONTACT SECTION --- */
.contact-section {
    padding: var(--section-pad) var(--side-pad);
    text-align: center;
}

.contact-inner {
    max-width: 600px;
    margin: 0 auto;
}

.contact-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--grey-dark);
    letter-spacing: 0.04em;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--near-black);
}

/* --- FOOTER --- */
.site-footer {
    border-top: 1px solid var(--beige);
    padding: 48px var(--side-pad);
    background: var(--cream);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-name {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.footer-tagline {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--grey-mid);
    margin-top: 4px;
}

.footer-contact {
    display: flex;
    gap: 24px;
}

.footer-contact a {
    font-size: 13px;
    color: var(--grey-dark);
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: var(--near-black);
}

.footer-socials {
    display: flex;
    gap: 18px;
}

.footer-socials a {
    color: var(--grey-mid);
    transition: color 0.3s ease;
}

.footer-socials a:hover {
    color: var(--near-black);
}

.footer-copy {
    width: 100%;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--grey-warm);
    margin-top: 16px;
}

@media (max-width: 600px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-contact {
        flex-direction: column;
        gap: 8px;
    }
}

/* --- STORE PAGE --- */
.store-hero {
    padding: calc(var(--nav-height) + 48px) var(--side-pad) 48px;
    text-align: center;
}

.page-title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 300;
    letter-spacing: 0.04em;
}

.store-grid-section {
    padding: 0 var(--side-pad) var(--section-pad);
    max-width: 1400px;
    margin: 0 auto;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 3vw, 40px);
}

.store-card {
    position: relative;
    display: block;
}

.store-card .item-number {
    top: -6px;
    left: -2px;
}

.store-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--beige);
}

.store-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.store-card:hover .store-card-image img {
    transform: scale(1.04);
}

.sold-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 14px;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--white);
    background: rgba(26, 24, 22, 0.7);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.store-card-info {
    padding: 14px 0 0;
}

.store-card-title {
    font-family: var(--font-serif);
    font-size: clamp(16px, 1.8vw, 20px);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}

.store-card-meta {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.store-card-medium {
    font-size: 12px;
    color: var(--grey-mid);
    letter-spacing: 0.04em;
}

.store-card-price {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--grey-dark);
}

.store-card-edition {
    display: inline-block;
    margin-top: 6px;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--grey-warm);
}

.store-empty {
    text-align: center;
    padding: 80px 0;
    color: var(--grey-mid);
}

@media (max-width: 768px) {
    .store-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Store single-column handled in the main mobile block below */

/* --- PRODUCT PAGE --- */
.product-page {
    padding: calc(var(--nav-height) + 32px) var(--side-pad) var(--section-pad);
    max-width: 1300px;
    margin: 0 auto;
}

.product-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(32px, 5vw, 80px);
    align-items: start;
}

.product-main-image {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--beige);
}

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

.product-gallery {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.gallery-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    overflow: hidden;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    border: 1px solid transparent;
    padding: 0;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    opacity: 1;
    border-color: var(--grey-warm);
}

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

.product-back {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--grey-mid);
    margin-bottom: 24px;
    transition: color 0.3s ease;
}

.product-back:hover {
    color: var(--near-black);
}

.product-edition-badge {
    display: inline-block;
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--grey-warm);
    border: 1px solid var(--beige);
    padding: 4px 14px;
    margin-bottom: 16px;
}

.product-title {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin-bottom: 24px;
}

.product-specs {
    margin-bottom: 24px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--beige);
}

.spec-label {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--grey-mid);
}

.spec-value {
    font-size: 14px;
    color: var(--grey-dark);
}

.product-price-row {
    margin-bottom: 24px;
}

.product-price {
    font-family: var(--font-serif);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 400;
    letter-spacing: 0.03em;
}

.product-description {
    color: var(--grey-dark);
    line-height: 1.85;
    margin-bottom: 32px;
}

.product-description p + p {
    margin-top: 1em;
}

.btn-buy,
.btn-sold {
    display: block;
    width: 100%;
    max-width: 320px;
    padding: 14px 32px;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
    transition: background 0.3s ease, color 0.3s ease;
}

.btn-buy {
    background: var(--near-black);
    color: var(--white);
    border: 1px solid var(--near-black);
}

.btn-buy:hover {
    background: transparent;
    color: var(--near-black);
}

.btn-sold {
    background: var(--beige);
    color: var(--grey-mid);
    border: 1px solid var(--beige);
    cursor: not-allowed;
}

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

    .product-main-image {
        aspect-ratio: 1 / 1;
    }
}

/* --- PARALLAX DRIFT (desktop only) --- */
[data-parallax-drift] {
    will-change: transform;
}

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

    html {
        scroll-behavior: auto;
    }

    .hero-bg {
        will-change: auto;
    }

    [data-parallax-drift] {
        will-change: auto;
    }
}

/* --- CART BADGE --- */
.nav-cart {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 9px;
    font-weight: 500;
    line-height: 16px;
    text-align: center;
    color: var(--white);
    background: var(--near-black);
    border-radius: 8px;
}

/* --- ALERTS --- */
.alert {
    padding: 14px 20px;
    margin-bottom: 24px;
    font-size: 13px;
    line-height: 1.6;
    border-left: 3px solid;
}

.alert-error {
    background: #fdf2f2;
    border-color: #c53030;
    color: #742a2a;
}

.alert-success {
    background: #f0fff4;
    border-color: #38a169;
    color: #22543d;
}

/* --- CART PAGE --- */
.cart-page {
    padding: calc(var(--nav-height) + 48px) var(--side-pad) var(--section-pad);
    max-width: 900px;
    margin: 0 auto;
}

.cart-inner .page-title {
    margin-bottom: 32px;
}

.cart-items {
    border-top: 1px solid var(--beige);
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 16px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--beige);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    overflow: hidden;
    background: var(--beige);
}

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

.cart-item-title {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 4px;
}

.cart-item-title a {
    transition: color 0.3s ease;
}

.cart-item-title a:hover {
    color: var(--accent);
}

.cart-item-edition {
    display: block;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--grey-warm);
}

.cart-item-price {
    display: block;
    font-size: 13px;
    color: var(--grey-dark);
    margin-top: 4px;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--beige);
}

.qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--grey-dark);
    background: var(--white);
    transition: background 0.2s ease;
}

.qty-btn:hover {
    background: var(--beige-light);
}

.qty-value,
.qty-input {
    width: 36px;
    height: 32px;
    text-align: center;
    font-size: 13px;
    font-family: var(--font-sans);
    border: none;
    border-left: 1px solid var(--beige);
    border-right: 1px solid var(--beige);
    background: transparent;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.cart-item-line-total {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.cart-item-remove button {
    color: var(--grey-warm);
    transition: color 0.3s ease;
    padding: 4px;
}

.cart-item-remove button:hover {
    color: #c53030;
}

.cart-summary {
    margin-top: 32px;
    text-align: right;
}

.cart-subtotal {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 24px;
    margin-bottom: 24px;
}

.cart-subtotal-label {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--grey-mid);
}

.cart-subtotal-value {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 400;
}

.cart-summary .btn-buy {
    display: inline-block;
    max-width: 280px;
    margin-left: auto;
}

.cart-empty {
    text-align: center;
    padding: 60px 0;
    color: var(--grey-mid);
}

/* Cart mobile layout handled in the main mobile block below */

/* --- PRODUCT QUANTITY ON PRODUCT PAGE --- */
.product-qty-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.add-to-cart-form {
    margin-top: 4px;
}

/* --- STORE CARD QUICK ADD --- */
.store-card-cart {
    margin-top: 8px;
}

.btn-add-quick {
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--grey-mid);
    background: none;
    border: 1px solid var(--beige);
    padding: 6px 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-add-quick:hover {
    background: var(--near-black);
    color: var(--white);
    border-color: var(--near-black);
}

/* --- CHECKOUT PAGE --- */
.checkout-page {
    padding: calc(var(--nav-height) + 48px) var(--side-pad) var(--section-pad);
    max-width: 1100px;
    margin: 0 auto;
}

.checkout-inner .page-title {
    margin-bottom: 32px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: start;
}

.checkout-section-title {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 20px;
}

/* Form elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--grey-mid);
    margin-bottom: 6px;
}

.form-input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 300;
    color: var(--near-black);
    background: var(--white);
    border: 1px solid var(--beige);
    transition: border-color 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--grey-warm);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-error {
    display: block;
    font-size: 12px;
    color: #c53030;
    margin-top: 4px;
}

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

/* Checkout summary sidebar */
.checkout-summary {
    background: var(--white);
    padding: 28px;
    border: 1px solid var(--beige);
}

.summary-items {
    border-top: 1px solid var(--beige);
    margin-bottom: 16px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--beige);
}

.summary-item-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.summary-item-title {
    font-size: 13px;
    font-weight: 400;
}

.summary-item-qty {
    font-size: 11px;
    color: var(--grey-mid);
}

.summary-item-price {
    font-size: 13px;
    white-space: nowrap;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 16px 0;
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 400;
}

.btn-paystack {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-secure-note {
    margin-top: 16px;
    font-size: 11px;
    color: var(--grey-mid);
    text-align: center;
}

@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }

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

/* --- CONFIRMATION PAGE --- */
.confirmation-page {
    padding: calc(var(--nav-height) + 48px) var(--side-pad) var(--section-pad);
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.confirmation-icon {
    margin-bottom: 16px;
}

.confirmation-message {
    font-size: 14px;
    color: var(--grey-dark);
    margin: 16px 0 32px;
    line-height: 1.7;
}

.confirmation-card {
    background: var(--white);
    border: 1px solid var(--beige);
    padding: 28px;
    text-align: left;
    margin-bottom: 8px;
}

.confirmation-ref {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--beige);
    margin-bottom: 8px;
}

.confirmation-shipping {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--beige);
}

.confirmation-shipping p {
    font-size: 14px;
    color: var(--grey-dark);
    margin-top: 6px;
    line-height: 1.6;
}

/* ============================================================
   MOBILE — BCODE Design System spacing & sizing pass
   Reference: 393×852 (iPhone 16 Pro)
   SIZES & SPACING ONLY — fonts, colors, styles unchanged.
   Tap targets ≥ 44px.
   ============================================================ */
@media (max-width: 600px) {

    /* --- SPACING TOKENS (mobile overrides) --- */
    :root {
        --section-pad: 24px;
        --side-pad:    16px;
    }

    /* --- BASE TYPOGRAPHY (size only) --- */
    body {
        font-size: 13px;
        line-height: 1.5; /* ~19.5px */
    }

    /* --- NAV — tap targets --- */
    .nav-toggle {
        width: 44px;
        height: 44px;
        padding: 14px 10px;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-cart {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-links {
        gap: 0;
        padding: 80px 24px 48px;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        min-height: 48px;
        font-size: 13px;
        padding: 4px 0;
    }

    .nav-logo-img {
        height: 28px;
    }

    /* --- HERO — compact, fits viewport --- */
    .hero {
        height: 70vh;
        min-height: 320px;
    }

    .hero-bg {
        will-change: auto;
    }

    .hero-bg picture,
    .hero-bg img {
        height: 100%;
        animation: kenBurns 25s ease-in-out infinite alternate;
    }

    .hero-content {
        padding: 28px 16px 0;
    }

    .hero-headline {
        font-size: 28px;
        line-height: 1.22; /* ~34px */
        margin-bottom: 8px;
    }

    .hero-subtitle {
        font-size: 13px;
        line-height: 1.46; /* ~19px */
    }

    /* --- SECTION HEADERS --- */
    .section-label {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .section-title {
        font-size: 20px;
        line-height: 1.3;
    }

    .section-header {
        margin-bottom: 16px;
    }

    /* --- FEATURED GRID — 2 columns, dense --- */
    .featured-section {
        padding: 24px 16px;
    }

    .staggered-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .staggered-item:nth-child(even) {
        margin-top: 24px;
    }

    .item-number {
        font-size: 9px;
        top: -6px;
        left: -2px;
    }

    .item-meta {
        padding: 6px 0 0;
    }

    .item-title {
        font-size: 13px;
        margin-bottom: 2px;
    }

    .item-link {
        font-size: 10px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* --- ABOUT --- */
    .about-section {
        padding: 24px 16px;
    }

    .about-inner {
        gap: 16px;
    }

    .about-body {
        font-size: 13px;
        line-height: 1.5;
        margin-top: 12px;
    }

    .about-image-wrap {
        aspect-ratio: 16 / 9;
    }

    /* --- CONTACT --- */
    .contact-section {
        padding: 24px 16px;
    }

    .contact-details {
        gap: 8px;
        margin-top: 16px;
    }

    .contact-link {
        font-size: 13px;
        min-height: 44px;
        padding: 8px 0;
    }

    /* --- FOOTER --- */
    .site-footer {
        padding: 24px 16px;
    }

    .footer-inner {
        gap: 16px;
    }

    .footer-name {
        font-size: 16px;
    }

    .footer-tagline {
        font-size: 10px;
    }

    .footer-socials {
        gap: 0;
    }

    .footer-socials a {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .footer-contact a {
        display: block;
        min-height: 44px;
        line-height: 44px;
        font-size: 13px;
    }

    .footer-copy {
        font-size: 11px;
        margin-top: 8px;
    }

    /* --- STORE — 2 columns, dense --- */
    .store-hero {
        padding: calc(var(--nav-height) + 24px) 16px 16px;
    }

    .store-grid-section {
        padding: 0 16px 24px;
    }

    .store-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: none;
    }

    .store-card-info {
        padding: 6px 0 0;
    }

    .store-card-title {
        font-size: 13px;
        margin-bottom: 2px;
    }

    .store-card-medium {
        font-size: 11px;
    }

    .store-card-price {
        font-size: 12px;
    }

    .store-card-edition {
        font-size: 9px;
        margin-top: 2px;
    }

    .sold-badge {
        font-size: 9px;
        padding: 2px 8px;
        top: 6px;
        right: 6px;
    }

    .btn-add-quick {
        font-size: 10px;
        padding: 10px 12px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .store-card-cart {
        margin-top: 4px;
    }

    .page-title {
        font-size: 24px;
    }

    /* --- PRODUCT PAGE --- */
    .product-page {
        padding: calc(var(--nav-height) + 16px) 16px 24px;
    }

    .product-back {
        font-size: 11px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        margin-bottom: 12px;
    }

    .product-edition-badge {
        font-size: 9px;
        padding: 4px 12px;
        margin-bottom: 8px;
    }

    .product-title {
        font-size: 22px;
        margin-bottom: 16px;
    }

    .product-main-image {
        aspect-ratio: 4 / 5;
    }

    .spec-label {
        font-size: 10px;
    }

    .spec-value {
        font-size: 13px;
    }

    .spec-row {
        padding: 8px 0;
    }

    .product-specs {
        margin-bottom: 16px;
    }

    .product-price {
        font-size: 22px;
    }

    .product-price-row {
        margin-bottom: 16px;
    }

    .product-description {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 16px;
    }

    .btn-buy,
    .btn-sold {
        max-width: 100%;
        padding: 14px 24px;
        font-size: 11px;
        min-height: 48px;
    }

    .qty-btn {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .qty-value,
    .qty-input {
        width: 44px;
        height: 44px;
        font-size: 14px;
    }

    .gallery-thumb {
        width: 48px;
        height: 48px;
    }

    .product-gallery {
        gap: 8px;
        margin-top: 8px;
    }

    /* --- CART PAGE --- */
    .cart-page {
        padding: calc(var(--nav-height) + 24px) 16px 24px;
    }

    .cart-inner .page-title {
        margin-bottom: 16px;
    }

    .cart-item {
        grid-template-columns: 56px 1fr;
        gap: 8px;
        padding: 12px 0;
    }

    .cart-item-image {
        width: 56px;
        height: 56px;
    }

    .cart-item-details {
        grid-column: 2;
    }

    .cart-item-title {
        font-size: 14px;
    }

    .cart-item-edition {
        font-size: 9px;
    }

    .cart-item-price {
        font-size: 12px;
    }

    .cart-item-quantity {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 4px;
    }

    .cart-item-line-total {
        font-size: 13px;
        grid-column: 1 / -1;
        text-align: right;
    }

    .cart-item-remove {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .cart-item-remove button {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px;
    }

    .cart-subtotal {
        gap: 16px;
        margin-bottom: 16px;
    }

    .cart-subtotal-value {
        font-size: 20px;
    }

    .cart-summary {
        margin-top: 16px;
    }

    .cart-summary .btn-buy {
        display: block;
        max-width: 100%;
    }

    .cart-empty {
        padding: 32px 0;
    }

    /* --- CHECKOUT --- */
    .checkout-page {
        padding: calc(var(--nav-height) + 24px) 16px 24px;
    }

    .checkout-inner .page-title {
        margin-bottom: 16px;
    }

    .checkout-section-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .form-input {
        padding: 10px 12px;
        font-size: 16px; /* prevents iOS zoom */
        min-height: 44px;
    }

    .form-label {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    textarea.form-input {
        min-height: 80px;
    }

    .checkout-summary {
        padding: 16px;
    }

    .summary-item-title {
        font-size: 12px;
    }

    .summary-item-price {
        font-size: 12px;
    }

    .summary-total {
        font-size: 18px;
        padding: 12px 0;
    }

    .btn-paystack {
        max-width: 100%;
        min-height: 48px;
    }

    .checkout-secure-note {
        font-size: 10px;
    }

    /* --- CONFIRMATION --- */
    .confirmation-page {
        padding: calc(var(--nav-height) + 24px) 16px 24px;
    }

    .confirmation-message {
        font-size: 13px;
        margin: 12px 0 24px;
    }

    .confirmation-card {
        padding: 16px;
    }

    .confirmation-ref {
        flex-direction: column;
        gap: 4px;
    }

    /* --- LOADING OVERLAY --- */
    .loading-logo {
        padding: 0 24px;
    }

    /* --- ALERTS --- */
    .alert {
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* Ken Burns keyframes — slow zoom-and-drift, GPU-only (transform) */
@keyframes kenBurns {
    0% {
        transform: scale(1.0) translate3d(0, 0, 0);
    }
    100% {
        transform: scale(1.08) translate3d(-2%, -1%, 0);
    }
}

/* Disable Ken Burns for reduced-motion users */
@media (prefers-reduced-motion: reduce) {
    .hero-bg picture,
    .hero-bg img {
        animation: none !important;
    }
}
