/* =========================================================
   Patinova Texture — design tokens
   ========================================================= */
:root {
    /* Palette — gemstone jade & lapis lazuli: cool mineral-white ground,
       deep teal ink, a confident jade-green primary accent, and lapis
       blue as the second "mixture" accent (see the Featured badge). */
    --color-bg: #f2f8f4;
    --color-bg-alt: #e5f0e7;
    --color-bg-deep: #0e2a26;
    --color-surface: #ffffff;

    --color-ink: #16332c;
    --color-heading: #163832;
    --color-text: #2d4a42;
    --color-text-muted: #55766c;
    --color-text-on-dark: #eaf5ef;
    --color-text-on-dark-muted: #a9c9bd;

    --color-accent: #1f7a52;
    --color-accent-hover: #175f3f;
    --color-accent-bright: #4fc48c;
    --color-accent-light: #bfe6d3;
    --color-accent-tint: #e6f6ee;

    --color-lapis: #2c5b8a;
    --color-lapis-dark: #1c3c5c;
    --color-lapis-tint: #e4edf5;

    --color-border: #d7e6de;
    --color-border-strong: #a9c7b8;

    --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

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

    --shadow-xs: 0 1px 2px rgba(14, 38, 32, 0.07);
    --shadow-sm: 0 2px 8px rgba(14, 38, 32, 0.09);
    --shadow-md: 0 10px 28px rgba(14, 38, 32, 0.13);
    --shadow-lg: 0 20px 48px rgba(14, 38, 32, 0.19);
    --shadow-xl: 0 30px 70px rgba(6, 20, 17, 0.38);
}

/* Farsi mode: swap in a font that actually renders Persian glyphs. Latin
   brand names (Patinova Texture, hex codes) stay legible through the same
   family since Vazirmatn covers Latin too. */
html[lang="fa"] {
    --font-display: 'Vazirmatn', 'Inter', sans-serif;
    --font-body: 'Vazirmatn', 'Inter', sans-serif;
}

html[dir="rtl"] .hero-eyebrow,
html[dir="rtl"] .hero p,
html[dir="rtl"] .review-card p {
    font-style: normal; /* italics don't render meaningfully in Persian script */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    background: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--color-heading);
    font-weight: 600;
    line-height: 1.15;
}

::selection {
    background: var(--color-accent-light);
    color: var(--color-heading);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(242, 248, 244, 0.88);
    backdrop-filter: blur(14px);
    padding: 1.15rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(22, 56, 50, 0.08);
    border-bottom: 1px solid rgba(169, 199, 184, 0.35);
    transition: all 0.3s ease;
    gap: 1.5rem;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--color-heading);
    letter-spacing: 2.5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.logo:hover {
    color: var(--color-accent);
    transform: scale(1.03);
}

.nav-links {
    display: flex;
    gap: 2.2rem;
    list-style: none;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    position: relative;
    transition: all 0.3s ease;
    padding: 5px 0;
}

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

.nav-links a:hover { color: var(--color-accent); }
.nav-links a:hover::after { width: 100%; }

.cart-toggle {
    position: relative;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border-strong);
    color: var(--color-heading);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: all 0.25s ease;
}

.cart-toggle:hover {
    background: var(--color-heading);
    border-color: var(--color-heading);
    color: var(--color-text-on-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--color-accent);
    color: white;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.68rem;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 0 0 2px var(--color-surface);
}

.lang-toggle {
    background: var(--color-surface);
    border: 1.5px solid var(--color-border-strong);
    color: var(--color-heading);
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.lang-toggle:hover {
    background: var(--color-heading);
    border-color: var(--color-heading);
    color: var(--color-text-on-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* RTL: absolutely-positioned corner badges need to mirror manually since
   left/right are physical properties, not logical ones. */
html[dir="rtl"] .featured-badge { right: auto; left: 14px; }
html[dir="rtl"] .product-image-wrap .featured-badge { right: auto; left: 18px; }
html[dir="rtl"] .product-lightbox-prev { left: auto; right: 1.5rem; }
html[dir="rtl"] .product-lightbox-next { right: auto; left: 1.5rem; }
html[dir="rtl"] .product-lightbox-close { right: auto; left: 2rem; }
html[dir="rtl"] .newsletter-inner,
html[dir="rtl"] .order-line-items,
html[dir="rtl"] .order-shipping-to { text-align: right; }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* Gemstone gradient: mineral-white through jade into lapis lazuli. */
    background: linear-gradient(160deg, #eef7f2 0%, #7dd0a8 32%, #2f9e93 58%, #245f82 80%, #1d4e78 100%);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 24%, rgba(44, 91, 138, 0.18) 0%, transparent 38%),
        radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.4) 0%, transparent 45%),
        radial-gradient(circle at 70% 85%, rgba(14, 42, 38, 0.22) 0%, transparent 50%),
        /* faceted-gem sparkle lines */
        repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0px, rgba(255, 255, 255, 0.07) 1px, transparent 1px, transparent 46px),
        repeating-linear-gradient(25deg, rgba(255, 255, 255, 0.05) 0px, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 60px),
        radial-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px);
    background-size: auto, auto, auto, auto, auto, 3px 3px;
    mix-blend-mode: overlay;
    opacity: 0.65;
    animation: float 9s ease-in-out infinite;
}

.hero::after {
    content: 'PATINOVA TEXTURE';
    position: absolute;
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: min(22vw, 320px);
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.14);
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.06); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 780px;
    padding: 3rem 2.5rem;
    background: radial-gradient(ellipse at center, rgba(242, 248, 244, 0.6) 0%, rgba(242, 248, 244, 0.14) 62%, transparent 75%);
    border-radius: var(--radius-lg);
}

.hero-eyebrow {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 3.5px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent-hover);
    margin-bottom: 1.1rem;
    animation: fadeInUp 0.8s ease;
}

.hero h1 {
    font-size: clamp(2.75rem, 4.4vw + 1.2rem, 5rem);
    font-weight: 700;
    margin-bottom: 1.1rem;
    color: var(--color-heading);
    letter-spacing: 0.5px;
    animation: fadeInUp 1s ease;
    transition: all 0.3s ease;
}

.hero h1:hover {
    transform: scale(1.015);
    text-shadow: 2px 2px 24px rgba(14, 42, 38, 0.2);
}

.hero p {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.15rem, 1vw + 1rem, 1.5rem);
    margin-bottom: 2.2rem;
    color: var(--color-text);
    animation: fadeInUp 1.2s ease;
}

.hero-actions {
    display: flex;
    gap: 1.1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.4s ease;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.7rem;
    background: linear-gradient(180deg, var(--color-accent-bright) 0%, var(--color-accent) 55%, var(--color-accent-hover) 100%);
    color: white;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: 0.2px;
    border-radius: var(--radius-pill);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(23, 95, 63, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.cta-button:hover::before { width: 320px; height: 320px; }

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(23, 95, 63, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.cta-button:active {
    transform: translateY(-1px);
    filter: brightness(0.96);
}

.cta-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

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

/* Promo banner */
.promo-banner {
    background: var(--color-heading);
    color: var(--color-text-on-dark);
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.4px;
}

.promo-banner span {
    color: var(--color-accent-bright);
    font-weight: 700;
}

/* About Section */
.about { padding: 7.5rem 5%; background: var(--color-surface); position: relative; }
.about-content { max-width: 860px; margin: 0 auto; text-align: center; }

.about h2 {
    font-size: clamp(2.1rem, 2vw + 1.4rem, 2.9rem);
    margin-bottom: 0.6rem;
    color: var(--color-heading);
    transition: all 0.3s ease;
}

.about h2::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    margin: 1.2rem auto 2rem;
    background: var(--color-accent);
    border-radius: var(--radius-pill);
}

.about h2:hover { color: var(--color-accent); }

.about p {
    font-size: 1.12rem;
    line-height: 1.85;
    color: var(--color-text-muted);
    margin-bottom: 1.4rem;
}

/* Gallery Section */
.gallery { padding: 6rem 5% 8rem; background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%); }

.gallery h2 {
    font-size: clamp(2.1rem, 2vw + 1.4rem, 2.9rem);
    text-align: center;
    margin-bottom: 0.6rem;
    color: var(--color-heading);
    transition: all 0.3s ease;
}

.gallery h2:hover { color: var(--color-accent); }

.gallery-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 2.6rem;
    font-size: 1.02rem;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 3.2rem;
}

.filter-chip {
    border: 1.5px solid var(--color-border-strong);
    background: var(--color-surface);
    color: var(--color-text);
    padding: 0.55rem 1.35rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.filter-chip:hover { border-color: var(--color-accent); color: var(--color-accent); }

.filter-chip.active {
    background: var(--color-heading);
    border-color: var(--color-heading);
    color: var(--color-text-on-dark);
}

/* Sort & filter bar */
.gallery-tools {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 1.4rem;
    margin: -1.6rem auto 1.2rem;
    max-width: 1000px;
}

.gallery-tool {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
html[dir="rtl"] .gallery-tool { letter-spacing: 0; font-size: 0.82rem; }

.gallery-tool select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 200px;
    min-height: 44px;
    padding: 0.6rem 2.4rem 0.6rem 1.1rem;
    border: 1.5px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    background-color: var(--color-surface);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2316332c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    color: var(--color-heading);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
html[dir="rtl"] .gallery-tool select { padding: 0.6rem 1.1rem 0.6rem 2.4rem; background-position: left 1rem center; }
.gallery-tool select:hover { border-color: var(--color-accent); }
.gallery-tool select:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.gallery-tool select.is-set { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent); }

.gallery-status {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    min-height: 2rem;
    margin-bottom: 2.2rem;
    font-size: 0.92rem;
    color: var(--color-text-muted);
}
.gallery-clear {
    border: 0;
    background: none;
    padding: 0.35rem 0.2rem;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-lapis);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.gallery-clear:hover { color: var(--color-accent); }
.gallery-empty { grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--color-text-muted); font-size: 1.05rem; }

/* The piece you came back to */
.gallery-item { scroll-margin-top: 110px; }
.gallery-item.is-found { animation: found-pulse 2.2s ease-out 1; }
@keyframes found-pulse {
    0%, 35% { box-shadow: 0 0 0 4px var(--color-accent-bright), var(--shadow-lg); }
    100% { box-shadow: var(--shadow-sm); }
}
@media (prefers-reduced-motion: reduce) { .gallery-item.is-found { animation: none; outline: 3px solid var(--color-accent-bright); outline-offset: 3px; } }

@media (max-width: 560px) {
    .gallery-tools { margin-top: -1rem; }
    .gallery-tool { width: 100%; }
    .gallery-tool select { width: 100%; }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.6rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent-light);
}

.gallery-item-image {
    width: 100%;
    height: 320px;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: var(--color-bg-alt);
    background-position: center;
    display: flex;
    align-items: flex-end;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.gallery-item-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(9,26,22,0.28) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.gallery-item:hover .gallery-item-image { transform: scale(1.06); }
.gallery-item:hover .gallery-item-image::after { opacity: 1; }

.sold-out-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(15, 42, 36, 0.82);
    backdrop-filter: blur(4px);
    color: var(--color-text-on-dark);
    padding: 0.4rem 0.95rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    z-index: 1;
}

.featured-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(44, 91, 138, 0.9);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.4rem 0.95rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    z-index: 1;
}

.gallery-item-info { padding: 1.6rem 1.7rem 1.8rem; transition: all 0.3s ease; flex: 1; display: flex; flex-direction: column; }

.gallery-item h3 {
    font-size: 1.32rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
    color: var(--color-heading);
    transition: all 0.3s ease;
}
.gallery-item:hover h3 { color: var(--color-accent); }

.gallery-item p.desc {
    font-family: var(--font-body);
    color: var(--color-text-muted);
    margin-bottom: 0.8rem;
    font-size: 0.94rem;
    line-height: 1.55;
    flex: 1;
    /* Keep card height consistent regardless of summary length. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-item .size {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.1rem;
    opacity: 0.85;
}

.gallery-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--color-border);
}

.gallery-item .price {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--color-heading);
    font-weight: 600;
}

.add-to-cart-btn {
    background: var(--color-heading);
    color: var(--color-text-on-dark);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-xs);
}

.add-to-cart-btn:hover:not(:disabled) {
    background: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.add-to-cart-btn:active:not(:disabled) { transform: translateY(0); }

.add-to-cart-btn:disabled { background: #cfdcd5; color: #7c9088; cursor: not-allowed; box-shadow: none; }

/* Reviews */
.reviews { padding: 6rem 5%; background: var(--color-surface); }
.reviews h2 {
    font-size: clamp(2.1rem, 2vw + 1.4rem, 2.9rem);
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-heading);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.review-card {
    background: var(--color-bg);
    padding: 2.2rem 2rem 2rem;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-accent);
    position: relative;
}

.review-card::before {
    content: '\201C';
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--color-accent-light);
    line-height: 1;
    display: block;
    margin-bottom: 0.4rem;
}

.review-card p {
    font-family: var(--font-display);
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 1rem;
    font-style: italic;
}
.review-card cite { color: var(--color-lapis); font-style: normal; font-weight: 600; font-size: 0.92rem; }

/* Newsletter */
.newsletter {
    background: var(--color-bg-deep);
    color: var(--color-text-on-dark);
    padding: 4.5rem 5%;
    text-align: center;
}

.newsletter-inner {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    text-align: left;
}

.newsletter h2 { font-size: 2.1rem; margin-bottom: 0.5rem; color: var(--color-text-on-dark); }
.newsletter p { color: var(--color-text-on-dark-muted); }

.newsletter-form { display: flex; gap: 0.6rem; flex: 1; min-width: 280px; }

.newsletter-form input {
    flex: 1;
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-pill);
    border: 1.5px solid transparent;
    font-family: var(--font-body);
    font-size: 0.98rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-ink);
    transition: all 0.25s ease;
}
.newsletter-form input:focus { outline: none; border-color: var(--color-accent-bright); }

.newsletter-form button {
    padding: 0.85rem 1.7rem;
    border-radius: var(--radius-pill);
    border: none;
    background: var(--color-accent);
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.25s ease;
}

.newsletter-form button:hover { background: var(--color-accent-bright); transform: translateY(-2px); }

.newsletter-status { max-width: 820px; margin: 1rem auto 0; font-size: 0.9rem; color: var(--color-text-on-dark-muted); }

/* Shared form styles (used by the checkout modal's shipping step) */
.form-group { margin-bottom: 1.7rem; }

.form-row { display: flex; gap: 1.2rem; }
.form-row .form-group { flex: 1; }
.form-row-3 .form-group { flex: 1; }

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-heading);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.2px;
    transition: all 0.3s ease;
}

.form-group:hover label { color: var(--color-accent); }

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.98rem;
    font-family: var(--font-body);
    color: var(--color-ink);
    background: var(--color-bg);
    transition: all 0.25s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px var(--color-accent-tint);
    background: var(--color-surface);
}

.form-group input:hover, .form-group textarea:hover { border-color: var(--color-border-strong); }
.form-group textarea { resize: vertical; min-height: 120px; }

.submit-btn {
    width: 100%;
    padding: 1.05rem;
    background: linear-gradient(180deg, var(--color-accent-bright) 0%, var(--color-accent) 60%, var(--color-accent-hover) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(23, 95, 63, 0.3);
}

.submit-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(23, 95, 63, 0.38); }
.submit-btn:active { transform: translateY(-1px); filter: brightness(0.97); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.form-status { text-align: center; margin-top: 1rem; font-size: 0.92rem; min-height: 1.2rem; font-family: var(--font-body); }
.form-status.success { color: var(--color-accent-hover); font-weight: 600; }
.form-status.error { color: #a3402f; font-weight: 600; }

/* Footer */
footer {
    background: var(--color-bg-deep);
    color: var(--color-text-on-dark-muted);
    text-align: center;
    padding: 2.2rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-top: 1px solid rgba(243, 234, 217, 0.08);
}
footer:hover { color: var(--color-text-on-dark); }

/* Cart drawer */
.drawer-overlay {
    position: fixed; inset: 0; background: rgba(8, 24, 20, 0.45);
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 1400;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(420px, 92vw);
    background: var(--color-bg); box-shadow: var(--shadow-xl);
    transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
    z-index: 1500; display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.5rem 1.7rem; border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}
.cart-drawer-header h3 { color: var(--color-heading); font-size: 1.35rem; }
.cart-drawer-header button {
    background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--color-text-muted); line-height: 1;
    transition: color 0.2s ease;
}
.cart-drawer-header button:hover { color: var(--color-accent); }

.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.7rem; }
.cart-empty { color: var(--color-text-muted); text-align: center; margin-top: 2.5rem; font-size: 0.98rem; }

.cart-item {
    display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--color-border);
}
.cart-item img { width: 66px; height: 66px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; box-shadow: var(--shadow-xs); }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-family: var(--font-body); font-weight: 600; font-size: 0.98rem; color: var(--color-heading); margin-bottom: 0.25rem; }
.cart-item-info .price { color: var(--color-text-muted); font-size: 0.88rem; }
.cart-item-qty { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; }
.cart-item-qty button {
    width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--color-border-strong); background: var(--color-surface);
    cursor: pointer; font-family: var(--font-body); line-height: 1; color: var(--color-heading); transition: all 0.2s ease;
}
.cart-item-qty button:hover { border-color: var(--color-accent); color: var(--color-accent); }
.cart-item-qty span { min-width: 1.2rem; text-align: center; font-weight: 600; font-size: 0.92rem; }
.cart-item-remove {
    background: none; border: none; color: #a3402f; font-size: 0.8rem; font-weight: 500; cursor: pointer; margin-top: 0.45rem;
    text-decoration: underline;
}

.cart-summary { padding: 1.5rem 1.7rem; border-top: 1px solid var(--color-border); background: var(--color-surface); }
.cart-row { display: flex; justify-content: space-between; margin-bottom: 0.6rem; color: var(--color-text-muted); font-size: 0.95rem; }
.cart-total { font-weight: 700; color: var(--color-heading); font-size: 1.2rem; margin-top: 0.6rem; font-family: var(--font-display); }
.cart-checkout-btn { width: 100%; margin-top: 1rem; }

/* Modal (checkout) */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(8, 24, 20, 0.55);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 1600; padding: 1.5rem;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
    background: var(--color-bg); border-radius: var(--radius-lg); padding: 2.4rem;
    max-width: 560px; width: 100%; max-height: 88vh; overflow-y: auto;
    position: relative; box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
}

.modal h3 { color: var(--color-heading); font-size: 1.65rem; margin-bottom: 1.5rem; }

.modal-close {
    position: absolute; top: 1.3rem; right: 1.3rem; background: none; border: none;
    font-size: 1.6rem; cursor: pointer; color: var(--color-text-muted); transition: color 0.2s ease;
}
.modal-close:hover { color: var(--color-accent); }

.checkout-form .form-group { margin-bottom: 1.3rem; }

.checkout-summary {
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); padding: 1.3rem; margin-bottom: 1.3rem; font-size: 0.95rem; color: var(--color-text);
}
.checkout-summary .row { display: flex; justify-content: space-between; margin-bottom: 0.45rem; }
.checkout-summary .row.total { font-weight: 700; color: var(--color-heading); border-top: 1px dashed var(--color-border); margin-top: 0.6rem; padding-top: 0.6rem; }

.payment-help { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 1.3rem; }

.payment-options { display: flex; flex-direction: column; gap: 0.9rem; }

.pay-btn {
    width: 100%; padding: 1rem; border-radius: var(--radius-sm); border: none; cursor: pointer;
    font-family: var(--font-body); font-weight: 600; font-size: 1rem; transition: all 0.25s ease;
}
.pay-btn-stripe { background: var(--color-heading); color: var(--color-text-on-dark); }
.pay-btn-stripe:hover { background: var(--color-accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.pay-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.link-btn {
    background: none; border: none; color: var(--color-accent-hover); text-decoration: underline;
    cursor: pointer; margin-top: 1.2rem; font-family: var(--font-body); font-size: 0.9rem; font-weight: 500;
}

/* Toast */
.toast {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--color-heading); color: var(--color-text-on-dark); padding: 0.9rem 1.7rem; border-radius: var(--radius-pill);
    font-family: var(--font-body); font-weight: 500; font-size: 0.95rem; opacity: 0; pointer-events: none; transition: all 0.3s ease; z-index: 1800;
    box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Product detail page (public/product.html) */
.product-page { max-width: 1200px; margin: 0 auto; padding: 8.5rem 5% 6rem; min-height: 70vh; }

.product-loading { text-align: center; color: var(--color-text-muted); padding: 4rem 0; font-size: 1.05rem; }

.product-back-link {
    display: inline-block; color: var(--color-lapis); text-decoration: none; font-weight: 600;
    font-size: 0.92rem; margin-bottom: 2rem; transition: color 0.2s ease;
}
.product-back-link:hover { color: var(--color-accent); }

.product-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; align-items: start;
}

.product-image-wrap {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-md); border: 1px solid var(--color-border);
}
.product-image { width: 100%; height: auto; display: block; background: var(--color-bg-alt); cursor: zoom-in; }
.product-image-wrap .sold-out-badge,
.product-image-wrap .featured-badge { top: 18px; }
.product-image-wrap .sold-out-badge { left: 18px; }
.product-image-wrap .featured-badge { right: 18px; }

.product-thumbs {
    display: flex; gap: 0.7rem; margin-top: 0.9rem; overflow-x: auto; padding-bottom: 0.2rem;
}
.product-thumb {
    flex: 0 0 auto; width: 64px; height: 64px; padding: 0; border-radius: var(--radius-sm);
    border: 2px solid transparent; overflow: hidden; cursor: pointer; background: var(--color-bg-alt);
    opacity: 0.65; transition: all 0.2s ease;
}
.product-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.product-thumb:hover { opacity: 1; }
.product-thumb.active { border-color: var(--color-accent); opacity: 1; }

.product-lightbox {
    position: fixed; inset: 0; background: rgba(6, 18, 15, 0.94);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 1700; padding: 2rem;
}
.product-lightbox.open { opacity: 1; pointer-events: auto; }
.product-lightbox img { max-width: 88vw; max-height: 82vh; border-radius: var(--radius-md); box-shadow: var(--shadow-xl); }
.product-lightbox-close {
    position: absolute; top: 1.5rem; right: 2rem; background: none; border: none;
    color: white; font-size: 2.2rem; cursor: pointer; opacity: 0.85; transition: opacity 0.2s ease;
}
.product-lightbox-close:hover { opacity: 1; }
.product-lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.12);
    border: none; color: white; width: 48px; height: 48px; border-radius: 50%; font-size: 1.3rem;
    cursor: pointer; transition: background 0.2s ease;
}
.product-lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.product-lightbox-prev { left: 1.5rem; }
.product-lightbox-next { right: 1.5rem; }
.product-lightbox-count {
    position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
    color: var(--color-text-on-dark-muted); font-family: var(--font-body); font-size: 0.9rem;
}

.product-category {
    text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.78rem; font-weight: 600;
    color: var(--color-lapis); margin-bottom: 0.6rem;
}

.product-info h1 { font-size: clamp(2rem, 2vw + 1.3rem, 2.7rem); margin-bottom: 0.6rem; }

.product-price {
    font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--color-accent);
    margin-bottom: 0.4rem;
}

.product-size { font-family: var(--font-body); font-style: italic; color: var(--color-text-muted); margin-bottom: 2rem; }

.product-section { margin-bottom: 2rem; }
.product-section h2 {
    font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--color-heading); margin-bottom: 0.7rem; font-weight: 700;
}
.product-section p { color: var(--color-text); line-height: 1.75; font-size: 1.02rem; }

.color-swatches { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.swatch { display: flex; align-items: center; gap: 0.7rem; }
.swatch-chip {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    box-shadow: var(--shadow-xs), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.swatch-label { font-size: 0.85rem; color: var(--color-text); line-height: 1.3; }
.swatch-label small { color: var(--color-text-muted); }
.swatch-empty { color: var(--color-text-muted); font-size: 0.92rem; }

.product-add-btn { width: 100%; margin-bottom: 0.8rem; }

.product-view-cart-link {
    display: inline-block; color: var(--color-lapis); font-weight: 600; text-decoration: none; font-size: 0.95rem;
}
.product-view-cart-link:hover { color: var(--color-accent); }

.product-not-found { text-align: center; padding: 5rem 0; }
.product-not-found h1 { margin-bottom: 0.8rem; }
.product-not-found p { color: var(--color-text-muted); margin-bottom: 2rem; }

@media (max-width: 800px) {
    .product-layout { grid-template-columns: 1fr; gap: 2rem; }
    .product-page { padding-top: 7rem; }
}

/* Success page */
.success-section {
    min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 8rem 5% 4rem;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}
.success-card {
    max-width: 520px; text-align: center; background: var(--color-surface); padding: 3.2rem 2.6rem;
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--color-border);
}
.success-card h1 { color: var(--color-heading); font-size: 2.1rem; margin-bottom: 0.8rem; }
.success-card p { color: var(--color-text-muted); line-height: 1.65; font-family: var(--font-body); }
.success-spinner {
    width: 38px; height: 38px; border: 3px solid var(--color-accent-light); border-top-color: var(--color-accent);
    border-radius: 50%; margin: 0 auto 1.5rem; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.order-line-items { text-align: left; margin: 1.6rem 0 0.5rem; border-top: 1px solid var(--color-border); padding-top: 1.3rem; font-family: var(--font-body); }
.order-line-items .li-row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; color: var(--color-text); font-size: 0.95rem; }
.order-total-row { display: flex; justify-content: space-between; font-weight: 700; color: var(--color-heading); border-top: 1px dashed var(--color-border); padding-top: 0.8rem; margin-top: 0.4rem; font-family: var(--font-display); font-size: 1.1rem; }
.order-shipping-to { text-align: left; color: var(--color-text-muted); font-size: 0.9rem; margin-top: 1.1rem; font-family: var(--font-body); }

/* Responsive */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .hero::after { font-size: min(30vw, 260px); }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-content { padding: 2.2rem 1.6rem; }
    .about, .gallery, .reviews { padding-left: 6%; padding-right: 6%; }
    .about h2, .gallery h2, .reviews h2 { font-size: 2rem; }
    .form-row { flex-direction: column; }
    .newsletter-inner { flex-direction: column; text-align: center; }
    .newsletter-form { width: 100%; }
    .gallery-item-image { height: 260px; }
    .modal { padding: 1.8rem; }
}

@media (max-width: 480px) {
    .hero-actions { flex-direction: column; width: 100%; }
    .cta-button { width: 100%; text-align: center; }
    .hero::after { display: none; }
    .logo { font-size: 1.05rem; letter-spacing: 1px; white-space: nowrap; }
    .lang-toggle { font-size: 0.72rem; padding: 0.4rem 0.75rem; }
    /* Safety net: if logo + toggle still don't fit on very narrow phones,
       wrap instead of overflowing off-screen (nav is position:fixed, so
       wrapping taller doesn't push page content around). */
    nav { flex-wrap: wrap; row-gap: 0.4rem; }
}
