/*
 * TapiStyle - Artisanal Carpet E-commerce
 * Elegant, warm, and refined design inspired by traditional craftsmanship
 */

/* ===========================
   CSS Variables
   =========================== */
:root {
    /* Brand Colors — Vilna Design (noir / or) */
    --ts-primary: #E9A23B;           /* Gold */
    --ts-primary-dark: #C98A2C;      /* Deep gold */
    --ts-primary-light: #F4C876;     /* Light gold */

    --ts-accent: #F4C876;            /* Light gold accent */
    --ts-accent-dark: #C98A2C;       /* Darker gold */

    --ts-burgundy: #C98A2C;          /* (kept for compat) deep gold, used on badges */
    --ts-terracotta: #C4846B;        /* Unused legacy variable */
    --ts-sage: #8B9D83;              /* Unused legacy variable */

    /* Neutral Colors */
    --ts-cream: #1A1611;             /* Dark card / section background */
    --ts-beige: #13110D;             /* Darker section background */
    --ts-sand: #E8D9B8;              /* Light neutral, used sparingly */

    --ts-text-dark: #E8D9B8;         /* Main text — cream */
    --ts-text-medium: rgba(232, 217, 184, 0.75);
    --ts-text-muted: rgba(232, 217, 184, 0.55);

    --ts-border: rgba(233, 162, 59, 0.2);
    --ts-shadow: rgba(0, 0, 0, 0.35);

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;

    /* Vilna Design tokens (navbar/footer already use these) */
    --vd-ink: #0A0907;
    --vd-ink-soft: #1A1611;
    --vd-gold: #E9A23B;
    --vd-gold-light: #F4C876;
    --vd-cream: #E8D9B8;
    --vd-line: rgba(233, 162, 59, 0.18);
}

/* ===========================
   Global Styles
   =========================== */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ts-text-dark);
    background-color: var(--vd-ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Headings with serif font */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--ts-text-dark);
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1, .h1 { font-size: 3rem; letter-spacing: -0.02em; }
h2, .h2 { font-size: 2.25rem; letter-spacing: -0.01em; }
h3, .h3 { font-size: 1.75rem; }
h4, .h4 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--ts-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--ts-primary-dark);
}

/* ===========================
   Bootstrap Overrides
   =========================== */
.btn-primary {
    background-color: var(--ts-primary) !important;
    border-color: var(--ts-primary) !important;
    color: white !important;
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 2px;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--ts-shadow);
}

.btn-primary:hover {
    background-color: var(--ts-primary-dark) !important;
    border-color: var(--ts-primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--ts-shadow);
}

.btn-outline-primary {
    color: var(--ts-primary) !important;
    border-color: var(--ts-primary) !important;
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 2px;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--ts-primary) !important;
    border-color: var(--ts-primary) !important;
    color: white !important;
}

.btn-light {
    background-color: white;
    border-color: white;
    color: var(--ts-primary);
    font-weight: 500;
}

.btn-light:hover {
    background-color: var(--ts-cream);
    border-color: var(--ts-cream);
    color: var(--ts-primary-dark);
}

.btn-outline-light {
    color: white;
    border-color: white;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--ts-primary);
}

.text-primary {
    color: var(--ts-primary) !important;
}

.text-muted {
    color: var(--ts-text-muted) !important;
}

.bg-light {
    background-color: var(--vd-ink-soft) !important;
    color: var(--vd-cream) !important;
}

.bg-white {
    background-color: var(--vd-ink-soft) !important;
}

.bg-dark {
    background-color: var(--vd-ink) !important;
}

.bg-primary {
    background-color: var(--ts-primary) !important;
}

.bg-primary.text-white,
.card-header.bg-primary {
    color: var(--vd-ink) !important;
}

.text-dark {
    color: var(--vd-cream) !important;
}

.badge.bg-secondary {
    background-color: var(--ts-accent) !important;
    color: var(--vd-ink) !important;
}

/* ===========================
   Cards (Bootstrap) — dark surfaces
   =========================== */
.card {
    background-color: var(--vd-ink-soft);
    color: var(--vd-cream);
    border: 1px solid var(--ts-border);
  
}

.card-header,
.card-footer {
    background-color: var(--vd-ink-soft);
    border-color: var(--ts-border);
}

.card-header.bg-white,
.card-footer.bg-white {
    background-color: var(--vd-ink-soft) !important;
    border-color: var(--ts-border);
}

.card-title,
.card-text {
    color: var(--vd-cream);
}

.card.border-primary { border-color: var(--vd-gold) !important; }

/* ===========================
   Tables (Bootstrap) — dark surfaces
   =========================== */
.table {
    color: var(--vd-cream);
    --bs-table-bg: transparent;
    --bs-table-color: var(--vd-cream);
    --bs-table-border-color: var(--ts-border);
    --bs-table-striped-bg: rgba(233, 162, 59, 0.04);
    --bs-table-hover-bg: rgba(233, 162, 59, 0.06);
    --bs-table-hover-color: var(--vd-cream);
}

.table-light,
.table > :not(caption) > * > .table-light {
    --bs-table-bg: var(--vd-ink);
    --bs-table-color: var(--vd-gold);
    color: var(--vd-gold);
    background-color: var(--vd-ink);
}

.table-success,
.table > :not(caption) > * > .table-success {
    --bs-table-bg: rgba(233, 162, 59, 0.12);
    --bs-table-color: var(--vd-cream);
}

.table-primary,
.table > :not(caption) > * > .table-primary {
    --bs-table-bg: rgba(233, 162, 59, 0.12);
    --bs-table-color: var(--vd-cream);
}

/* ===========================
   Forms (dark surfaces)
   =========================== */
.form-control,
.form-select,
.input-group-text {
    background-color: var(--vd-ink-soft);
    color: var(--vd-cream);
}

.form-control::placeholder {
    color: rgba(232, 217, 184, 0.4);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--vd-ink-soft);
    color: var(--vd-cream);
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23E9A23B' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
}

.form-label {
    color: var(--vd-cream);
}

input[type="number"] {
    background-color: var(--vd-ink-soft);
    color: var(--vd-cream);
}

.form-check-input {
    background-color: var(--vd-ink-soft);
    border-color: var(--ts-border);
}

.form-check-input:checked {
    background-color: var(--vd-gold);
    border-color: var(--vd-gold);
}

.form-check-label {
    color: var(--vd-cream);
}

/* ===========================
   Navbar Styles — Vilna Design (noir / or)
   =========================== */
.navbar {
    padding: 1rem 0;
    background-color: var(--vd-ink) !important;
    border-bottom: 1px solid var(--vd-line);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 600;
    font-style: italic;
    color: var(--vd-gold) !important;
    letter-spacing: 0.01em;
    transition: opacity 0.2s;
}

.navbar-brand:hover {
    opacity: 0.85;
}

.navbar .nav-link {
    font-weight: 500;
    color: var(--vd-cream) !important;
    opacity: 0.8;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.navbar .nav-link:hover {
    color: var(--vd-gold) !important;
    opacity: 1;
}

.navbar .badge.bg-primary {
    background-color: var(--vd-gold) !important;
    color: var(--vd-ink) !important;
}

.navbar-toggler {
    border-color: var(--vd-line);
}

.navbar-toggler-icon {
    filter: invert(72%) sepia(45%) saturate(600%) hue-rotate(1deg) brightness(103%);
}

/* ===========================
   Footer — Vilna Design (noir / or)
   =========================== */
.site-footer {
    background-color: var(--vd-ink) !important;
    border-top: 1px solid var(--vd-line);
}

.site-footer h5,
.site-footer h6 {
    font-family: var(--font-heading);
    color: var(--vd-gold);
    font-weight: 600;
}

.site-footer a {
    transition: color 0.2s;
}

.site-footer a:hover {
    color: var(--vd-gold) !important;
}

.site-footer hr {
    border-color: var(--vd-line);
    opacity: 1;
}

/* ===========================
   Hero Section
   =========================== */
.hero-section {
    background: linear-gradient(135deg, var(--ts-primary) 0%, var(--ts-burgundy) 100%);
    color: white;
    padding: 6rem 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,.02) 10px, rgba(255,255,255,.02) 20px);
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.hero-section .lead {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* ===========================
   Category Badges
   =========================== */
.category-badge {
    display: block;
    padding: 2rem;
    background: white;
    border: 2px solid var(--ts-border);
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.category-badge:hover {
    border-color: var(--ts-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 94, 60, 0.15);
}

.category-badge h4 {
    font-size: 1.5rem;
    color: var(--ts-text-dark);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.category-badge p {
    color: var(--ts-text-muted);
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ===========================
   Product Cards
   =========================== */
.product-card {
    background: var(--vd-ink-soft);
    color: var(--vd-cream);
    border: 1px solid var(--ts-border);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(233, 162, 59, 0.15);
    border-color: var(--ts-accent);
}

.product-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover img {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--ts-burgundy);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.product-price {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ts-primary);
}

/* ===========================
   Section Styling
   =========================== */
section {
    padding: 4rem 0;
}

section.py-5 {
    padding: 5rem 0 !important;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

section .text-center h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--ts-accent);
    margin: 1.5rem auto 0;
}

/* ===========================
   Why Choose Us Icons
   =========================== */
.display-4 {
    font-size: 3rem;
    color: var(--ts-primary);
}

/* ===========================
   Footer
   =========================== */
footer {
    background-color: var(--ts-text-dark) !important;
    border-top: 4px solid var(--ts-accent);
}

footer h5, footer h6 {
    color: var(--ts-accent);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

footer a {
    color: rgba(255,255,255,0.7);
    transition: color 0.2s;
}

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

/* ===========================
   Alerts
   =========================== */
.alert {
    border-radius: 4px;
    border: none;
    font-size: 0.9rem;
}

.alert-warning {
    background-color: #FFF3CD;
    color: #856404;
}

.alert-info {
    background-color: #D1ECF1;
    color: #0C5460;
}

/* ===========================
   Forms
   =========================== */


.form-control,
.form-select {
    width: 80%;
    border: 2px solid var(--ts-border);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ts-primary);
    box-shadow: 0 0 0 0.2rem rgba(139, 94, 60, 0.15);
}

/* ===========================
   Cart Badge Animation
   =========================== */
.position-relative .badge {
    animation: subtle-pulse 3s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ===========================
   Newsletter Section
   =========================== */
section.bg-primary {
    background: linear-gradient(135deg, var(--ts-primary), var(--ts-burgundy)) !important;
}

section.bg-primary h3 {
    color: white;
    font-weight: 600;
}

section.bg-primary .opacity-75 {
    opacity: 0.9 !important;
}

/* ===========================
   Buttons Refinement
   =========================== */
.btn-group .btn {
    padding: 0.5rem 0.75rem;
}

.btn i {
    font-size: 1rem;
}

/* ===========================
   Responsive Typography
   =========================== */
@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .product-card img {
        height: 220px;
    }
}

/* ===========================
   Image Gallery (for future product detail)
   =========================== */
.product-gallery-main img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--ts-border);
}

.product-gallery-thumbs img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid var(--ts-border);
    transition: border-color 0.2s;
}

.product-gallery-thumbs img:hover,
.product-gallery-thumbs img.active {
    border-color: var(--ts-primary);
}

/* ===========================
   Turbo Progress Bar
   =========================== */
.turbo-progress-bar {
    background: var(--ts-accent);
}

/* ===========================
   Spacing Utilities
   =========================== */
.py-6 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

/* ===========================
   Loading Spinner
   =========================== */
.loading-spinner {
    border: 3px solid var(--ts-border);
    border-top: 3px solid var(--ts-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===========================
   Subtle Texture Overlay
   =========================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23E9A23B' fill-opacity='0.025'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

main {
    position: relative;
    z-index: 1;
}

/* ===========================
   Breadcrumb
   =========================== */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--ts-text-muted);
}

.breadcrumb-item a {
    color: var(--ts-text-medium);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--ts-primary);
}

.breadcrumb-item.active {
    color: var(--ts-text-dark);
}

/* ===========================
   Catalog Sidebar
   =========================== */
.list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    background: transparent;
    color: var(--ts-text-medium);
    transition: all 0.2s;
}

.list-group-item:hover {
    background: transparent;
    color: var(--ts-primary);
    padding-left: 0.5rem;
}

.list-group-item.active {
    background: transparent;
    border: none;
}

/* ===========================
   Catalog Toolbar
   =========================== */
.form-select-sm {
    border: 2px solid var(--ts-border);
    border-radius: 4px;
    color: var(--ts-text-dark);
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    background-position: right 0.5rem center;
}

.form-select-sm:focus {
    border-color: var(--ts-primary);
    box-shadow: 0 0 0 0.2rem rgba(139, 94, 60, 0.15);
}

/* ===========================
   Product Card Links
   =========================== */
.product-card a {
    color: inherit;
    text-decoration: none;
}

.product-card a:hover {
    color: inherit;
}

.product-card h5 {
    transition: color 0.2s;
}

.product-card:hover h5 {
    color: var(--ts-primary) !important;
}

/* ===========================
   Product Detail Page
   =========================== */

/* Product Gallery */
.product-gallery .main-image-wrapper {
    background: var(--ts-cream);
    border: 1px solid var(--ts-border);
}

.product-gallery .main-image-wrapper img {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    object-fit: cover;
}

.product-gallery .main-image-wrapper img.is-transitioning {
    opacity: 0;
    transform: scale(1.02);
}

.product-gallery .thumbnail-wrapper {
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: var(--ts-cream);
}

.product-gallery .thumbnail-wrapper:hover {
    border-color: var(--ts-accent) !important;
    transform: scale(1.05);
}

.product-gallery .thumbnail-wrapper.border-primary {
    border-color: var(--ts-primary) !important;
}

.product-gallery .thumbnail-wrapper img {
    object-fit: cover;
}

/* Product Gallery — slider controls */
.main-image-wrapper {
    outline: none;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--vd-ink-soft);
    border: 1px solid var(--ts-border);
    color: var(--vd-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    z-index: 2;
    padding: 0;
}

.gallery-nav:hover {
    background: var(--vd-gold);
    color: var(--vd-ink);
    border-color: var(--vd-gold);
}

.gallery-nav--prev {
    left: 12px;
}

.gallery-nav--next {
    right: 12px;
}

.gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(10, 9, 7, 0.75);
    color: var(--vd-cream);
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    border: 1px solid var(--ts-border);
    z-index: 2;
}

.gallery-nav--expand {
    top: 12px;
    right: 12px;
    left: auto;
    transform: none;
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
}

.gallery-play-pause {
    bottom: 12px;
    left: 12px;
    top: auto;
    transform: none;
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
}

/* Let <main> rise above the sticky navbar while the lightbox is open,
   since <main> has its own stacking context that would otherwise cap it. */
body.has-open-lightbox main {
    position: relative;
    z-index: 2001;
}

/* Lightbox — large / fullscreen-ish view */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(10, 9, 7, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 6vw, 4rem);
    outline: none;
}

.gallery-lightbox__image {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border: 1px solid var(--ts-border);
    box-shadow: 0 0 80px rgba(233, 162, 59, 0.18);
}

.gallery-lightbox__close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--ts-border);
    color: var(--vd-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.gallery-lightbox__close:hover {
    background: var(--vd-gold);
    color: var(--vd-ink);
}

.gallery-lightbox__nav {
    width: 54px;
    height: 54px;
    font-size: 1.1rem;
}

.gallery-lightbox__nav--prev {
    left: clamp(0.5rem, 3vw, 2rem);
}

.gallery-lightbox__nav--next {
    right: clamp(0.5rem, 3vw, 2rem);
}

.gallery-lightbox__counter {
    right: auto;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
}

/* Share menu */
.share-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 190px;
    background: var(--vd-ink-soft);
    border: 1px solid var(--ts-border);
    border-radius: 10px;
    padding: 0.4rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    z-index: 20;
}

.share-menu__item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    color: var(--vd-cream);
    text-decoration: none;
    font-size: 0.875rem;
    font-family: var(--font-body);
    background: none;
    border: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.share-menu__item:hover {
    background: rgba(233, 162, 59, 0.12);
    color: var(--vd-gold);
}

.share-menu__item i {
    font-size: 1rem;
    width: 1.1rem;
    text-align: center;
}

/* Product Info */
.product-info .product-price {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--ts-primary);
}

.product-info .lead {
    font-size: 1.1rem;
    line-height: 1.6;
}

.product-info .list-unstyled li {
    padding: 0.5rem 0;
}

/* Product Description */
.product-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--ts-text-medium);
}

.product-description p {
    margin-bottom: 1.25rem;
}

/* Quantity Input */
input[type="number"] {
    border: 2px solid var(--ts-border);
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 1rem;
    text-align: center;
}

input[type="number"]:focus {
    border-color: var(--ts-primary);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(139, 94, 60, 0.15);
}

/* Related Products Section */
.related-products .product-card {
    transition: transform 0.2s ease;
}

.related-products .product-card:hover {
    transform: translateY(-5px);
}

/* Object Fit Utility (for older browsers fallback) */
.object-fit-cover {
    object-fit: cover;
}

/* ===========================
   Image Placeholder (no product photo yet)
   =========================== */
.ts-img-placeholder {
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ts-cream);
    border: 1px solid var(--ts-border);
    color: var(--ts-text-muted);
    font-family: var(--font-heading);
    font-style: italic;
    text-align: center;
    padding: 0.5rem;
    box-sizing: border-box;
}

/* Pastille de couleur — caractéristiques produit et filtres catalogue.
   La couleur réelle vient de Product.colorHex, posée en style inline. */
.ts-color-dot {
    display: inline-block;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 1px solid var(--ts-border);
    flex-shrink: 0;
}

.ts-color-dot--sm {
    width: 0.8rem;
    height: 0.8rem;
}

/* Couleur absente de la fiche : damier discret plutôt qu'un rond vide,
   pour que la pastille reste lisible comme « couleur non renseignée ». */
.ts-color-dot--empty {
    background-image: linear-gradient(45deg, var(--ts-border) 25%, transparent 25%,
                                      transparent 75%, var(--ts-border) 75%);
    background-size: 0.5rem 0.5rem;
}

/* Filtre couleur du catalogue : la pastille porte l'information, le libellé
   la double pour les lecteurs d'écran et les daltoniens. */
.ts-color-swatch {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem 0.3rem 0.4rem;
    border: 1px solid var(--ts-border);
    border-radius: 2rem;
    text-decoration: none;
    color: inherit;
    font-size: 0.85rem;
    line-height: 1.2;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ts-color-swatch:hover {
    border-color: var(--ts-primary);
    color: inherit;
}

.ts-color-swatch.is-selected {
    border-color: var(--ts-primary);
    border-width: 2px;
    background-color: rgba(233, 162, 59, 0.1);
    font-weight: 600;
}

/* Repère non chromatique de l'état actif : une bordure colorée seule ne
   suffit pas si l'on distingue mal les couleurs. */
.ts-color-swatch.is-selected .ts-color-swatch__label::after {
    content: ' ✓';
}

/* Cursor Pointer Utility */
.cursor-pointer {
    cursor: pointer;
}

/* ===========================
   Responsive Adjustments
   =========================== */
@media (max-width: 991px) {
    h1, .h1 {
        font-size: 2.25rem;
    }

    h2, .h2 {
        font-size: 1.875rem;
    }

    .product-gallery .main-image-wrapper {
        margin-bottom: 2rem;
    }
}

@media (max-width: 767px) {
    h1, .h1 {
        font-size: 1.875rem;
    }

    .product-info .product-price {
        font-size: 1.75rem;
    }

    .product-gallery .thumbnail-wrapper {
        height: 60px;
    }
}

/* ===========================
   Payment Options (Checkout)
   =========================== */
.payment-option {
    border: 2px solid var(--ts-border);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.payment-option:hover {
    border-color: var(--ts-primary);
    background-color: rgba(233, 162, 59, 0.05);
    box-shadow: 0 2px 8px rgba(233, 162, 59, 0.12);
}

.payment-option input[type="radio"]:checked + label {
    font-weight: 600;
}

.payment-option:has(input[type="radio"]:checked) {
    border-color: var(--ts-primary);
    background-color: rgba(233, 162, 59, 0.08);
    box-shadow: 0 2px 12px rgba(233, 162, 59, 0.18);
}

.payment-option label {
    cursor: pointer;
    margin-bottom: 0;
}

/* ===========================
   Login Page
   =========================== */
.login-card {
    max-width: 100%;
}

.login-card .card-body {
    background: var(--vd-ink-soft);
}

.login-form .form-control {
    width: 100%;
}

.login-form .btn {
    width: 100%;
}

/* Responsive adjustments for login */
@media (max-width: 768px) {
    .login-card .card-body {
        padding: 2rem 1.5rem !important;
    }
}

/* ===========================
   Legal pages (CGV, mentions, confidentialité, cookies)
   =========================== */
.legal-content h1 {
    font-family: var(--font-heading);
}

.legal-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--ts-border);
}

.legal-content p,
.legal-content li {
    line-height: 1.75;
    color: var(--ts-text-medium);
}

.legal-content a {
    color: var(--ts-primary);
}

/* ===========================
   Avertissement phase de test
   =========================== */
.beta-notice {
    position: fixed;
    inset: 0;
    z-index: 1090; /* au-dessus du bandeau cookies (1080) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(10, 9, 7, 0.82);
    backdrop-filter: blur(3px);
}

/* L'animation d'entrée est portée par une classe posée après l'affichage, pas
   par .beta-notice : déclarée sur un élément encore `hidden` (display:none),
   Chrome la crée figée à t=0 et l'état initial d'un fill-mode `both` laissait
   la fenêtre à opacité 0 — ouverte, mais invisible. Sans classe, l'état par
   défaut est donc pleinement visible : une animation qui ne part pas ne peut
   plus masquer le contenu. */
.beta-notice.is-open {
    animation: beta-notice-fade 0.35s ease;
}

.beta-notice[hidden] {
    display: none;
}

/* Le défilement de la page est bloqué tant que la fenêtre est ouverte :
   sinon la molette fait défiler l'accueil derrière la superposition. */
body.beta-notice-open {
    overflow: hidden;
}

.beta-notice__dialog {
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    padding: 2rem 2rem 1.75rem;
    background: var(--vd-ink-soft);
    color: var(--vd-cream);
    border: 1px solid var(--vd-line);
    border-top: 2px solid var(--vd-gold);
    border-radius: 4px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.beta-notice.is-open .beta-notice__dialog {
    animation: beta-notice-rise 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.beta-notice__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--vd-gold);
}

.beta-notice__title {
    margin: 0 0 1rem;
    font-family: var(--font-heading);
    font-size: 1.55rem;
    line-height: 1.25;
    color: var(--vd-cream);
}

.beta-notice__text p {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    line-height: 1.65;
    color: rgba(232, 217, 184, 0.8);
}

.beta-notice__list {
    list-style: none;
    margin: 0 0 1.1rem;
    padding: 1rem 1.1rem;
    background: rgba(233, 162, 59, 0.06);
    border: 1px solid var(--vd-line);
    border-radius: 4px;
}

.beta-notice__list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(232, 217, 184, 0.85);
}

.beta-notice__list li + li {
    margin-top: 0.85rem;
}

.beta-notice__list i {
    flex: 0 0 auto;
    margin-top: 0.15rem;
    font-size: 1.05rem;
    color: var(--vd-gold);
}

.beta-notice__list strong {
    color: var(--vd-cream);
    font-weight: 600;
}

.beta-notice__closing {
    font-size: 0.86rem !important;
    color: var(--ts-text-muted) !important;
}

.beta-notice__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

@media (max-width: 576px) {
    .beta-notice__dialog {
        padding: 1.5rem 1.25rem 1.35rem;
    }

    .beta-notice__title {
        font-size: 1.3rem;
    }

    .beta-notice__actions {
        justify-content: stretch;
    }

    .beta-notice__actions .btn {
        flex: 1 1 auto;
    }
}

@keyframes beta-notice-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes beta-notice-rise {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .beta-notice.is-open,
    .beta-notice.is-open .beta-notice__dialog {
        animation: none;
    }
}

/* ===========================
   Cookie consent banner
   =========================== */
.cookie-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.cookie-consent__panel {
    width: 100%;
    max-width: 960px;
    background: var(--vd-ink);
    color: var(--vd-cream);
    border: 1px solid var(--vd-line);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
}

.cookie-consent__text {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(232, 217, 184, 0.85);
}

.cookie-consent__text a {
    color: var(--vd-gold);
    text-decoration: underline;
}

.cookie-consent__preferences {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    background: var(--vd-ink-soft);
    border: 1px solid var(--vd-line);
    border-radius: 4px;
}

.cookie-consent__option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    margin: 0;
}

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

@media (max-width: 576px) {
    .cookie-consent__actions {
        justify-content: stretch;
    }

    .cookie-consent__actions .btn {
        flex: 1 1 auto;
    }
}
