/* ============================================================
   Mugai — Artisan Pottery E-Commerce
   Minimal Design: Japanese-inspired, clean, gallery-like
   Color palette: chalk, porcelain, silk white, plum grey
   Font: DM Sans
   ============================================================ */

/* ----- CSS Custom Properties ----- */
:root {
    /* Colors — Japanese-inspired soft palette */
    --color-bg: #FFFFFC;           /* Gofuniro / Chalk */
    --color-bg-alt: #F8FBF8;       /* Hakuji / White Porcelain */
    --color-text: #1A1A1A;         /* Near black for contrast */
    --color-text-light: #6B6B6B;   /* Medium grey */
    --color-text-muted: #9B9B9B;   /* Light grey */
    --color-accent: #1A1A1A;       /* Black as accent — minimal aesthetic */
    --color-accent-hover: #333333;
    --color-secondary: #5E7153;    /* Keep sage green for success toasts */
    --color-secondary-hover: #4D5F44;
    --color-border: #EAE5E3;       /* Soshoku / Base Color */
    --color-white: #FFFFFF;
    --color-dark: #1A1A1A;
    --color-cream: #F8FAF5;        /* Kinariro / Dough */
    --color-error: #C0392B;
    --color-success: #27AE60;
    --color-surface: #F3F3F2;      /* Shironeri / Silk White — cards, surfaces */
    --color-muted-bg: #E5E4E6;     /* Shiraumenezu / White Plum Grey */
    --color-highlight: #E7E7EB;    /* Murasakisuishiyou / Purple Water — hover */

    /* Typography — DM Sans for everything */
    --font-heading: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 40px;
    --space-2xl: 64px;
    --space-3xl: 96px;

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 800px;
    --nav-height: 72px;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
}

/* ----- Dark / Night Mode ----- */
:root[data-theme="dark"] {
    --color-bg: #121212;
    --color-bg-alt: #1A1A1A;
    --color-text: #E8E6E3;
    --color-text-light: #A0A0A0;
    --color-text-muted: #6B6B6B;
    --color-accent: #E8E6E3;
    --color-accent-hover: #FFFFFF;
    --color-border: #2A2A2A;
    --color-white: #1A1A1A;
    --color-dark: #E8E6E3;
    --color-cream: #1E1E1E;
    --color-surface: #1E1E1E;
    --color-muted-bg: #2A2A2A;
    --color-highlight: #333333;
}

[data-theme="dark"] .nav-header {
    background: rgba(18, 18, 18, 0.92);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .nav-links {
    background: #121212;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .nav-link {
    color: #E8E6E3;
}

[data-theme="dark"] .nav-link:hover {
    color: var(--color-accent);
}

/* ----- Base ----- */
body {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.8;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (min-width: 768px) {
    h1 { font-size: 3.75rem; letter-spacing: -0.02em; }
    h2 { font-size: 2.75rem; letter-spacing: -0.015em; }
}

a {
    transition: color var(--transition-base);
}

/* ----- Container ----- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ----- Navigation — Refined ----- */
.nav-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 240, 235, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: none;
    height: var(--nav-height);
    box-shadow: 0 1px 8px rgba(44, 36, 32, 0.06);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
}

.nav-logo-img {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.nav-logo-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--color-text);
}

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

.nav-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text);
    transition: color var(--transition-base);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-link:hover {
    color: var(--color-accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cart {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.cart-badge {
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
    z-index: 110;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform var(--transition-base), opacity var(--transition-fast);
}

.nav-hamburger.is-active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-hamburger.is-active .hamburger-line {
    background: #FFFFFF;
}

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

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        background: var(--color-dark);
        flex-direction: column;
        padding: calc(var(--nav-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
        gap: var(--space-lg);
        box-shadow: -4px 0 30px rgba(44, 36, 32, 0.2);
        align-items: flex-start;
        z-index: 105;
        overflow-y: auto;
    }

    .nav-links.nav-open {
        display: flex;
    }

    .nav-link {
        font-size: 1rem;
        color: var(--color-cream);
        letter-spacing: 0.06em;
    }

    .nav-link:hover {
        color: var(--color-accent);
    }

    .nav-link::after {
        background: var(--color-accent);
    }
}

/* ----- Main Content ----- */
.main-content {
    flex: 1;
}

/* ----- Sections — Visual Rhythm ----- */
.section {
    padding: 80px 0;
}

@media (min-width: 768px) {
    .section {
        padding: 120px 0;
    }
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-sm);
    position: relative;
    padding-bottom: var(--space-lg);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--color-accent);
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.section-cta {
    text-align: center;
    margin-top: var(--space-xl);
}

/* ----- Hero — Dramatic & Immersive ----- */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-height));
    padding: var(--space-3xl) var(--space-lg);
    text-align: center;
    background:
        radial-gradient(ellipse 80% 60% at 50% 120%, rgba(184, 92, 56, 0.06) 0%, transparent 70%),
        linear-gradient(to bottom, var(--color-bg) 0%, var(--color-bg-alt) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(184, 92, 56, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -5%;
    width: 40vw;
    height: 40vw;
    max-width: 500px;
    max-height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(94, 113, 83, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-size: 2.75rem;
    margin-bottom: var(--space-lg);
    color: var(--color-text);
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-light);
    max-width: 560px;
    margin: 0 auto var(--space-xl);
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 5rem;
        letter-spacing: -0.02em;
    }
    .hero {
        min-height: calc(100vh - var(--nav-height));
    }
}

/* ----- Buttons — Elevated ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    text-decoration: none;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-white);
    box-shadow: 0 2px 8px rgba(184, 92, 56, 0.2);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    box-shadow: 0 6px 20px rgba(184, 92, 56, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--color-secondary);
    color: var(--color-white);
    box-shadow: 0 2px 8px rgba(94, 113, 83, 0.2);
}

.btn-secondary:hover {
    background: var(--color-secondary-hover);
    box-shadow: 0 6px 20px rgba(94, 113, 83, 0.3);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
}

.btn-outline:hover {
    background: var(--color-accent);
    color: var(--color-white);
    box-shadow: 0 6px 20px rgba(184, 92, 56, 0.25);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 18px 42px;
    font-size: 0.95rem;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.8rem;
}

/* Focus states for accessibility */
.btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ----- Forms ----- */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-white);
    color: var(--color-text);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.12);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-error {
    font-size: 0.85rem;
    color: var(--color-error);
    margin-top: var(--space-xs);
}

/* ----- Product Grid (legacy — storefront grid is in .storefront__grid) ----- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

/* ----- About Section — Warm & Editorial ----- */
.about-section {
    background: var(--color-cream);
}

.about-grid {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.about-text p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: var(--space-md);
    font-size: 1.05rem;
}

/* ----- Newsletter — Dark & Standout ----- */
.newsletter-section {
    background: var(--color-dark);
    color: var(--color-cream);
}

.newsletter-section .section-title {
    color: var(--color-cream);
}

.newsletter-section .section-title::after {
    background: var(--color-accent);
}

.newsletter-section .section-subtitle {
    color: rgba(250, 247, 242, 0.7);
}

.newsletter-container {
    max-width: 520px;
    text-align: center;
}

.newsletter-input-group {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.newsletter-section .newsletter-input-group .form-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(250, 247, 242, 0.3);
    border-radius: 0;
    color: var(--color-cream);
    padding: 14px 4px;
}

.newsletter-section .newsletter-input-group .form-input::placeholder {
    color: rgba(250, 247, 242, 0.5);
}

.newsletter-section .newsletter-input-group .form-input:focus {
    border-bottom-color: var(--color-accent);
    box-shadow: none;
}

.newsletter-input {
    flex: 1;
}

.newsletter-note {
    font-size: 0.8rem;
    color: rgba(250, 247, 242, 0.5);
}

.newsletter-message {
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.newsletter-message.success {
    background: rgba(39, 174, 96, 0.15);
    color: #6dd5a0;
}

.newsletter-message.error {
    background: rgba(192, 57, 43, 0.15);
    color: #e88c84;
}

@media (max-width: 767px) {
    .newsletter-input-group {
        flex-direction: column;
    }
}

/* ----- Error Pages ----- */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
}

.error-container {
    max-width: 500px;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: var(--space-md);
}

.error-title {
    margin-bottom: var(--space-md);
}

.error-message {
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
    line-height: 1.8;
}

.error-container .btn {
    margin: 0 var(--space-sm);
}

/* ----- Footer — Dark & Warm ----- */
.site-footer {
    background: var(--color-dark);
    color: var(--color-cream);
    padding: var(--space-3xl) 0 var(--space-lg);
    margin-top: auto;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--color-border) 50%, transparent 100%);
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.footer-brand {
    margin-bottom: var(--space-xl);
}

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.footer-logo {
    height: 28px;
    width: 28px;
    object-fit: contain;
}

.footer-logo-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: #FFFFFF;
}

[data-theme="dark"] .site-footer {
    background: #0A0A0A;
    color: #E8E6E3;
}

[data-theme="dark"] .footer-logo-text {
    color: #E8E6E3;
}

[data-theme="dark"] .footer-col h4 {
    color: #E8E6E3;
}

[data-theme="dark"] .footer-tagline {
    color: rgba(232, 230, 227, 0.6);
}

[data-theme="dark"] .footer-bottom {
    border-top-color: rgba(232, 230, 227, 0.08);
    color: rgba(232, 230, 227, 0.4);
}

.footer-tagline {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-md);
    color: var(--color-cream);
}

.footer-col a {
    display: block;
    font-size: 0.9rem;
    color: rgba(250, 247, 242, 0.55);
    padding: var(--space-xs) 0;
    transition: color var(--transition-base);
}

.footer-col a:hover {
    color: #FFFFFF;
}

.footer-bottom {
    border-top: 1px solid rgba(250, 247, 242, 0.08);
    padding-top: var(--space-lg);
    font-size: 0.85rem;
    color: rgba(250, 247, 242, 0.4);
}

/* ----- model-viewer container (used in Task 3) ----- */
.model-viewer-container {
    width: 100%;
    aspect-ratio: 1;
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    overflow: hidden;
}

model-viewer.model-viewer-container {
    display: block;
}

/* ----- Utility Classes ----- */
.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.hidden { display: none !important; }

/* ----- Responsive Grid Helpers ----- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

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

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

/* ============================================================
   About Page
   ============================================================ */

.about-hero {
    background:
        radial-gradient(ellipse 60% 50% at 50% 100%, rgba(184, 92, 56, 0.05) 0%, transparent 70%),
        linear-gradient(to bottom, var(--color-bg-alt) 0%, var(--color-bg) 100%);
    padding: var(--space-3xl) var(--space-lg) var(--space-2xl);
    text-align: center;
}

.about-hero-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.about-hero-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-light);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.8;
}

@media (min-width: 768px) {
    .about-hero-title { font-size: 3.75rem; }
}

.about-mission {
    background: var(--color-cream);
}

.about-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.about-block {
    margin-bottom: var(--space-xl);
}

.about-heading {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--color-text);
    margin-bottom: var(--space-md);
    position: relative;
    padding-bottom: var(--space-md);
}

.about-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--color-accent);
}

.about-block p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: var(--space-md);
    font-size: 1.05rem;
}

.about-artisans {
    background: var(--color-bg-alt);
}

.artisan-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

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

.artisan-card {
    background: var(--color-cream);
    border-radius: var(--radius-md);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    border: 1px solid var(--color-border);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    box-shadow: 0 2px 8px rgba(44, 36, 32, 0.04);
}

.artisan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(44, 36, 32, 0.08);
}

.artisan-image-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-md);
    background: var(--color-bg-alt);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.artisan-icon {
    font-size: 2rem;
}

.artisan-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.artisan-bio {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

.about-craftsmanship {
    background: var(--color-cream);
}

.about-cta-section {
    background: var(--color-bg-alt);
}

/* ============================================================
   Legal Pages (Privacy, Terms, Return Policy)
   ============================================================ */

.legal-page {
    padding: var(--space-3xl) 0;
    background: var(--color-bg);
}

.legal-container {
    max-width: var(--container-narrow);
    margin: 0 auto;
    background: var(--color-cream);
    padding: var(--space-2xl) var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 12px rgba(44, 36, 32, 0.04);
}

.legal-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.legal-updated {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.legal-content h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--color-text);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.legal-content p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.legal-content ul,
.legal-content ol {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.legal-content li {
    margin-bottom: var(--space-sm);
}

.legal-content a {
    color: var(--color-accent);
    text-decoration: underline;
    transition: color var(--transition-base);
}

.legal-content a:hover {
    color: var(--color-accent-hover);
}

.legal-contact {
    list-style: none;
    padding-left: 0;
}

.legal-contact li {
    padding: var(--space-xs) 0;
}

/* ============================================================
   Landing Page — Hero Actions
   ============================================================ */

.hero-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ============================================================
   Landing Page — AR Callout Section
   ============================================================ */

.ar-callout-section {
    background:
        radial-gradient(ellipse 50% 50% at 80% 50%, rgba(94, 113, 83, 0.04) 0%, transparent 70%),
        var(--color-cream);
}

.ar-callout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

@media (min-width: 768px) {
    .ar-callout-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ar-callout-text p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
    font-size: 1.05rem;
}

.ar-features-list {
    list-style: none;
    padding: 0;
    margin-bottom: var(--space-xl);
}

.ar-features-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    color: var(--color-text);
    line-height: 1.7;
}

.ar-feature-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.ar-callout-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ar-demo-placeholder {
    width: 100%;
    aspect-ratio: 1;
    max-width: 400px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    box-shadow: 0 4px 16px rgba(44, 36, 32, 0.06);
    transition: box-shadow var(--transition-base);
}

.ar-demo-placeholder:hover {
    box-shadow: 0 8px 28px rgba(44, 36, 32, 0.1);
}

.ar-demo-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.ar-demo-placeholder p {
    font-size: 0.9rem;
}

/* ============================================================
   Landing Page — Instagram Section
   ============================================================ */

.instagram-section {
    background: var(--color-bg-alt);
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .instagram-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 800px;
    }
}

.instagram-placeholder-item {
    aspect-ratio: 1;
    background: var(--color-cream);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 1px solid var(--color-border);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.instagram-placeholder-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(44, 36, 32, 0.06);
}

/* ============================================================
   Auth Pages — Login, OTP, Account, Newsletter Confirm
   ============================================================ */

.auth-section {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-lg);
    background: var(--color-bg);
}

.auth-container {
    background: var(--color-cream);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: var(--space-2xl) var(--space-xl);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 4px 20px rgba(44, 36, 32, 0.06);
}

.auth-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    text-align: center;
    letter-spacing: -0.01em;
}

.auth-subtitle {
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: var(--space-xl);
    font-size: 0.95rem;
    line-height: 1.7;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* OTP digit inputs */
.otp-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.otp-digit {
    width: 48px;
    height: 56px;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--font-body);
    color: var(--color-text);
    background: #fff;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    -webkit-appearance: none;
    appearance: none;
}

.otp-digit:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.12);
}

.auth-links {
    margin-top: var(--space-lg);
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.auth-link {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-base);
    display: inline-block;
    margin-top: var(--space-sm);
}

.auth-link:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.otp-timer {
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

@media (max-width: 400px) {
    .otp-digit {
        width: 40px;
        height: 48px;
        font-size: 1.25rem;
    }

    .otp-input-group {
        gap: 6px;
    }
}

.auth-footer {
    margin-top: var(--space-lg);
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.auth-footer a {
    color: var(--color-accent);
    text-decoration: underline;
    transition: color var(--transition-base);
}

.auth-footer a:hover {
    color: var(--color-accent-hover);
}

@media (max-width: 600px) {
    .auth-container {
        padding: var(--space-xl) var(--space-lg);
    }
    .auth-title {
        font-size: 1.5rem;
    }
}

/* ----- Account Page ----- */
.account-container {
    max-width: 520px;
}

.account-links {
    margin-top: var(--space-lg);
}

.account-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.account-link:hover {
    border-color: var(--color-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.account-link__arrow {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    transition: transform var(--transition-base);
}

.account-link:hover .account-link__arrow {
    transform: translateX(3px);
}

.account-newsletter {
    margin-top: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

.account-newsletter__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.account-newsletter__label {
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text);
}

.account-newsletter__desc {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-muted-bg);
    border-radius: 24px;
    transition: background var(--transition-base);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #FFFFFF;
    border-radius: 50%;
    transition: transform var(--transition-base);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--color-secondary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.account-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-lg) 0;
}

/* ============================================================
   Storefront
   ============================================================ */
.storefront {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}
.storefront__section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}
.storefront__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}
.storefront__featured {
    margin-bottom: var(--space-xl);
}
.storefront__pagination {
    text-align: center;
    padding: var(--space-xl) 0;
}
.storefront__load-more {
    background: transparent;
    border: 1px solid var(--color-text);
    color: var(--color-text);
    padding: 12px 48px;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    border-radius: var(--radius-sm);
}
.storefront__load-more:hover {
    background: var(--color-text);
    color: var(--color-bg);
}
.storefront__empty {
    text-align: center;
    padding: var(--space-3xl) 0;
    color: var(--color-text-muted);
}
@media (max-width: 768px) {
    .storefront__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   Cart Page
   ============================================================ */
.cart-page {
    max-width: 680px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}
.cart-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: var(--space-lg);
}
.cart-items {
    border-top: 1px solid var(--color-border);
}
.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}
.cart-item__image-link {
    flex-shrink: 0;
}
.cart-item__image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}
.cart-item__details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cart-item__name {
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
}
.cart-item__name:hover {
    color: var(--color-accent);
}
.cart-item__price {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}
.cart-remove-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: color 0.2s;
}
.cart-remove-btn:hover {
    color: #EF4444;
}
.cart-summary {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}
.cart-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95rem;
}
.cart-summary__row--muted {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}
.cart-summary__total {
    font-weight: 600;
    font-size: 1.1rem;
}
.cart-checkout-btn {
    width: 100%;
    margin-top: var(--space-md);
}
.cart-continue {
    display: block;
    text-align: center;
    margin-top: var(--space-sm);
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-decoration: none;
}
.cart-continue:hover {
    color: var(--color-accent);
}
.cart-empty {
    text-align: center;
    padding: var(--space-3xl) 0;
    color: var(--color-text-muted);
}
.cart-empty .btn {
    margin-top: var(--space-md);
}

/* ============================================================
   Toast Notifications
   ============================================================ */
.toast-container {
    position: fixed;
    top: 88px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.toast--visible {
    opacity: 1;
    transform: translateX(0);
}
.toast--success {
    background: var(--color-secondary);
}
.toast--error {
    background: #EF4444;
}

/* ================================================================
   Order History & Order Detail Pages
   ================================================================ */

/* Order list card */
.order-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    background: var(--color-surface);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.order-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.order-card__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.order-card__number {
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.order-card__meta {
    color: var(--color-text-light);
    font-size: 0.85rem;
    margin-top: 4px;
}

.order-card__total {
    font-weight: 600;
    font-size: 1.05rem;
    text-align: right;
}

.order-card__status {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    margin-top: 6px;
}

/* Status colors */
.order-card__status--pending { background: #F59E0B; }
.order-card__status--paid { background: #10B981; }
.order-card__status--processing { background: #3B82F6; }
.order-card__status--shipped { background: #6366F1; }
.order-card__status--delivered { background: #059669; }
.order-card__status--cancelled { background: #EF4444; }
.order-card__status--refunded { background: #6B7280; }

/* Orders page back link */
.orders-back-link {
    display: inline-block;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
    transition: color var(--transition-base);
}

.orders-back-link:hover {
    color: var(--color-accent);
}

.orders-empty-text {
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
    font-size: 1rem;
}

/* Order detail page */
.order-detail__back {
    display: inline-block;
    color: var(--color-accent);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.order-detail__back:hover {
    text-decoration: underline;
}

/* Status timeline */
.order-timeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: var(--space-xl);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
}

.order-timeline__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 70px;
}

.order-timeline__dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-border);
    margin-bottom: 6px;
    flex-shrink: 0;
}

.order-timeline__dot--active {
    background: var(--color-accent);
}

.order-timeline__dot--error {
    background: #EF4444;
}

.order-timeline__label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: capitalize;
}

.order-timeline__label--active {
    color: var(--color-text);
    font-weight: 500;
}

.order-timeline__arrow {
    color: var(--color-border);
    margin: 4px 4px 0;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Order section headings */
.order-section-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

/* Line items */
.order-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item__image {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--color-muted-bg);
}

.order-item__info {
    flex: 1;
}

.order-item__name {
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
}

.order-item__name:hover {
    text-decoration: underline;
}

.order-item__qty {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 2px;
}

.order-item__price {
    font-weight: 600;
    white-space: nowrap;
}

/* Order summary box */
.order-summary {
    background: var(--color-surface);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-xl);
}

.order-summary__row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.order-summary__row--total {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-text);
    margin-bottom: 0;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
}

.order-summary hr {
    display: none;
}

/* Shipping address & tracking */
.order-info-block {
    margin-bottom: var(--space-xl);
}

.order-info-block p {
    color: var(--color-text-light);
    line-height: 1.6;
}

/* Refund notice */
.order-refund {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-xl);
}

.order-refund p {
    margin: 4px 0;
    color: var(--color-text);
}
