/* =============================================
   CLAUDE-INSPIRED DESIGN SYSTEM
   Warm neutrals · Soft depth · Refined motion
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── Tokens ── */
:root {
    --bg: #1a1915;
    --bg-elevated: #222119;
    --bg-card: #2a2820;
    --bg-card-hover: #302e25;
    --surface: #332f25;
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.14);
    --text-primary: #f0ebe0;
    --text-secondary: #a09880;
    --text-muted: #6b6455;
    --accent: #d97757;
    --accent-dim: rgba(217,119,87,0.15);
    --accent-glow: rgba(217,119,87,0.25);
    --green: #5a9e6f;
    --green-dim: rgba(90,158,111,0.18);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.45);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.55);
    --font-display: 'DM Sans', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
}

/* ── Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    background-color: var(--bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(217,119,87,0.07) 0%, transparent 70%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.6rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.2rem, 2.5vw, 2.2rem); }
h3 { font-size: clamp(1rem, 2vw, 1.3rem); }

p {
    color: var(--text-secondary);
    max-width: 65ch;
}

/* ── Header ── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(26, 25, 21, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    transition: background-color 0.3s var(--ease-out);
}

header img {
    max-width: min(80px, 15vw);
    height: auto;
}

    header p,
    header .site-title {
        font-family: var(--font-body);
        font-size: clamp(1.2rem, 3.5vw, 1.8rem);
        font-weight: 500;
        color: var(--text-primary);
        letter-spacing: 0.01em;
        margin: 0;
    }

/* ── Navigation ── */
nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: transparent;
}

nav a {
    font-family: var(--font-body);
    font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background-color 0.2s;
    white-space: nowrap;
}

nav a:hover {
    color: var(--text-primary);
    background-color: var(--surface);
    text-decoration: none;
}

nav a.active {
    color: var(--accent);
    background-color: var(--accent-dim);
}

/* ── Container ── */
.container {
    width: min(96%, 1100px);
    margin: 0 auto;
    padding: 0 16px;
}

/* ── Main Content ── */
main {
    padding: clamp(24px, 5vw, 60px) clamp(12px, 4vw, 40px);
    margin: 0;
    background-color: transparent;
    color: var(--text-primary);
    min-height: 60vh;
}

main > section,
main > .container {
    margin-bottom: clamp(40px, 6vw, 80px);
}

/* ── Cards (Products / Cart) ── */
.product,
.cart {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: clamp(14px, 3vw, 24px);
    margin: 0;
    font-size: 1rem;
    transition:
        background-color 0.25s var(--ease-out),
        border-color     0.25s var(--ease-out),
        box-shadow       0.25s var(--ease-out),
        transform        0.25s var(--ease-out);
    box-shadow: var(--shadow-sm);
}

.product:hover,
.cart:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product h1,
.product h2,
.product h3,
.product .product-title {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* ── Carousel ── */
.carousel-container {
    display: flex;
    overflow-x: auto;
    gap: 14px;
    padding: 20px 4px 28px;
    margin-bottom: 40px;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-container.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.carousel-container .product {
    flex: 0 0 auto;
    /* Fluid card width: fills screen on mobile, fixed on desktop */
    width: clamp(220px, 75vw, 280px);
    margin: 0;
}

/* Click suppression after drag is handled in JS, not CSS */

/* ── Buttons ── */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--accent);
    color: #fff;
    font-family: var(--font-body);
    font-size: clamp(0.8rem, 2vw, 0.9375rem);
    font-weight: 500;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition:
        background-color 0.2s var(--ease-out),
        box-shadow       0.2s var(--ease-out),
        transform        0.15s var(--ease-out);
    margin-bottom: 10px;
    letter-spacing: 0.01em;
    box-shadow: 0 0 0 0 var(--accent-glow);
    /* Never stretch full-width unless inside a form */
    width: auto;
    white-space: normal;
    word-break: break-word;
}

.button:hover {
    background-color: #c96847;
    box-shadow: 0 4px 20px var(--accent-glow);
    transform: translateY(-1px);
    text-decoration: none;
}

.button:active {
    transform: translateY(0);
    box-shadow: none;
}

.button.secondary {
    background-color: var(--surface);
    color: var(--text-primary);
    box-shadow: none;
}

.button.secondary:hover {
    background-color: var(--bg-card-hover);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.mailing-link {
    font-family: var(--font-body);
    color: #7fbfff;
}

    .mailing-link:hover {
        color: #a8d4ff;
    }


/* ── Top button (full-width, centred) ── */
.button-top {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 16px 0;
    border-radius: 0;
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background-color: var(--surface);
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    box-shadow: none;
}

.button-top:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
    box-shadow: none;
    transform: none;
}

/* ── mailing list link ── */

.mailing-link {
    font-family: var(--font-display);
    color: #7fbfff;
}

    .mailing-link:hover {
        color: #a8d4ff;
    }

/* ── Price ── */
.price {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 4vw, 2.2rem);
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 8px 0;
}

/* ── Forms ── */
form {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 36px) clamp(16px, 4vw, 32px);
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

/* Full-width buttons ONLY inside forms */
form input[type="submit"],
form button {
    width: 100%;
}

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

label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

input[type="text"],
input[type="email"],
select {
    width: 100%;
    padding: 10px 14px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: max(16px, 1rem);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a09880' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder {
    color: var(--text-muted);
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

input[type="submit"],
button {
    padding: 12px 20px;
    background-color: var(--accent);
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-top: 6px;
    transition:
        background-color 0.2s var(--ease-out),
        box-shadow       0.2s var(--ease-out),
        transform        0.15s var(--ease-out);
    letter-spacing: 0.01em;
}

input[type="submit"]:hover,
button:hover {
    background-color: #c96847;
    box-shadow: 0 4px 16px var(--accent-glow);
    transform: translateY(-1px);
}

input[type="submit"]:active,
button:active {
    transform: translateY(0);
}

/* ── Cart section ── */
.cart {
    max-width: 700px;
    margin: 0 auto;
}

.cart ul {
    list-style: none;
    padding: 0;
}

.cart ul li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: clamp(0.85rem, 2vw, 1rem);
}

.cart ul li input[type="number"] {
    width: 60px;
    padding: 6px 8px;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-align: center;
}

/* ── Shop Link ── */
a.shop-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: clamp(0.8rem, 2vw, 0.9375rem);
    font-weight: 400;
    padding: 6px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
    white-space: nowrap;
}

a.shop-link:hover {
    color: var(--text-primary);
    border-color: var(--accent);
    background-color: var(--accent-dim);
}

/* ── Images ── */
.image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 10px 0;
}

/* ── Footer ── */
footer {
    background-color: var(--bg-elevated);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    padding: clamp(20px, 4vw, 40px);
    text-align: center;
    font-size: 0.875rem;
}

footer p {
    max-width: none;
    margin: 4px 0;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--text-primary);
}

/* ── Dividers ── */
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: clamp(24px, 4vw, 48px) 0;
}

/* ── Hidden ── */
.hidden-paragraph {
    display: none;
}

/* ── Scrollbar (Webkit) ── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ── Page fade-in ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

main > * { animation: fadeUp 0.5s var(--ease-out) both; }
main > *:nth-child(2) { animation-delay: 0.07s; }
main > *:nth-child(3) { animation-delay: 0.14s; }
main > *:nth-child(4) { animation-delay: 0.21s; }

/* ════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ════════════════════════════════════ */

/* ── Tablet (iPad, ≤1024px) ── */
@media (max-width: 1024px) {
    .carousel-container .product {
        width: clamp(220px, 42vw, 280px);
    }
}

/* ── Tablet portrait / large phone (≤768px) ── */
@media (max-width: 768px) {
    header {
        padding: 10px 16px;
        gap: 6px;
    }

    nav {
        padding: 10px 12px;
        gap: 4px;
    }

    nav a {
        padding: 5px 10px;
        font-size: 0.82rem;
    }

    main {
        padding: 28px 16px;
    }

    .container {
        width: 100%;
        padding: 0 12px;
    }

    .carousel-container .product {
        width: clamp(200px, 70vw, 260px);
    }

    form {
        max-width: 100%;
    }
}

/* ── Phone (≤480px) ── */
@media (max-width: 480px) {
    nav {
        gap: 4px;
        padding: 8px;
    }

    nav a {
        font-size: 0.78rem;
        padding: 5px 8px;
    }

    main {
        padding: 20px 12px;
    }

    .product,
    .cart {
        padding: 14px;
    }

    .carousel-container {
        gap: 10px;
        padding: 16px 4px 22px;
    }

    .carousel-container .product {
        /* Nearly full-width on small phones, just enough peek to hint more */
        width: calc(100vw - 56px);
    }

    .button {
        font-size: 0.82rem;
        padding: 9px 14px;
    }

    form {
        padding: 20px 14px;
        border-radius: var(--radius-lg);
    }

    .price {
        font-size: 1.5rem;
    }
}

/* ── Very small phones (≤320px) ── */
@media (max-width: 320px) {
    nav a {
        font-size: 0.72rem;
        padding: 4px 7px;
    }
}

/* ── Variant selection modal (size/colour at add-to-cart) ── */
.variant-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.variant-modal {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.variant-modal h3 {
    margin: 0 0 18px;
    color: var(--text-primary, #f0ead6);
    font-size: 1.15rem;
    text-align: center;
}

.variant-modal .form-group {
    margin-bottom: 16px;
}

.variant-modal .form-group:last-child {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.variant-modal .form-group:last-child .button {
    flex: 1;
}

/* ── Fullscreen image viewer (long-press on product images) ── */
#imgViewerOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
    cursor: pointer;
}

#imgViewerOverlay.active {
    opacity: 1;
}

#imgViewerImg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
    transform: scale(0.95);
    transition: transform 0.25s var(--ease-out);
}

#imgViewerOverlay.active #imgViewerImg {
    transform: scale(1);
}
