/* =============================================
   Quincaillerie.tn â€” Main Stylesheet
   ============================================= */

:root {
    --primary:     #e85d04;
    --primary-dark:#c84e03;
    --secondary:   #1a1a2e;
    --accent:      #f77f00;
    --bg:          #f8f9fa;
    --white:       #ffffff;
    --text:        #374151;
    --text-light:  #6b7280;
    --border:      #e5e7eb;
    --success:     #10b981;
    --error:       #ef4444;
    --warning:     #f59e0b;
    --radius:      10px;
    --shadow:      0 2px 12px rgba(0,0,0,.08);
    --shadow-md:   0 4px 24px rgba(0,0,0,.12);
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

img { max-width: 100%; display: block; }

/* ---- Top Bar ---- */
.topbar {
    background: var(--secondary);
    color: rgba(255,255,255,.8);
    font-size: .8rem;
    padding: 6px 0;
}
.topbar .container {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}
.topbar span { display: flex; align-items: center; gap: 6px; }
.topbar .ms-auto { margin-left: auto; }

/* ---- Header ---- */
.site-header {
    background: var(--white);
    padding: 16px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary);
    white-space: nowrap;
}
.logo i { color: var(--primary); font-size: 1.6rem; }
.logo strong { color: var(--primary); }

.search-bar {
    flex: 1;
    max-width: 560px;
    display: flex;
    border: 2px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    transition: border-color .2s;
}
.search-bar:focus-within { border-color: var(--primary); }
.search-bar input {
    flex: 1;
    padding: 10px 18px;
    border: none;
    outline: none;
    font-size: .95rem;
    background: transparent;
}
.search-bar button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: background .2s;
}
.search-bar button:hover { background: var(--primary-dark); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-icon {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--secondary);
    font-size: 1.15rem;
    transition: background .2s;
}
.btn-icon:hover { background: var(--bg); color: var(--primary); }

/* ── Badge revendeur ─────────────────────────────── */
.revendeur-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white; font-size: .75rem; cursor: default;
}
.badge-revendeur {
    position: absolute; top: 8px; left: 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white; font-size: .65rem; font-weight: 700;
    padding: 2px 7px; border-radius: 5px; z-index: 3;
}
.prix-revendeur {
    color: var(--success); font-weight: 700;
}
.prix-revendeur::before {
    content: '→ '; font-weight: 400;
}
.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--primary);
    color: white;
    font-size: .65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Nav ---- */
.main-nav {
    background: var(--secondary);
    position: relative;
    display: flex;
    align-items: stretch;
}

/* Zone de défilement sans scrollbar visible */
.nav-scroll-wrapper {
    flex: 1;
    overflow-x: auto;
    scroll-behavior: smooth;
    /* Cacher la scrollbar sur tous les navigateurs */
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE / Edge */
}
.nav-scroll-wrapper::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    width: max-content; /* Empêche le retour à la ligne */
}
.nav-list li a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    color: rgba(255,255,255,.85);
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background .2s, color .2s;
}
.nav-list li a:hover,
.nav-list li a.active { background: var(--primary); color: white; }
.badge-cat {
    background: rgba(255,255,255,.18);
    font-size: .7rem;
    padding: 1px 7px;
    border-radius: 50px;
    font-weight: 600;
}

/* Flèches de navigation */
.nav-arrow {
    flex-shrink: 0;
    width: 36px;
    background: var(--secondary);
    border: none;
    color: rgba(255,255,255,.6);
    cursor: pointer;
    font-size: .8rem;
    transition: color .2s, background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}
.nav-arrow.visible {
    opacity: 1;
    pointer-events: auto;
}
.nav-arrow:hover { color: white; background: rgba(255,255,255,.08); }
.nav-arrow-left  { border-right: 1px solid rgba(255,255,255,.08); }
.nav-arrow-right { border-left:  1px solid rgba(255,255,255,.08); }
.nav-toggle { display: none; }

/* ---- Flash ---- */
.flash {
    padding: 12px 0;
    font-size: .9rem;
    font-weight: 500;
}
.flash .container {
    display: flex;
    align-items: center;
    gap: 10px;
}
.flash button { margin-left: auto; background: none; border: none; cursor: pointer; font-size: 1.2rem; line-height: 1; }
.flash-success { background: #d1fae5; color: #065f46; }
.flash-error   { background: #fee2e2; color: #991b1b; }

/* ---- Main ---- */
.site-main { min-height: 70vh; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .2s;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: white; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-white { background: white; color: var(--primary); border-color: white; }
.btn-white:hover { background: var(--bg); }
.btn-danger-outline { background: transparent; color: var(--error); border-color: var(--error); }
.btn-danger-outline:hover { background: var(--error); color: white; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }
.btn-xl { padding: 15px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Hero ---- */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #2d2d55 100%);
    color: white;
    padding: 60px 0;
    overflow: hidden;
}
.hero-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
}
.hero-badge {
    display: inline-block;
    background: rgba(232,93,4,.2);
    color: var(--accent);
    font-size: .8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 16px;
    border: 1px solid rgba(247,127,0,.3);
}
.hero-text h1 {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}
.hero-text h1 span { color: var(--primary); }
.hero-text p { color: rgba(255,255,255,.75); font-size: 1.05rem; margin-bottom: 28px; max-width: 520px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-img-box {
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--primary);
}

/* ---- Advantages ---- */
.advantages { background: white; padding: 20px 0; border-bottom: 1px solid var(--border); }
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.advantage-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.advantage-item > i {
    font-size: 1.6rem;
    color: var(--primary);
    width: 40px;
    text-align: center;
}
.advantage-item strong { display: block; font-size: .9rem; }
.advantage-item span { font-size: .8rem; color: var(--text-light); }

/* ---- Sections ---- */
.section { padding: 50px 0; }
.bg-light { background: var(--bg); }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.section-header h2 { font-size: 1.6rem; color: var(--secondary); }
.link-all { font-size: .9rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }

/* ---- Categories Grid ---- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.cat-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: all .2s;
    border: 2px solid transparent;
    color: var(--text);
}
.cat-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: var(--primary);
}
.cat-icon {
    width: 56px;
    height: 56px;
    background: rgba(232,93,4,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary);
    margin: 0 auto 12px;
}
.cat-nom { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 4px; }
.cat-count { font-size: .75rem; color: var(--text-light); }

/* ---- Products Grid ---- */
.products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
.products-content {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow: hidden;
}
.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow .25s ease;
    position: relative;
    min-width: 0;
    max-width: 100%;
    word-wrap: break-word;
    width: calc(25% - 15px);
    flex-shrink: 0;
}
.product-card:hover {
    /* inset simule une bordure orange SANS changer les dimensions */
    box-shadow: 0 8px 28px rgba(0,0,0,.13),
                inset 0 0 0 2px var(--primary);
}
.badge-stock {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 1;
}
.badge-stock.out { background: var(--error); color: white; }
.badge-stock.low { background: var(--warning); color: white; }
.product-img-link {
    display: block;
    height: 180px;
    overflow: hidden;
    background: #f9f9f9;
}
.product-img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
    max-width: 100%;
}
.product-card:hover .product-img-link img { transform: scale(1.05); }
.product-info { padding: 14px; }
.product-cat { font-size: .72rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.product-nom {
    font-size: .9rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 4px 0 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-nom:hover { color: var(--primary); }
.product-ref { font-size: .75rem; color: var(--text-light); display: block; margin-bottom: 10px; }
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}
.product-price { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.btn-add-cart {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: .9rem;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-add-cart:hover { background: var(--primary-dark); }
.btn-add-cart.disabled { background: var(--border); color: var(--text-light); cursor: default; }

/* ---- Promo Banner ---- */
.promo-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 40px 0;
}
.promo-content {
    display: flex;
    align-items: center;
    gap: 24px;
}
.promo-content > i { font-size: 2.5rem; }
.promo-content h3 { font-size: 1.3rem; font-weight: 700; }
.promo-content p { opacity: .9; font-size: .95rem; }
.promo-content .btn-white { margin-left: auto; }

/* ---- Footer ---- */
.site-footer { background: var(--secondary); color: rgba(255,255,255,.8); padding: 50px 0 0; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 40px;
}
.footer-col h4 {
    color: white;
    font-size: .95rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-col p { font-size: .85rem; line-height: 1.7; margin-bottom: 8px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: rgba(255,255,255,.7); font-size: .85rem; transition: color .2s; }
.footer-col ul li a:hover { color: var(--primary); }
.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-links a {
    width: 36px; height: 36px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: .9rem;
    transition: background .2s;
}
.social-links a:hover { background: var(--primary); }
.payment-logos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pay-badge {
    background: rgba(255,255,255,.1);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: .78rem;
    display: flex;
    align-items: center;
    gap: 5px;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 16px 0;
    text-align: center;
    font-size: .8rem;
    color: rgba(255,255,255,.5);
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    padding: 14px 0;
    font-size: .82rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb i { font-size: .7rem; }

/* ---- Page Products ---- */
.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--secondary);
}
.products-layout { display: grid; grid-template-columns: 240px 1fr; gap: 30px; margin-top: 10px; }
.sidebar { position: sticky; top: 80px; align-self: start; }
.sidebar-block {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}
.sidebar-block h3 { font-size: 1rem; margin-bottom: 14px; color: var(--secondary); }
.cat-filter { list-style: none; }
.cat-filter li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--text);
    font-size: .875rem;
    transition: all .15s;
}
.cat-filter li a:hover, .cat-filter li a.active {
    background: rgba(232,93,4,.08);
    color: var(--primary);
    font-weight: 600;
}
.cat-filter li a span {
    background: var(--bg);
    padding: 1px 7px;
    border-radius: 50px;
    font-size: .72rem;
}

.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: .875rem;
}
.results-count strong { color: var(--secondary); }

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}
.pagination a {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .875rem;
    color: var(--text);
    transition: all .15s;
}
.pagination a.active, .pagination a:hover { background: var(--primary); border-color: var(--primary); color: white; }

/* ---- Product Detail ---- */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 20px 0 40px;
}
.product-gallery .main-image {
    border-radius: var(--radius);
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow);
}
.product-gallery .main-image img { width: 100%; height: 400px; object-fit: contain; padding: 20px; }
.product-cat-link a { font-size: .82rem; color: var(--primary); font-weight: 600; text-transform: uppercase; }
.product-detail-info h1 { font-size: 1.7rem; margin: 8px 0; color: var(--secondary); }
.detail-brand { font-size: .9rem; margin-bottom: 4px; }
.detail-brand a { color: var(--primary); text-decoration: none; font-weight: 600; }
.detail-brand a:hover { text-decoration: underline; }
.detail-ref { font-size: .85rem; color: var(--text-light); margin-bottom: 16px; }
.detail-price { font-size: 2rem; font-weight: 700; color: var(--primary); margin: 16px 0; }
.price-ttc { font-size: 1rem; font-weight: 400; color: var(--text-light); }
.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .875rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
    margin-bottom: 20px;
}
.stock-status.in-stock { background: #d1fae5; color: #065f46; }
.stock-status.out-stock { background: #fee2e2; color: #991b1b; }

.qty-wrapper { margin-bottom: 16px; }
.qty-wrapper label { font-size: .875rem; font-weight: 500; margin-bottom: 8px; display: block; }
.qty-control {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.qty-control button {
    width: 36px; height: 36px;
    background: var(--bg);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background .15s;
}
.qty-control button:hover { background: var(--border); }
.qty-control input {
    width: 60px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 1rem;
    font-weight: 600;
    height: 36px;
    outline: none;
}
.detail-btns { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.product-guarantees {
    display: flex;
    gap: 20px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: .82rem;
    color: var(--text-light);
}
.product-guarantees div { display: flex; align-items: center; gap: 6px; }
.product-guarantees i { color: var(--primary); }
.alert-stock {
    background: #fff7ed;
    color: #c05621;
    padding: 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.product-description {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}
.product-description h2 { margin-bottom: 16px; }
.desc-content { color: var(--text); line-height: 1.8; }

/* ---- Cart ---- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 30px; margin-top: 10px; }
.cart-item {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}
.cart-item-img { width: 80px; height: 80px; flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.cart-item-info { flex: 1; }
.cart-item-info h3 { font-size: .95rem; font-weight: 600; color: var(--secondary); margin-bottom: 4px; }
.cart-item-ref { font-size: .78rem; color: var(--text-light); display: block; }
.cart-item-price { font-size: .82rem; color: var(--text-light); margin-top: 4px; display: block; }
.cart-item-qty .qty-control { margin: 0; }
.cart-item-total { font-weight: 700; font-size: 1rem; color: var(--primary); min-width: 100px; text-align: right; }
.btn-remove {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    border-radius: 6px;
    transition: all .15s;
}
.btn-remove:hover { color: var(--error); background: #fee2e2; }
.cart-actions { display: flex; justify-content: space-between; margin-top: 16px; }
.cart-summary {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    align-self: start;
    position: sticky;
    top: 80px;
}
.cart-summary h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }
.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: .9rem;
    color: var(--text);
}
.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    border-top: 2px solid var(--border);
    padding-top: 14px;
    margin-top: 4px;
    margin-bottom: 20px;
    color: var(--secondary);
}
.free-shipping-bar { margin: 10px 0; }
.free-shipping-bar small { font-size: .78rem; color: var(--warning); font-weight: 500; display: block; margin-bottom: 6px; }
.free-shipping-bar .bar { background: var(--border); border-radius: 50px; height: 6px; }
.free-shipping-bar .bar div { background: var(--warning); height: 100%; border-radius: 50px; transition: width .3s; }
.secure-payment-icons { text-align: center; margin-top: 12px; font-size: .8rem; color: var(--text-light); }
.text-success { color: var(--success); font-weight: 600; }

/* ---- Checkout ---- */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 30px; margin-top: 10px; }
.form-section {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.form-section h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; color: var(--secondary); display: flex; align-items: center; gap: 10px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .875rem; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: .9rem;
    font-family: inherit;
    transition: border-color .2s;
    background: white;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,93,4,.1); }
.form-group.has-error input,
.form-group.has-error select { border-color: var(--error); }
.form-group .error { display: block; color: var(--error); font-size: .78rem; margin-top: 4px; }
.payment-methods { display: flex; flex-direction: column; gap: 12px; }
.payment-method { cursor: pointer; }
.payment-method input { display: none; }
.pm-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    transition: border-color .2s;
}
.payment-method.selected .pm-content { border-color: var(--primary); background: rgba(232,93,4,.03); }
.pm-logo {
    width: 44px; height: 44px;
    background: rgba(232,93,4,.1);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: var(--primary);
}
.pm-content strong { display: block; font-size: .9rem; }
.pm-content small { color: var(--text-light); font-size: .78rem; }
.pm-secure { margin-left: auto; color: var(--success); }
.checkout-disclaimer { text-align: center; margin-top: 12px; font-size: .78rem; color: var(--text-light); }
.order-summary {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    align-self: start;
    position: sticky;
    top: 80px;
}
.order-summary h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 16px; }
.summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.summary-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.si-info { flex: 1; }
.si-info span { font-size: .875rem; font-weight: 500; display: block; }
.si-info small { color: var(--text-light); font-size: .78rem; }
.si-info strong { font-size: .875rem; }
.summary-divider { border-top: 1px solid var(--border); margin: 14px 0; }

/* ---- Confirmation ---- */
.confirmation-page {
    max-width: 600px;
    margin: 50px auto;
    text-align: center;
}
.confirm-icon { font-size: 5rem; margin-bottom: 20px; }
.confirm-icon.success { color: var(--success); }
.confirm-icon.warning { color: var(--warning); }
.confirm-icon.error { color: var(--error); }
.confirmation-page h1 { font-size: 1.8rem; margin-bottom: 10px; }
.confirm-subtitle { color: var(--text-light); font-size: 1.05rem; margin-bottom: 30px; }
.order-details-box {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    text-align: left;
    margin-bottom: 24px;
}
.order-details-box h3 { margin-bottom: 16px; }
.od-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: .9rem;
}
.od-row:last-child { border-bottom: none; }
.status-badge {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 600;
}
.status-payee { background: #d1fae5; color: #065f46; }
.status-en_attente { background: #fef3c7; color: #92400e; }
.status-en_preparation { background: #dbeafe; color: #1e40af; }
.status-expediee { background: #ede9fe; color: #5b21b6; }
.status-livree { background: #d1fae5; color: #065f46; }
.status-annulee { background: #fee2e2; color: #991b1b; }
.confirm-email { color: var(--text-light); font-size: .9rem; margin-bottom: 24px; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}
.empty-state i { font-size: 4rem; margin-bottom: 16px; opacity: .4; }
.empty-state h3 { font-size: 1.3rem; color: var(--secondary); margin-bottom: 8px; }
.empty-state p { margin-bottom: 24px; }

/* ---- Alerts ---- */
.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 16px; font-size: .9rem; font-weight: 500; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: #d1fae5; color: #065f46; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .products-grid .product-card { width: calc(33.33% - 14px); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }
    .search-bar { order: 3; flex: 0 0 100%; max-width: 100%; }
    .hero-content { grid-template-columns: 1fr; }
    .hero-image { display: none; }
    .hero-text h1 { font-size: 1.7rem; }
    .advantages-grid { grid-template-columns: 1fr 1fr; }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .products-grid .product-card { width: calc(50% - 10px); }
    .products-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .product-detail { grid-template-columns: 1fr; }
    .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
    .cart-summary, .order-summary { position: static; }
    .form-row { grid-template-columns: 1fr; }
    /* Sur mobile, on garde le défilement horizontal normal */
    .nav-arrow { display: none !important; }
    .nav-scroll-wrapper { overflow-x: auto; scrollbar-width: none; }
    .nav-scroll-wrapper::-webkit-scrollbar { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .promo-content { flex-direction: column; text-align: center; }
    .promo-content .btn-white { margin-left: 0; }
}

@media (max-width: 480px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid { gap: 12px; }
    .products-grid .product-card { width: calc(50% - 6px); }
    .product-img-link { height: 140px; }
}

/* ---- Cart Sidebar ---- */
.cart-sidebar-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}
.cart-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0; right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100%;
    background: white;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,.15);
}
.cart-sidebar.active {
    transform: translateX(0);
}

.cart-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.cart-sidebar-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.cart-sidebar-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all .15s;
}
.cart-sidebar-close:hover {
    background: var(--bg);
    color: var(--error);
}

.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-sidebar-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}
.cart-sidebar-empty i {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: .4;
}
.cart-sidebar-empty p {
    margin-bottom: 16px;
    font-size: .95rem;
}

.cart-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    animation: slideIn .3s ease;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
.cart-sidebar-item:last-child {
    border-bottom: none;
}

.cart-sidebar-item-img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}
.cart-sidebar-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.cart-sidebar-item-info {
    flex: 1;
    min-width: 0;
}
.cart-sidebar-item-info h4 {
    font-size: .85rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cart-sidebar-item-price {
    font-size: .75rem;
    color: var(--text-light);
}

.cart-sidebar-item-qty .qty-control {
    margin: 0;
}
.qty-sm .qty-control button {
    width: 28px;
    height: 28px;
    font-size: .9rem;
}
.qty-sm .qty-control input,
.qty-sm .qty-control span {
    width: 36px;
    height: 28px;
    font-size: .85rem;
}

.cart-sidebar-item-total {
    font-weight: 700;
    font-size: .9rem;
    color: var(--primary);
    min-width: 80px;
    text-align: right;
    flex-shrink: 0;
}

.cart-sidebar-remove {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: .85rem;
    padding: 6px;
    border-radius: 6px;
    transition: all .15s;
    flex-shrink: 0;
}
.cart-sidebar-remove:hover {
    color: var(--error);
    background: #fee2e2;
}

.cart-sidebar-summary {
    border-top: 2px solid var(--border);
    padding-top: 16px;
    margin-top: 16px;
}
.cart-sidebar-summary .summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: .875rem;
}
.cart-sidebar-summary .summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.05rem;
    font-weight: 700;
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 10px;
    margin-bottom: 16px;
    color: var(--secondary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: .85rem;
}

/* Cart bounce animation */
.cart-badge.bounce {
    animation: cartBounce .4s ease;
}
@keyframes cartBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.4); }
    60% { transform: scale(.9); }
    100% { transform: scale(1); }
}

/* Add to cart button animation */
.btn-add-cart.added {
    background: var(--success) !important;
    animation: addPop .4s ease;
}
.btn-add-cart.added i::before {
    content: "\f00c";
}
@keyframes addPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Fly-to-cart animation */
.fly-to-cart {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    z-index: 9999;
    pointer-events: none;
    opacity: .9;
    transition: all .6s cubic-bezier(.25,.46,.45,.94);
}
.fly-to-cart.done {
    opacity: 0;
    transform: scale(.2);
}

/* Responsive cart sidebar */
@media (max-width: 480px) {
    .cart-sidebar {
        width: 100vw;
        max-width: 100vw;
    }
    .cart-sidebar-item-total {
        min-width: 60px;
        font-size: .8rem;
    }
}


/* ── Wishlist / Favoris ───────────────────────────────────────── */
.btn-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.9);
    color: #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.btn-wishlist:hover { color: #e85d04; transform: scale(1.1); }
.btn-wishlist.active { color: #e85d04; }
.btn-wishlist.active i { font-weight: 900; }
.product-card { position: relative; }

.wishlist-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--primary);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}
.btn-icon { position: relative; }

/* ── Recherche autocomplete ───────────────────────────────────── */
.search-wrapper { position: relative; flex: 1; max-width: 560px; }
.search-wrapper .search-bar { max-width: 100%; }
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 200;
    max-height: 420px;
    overflow-y: auto;
    display: none;
}
.autocomplete-results.active { display: block; }
.ac-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background .15s;
    border-bottom: 1px solid var(--border);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.highlighted { background: #fff5eb; }
.ac-item img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 6px;
    background: #f8f9fa;
    flex-shrink: 0;
}
.ac-item-info { flex: 1; min-width: 0; }
.ac-item-info .ac-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-item-info .ac-ref {
    font-size: .75rem;
    color: var(--text-light);
}
.ac-item .ac-price {
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    font-size: .9rem;
}
.ac-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: .85rem;
}
.ac-loading {
    padding: 16px;
    text-align: center;
}
.ac-loading i { color: var(--primary); font-size: 1.2rem; }

/* ── Filtres avancés ──────────────────────────────────────────── */
.sort-select { margin-left: auto; }
.sort-select select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .85rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E") no-repeat right 10px center;
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    color: var(--text);
}
.sort-select select:focus { border-color: var(--primary); outline: none; }

.price-inputs { display: flex; align-items: flex-end; gap: 8px; }
.price-field { flex: 1; }
.price-field label { display: block; font-size: .75rem; color: var(--text-light); margin-bottom: 2px; }
.price-field input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .85rem;
    font-family: inherit;
}
.price-field input:focus { border-color: var(--primary); outline: none; }
.price-sep { padding-bottom: 8px; color: var(--text-light); font-size: .85rem; }
.btn-block { width: 100%; }

/* ── Pages statiques ──────────────────────────────────────────── */
.page-static { padding: 30px 0 60px; }
.static-content { max-width: 860px; margin: 0 auto; }
.static-content h1 { font-size: 1.8rem; margin-bottom: 30px; color: var(--secondary); }
.static-content h2 { font-size: 1.2rem; margin: 30px 0 12px; color: var(--secondary); }
.static-content p { margin-bottom: 10px; line-height: 1.8; }
.static-content ul { margin: 10px 0 20px 20px; }
.static-content ul li { margin-bottom: 6px; line-height: 1.7; }

.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin: 20px 0; }
.value-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}
.value-card i { font-size: 2rem; color: var(--primary); margin-bottom: 10px; }
.value-card h3 { font-size: 1rem; margin-bottom: 6px; }
.value-card p { font-size: .85rem; color: var(--text-light); margin: 0; }

.contact-grid { display: grid; gap: 40px; }
.contact-info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.contact-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}
.contact-card i { font-size: 1.6rem; color: var(--primary); margin-bottom: 8px; }
.contact-card h3 { font-size: .95rem; margin-bottom: 4px; }
.contact-card p { font-weight: 600; color: var(--secondary); margin: 0; }
.contact-card small { color: var(--text-light); font-size: .8rem; }

.contact-form { max-width: 600px; }
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.form-group input, .form-group textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: .9rem; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); outline: none; }

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: .9rem; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert i { margin-right: 8px; }

/* ── Page d'accueil breadcrumb fix ────────────────────────────── */
.breadcrumb { padding: 16px 0; font-size: .85rem; color: var(--text-light); }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb i { font-size: .65rem; margin: 0 8px; vertical-align: middle; }
.breadcrumb span { color: var(--text); }

.page-header { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.page-header h1 { margin: 0; font-size: 1.5rem; }

/* ── Catégories Avancées (carte avec image de fond) ─────────── */
.categories-grid-advanced {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.cat-card-advanced {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 220px;
    display: flex;
    align-items: flex-end;
    color: white;
    text-decoration: none;
    transition: transform .3s, box-shadow .3s;
    box-shadow: var(--shadow);
}
.cat-card-advanced:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    color: white;
}
.cat-card-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
}
.cat-card-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: .3;
    transition: opacity .3s, transform .3s;
}
.cat-card-advanced:hover .cat-card-bg img {
    opacity: .4;
    transform: scale(1.08);
}
.cat-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.1) 100%);
    z-index: 1;
}
.cat-card-info {
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
}
.cat-card-info i {
    font-size: 1.4rem;
    margin-bottom: 6px;
    display: block;
}
.cat-card-info .cat-nom {
    font-size: 1.05rem;
    font-weight: 700;
    display: block;
}
.cat-card-info .cat-count {
    font-size: .8rem;
    opacity: .8;
}

/* ── Badge Vedette ────────────────────────────────────────────── */
.badge-vedette {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #78350f;
    font-size: .65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(245,158,11,.3);
}
.badge-vedette i { font-size: .6rem; }

/* ── Image Zoom (produit) ─────────────────────────────────────── */
.product-gallery { position: relative; }
.product-gallery .main-image {
    position: relative;
    cursor: crosshair;
    overflow: hidden;
}
.product-gallery .main-image img {
    transition: transform .2s;
    width: 100%;
    height: 400px;
    object-fit: contain;
    padding: 20px;
}
.product-gallery .main-image.zoomed img {
    transform: scale(2);
    cursor: zoom-out;
}
.zoom-lens {
    position: absolute;
    border: 2px solid var(--primary);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(232,93,4,.08);
    pointer-events: none;
    display: none;
    z-index: 5;
}
.product-gallery .main-image.zoom-active .zoom-lens {
    display: block;
}

/* ── Galerie multi-images ─────────────────────────────────────── */
.thumbnails-grid {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.thumbnail-item {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--border);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color .2s;
}
.thumbnail-item:hover,
.thumbnail-item.active {
    border-color: var(--primary);
}

/* ── Lightbox ─────────────────────────────────────── */
.img-expand-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,.5);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    font-size: .9rem;
    opacity: 0;
    transition: opacity .2s;
}
.product-gallery .main-image:hover .img-expand-btn {
    opacity: 1;
}
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.lb-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    cursor: default;
}
.lb-close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    transition: background .2s;
}
.lb-close:hover { background: rgba(255,255,255,.2); }
.lb-prev, .lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 16px;
    background: rgba(255,255,255,.08);
    border-radius: 8px;
    transition: background .2s;
    user-select: none;
}
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.15); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.6);
    font-size: .85rem;
    background: rgba(0,0,0,.4);
    padding: 4px 12px;
    border-radius: 20px;
}
.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Skeleton Loading ─────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 6px;
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.skeleton-img {
    height: 180px;
    width: 100%;
}
.skeleton-text {
    padding: 14px;
}
.skeleton-line {
    height: 12px;
    margin-bottom: 8px;
    width: 70%;
}
.skeleton-line.short { width: 40%; }
.skeleton-line.long { width: 90%; }
.skeleton-price {
    height: 16px;
    width: 50px;
    margin-top: 10px;
}

/* ── Suivi de commande (visual progress) ──────────────────────── */
.order-tracking {
    max-width: 700px;
    margin: 30px auto;
    padding: 0 20px;
}
.tracking-header {
    text-align: center;
    margin-bottom: 40px;
}
.tracking-header h1 { font-size: 1.5rem; margin-bottom: 6px; }
.tracking-header p { color: var(--text-light); font-size: .9rem; }
.tracking-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 40px;
}
.tracking-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 30px;
    right: 30px;
    height: 3px;
    background: var(--border);
    z-index: 0;
}
.tracking-steps::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 30px;
    height: 3px;
    background: var(--primary);
    z-index: 0;
    transition: width .5s;
}
.tracking-step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}
.tracking-step .step-dot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--border);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: .9rem;
    transition: all .3s;
}
.tracking-step.done .step-dot {
    background: var(--success);
}
.tracking-step.active .step-dot {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(232,93,4,.2);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0% { box-shadow: 0 0 0 0 rgba(232,93,4,.4); }
    70% { box-shadow: 0 0 0 10px rgba(232,93,4,0); }
    100% { box-shadow: 0 0 0 0 rgba(232,93,4,0); }
}
.tracking-step .step-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-light);
    display: block;
}
.tracking-step.done .step-label { color: var(--success); }
.tracking-step.active .step-label { color: var(--primary); }
.tracking-step .step-date {
    font-size: .7rem;
    color: #9ca3af;
    display: block;
    margin-top: 2px;
}
.tracking-info {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-top: 20px;
}
.tracking-info h3 { font-size: 1rem; margin-bottom: 12px; }
.tracking-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: .875rem;
}
.tracking-info-row:last-child { border-bottom: none; }

/* ── Mobile Filters Toggle ────────────────────────────────────── */
.filter-toggle-btn {
    display: none;
    width: 100%;
    padding: 10px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    margin-bottom: 16px;
    transition: all .15s;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.filter-toggle-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-toggle-btn i { transition: transform .3s; }
.filter-toggle-btn.open i { transform: rotate(180deg); }

@media (max-width: 768px) {
    .filter-toggle-btn { display: flex; }
    .sidebar { display: none; }
    .sidebar.mobile-open { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 300; overflow-y: auto; padding: 20px; background: var(--bg); }
    .sidebar.mobile-open .sidebar-block:first-child { margin-top: 40px; }
    .sidebar-close-btn {
        display: flex;
        position: fixed;
        top: 10px; right: 10px;
        z-index: 301;
        width: 36px; height: 36px;
        background: var(--error);
        color: white;
        border: none;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1.1rem;
    }
    .categories-grid-advanced { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cat-card-advanced { height: 160px; }
}

@media (max-width: 480px) {
    .categories-grid-advanced { grid-template-columns: 1fr 1fr; gap: 10px; }
    .cat-card-advanced { height: 140px; }
}

/* ── Per-page selector ────────────────────────────────────────── */
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}
.per-page-select {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--text-light);
}
.per-page-select label { white-space: nowrap; }
.per-page-select select {
    padding: 6px 28px 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .82rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E") no-repeat right 8px center;
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    color: var(--text);
}
.per-page-select select:focus { border-color: var(--primary); outline: none; }

/* ── Pagination intelligente ──────────────────────────────────── */
.pagination .page-nav {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .8rem;
    color: var(--text);
    transition: all .15s;
    text-decoration: none;
}
.pagination .page-nav:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }
.pagination .page-dots {
    display: flex; align-items: center; justify-content: center;
    width: 30px;
    font-size: .9rem;
    color: var(--text-light);
    user-select: none;
}

@media (max-width: 768px) {
    .toolbar-right { flex-wrap: wrap; gap: 8px; }
    .per-page-select label { display: none; }
}

/* ── WhatsApp Floating Button ────────────────────────────────── */
.wa-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 16px rgba(37, 211, 102, .4);
    z-index: 999;
    transition: all .25s;
    text-decoration: none;
}
.wa-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, .5);
    color: white;
}
.wa-float::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #25d366;
    animation: wa-pulse 2s infinite;
}
@keyframes wa-pulse {
    0% { transform: scale(1); opacity: .6; }
    70% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* ── Badge Promo ──────────────────────────────────────────────── */
.badge-promo {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: linear-gradient(135deg, var(--error), #f87171);
    color: white;
    font-size: .7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(239,68,68,.3);
}
.product-price-wrap { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.product-price-barre {
    font-size: .82rem;
    color: var(--text-light);
    text-decoration: line-through;
}

/* ── Marque dans la card ──────────────────────────────────────── */
.product-brand {
    font-size: .72rem;
    color: var(--text-light);
    font-weight: 500;
    display: block;
    margin-top: 1px;
}
.product-brand a {
    color: var(--text-light);
    text-decoration: none;
}
.product-brand a:hover {
    color: var(--primary);
    text-decoration: underline;
}
.product-brand::before { content: '🏷️ '; }

/* ── Section Avis ─────────────────────────────────────────────── */
.reviews-section {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.reviews-summary {
    display: flex;
    align-items: center;
    gap: 16px;
}
.reviews-summary .avg-note {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
}
.reviews-summary .avg-stars { color: #f59e0b; font-size: 1.1rem; }
.reviews-summary .avg-count { font-size: .85rem; color: var(--text-light); }
.review-card {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.review-card:last-child { border-bottom: none; }
.review-author {
    font-weight: 600;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.review-author .stars { color: #f59e0b; font-size: .85rem; }
.review-date { font-size: .78rem; color: var(--text-light); }
.review-text { font-size: .875rem; line-height: 1.6; margin-top: 6px; color: var(--text); }

.review-form { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.review-form h3 { font-size: 1rem; margin-bottom: 16px; }
.rating-select { display: flex; gap: 4px; margin-bottom: 12px; font-size: 1.4rem; }
.rating-select i { cursor: pointer; color: #d1d5db; transition: color .15s; }
.rating-select i.active, .rating-select i:hover { color: #f59e0b; }

/* ── Code promo input ─────────────────────────────────────────── */
.coupon-input-group {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}
.coupon-input-group input {
    flex: 1;
    padding: 9px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: .9rem;
    text-transform: uppercase;
    font-family: monospace;
}
.coupon-input-group input:focus { outline: none; border-color: var(--primary); }
.coupon-input-group .btn { flex-shrink: 0; }
.coupon-msg {
    font-size: .82rem;
    font-weight: 500;
    margin-top: 6px;
}
.coupon-msg.success { color: var(--success); }
.coupon-msg.error { color: var(--error); }

/* ── Brand filter on products page ────────────────────────────── */
.brand-filter { margin-top: 16px; }
.brand-filter h4 { font-size: .85rem; margin-bottom: 8px; color: var(--text-light); }
.brand-items { max-height: 180px; overflow-y: auto; }
.brand-items a {
    display: block;
    padding: 5px 10px;
    font-size: .82rem;
    color: var(--text);
    border-radius: 4px;
    transition: all .15s;
    text-decoration: none;
}
.brand-items a:hover, .brand-items a.active { background: rgba(232,93,4,.08); color: var(--primary); font-weight: 600; }
