/* ================================================================
   boutique.casa — Main Stylesheet
   Moroccan Luxury Design System
   ================================================================ */

/* ----------------------------------------------------------------
   1. CSS Custom Properties (Design Tokens)
   ---------------------------------------------------------------- */
:root {
    /* Brand Colors */
    --crimson: #B5231B;
    --crimson-dark: #8C1915;
    --crimson-light: #D93026;
    --gold: #C9941A;
    --gold-light: #E8B53A;
    --gold-pale: #F5E6C0;
    --ivory: #FAF7F2;
    --ivory-dark: #F0EBE1;
    --charcoal: #1E1E1E;
    --gray-dark: #3D3D3D;
    --gray-mid: #6B6B6B;
    --gray-light: #AAAAAA;
    --gray-pale: #E8E4DF;
    --white: #FFFFFF;
    --black: #000000;

    /* Semantic */
    --success: #2D8A4E;
    --warning: #D97706;
    --error: #DC2626;
    --info: #2563EB;

    /* Typography */
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Lato', 'Segoe UI', sans-serif;
    --font-arabic: 'Amiri', serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.14);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.18);
    --shadow-gold: 0 4px 20px rgba(201, 148, 26, 0.25);
    --shadow-red: 0 4px 20px rgba(181, 35, 27, 0.25);

    /* Transitions */
    --trans-fast: 0.15s ease;
    --trans-normal: 0.25s ease;
    --trans-slow: 0.4s ease;

    /* Layout */
    --container-max: 1280px;
    --header-height: 80px;
}

/* ----------------------------------------------------------------
   2. Reset & Base
   ---------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--charcoal);
    background: var(--ivory);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100vw;
}

img,
video,
svg {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--trans-fast);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

ul,
ol {
    list-style: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ----------------------------------------------------------------
   3. Typography
   ---------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    line-height: 1.2;
    color: var(--charcoal);
    font-weight: 600;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--space-md);
}

p:last-child {
    margin-bottom: 0;
}

/* ----------------------------------------------------------------
   4. Layout
   ---------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-xl);
}

.section {
    padding-block: var(--space-4xl);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-header .eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: var(--space-sm);
    position: relative;
    padding-inline: var(--space-md);
}

.section-header .eyebrow::before,
.section-header .eyebrow::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1px;
    background: var(--gold);
    transform: translateY(-50%);
}

.section-header .eyebrow::before {
    right: 100%;
}

.section-header .eyebrow::after {
    left: 100%;
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    color: var(--gray-mid);
    max-width: 600px;
    margin-inline: auto;
}

/* ----------------------------------------------------------------
   5. Buttons
   ---------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    transition: all var(--trans-normal);
    white-space: nowrap;
    text-transform: uppercase;
    cursor: pointer;
}

.btn-primary {
    background: var(--crimson);
    color: var(--white);
    box-shadow: var(--shadow-red);
}

.btn-primary:hover {
    background: var(--crimson-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(181, 35, 27, 0.35);
    color: var(--white);
}

.btn-gold {
    background: var(--gold);
    color: var(--white);
    box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--crimson);
    color: var(--crimson);
}

.btn-outline:hover {
    background: var(--crimson);
    color: var(--white);
}

.btn-outline-white {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: var(--white);
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--white);
}

.btn-ghost {
    background: transparent;
    color: var(--charcoal);
}

.btn-ghost:hover {
    background: var(--gray-pale);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 0.75rem;
    border-radius: var(--radius-full);
}

/* ----------------------------------------------------------------
   6. Top Bar
   ---------------------------------------------------------------- */
.topbar {
    background: var(--charcoal);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    padding-block: 0.5rem;
}

.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.topbar a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--trans-fast);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.topbar a:hover {
    color: var(--gold-light);
}

.topbar-wa {
    color: #25D366 !important;
}

/* ----------------------------------------------------------------
   7. Header
   ---------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    transition: all var(--trans-normal);
}

.site-header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: var(--space-xl);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

.logo-mark {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-red);
}

.logo-icon {
    color: var(--white);
    font-size: 1.2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-name {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--charcoal);
    letter-spacing: -0.02em;
}

.logo-tagline {
    font-size: 0.65rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 2px;
}

/* Main Nav */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 0;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li a {
    display: block;
    padding: 0.6rem var(--space-md);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-dark);
    letter-spacing: 0.02em;
    transition: color var(--trans-fast);
    position: relative;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: var(--space-md);
    right: var(--space-md);
    height: 2px;
    background: var(--crimson);
    transform: scaleX(0);
    transition: transform var(--trans-normal);
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: var(--crimson);
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    transform: scaleX(1);
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: var(--space-sm) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--trans-normal);
    border-top: 3px solid var(--crimson);
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    display: block;
    padding: 0.6rem var(--space-lg);
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gray-dark);
}

.dropdown a:hover {
    background: var(--ivory);
    color: var(--crimson);
    padding-left: calc(var(--space-lg) + 4px);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-pale);
    margin-block: var(--space-sm);
}

.dropdown-all {
    color: var(--crimson) !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--gray-dark);
    font-size: 1rem;
    transition: all var(--trans-fast);
}

.icon-btn:hover {
    background: var(--ivory-dark);
    color: var(--crimson);
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--crimson);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: transform var(--trans-normal);
}

.cart-badge.active {
    transform: scale(1);
}

/* Account Menu */
.account-menu {
    position: relative;
}

.account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: var(--space-sm) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--trans-normal);
    border-top: 3px solid var(--crimson);
}

.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.account-info {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--gray-pale);
    display: flex;
    flex-direction: column;
}

.account-info strong {
    color: var(--charcoal);
}

.account-info small {
    color: var(--gray-mid);
    font-size: 0.75rem;
}

.account-dropdown a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.6rem var(--space-lg);
    font-size: 0.875rem;
    color: var(--gray-dark);
}

.account-dropdown a:hover {
    background: var(--ivory);
    color: var(--crimson);
}

.logout-link {
    color: var(--error) !important;
}

/* Search Bar */
.search-bar {
    background: var(--ivory-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--trans-slow);
}

.search-bar.active {
    max-height: 100px;
    border-top: 1px solid var(--gray-pale);
}

.search-bar .container {
    padding-block: var(--space-md);
}

.search-form {
    display: flex;
    gap: var(--space-sm);
    max-width: 600px;
}

.search-form input {
    flex: 1;
    padding: 0.65rem var(--space-md);
    border: 2px solid var(--gray-pale);
    border-radius: var(--radius-md);
    background: var(--white);
    transition: border-color var(--trans-fast);
    outline: none;
}

.search-form input:focus {
    border-color: var(--crimson);
}

.search-form button {
    padding: 0.65rem var(--space-md);
    border-radius: var(--radius-md);
    background: var(--crimson);
    color: var(--white);
    transition: background var(--trans-fast);
}

.search-form button:hover {
    background: var(--crimson-dark);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    padding: 6px;
}

.mobile-menu-btn span {
    display: block;
    height: 2px;
    background: var(--charcoal);
    border-radius: 2px;
    transition: all var(--trans-normal);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    background: var(--white);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--trans-slow);
}

.mobile-nav.active {
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    border-top: 1px solid var(--gray-pale);
}

.mobile-nav-inner {
    display: flex;
    flex-direction: column;
    padding: var(--space-md) 0;
}

.mobile-nav-inner a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem var(--space-xl);
    color: var(--gray-dark);
    font-weight: 700;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--gray-pale);
}

.mobile-nav-inner a:hover {
    color: var(--crimson);
    background: var(--ivory);
}

.mobile-nav-inner a i {
    width: 16px;
    color: var(--gold);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.mobile-nav-sub {
    padding-left: calc(var(--space-xl) + 12px) !important;
    font-weight: 400 !important;
    color: var(--gray-mid) !important;
}

.mobile-nav-divider {
    height: 8px;
    background: var(--ivory-dark);
}

/* Mobile nav search box */
.mobile-nav-search {
    padding: var(--space-md) var(--space-xl);
    border-bottom: 1px solid var(--gray-pale);
}

.mobile-nav-search form {
    display: flex;
    gap: 0;
    border: 2px solid var(--gray-pale);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--white);
}

.mobile-nav-search input {
    flex: 1;
    padding: 0.6rem var(--space-md);
    font-size: 0.9rem;
    border: none;
    outline: none;
    background: transparent;
    color: var(--charcoal);
}

.mobile-nav-search button {
    padding: 0.6rem var(--space-md);
    background: var(--crimson);
    color: var(--white);
    border-radius: 0;
    transition: background var(--trans-fast);
}

.mobile-nav-search button:hover {
    background: var(--crimson-dark);
}


/* ----------------------------------------------------------------
   8. Flash Messages
   ---------------------------------------------------------------- */
.flash-container {
    position: fixed;
    top: calc(var(--header-height) + var(--space-md));
    right: var(--space-xl);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-width: 400px;
    width: 90vw;
}

.flash {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    position: relative;
}

.flash-success {
    background: #ECFDF5;
    color: #065F46;
    border-left: 4px solid var(--success);
}

.flash-error {
    background: #FEF2F2;
    color: #991B1B;
    border-left: 4px solid var(--error);
}

.flash-warning {
    background: #FFFBEB;
    color: #92400E;
    border-left: 4px solid var(--warning);
}

.flash-info {
    background: #EFF6FF;
    color: #1E40AF;
    border-left: 4px solid var(--info);
}

.flash-close {
    margin-left: auto;
    font-size: 1.2rem;
    opacity: 0.6;
    cursor: pointer;
    padding: 0 var(--space-sm);
}

.flash-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ----------------------------------------------------------------
   9. Hero Section
   ---------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--charcoal) 0%, #3D1A17 60%, var(--crimson-dark) 100%);
    padding-block: var(--space-3xl);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('/assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.25;
}

/* Moroccan geometric pattern overlay */
.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpolygon points='40,5 75,25 75,55 40,75 5,55 5,25' fill='none' stroke='%23fff' stroke-width='1'/%3E%3Cpolygon points='40,15 65,28 65,52 40,65 15,52 15,28' fill='none' stroke='%23fff' stroke-width='0.5'/%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    animation: fadeUp 0.8s ease both;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: var(--space-lg);
}

.hero-eyebrow::before,
.hero-eyebrow::after {
    content: '✦';
    color: var(--gold);
    font-size: 0.6rem;
}

.hero h1 {
    color: var(--white);
    font-style: italic;
    margin-bottom: var(--space-lg);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero h1 em {
    font-style: normal;
    color: var(--gold-light);
}

.hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: var(--space-xl);
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    animation: bounce 2s infinite;
}

.hero-scroll i {
    font-size: 1.2rem;
}

/* Hero Floating Cards */
.hero-side {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding-right: var(--space-3xl);
    z-index: 2;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    animation: floatIn 0.8s ease both;
}

.hero-badge:nth-child(2) {
    animation-delay: 0.15s;
}

.hero-badge:nth-child(3) {
    animation-delay: 0.3s;
}

.hero-badge-icon {
    font-size: 1.5rem;
    color: var(--gold-light);
}

.hero-badge strong {
    display: block;
    font-size: 0.9rem;
}

.hero-badge small {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Why Choose Us Grid */
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.why-item {
    text-align: center;
    padding: 2rem;
}

/* ----------------------------------------------------------------
   10. Product Cards
   ---------------------------------------------------------------- */
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--trans-normal);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-card-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--ivory-dark);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--trans-slow);
}

.product-card:hover .product-card-image img {
    transform: scale(1.07);
}

.product-card-badges {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    z-index: 2;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-sale {
    background: var(--crimson);
    color: var(--white);
}

.badge-new {
    background: var(--gold);
    color: var(--white);
}

.badge-hot {
    background: var(--charcoal);
    color: var(--white);
}

.badge-out {
    background: var(--gray-light);
    color: var(--white);
}

.product-card-actions {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    z-index: 2;
    transform: translateX(60px);
    transition: transform var(--trans-normal);
}

.product-card:hover .product-card-actions {
    transform: translateX(0);
}

.product-action-btn {
    width: 36px;
    height: 36px;
    background: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-dark);
    font-size: 0.85rem;
    box-shadow: var(--shadow-md);
    transition: all var(--trans-fast);
}

.product-action-btn:hover {
    background: var(--crimson);
    color: var(--white);
    transform: scale(1.1);
}

.product-card-body {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-bottom: var(--space-xs);
}

.product-card-name {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: var(--space-sm);
    flex: 1;
    line-height: 1.3;
}

.product-card-name a:hover {
    color: var(--crimson);
}

.product-card-price {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.price-current {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--crimson);
}

.price-old {
    font-size: 0.9rem;
    color: var(--gray-light);
    text-decoration: line-through;
}

.price-discount {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--success);
    background: #ECFDF5;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.product-card .btn-add-cart {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.6rem var(--space-md);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

/* Related / Nouveautés: always 4 cols on large screens */
.related-products-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* Shop page grid: 3 cols (inside sidebar layout) */
.shop-products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

/* ----------------------------------------------------------------
   11. Categories Grid
   ---------------------------------------------------------------- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.category-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4/3;
    display: flex;
    align-items: flex-end;
    transition: transform var(--trans-normal), box-shadow var(--trans-normal);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.category-card-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--crimson-dark), var(--charcoal));
    transition: transform var(--trans-slow);
}

.category-card:hover .category-card-bg {
    transform: scale(1.05);
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.1) 60%);
}

.category-card-content {
    position: relative;
    z-index: 2;
    padding: var(--space-xl);
    width: 100%;
}

.category-card-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    color: var(--gold-light);
}

.category-card-content h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: var(--space-xs);
}

.category-card-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin: 0;
}

.category-card-arrow {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.8rem;
    transform: rotate(-45deg);
    transition: all var(--trans-normal);
}

.category-card:hover .category-card-arrow {
    background: var(--gold);
    transform: rotate(0);
}

/* ----------------------------------------------------------------
   12. Forms
   ---------------------------------------------------------------- */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: var(--space-xs);
    letter-spacing: 0.02em;
}

.form-label .required {
    color: var(--crimson);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 0.75rem var(--space-md);
    border: 2px solid var(--gray-pale);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--charcoal);
    transition: border-color var(--trans-fast), box-shadow var(--trans-fast);
    outline: none;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--crimson);
    box-shadow: 0 0 0 3px rgba(181, 35, 27, 0.1);
}

.form-control.is-invalid {
    border-color: var(--error);
}

.form-control.is-valid {
    border-color: var(--success);
}

.form-error {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.form-hint {
    color: var(--gray-mid);
    font-size: 0.8rem;
    margin-top: var(--space-xs);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    cursor: pointer;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-pale);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all var(--trans-fast);
    background: var(--white);
    position: relative;
}

.form-check-input:checked {
    background: var(--crimson);
    border-color: var(--crimson);
}

.form-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ----------------------------------------------------------------
   13. Cart / Checkout
   ---------------------------------------------------------------- */
/* Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 3rem;
    align-items: start;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-mid);
    border-bottom: 2px solid var(--gray-pale);
}

.cart-table td {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--gray-pale);
    vertical-align: middle;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.cart-product-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--ivory-dark);
    flex-shrink: 0;
}

.cart-product-info a {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--charcoal);
}

.cart-product-info a:hover {
    color: var(--crimson);
}

.cart-product-info small {
    color: var(--gray-mid);
    font-size: 0.8rem;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 2px solid var(--gray-pale);
    border-radius: var(--radius-md);
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ivory-dark);
    color: var(--charcoal);
    font-size: 1rem;
    transition: background var(--trans-fast);
}

.qty-btn:hover {
    background: var(--gray-pale);
}

.qty-input {
    width: 48px;
    height: 36px;
    border: none;
    text-align: center;
    font-weight: 700;
    background: var(--white);
    outline: none;
}

.cart-remove {
    color: var(--gray-light);
    transition: color var(--trans-fast);
    padding: var(--space-sm);
}

.cart-remove:hover {
    color: var(--error);
}

/* Order Summary Box */
.order-summary {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.order-summary h3 {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--gray-pale);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: 0.6rem;
    font-size: 0.9rem;
}

.summary-row.total {
    font-size: 1.1rem;
    font-weight: 700;
    border-top: 2px solid var(--gray-pale);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    color: var(--crimson);
}

.coupon-form {
    display: flex;
    gap: var(--space-sm);
    margin-block: var(--space-md);
}

.coupon-form input {
    flex: 1;
    padding: 0.6rem var(--space-md);
    border: 2px solid var(--gray-pale);
    border-radius: var(--radius-md);
    outline: none;
}

.coupon-form input:focus {
    border-color: var(--gold);
}

/* ----------------------------------------------------------------
   14. Page Hero (inner pages)
   ---------------------------------------------------------------- */
.page-hero {
    background: linear-gradient(135deg, var(--charcoal), #3D1A17);
    padding-block: var(--space-3xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpolygon points='30,3 57,18 57,42 30,57 3,42 3,18' fill='none' stroke='%23fff' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E");
}

.page-hero h1 {
    color: var(--white);
    position: relative;
    margin-bottom: var(--space-sm);
}

.page-hero .breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    position: relative;
}

.page-hero .breadcrumb a {
    color: var(--gold-light);
}

.page-hero .breadcrumb a:hover {
    color: var(--white);
}

.page-hero .breadcrumb .sep {
    opacity: 0.5;
}

/* ----------------------------------------------------------------
   15. Sidebar Filters
   ---------------------------------------------------------------- */
.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

.sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.sidebar-section {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--gray-pale);
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: var(--space-md);
}

.filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0;
    cursor: pointer;
}

.filter-option label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray-dark);
}

.filter-count {
    font-size: 0.75rem;
    color: var(--gray-mid);
    background: var(--ivory-dark);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-full);
}

.price-range {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.price-range input {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid var(--gray-pale);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 0.85rem;
    outline: none;
}

.price-range input:focus {
    border-color: var(--crimson);
}

/* ----------------------------------------------------------------
   16. Pagination
   ---------------------------------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-3xl);
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-dark);
    background: var(--white);
    border: 2px solid var(--gray-pale);
    transition: all var(--trans-fast);
}

.page-link:hover {
    border-color: var(--crimson);
    color: var(--crimson);
}

.page-link.active {
    background: var(--crimson);
    border-color: var(--crimson);
    color: var(--white);
}

.page-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ----------------------------------------------------------------
   17. Product Detail
   ---------------------------------------------------------------- */
.product-gallery {
    display: flex;
    gap: var(--space-md);
}

.gallery-thumbnails {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 80px;
    flex-shrink: 0;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    cursor: pointer;
    opacity: 0.7;
    border: 2px solid transparent;
    transition: all var(--trans-fast);
}

.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
    border-color: var(--crimson);
}

.gallery-main {
    flex: 1;
    aspect-ratio: 1/1;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--ivory-dark);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info {
    padding: 0 var(--space-xl);
}

.product-detail-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-bottom: var(--space-sm);
}

.product-detail-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: var(--space-md);
}

.product-detail-price {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.product-detail-price .price-main {
    font-size: 2rem;
    font-weight: 700;
    color: var(--crimson);
}

.product-add-section {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    margin-bottom: var(--space-xl);
}

/* ----------------------------------------------------------------
   18. Login / Register Cards
   ---------------------------------------------------------------- */
.auth-container {
    min-height: calc(100vh - var(--header-height) - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) var(--space-xl);
    background: var(--ivory-dark);
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.auth-header .auth-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    margin: 0 auto var(--space-lg);
    box-shadow: var(--shadow-red);
}

.auth-tabs {
    display: flex;
    background: var(--ivory-dark);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: var(--space-xl);
}

.auth-tab {
    flex: 1;
    padding: 0.6rem var(--space-md);
    border-radius: calc(var(--radius-md) - 2px);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-mid);
    text-align: center;
    cursor: pointer;
    transition: all var(--trans-normal);
}

.auth-tab.active {
    background: var(--white);
    color: var(--crimson);
    box-shadow: var(--shadow-sm);
}

/* ----------------------------------------------------------------
   19. Account Dashboard
   ---------------------------------------------------------------- */
.account-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.account-sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.account-user-info {
    background: linear-gradient(135deg, var(--crimson), var(--crimson-dark));
    padding: var(--space-xl);
    color: var(--white);
}

.account-avatar {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.account-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--gray-dark);
    font-size: 0.9rem;
    font-weight: 600;
    border-left: 3px solid transparent;
    transition: all var(--trans-fast);
}

.account-nav a:hover,
.account-nav a.active {
    color: var(--crimson);
    background: var(--ivory);
    border-left-color: var(--crimson);
}

.account-nav a i {
    width: 16px;
    text-align: center;
}

/* Order Status Badges */
.order-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pending {
    background: #FFFBEB;
    color: #92400E;
}

.status-contacted {
    background: #EFF6FF;
    color: #1E40AF;
}

.status-confirmed {
    background: #F0FDF4;
    color: #14532D;
}

.status-processing {
    background: #FFF7ED;
    color: #9A3412;
}

.status-shipped {
    background: #F0F9FF;
    color: #0C4A6E;
}

.status-delivered {
    background: #F0FDF4;
    color: #065F46;
}

.status-cancelled {
    background: #FEF2F2;
    color: #991B1B;
}

/* ----------------------------------------------------------------
   20. Moroccan Decorative Elements
   ---------------------------------------------------------------- */
.moroccan-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-block: var(--space-2xl);
}

.moroccan-divider::before,
.moroccan-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.moroccan-divider .ornament {
    color: var(--gold);
    font-size: 1.2rem;
}

/* Trust Badges Strip */
.trust-strip {
    background: var(--charcoal);
    padding-block: var(--space-xl);
}

.trust-strip .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: rgba(255, 255, 255, 0.85);
}

.trust-icon {
    font-size: 1.8rem;
    color: var(--gold-light);
    flex-shrink: 0;
}

.trust-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--white);
}

.trust-item small {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 9999;
    width: 58px;
    height: 58px;
    background: #25D366;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--white);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all var(--trans-normal);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
    color: var(--white);
}

.whatsapp-tooltip {
    position: absolute;
    right: calc(100% + 10px);
    white-space: nowrap;
    background: var(--charcoal);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
    transition: all var(--trans-normal);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: calc(var(--space-xl) + 70px);
    right: var(--space-xl);
    z-index: 9998;
    width: 44px;
    height: 44px;
    background: var(--crimson);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--trans-normal);
    pointer-events: none;
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.scroll-top:hover {
    background: var(--crimson-dark);
    transform: translateY(-2px);
}

/* ----------------------------------------------------------------
   21. Empty States
   ---------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--gray-light);
    margin-bottom: var(--space-lg);
}

.empty-state h3 {
    font-size: 1.4rem;
    margin-bottom: var(--space-md);
    color: var(--gray-dark);
}

.empty-state p {
    color: var(--gray-mid);
    margin-bottom: var(--space-xl);
}

/* ----------------------------------------------------------------
   22. Footer
   ---------------------------------------------------------------- */
.site-footer {
    background: #141414;
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--space-4xl);
}

.footer-top {
    padding: var(--space-4xl) 0 var(--space-3xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-3xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    color: var(--white);
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
}

.footer-logo i {
    color: var(--gold-light);
    font-size: 1.2rem;
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.footer-contact a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--trans-fast);
}

.footer-contact a:hover {
    color: var(--gold-light);
}

.footer-contact i {
    width: 16px;
    color: var(--gold);
}

.footer-social {
    display: flex;
    gap: var(--space-sm);
}

.footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: all var(--trans-fast);
}

.footer-social a:hover {
    background: var(--crimson);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-col h4 {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--white);
    margin-bottom: var(--space-lg);
    position: relative;
    padding-bottom: var(--space-sm);
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--gold);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-col ul a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
    transition: all var(--trans-fast);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.footer-col ul a:hover {
    color: var(--gold-light);
    padding-left: var(--space-xs);
}

.footer-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.footer-feature i {
    font-size: 1.2rem;
    color: var(--gold);
    margin-top: 2px;
    flex-shrink: 0;
}

.footer-feature strong {
    display: block;
    font-size: 0.85rem;
    color: var(--white);
}

.footer-feature small {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-block: var(--space-lg);
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.footer-bottom p {
    font-size: 0.8rem;
    margin: 0;
}

.footer-payment-icons {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.8rem;
}

.footer-payment-icons span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: rgba(255, 255, 255, 0.5);
}

/* ----------------------------------------------------------------
   23. Animations
   ---------------------------------------------------------------- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-fadeup {
    animation: fadeUp 0.6s ease both;
}

.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

.animate-delay-4 {
    animation-delay: 0.4s;
}

/* ----------------------------------------------------------------
   24. Loading States
   ---------------------------------------------------------------- */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: var(--radius-full);
    animation: spin 0.7s linear infinite;
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-pale) 25%, var(--ivory-dark) 50%, var(--gray-pale) 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-shine {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ----------------------------------------------------------------
   25. Utility Classes
   ---------------------------------------------------------------- */
.text-crimson {
    color: var(--crimson);
}

.text-gold {
    color: var(--gold);
}

.text-gray {
    color: var(--gray-mid);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-sm {
    margin-bottom: var(--space-sm);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.mb-xl {
    margin-bottom: var(--space-xl);
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.hidden {
    display: none !important;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

/* ----------------------------------------------------------------
   26. Responsive
   ---------------------------------------------------------------- */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .related-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Shop grid: stays 3 cols at 1200px (sidebar still there) */
    .shop-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
    }

    .footer-col:last-child {
        grid-column: 1 / -1;
    }
}

/* ≤1100px: related drops to 3 cols, shop drops to 2 cols (sidebar still visible = tight) */
@media (max-width: 1100px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-lg);
    }

    .related-products-grid .product-card-body {
        padding: var(--space-md);
    }

    .related-products-grid .product-card-name {
        font-size: 0.95rem;
    }

    .related-products-grid .price-current {
        font-size: 1.05rem;
    }

    .related-products-grid .product-card-footer {
        flex-wrap: wrap;
        gap: var(--space-xs);
    }

    .related-products-grid .product-card-footer .btn {
        font-size: 0.75rem;
        padding: 0.45rem 0.75rem;
    }

    /* Shop: 2 cols when sidebar is still visible but viewport tight */
    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .shop-products-grid .product-card-body {
        padding: var(--space-md);
    }

    .shop-products-grid .product-card-name {
        font-size: 0.95rem;
    }

    .shop-products-grid .product-card-footer {
        flex-wrap: wrap;
        gap: var(--space-xs);
    }

    .shop-products-grid .product-card-footer .btn {
        font-size: 0.75rem;
        padding: 0.45rem 0.75rem;
    }
}

@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }

    /* On mobile, hide search & account from header — they're in the mobile menu */
    #search-toggle,
    .account-menu,
    .header-actions > a[href="/login.php"] {
        display: none;
    }

    /* Tighten the header gap on mobile */
    .header-inner {
        gap: var(--space-sm);
    }

    .shop-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
    }

    .account-layout {
        grid-template-columns: 1fr;
    }

    .hero-side {
        display: none;
    }

    .trust-strip .container {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Related products: 2 cols on tablet */
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Shop: sidebar gone at 1024px → full width → 3 cols fits nicely */
    .shop-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }
}

@media (max-width: 768px) {
    :root {
        --container-max: 100%;
        --header-height: 64px;
    }

    .container {
        padding-inline: var(--space-md);
    }

    /* Compact header on small phones */
    .logo-tagline {
        display: none;
    }

    .logo-name {
        font-size: 1.1rem;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
    }

    .topbar-right {
        display: none;
    }

    .hero {
        min-height: 55vh;
        padding-block: var(--space-xl);
    }

    .page-hero {
        padding-block: var(--space-xl);
    }

    /* Why Choose Us: single column on mobile */
    .why-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .why-item {
        padding: 1.25rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .why-item:last-child {
        border-bottom: none;
    }

    /* Reduce section padding on mobile — main cause of large gaps */
    .section {
        padding-block: 2.5rem;
    }

    .section-header {
        margin-bottom: 1.5rem;
    }

    /* Reduce inline section padding overrides */
    [style*="padding-block:4rem"],
    [style*="padding-block: 4rem"] {
        padding-block: 2.5rem !important;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .product-gallery {
        flex-direction: column;
    }

    .gallery-thumbnails {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
    }

    .gallery-thumb {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }

    .product-add-section {
        flex-direction: column;
        align-items: stretch;
    }

    .product-add-section .btn {
        width: 100%;
        justify-content: center;
    }

    /* Product detail: single column on mobile */
    .product-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .product-detail-info {
        padding: 0;
    }

    /* Cart Table Mobile View */
    .cart-table thead {
        display: none;
    }

    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        margin-bottom: var(--space-lg);
        border: 1px solid var(--gray-pale);
        border-radius: var(--radius-lg);
        padding: var(--space-md);
        position: relative;
    }

    .cart-table td {
        padding: var(--space-sm) 0;
        border-bottom: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cart-table td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.85rem;
        color: var(--gray-mid);
        text-transform: uppercase;
    }

    .cart-table td[data-label="Produit"] {
        justify-content: flex-start;
        border-bottom: 1px solid var(--gray-pale);
        padding-bottom: var(--space-md);
        margin-bottom: var(--space-md);
    }
    
    .cart-table td[data-label="Produit"]::before {
        display: none;
    }

    .cart-table td:last-child {
        position: absolute;
        top: var(--space-md);
        right: var(--space-md);
        padding: 0;
        width: auto;
    }

    .trust-strip .container {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    /* Shop: 2 cols on mobile */
    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    /* Keep related products at 2 cols on small phones */
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .related-products-grid .product-card-body {
        padding: var(--space-sm);
    }

    .related-products-grid .product-card-name {
        font-size: 0.85rem;
    }

    /* Shop: 2 cols on small phones, compact */
    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xs);
    }

    .shop-products-grid .product-card-body {
        padding: var(--space-sm);
    }

    .shop-products-grid .product-card-name {
        font-size: 0.82rem;
    }

    .shop-products-grid .product-card-footer .btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.5rem;
    }

    /* Even tighter sections on very small phones */
    .section {
        padding-block: 1.5rem;
    }

    .section-header {
        margin-bottom: 1rem;
    }

    .hero {
        min-height: 50vh;
    }

    .flash-container {
        right: var(--space-md);
        left: var(--space-md);
        width: auto;
    }
}