/* ===== Base & Reset ===== */
:root {
    --primary: #5d4a66;          /* soft plum */
    --accent: #ff8fab;           /* playful pink */
    --accent-2: #7fc8a9;         /* mint */
    --accent-3: #ffd166;         /* sunny yellow */
    --bg: #fff9f4;               /* warm cream */
    --bg-alt: #fdf0f5;           /* blush */
    --text: #4a3f55;
    --text-light: #8d7f99;
    --white: #ffffff;
    --radius: 18px;
    --radius-lg: 28px;
    --shadow: 0 6px 24px rgba(93, 74, 102, 0.10);
    --font-display: 'Caveat', cursive;
    --font-body: 'Quicksand', sans-serif;
}

/* ===== Theme presets (set via <html data-theme="...">) ===== */
html[data-theme='meadow'] {
    --primary: #2f5233;
    --accent: #7fc8a9;
    --accent-2: #ffd166;
    --accent-3: #a3d977;
    --bg: #f7fbf4;
    --bg-alt: #e8f5e8;
    --text: #33402f;
    --text-light: #7c8a76;
}

html[data-theme='ocean'] {
    --primary: #1d3d63;
    --accent: #63a4d9;
    --accent-2: #6fd6c8;
    --accent-3: #ffd166;
    --bg: #f4f9fd;
    --bg-alt: #e2eff9;
    --text: #2a3a4d;
    --text-light: #7d90a5;
}

html[data-theme='sunset'] {
    --primary: #6b2d3c;
    --accent: #ff9e6d;
    --accent-2: #f4a4c0;
    --accent-3: #ffc46d;
    --bg: #fff8f2;
    --bg-alt: #ffeee0;
    --text: #4d3230;
    --text-light: #9b7d74;
}

/* Rose: the Chey Rose Collection brand (brand/README.md is the source of truth).
   Flat and clean: blush/cream backgrounds, charcoal text, rose accents,
   no gradients or drop shadows. */
html[data-theme='rose'] {
    --primary: #86404F;          /* rose-deep: buttons, links (accessible rose) */
    --accent: #C0707C;           /* rose: logo, decorative, large labels only */
    --accent-2: #A3566A;         /* rose-dark: hover */
    --accent-3: #F3DCD8;         /* blush */
    --bg: #F3DCD8;               /* blush page background */
    --bg-alt: #FBF4F1;           /* cream cards & alternate sections */
    --text: #2F2C2D;             /* charcoal */
    --text-light: #625659;       /* muted charcoal, 5.4:1 on blush */
    --white: #FBF4F1;            /* "white" surfaces become cream */
    --charcoal: #2F2C2D;
    --radius: 12px;
    --radius-lg: 12px;
    --shadow: none;
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html[data-theme='rose'] body { font-weight: 300; }
html[data-theme='rose'] h1,
html[data-theme='rose'] h2,
html[data-theme='rose'] h3 { font-family: var(--font-display); font-weight: 400; }
html[data-theme='rose'] .hero-title,
html[data-theme='rose'] .section-title { font-weight: 400; }
html[data-theme='rose'] .hero { background: var(--bg); }
html[data-theme='rose'] .hero-eyebrow,
html[data-theme='rose'] .image-caption,
html[data-theme='rose'] .custom-note,
html[data-theme='rose'] .hero-note { transform: none; }
html[data-theme='rose'] .hero-eyebrow {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--primary);
}
html[data-theme='rose'] .hero-note { font-family: var(--font-body); font-size: 0.95rem; }
html[data-theme='rose'] .btn { font-weight: 500; letter-spacing: 0.08em; }
html[data-theme='rose'] .btn-primary:hover,
html[data-theme='rose'] .btn-secondary:hover { background: var(--charcoal); border-color: var(--charcoal); color: var(--bg-alt); }
html[data-theme='rose'] .btn-outline { background: transparent; }
html[data-theme='rose'] .btn-outline:hover { background: var(--primary); border-color: var(--primary); color: var(--bg-alt); }
html[data-theme='rose'] .btn:hover { transform: none; }
html[data-theme='rose'] .main-nav { border-bottom: 1px solid rgba(47, 44, 45, 0.12); }
html[data-theme='rose'] .nav-link { font-weight: 500; }
html[data-theme='rose'] .nav-link:hover { color: var(--primary); }
html[data-theme='rose'] .category-strip,
html[data-theme='rose'] .main-footer { background: var(--charcoal); }
html[data-theme='rose'] .footer-links a:hover { color: var(--accent); }
html[data-theme='rose'] .newsletter-section { background: var(--bg-alt); color: var(--text); }

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Shop switched off in the dashboard (server adds .shop-off to <html>) */
.shop-off [data-shop] { display: none !important; }
html:not(.shop-off) [data-shop-off] { display: none !important; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-body); }

h2.section-title { font-weight: 700; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4.5rem 0; }
.section-bg { background: var(--bg-alt); }

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-radius: 999px;
}
.btn-primary:hover { background: var(--accent); color: var(--primary); transform: translateY(-2px); }

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 999px;
}
.btn-outline:hover { background: var(--accent-3); border-color: var(--accent-3); color: var(--primary); }

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary); color: var(--white); }

.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }

.btn:hover { transform: translateY(-2px); }
.full-width { width: 100%; text-align: center; }

/* ===== Navigation ===== */
.main-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo { display: block; flex-shrink: 0; line-height: 0; }
.logo img { height: 60px; width: auto; }

.nav-menu { display: flex; gap: 1.75rem; }

.nav-link {
    font-weight: 400;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}
.nav-link:hover { color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 1rem; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    color: var(--primary);
}

.cart-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--accent);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    padding: 2px 6px;
}

/* ===== Hero ===== */
.hero {
    min-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 209, 102, 0.35), transparent 45%),
        radial-gradient(circle at 80% 20%, rgba(255, 143, 171, 0.35), transparent 45%),
        radial-gradient(circle at 65% 80%, rgba(127, 200, 169, 0.35), transparent 45%),
        linear-gradient(180deg, #fdf0f5 0%, #fff9f4 100%);
    color: var(--text);
    padding: 4rem 1.5rem;
}

.hero-eyebrow {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    transform: rotate(-2deg);
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.15rem;
    max-width: 620px;
    margin: 0 auto 2rem;
    font-weight: 500;
    color: var(--text-light);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.hero-note {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-light);
}

/* ===== Category strip ===== */
.category-strip {
    background: var(--primary);
    padding: 0.9rem 0;
    overflow: hidden;
}

.strip-inner {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.strip-item {
    color: var(--white);
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.image-caption {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 0.75rem;
    transform: rotate(-1.5deg);
}

.custom-note {
    margin-top: 0.9rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-light);
    transform: rotate(-1deg);
}

/* ===== Product Grid & Cards ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border: 3px solid var(--bg-alt);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px) rotate(-1deg);
    border-color: var(--accent);
    box-shadow: 0 12px 32px rgba(255, 143, 171, 0.25);
}

.product-image {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 100%;
    background: var(--bg-alt);
}

.product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.product-title { font-size: 1.1rem; font-weight: 600; }

.product-price { font-weight: 700; color: var(--accent); }

.product-category {
    font-size: 0.8rem;
    text-transform: lowercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    background: var(--bg-alt);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    align-self: flex-start;
}

.product-actions { margin-top: auto; padding-top: 0.75rem; }

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 0;
    color: var(--text-light);
}

/* ===== Category Filters ===== */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--primary);
    background: var(--white);
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--accent-3);
    border-color: var(--accent-3);
    color: var(--primary);
    transform: rotate(-2deg);
}

/* ===== About ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: center;
}

.about-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.about-text p { margin-bottom: 1rem; color: var(--text-light); }

.artist-stats {
    display: flex;
    gap: 2rem;
    margin: 1.75rem 0;
}

.stat { text-align: center; }

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--accent);
    transform: rotate(-2deg);
}

.stat-label { font-size: 0.85rem; color: var(--text-light); }

/* ===== Commission ===== */
.commission-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
    margin-top: 1rem;
}

.studio-image {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 90px;
}

.commission-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.commission-info > p { color: var(--text-light); margin-bottom: 1.5rem; }

.commission-process {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.process-step {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-2);
    color: var(--white);
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.process-step h4 { font-family: var(--font-body); font-size: 1rem; margin-bottom: 0.3rem; }
.process-step p { font-size: 0.88rem; color: var(--text-light); }

/* ===== Blog ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.blog-image { width: 100%; height: 200px; object-fit: cover; background: var(--bg-alt); }

.blog-content { padding: 1.25rem; }

.blog-title { font-size: 1.15rem; margin-bottom: 0.5rem; }

.blog-excerpt { color: var(--text-light); font-size: 0.92rem; margin-bottom: 0.75rem; }

.blog-date { font-size: 0.8rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.06em; }

/* ===== Newsletter ===== */
.newsletter-section {
    background: linear-gradient(120deg, var(--accent) 0%, var(--accent-3) 100%);
    color: var(--white);
    padding: 3.5rem 0;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.newsletter-content p { color: var(--primary); margin-bottom: 1.75rem; font-weight: 600; }

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    max-width: 480px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 999px;
    font-family: var(--font-body);
}

/* ===== Footer ===== */
.main-footer {
    background: var(--primary);
    color: rgba(255,255,255,0.85);
    padding: 3.5rem 0 1.5rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-section h4 {
    color: var(--white);
    font-family: var(--font-body);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-links li { margin-bottom: 0.5rem; }

.footer-links a:hover { color: var(--accent-3); }

.footer-logo { width: 150px; margin-top: 1.25rem; }

.social-links { display: flex; gap: 0.75rem; margin-top: 1rem; font-size: 1.2rem; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    font-size: 0.85rem;
}

.footer-bottom .footer-links { display: flex; gap: 1.25rem; }

.shopify-icon { height: 24px; opacity: 0.7; }

/* ===== Modals ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal.open { display: flex; }

.modal-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    width: 100%;
}

.modal-large { max-width: 640px; }
.modal-small { max-width: 900px; }

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-light);
}

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.toast {
    background: var(--primary);
    color: var(--white);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: toast-in 0.3s ease;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Large displays (1440p / 4K): scale up instead of shrinking content ===== */
@media (min-width: 1600px) {
    html { font-size: 18px; }
    .container, .nav-container, .footer-bottom { max-width: 1400px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
    .blog-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
    .modal-large { max-width: 760px; }
    .modal-small { max-width: 1040px; }
}
@media (min-width: 2000px) {
    html { font-size: 20px; }
    .container, .nav-container, .footer-bottom { max-width: 1560px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
    .blog-grid { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
}
@media (min-width: 2600px) {
    html { font-size: 23px; }
    .container, .nav-container, .footer-bottom { max-width: 1820px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); }
    .blog-grid { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); }
    .modal-large { max-width: 880px; }
    .modal-small { max-width: 1200px; }
    .hero { min-height: 76vh; }
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
    .about-content,
    .commission-content { grid-template-columns: 1fr; }

    .studio-image { position: static; }

    .nav-toggle { display: inline-block; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--white);
        padding: 0.5rem 0 0.75rem;
        box-shadow: 0 14px 28px rgba(93, 74, 102, 0.16);
        border-top: 2px solid var(--bg-alt);
    }
    .main-nav.menu-open .nav-menu { display: flex; }
    .nav-link { display: block; padding: 0.65rem 1.5rem; }
    .nav-container { position: relative; padding: 0.75rem 1rem; }
    .logo img { height: 48px; }
    html[data-theme='rose'] .nav-menu { box-shadow: none; border-bottom: 1px solid rgba(47, 44, 45, 0.12); }
}

@media (max-width: 520px) {
    .newsletter-form { flex-direction: column; }
    .products-grid { grid-template-columns: 1fr; }
    .hero-buttons .btn { width: 100%; }
    .artist-stats { flex-wrap: wrap; gap: 1.25rem 1.75rem; }
    .section { padding: 3rem 0; }
    .container { padding: 0 1.1rem; }
    .modal-content { padding: 1.25rem; }
    .footer-bottom { justify-content: center; text-align: center; }
    .strip-inner { gap: 1.1rem; font-size: 0.9rem; }
}
