/* ============================================
   BOUTIQUE STAG SÉCURITÉ V5
   Responsive, bien proportionné, lisible
   ============================================ */

:root {
    --shop-primary: #343a40;
    --shop-primary-light: #495057;
    --shop-primary-dark: #212529;
    --shop-secondary: #c0392b;
    --shop-accent: #c0392b;
    --shop-text: #2c3e50;
    --shop-text-light: #6c757d;
    --shop-bg: #fdfcfa;
    --shop-bg-warm: #faf9f7;
    --shop-bg-card: #ffffff;
    --shop-white: #ffffff;
    --shop-beige: #f0ebe3;
    --shop-beige-light: #f5f3f0;
    --shop-border: #e0dbd5;
    --shop-border-light: #ebe7e2;
    --shop-success: #28a745;
    --shop-font: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --shop-radius: 6px;
    --shop-shadow: 0 1px 6px rgba(0,0,0,0.06);
    --shop-shadow-hover: 0 4px 16px rgba(0,0,0,0.10);
    --shop-max-width: 1400px;
}

* { box-sizing: border-box; }

body.shop-body {
    font-family: var(--shop-font);
    background-color: var(--shop-bg);
    color: var(--shop-text);
    margin: 0; padding: 0;
    line-height: 1.5; font-size: 14px;
}

a { color: var(--shop-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--shop-primary-light); }
img { max-width: 100%; height: auto; }

.container { max-width: var(--shop-max-width); margin: 0 auto; padding: 0 15px; width: 100%; }

/* ========== TOP BAR ========== */
.shop-topbar {
    background: linear-gradient(135deg, var(--shop-primary-dark), var(--shop-primary));
    color: #fff; padding: 4px 0; font-size: 10px;
    position: relative; z-index: 1001;
}
.shop-topbar .container {
    display: flex; justify-content: center; align-items: center;
    text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ========== HEADER ========== */
.shop-header {
    background: var(--shop-white); box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 1px solid var(--shop-border-light);
}
.shop-header .container { max-width: var(--shop-max-width); margin: 0 auto; padding: 0 15px; }
.shop-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 0; gap: 10px; min-height: 40px;
}
.shop-header-brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.shop-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.shop-logo img { height: 48px; width: auto; }

/* Search */
.shop-search { flex: 1; max-width: 380px; margin: 0 10px; position: relative; }
.shop-search input {
    width: 100%; padding: 6px 36px 6px 14px;
    border: 1px solid var(--shop-border); border-radius: 20px;
    font-size: 13px; outline: none; background: var(--shop-bg-warm); font-family: var(--shop-font);
    transition: border-color 0.2s;
}
.shop-search input:focus { border-color: var(--shop-primary); background: #fff; }
.shop-search button {
    position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
    background: var(--shop-primary); color: #fff; border: none;
    width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.shop-search-results {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    border: 1px solid var(--shop-border); border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow); max-height: 300px; overflow-y: auto;
    z-index: 1002; display: none; margin-top: 2px;
}
.shop-search-results.active { display: block; }
.shop-search-result-item { display: flex; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--shop-border-light); cursor: pointer; }
.shop-search-result-item:hover { background: var(--shop-bg-warm); }
.shop-search-result-item img { width: 32px; height: 32px; object-fit: contain; margin-right: 8px; background: var(--shop-bg-warm); border-radius: 3px; }
.shop-search-result-info { flex: 1; }
.shop-search-result-info .name { font-weight: 600; font-size: 11px; }
.shop-search-result-info .ref { font-size: 9px; color: var(--shop-text-light); }
.shop-search-result-info .price { font-weight: 700; color: var(--shop-secondary); }

/* Header actions */
.shop-header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.shop-header-action { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--shop-text); font-size: 9px; position: relative; }
.shop-header-action:hover { color: var(--shop-primary); }
.shop-header-action i { font-size: 16px; margin-bottom: 1px; }
.shop-cart-badge { position: absolute; top: -4px; right: -6px; background: var(--shop-secondary); color: #fff; font-size: 8px; font-weight: 700; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* ========== NAVIGATION ========== */
.shop-nav { background: var(--shop-primary); position: sticky; top: 40px; z-index: 999; }
.shop-nav .container { max-width: var(--shop-max-width); margin: 0 auto; padding: 0 15px; position: relative; }
.shop-nav-menu { display: flex; list-style: none; margin: 0; padding: 0; }
.shop-nav-item { position: relative; }
.shop-nav-item > a { display: flex; align-items: center; gap: 4px; padding: 8px 12px; color: rgba(255,255,255,0.9); text-decoration: none; font-weight: 500; font-size: 12px; transition: all 0.2s; white-space: nowrap; }
.shop-nav-item > a:hover, .shop-nav-item.active > a { background: rgba(255,255,255,0.1); color: #fff; }
.shop-nav-item > a .nav-icon { font-size: 13px; opacity: 0.8; }
.shop-nav-dropdown { position: absolute; top: 100%; left: 0; background: #fff; min-width: 200px; box-shadow: var(--shop-shadow-hover); border-radius: 0 0 var(--shop-radius) var(--shop-radius); opacity: 0; visibility: hidden; transform: translateY(3px); transition: all 0.2s; z-index: 1000; padding: 4px 0; }
.shop-nav-item:hover > .shop-nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.shop-nav-dropdown a { display: flex; justify-content: space-between; align-items: center; padding: 7px 14px; color: var(--shop-text); font-size: 12px; }
.shop-nav-dropdown a:hover { background: var(--shop-bg-warm); color: var(--shop-primary); }
.shop-nav-dropdown a .count { background: var(--shop-bg-warm); padding: 1px 6px; border-radius: 10px; font-size: 9px; color: var(--shop-text-light); }
.shop-nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; padding: 8px 12px; }

/* ========== HERO ========== */
.shop-hero { position: relative; overflow: hidden; background: var(--shop-primary-dark); max-height: 300px; }
.shop-hero-slide { position: relative; display: none; animation: fadeIn 0.6s ease; }
.shop-hero-slide.active { display: block; }
.shop-hero-slide img { width: 100%; height: 240px; object-fit: cover; }
.shop-hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(15,37,64,0.7), rgba(26,58,92,0.4)); display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; }
.shop-hero-content { max-width: 550px; padding: 15px; }
.shop-hero-content h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.shop-hero-content p { font-size: 13px; margin-bottom: 12px; opacity: 0.9; }
.shop-hero-btn { display: inline-block; background: var(--shop-secondary); color: #fff; padding: 8px 20px; border-radius: 20px; font-weight: 600; font-size: 12px; }
.shop-hero-btn:hover { background: #a93226; color: #fff; }
.shop-hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.2); color: #fff; border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 14px; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; }
.shop-hero-arrow:hover { background: rgba(255,255,255,0.35); }
.shop-hero-arrow.prev { left: 10px; }
.shop-hero-arrow.next { right: 10px; }
.shop-hero-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; z-index: 10; }
.shop-hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); border: none; cursor: pointer; }
.shop-hero-dot.active { background: #fff; width: 20px; border-radius: 4px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ========== SECTIONS ========== */
.shop-section { padding: 15px 0; }
.shop-section-title { text-align: center; margin-bottom: 12px; }
.shop-section-title h2 { font-size: 18px; font-weight: 700; color: var(--shop-primary); margin: 0 0 3px; }
.shop-section-title p { font-size: 12px; color: var(--shop-text-light); margin: 0; }
.shop-section-title .underline { width: 35px; height: 2px; background: var(--shop-secondary); margin: 5px auto 0; border-radius: 1px; }

/* ========== CATEGORY CARDS ========== */
.shop-categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shop-category-card { background: var(--shop-white); border-radius: var(--shop-radius); overflow: hidden; box-shadow: var(--shop-shadow); transition: all 0.2s; text-decoration: none; color: var(--shop-text); }
.shop-category-card:hover { transform: translateY(-2px); box-shadow: var(--shop-shadow-hover); }
.shop-category-card-icon { height: 55px; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; }
.shop-category-card-icon.cat-intrusion { background: linear-gradient(135deg, #c0392b, #a93226); }
.shop-category-card-icon.cat-video { background: linear-gradient(135deg, #343a40, #495057); }
.shop-category-card-icon.cat-incendie { background: linear-gradient(135deg, #e67e22, #d35400); }
.shop-category-card-icon.cat-access { background: linear-gradient(135deg, #27ae60, #229954); }
.shop-category-card-icon.cat-domotique { background: linear-gradient(135deg, #8e44ad, #7d3c98); }
.shop-category-card-icon.cat-default { background: linear-gradient(135deg, var(--shop-primary), var(--shop-primary-light)); }
.shop-category-card-body { padding: 8px; text-align: center; }
.shop-category-card-body h3 { font-size: 12px; font-weight: 600; margin: 0 0 2px; }
.shop-category-card-body .product-count { font-size: 10px; color: var(--shop-text-light); }

/* ========== PRODUCT CARDS — PROPORTIONNÉS ========== */
.shop-products-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.shop-product-card { background: var(--shop-white); border-radius: var(--shop-radius); overflow: hidden; box-shadow: var(--shop-shadow); transition: all 0.2s; display: flex; flex-direction: column; }
.shop-product-card:hover { transform: translateY(-2px); box-shadow: var(--shop-shadow-hover); }
.shop-product-card-image {
    position: relative; height: 140px;
    display: flex; align-items: center; justify-content: center;
    background: var(--shop-bg-card); overflow: hidden; padding: 8px;
}
.shop-product-card-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.shop-product-card-image img {
    width: 100%; height: 100%;
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s;
    padding: 5px;
}
.shop-product-card:hover .shop-product-card-image img { transform: scale(1.03); }
.shop-product-card-badge { position: absolute; top: 4px; left: 4px; padding: 2px 6px; border-radius: 3px; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.shop-product-card-badge.new { background: var(--shop-primary); color: #fff; }
.shop-product-card-badge.promo { background: var(--shop-secondary); color: #fff; }
.shop-product-card-body { padding: 8px 10px; flex: 1; display: flex; flex-direction: column; }
.shop-product-card-body .category { font-size: 9px; color: var(--shop-primary); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 2px; }
.shop-product-card-body .name { font-size: 12px; font-weight: 600; color: var(--shop-text); margin-bottom: 2px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-decoration: none; }
.shop-product-card-body .name:hover { color: var(--shop-primary); }
.shop-product-card-body .ref { font-size: 9px; color: var(--shop-text-light); margin-bottom: 2px; }
.shop-product-card-body .short-desc { font-size: 10px; color: var(--shop-text-light); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-product-card-footer { padding: 6px 10px; border-top: 1px solid var(--shop-border-light); display: flex; justify-content: space-between; align-items: center; }
.shop-product-card-price { display: flex; flex-direction: column; }
.shop-product-card-price .current { font-size: 14px; font-weight: 700; color: var(--shop-secondary); }
.shop-product-card-price .old { font-size: 11px; color: #999; text-decoration: line-through; }
.shop-product-card-price .tva { font-size: 8px; color: var(--shop-text-light); }
.shop-add-cart-btn { background: var(--shop-primary); color: #fff; border: none; width: 30px; height: 30px; border-radius: 50%; font-size: 12px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.shop-add-cart-btn:hover { background: var(--shop-primary-light); transform: scale(1.1); }

/* ========== CAROUSEL ========== */
.shop-carousel { display: flex; overflow-x: auto; scroll-behavior: smooth; gap: 10px; padding: 6px 0; scrollbar-width: none; }
.shop-carousel::-webkit-scrollbar { display: none; }
.shop-carousel .shop-product-card { min-width: 200px; max-width: 200px; flex-shrink: 0; }

/* ========== CATALOG LAYOUT ========== */
.shop-catalog-layout { display: flex; gap: 15px; padding: 8px 0; align-items: flex-start; }
.shop-catalog-sidebar { width: 220px; flex-shrink: 0; }
.shop-catalog-main { flex: 1; min-width: 0; }
.shop-sidebar-toggle { display: none; align-items: center; gap: 5px; background: var(--shop-primary); color: #fff; border: none; padding: 8px 14px; border-radius: var(--shop-radius); font-size: 12px; font-weight: 600; cursor: pointer; margin-bottom: 10px; font-family: var(--shop-font); }
.shop-filter-panel { background: var(--shop-white); border-radius: var(--shop-radius); box-shadow: var(--shop-shadow); padding: 10px; position: sticky; top: 85px; }
.shop-filter-group { margin-bottom: 5px; padding-bottom: 5px; border-bottom: 1px solid var(--shop-border-light); }
.shop-filter-group:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.shop-filter-group h4 { font-size: 12px; font-weight: 700; color: var(--shop-primary); margin: 0 0 4px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 4px 4px; border-radius: 3px; user-select: none; }
.shop-filter-group h4:hover { background: var(--shop-bg-warm); }
.shop-filter-group h4 i { transition: transform 0.2s; font-size: 9px; }
.shop-filter-group.collapsed h4 i { transform: rotate(-90deg); }
.shop-filter-group.collapsed .shop-filter-options { display: none; }
.shop-filter-category-item { display: flex; align-items: center; gap: 4px; padding: 3px 4px; font-size: 12px; color: var(--shop-text); cursor: pointer; border-radius: 3px; }
.shop-filter-category-item:hover { background: var(--shop-bg-warm); }
.shop-filter-category-item.active { color: var(--shop-secondary); font-weight: 600; }
.shop-filter-category-item .count { margin-left: auto; background: var(--shop-bg-warm); padding: 1px 6px; border-radius: 8px; font-size: 9px; color: var(--shop-text-light); }
.shop-filter-category-toggle { cursor: pointer; font-size: 8px; color: var(--shop-text-light); width: 12px; text-align: center; }
.shop-filter-subcategories { display: none; padding-left: 14px; }
.shop-filter-subcategories.open { display: block; }
.shop-filter-subcategories a { display: flex; align-items: center; gap: 4px; padding: 2px 6px; font-size: 11px; color: var(--shop-text-light); text-decoration: none; border-radius: 3px; }
.shop-filter-subcategories a:hover { color: var(--shop-primary); background: var(--shop-bg-warm); }
.shop-filter-subcategories a.active { color: var(--shop-secondary); font-weight: 600; }
.shop-filter-subcategories a .count { margin-left: auto; background: var(--shop-bg-warm); padding: 1px 4px; border-radius: 8px; font-size: 8px; color: var(--shop-text-light); }
.shop-filter-options a, .shop-filter-options label { display: flex; align-items: center; gap: 5px; padding: 3px 4px; font-size: 12px; color: var(--shop-text); cursor: pointer; }

/* Toolbar */
.shop-catalog-toolbar { display: flex; justify-content: space-between; align-items: center; background: var(--shop-white); padding: 6px 12px; border-radius: var(--shop-radius); box-shadow: var(--shop-shadow); margin-bottom: 10px; flex-wrap: wrap; gap: 5px; }
.shop-catalog-toolbar .results-count { font-size: 12px; color: var(--shop-text-light); }

/* Pagination */
.shop-pagination { display: flex; justify-content: center; align-items: center; gap: 3px; margin-top: 12px; }
.shop-pagination a, .shop-pagination span { display: flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; border-radius: 5px; font-size: 12px; font-weight: 500; text-decoration: none; border: 1px solid var(--shop-border-light); color: var(--shop-text); background: var(--shop-white); padding: 0 5px; }
.shop-pagination a:hover { background: var(--shop-bg-warm); border-color: var(--shop-primary); }
.shop-pagination .active { background: var(--shop-primary); color: #fff; border-color: var(--shop-primary); }

/* ========== PRODUCT DETAIL ========== */
.shop-product-detail { padding: 12px 0; }
.shop-product-gallery { background: var(--shop-white); border-radius: var(--shop-radius); box-shadow: var(--shop-shadow); padding: 12px; display: flex; align-items: center; justify-content: center; min-height: 200px; }
.shop-product-gallery img { max-height: 300px; max-width: 100%; width: auto; height: auto; object-fit: contain; display: block; margin: 0 auto; }
.shop-product-info { padding: 0 6px; }
.shop-product-info h1 { font-size: 18px; font-weight: 700; color: var(--shop-primary-dark); margin: 0 0 5px; line-height: 1.2; }
.shop-product-info .ref { font-size: 12px; color: var(--shop-text-light); margin-bottom: 6px; }
.shop-product-info .manufacturer { font-size: 12px; color: var(--shop-primary); margin-bottom: 6px; font-weight: 600; }
.shop-product-info .stock-status { display: none !important; }
.shop-product-price-box { background: var(--shop-bg-warm); border-radius: var(--shop-radius); padding: 10px; margin-bottom: 10px; }
.shop-product-price-box .current-price { font-size: 24px; font-weight: 700; color: var(--shop-secondary); }
.shop-product-price-box .old-price { font-size: 14px; color: #999; text-decoration: line-through; margin-left: 8px; }
.shop-product-price-box .tva-info { font-size: 10px; color: var(--shop-text-light); margin-top: 3px; }
.shop-product-description { margin-bottom: 10px; font-size: 13px; line-height: 1.5; }
.shop-quantity-selector { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.shop-quantity-selector label { font-weight: 600; font-size: 13px; }
.shop-quantity-controls { display: flex; align-items: center; border: 1px solid var(--shop-border); border-radius: 5px; overflow: hidden; }
.shop-quantity-controls button { width: 30px; height: 30px; border: none; background: var(--shop-bg-warm); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.shop-quantity-controls button:hover { background: var(--shop-border); }
.shop-quantity-controls input { width: 40px; height: 30px; border: none; text-align: center; font-size: 13px; font-weight: 600; outline: none; }
.shop-btn-add-cart { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; max-width: 320px; padding: 10px; background: var(--shop-primary); color: #fff; border: none; border-radius: var(--shop-radius); font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--shop-font); }
.shop-btn-add-cart:hover { background: var(--shop-primary-light); }
.shop-related-products { padding: 15px 0; }
.pdf-download-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--shop-secondary); color: #fff; padding: 7px 14px; border-radius: 5px; font-size: 12px; text-decoration: none; font-weight: 600; }
.pdf-download-btn:hover { background: #a93226; color: #fff; }

/* ========== FORM FIELDS ========== */
.wizard-form-group select,
.wizard-form-group input,
.wizard-form-group textarea {
    width: 100% !important;
    max-width: 100%;
    padding: 7px 12px !important;
    border: 1px solid var(--shop-border) !important;
    border-radius: 5px !important;
    font-size: 13px !important;
    outline: none !important;
    font-family: var(--shop-font) !important;
    background: var(--shop-bg-warm) !important;
    height: auto !important;
    line-height: 1.4 !important;
    min-height: 0 !important;
}
.wizard-form-group select:focus,
.wizard-form-group input:focus {
    border-color: var(--shop-primary) !important;
    background: #fff !important;
}

/* ========== CALCULATOR ========== */
.calculateur-container {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px;
    align-items: start; max-width: 100%; padding: 5px 0;
}
.calculateur-panel {
    background: var(--shop-white); border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow); padding: 15px;
}
.calculateur-panel + .calculateur-panel { position: sticky; top: 85px; }
.calculateur-panel h3 { font-size: 14px; color: var(--shop-primary); margin: 0 0 10px; }
.calculateur-result {
    background: linear-gradient(135deg, var(--shop-primary-dark), var(--shop-primary));
    color: #fff; border-radius: 6px; padding: 15px; text-align: center; margin-top: 10px;
}
.calculateur-result .value { font-size: 24px; font-weight: 800; margin: 3px 0; }
.calculateur-result .label { font-size: 10px; opacity: 0.8; }
.calc-buttons { display: flex; gap: 8px; margin-top: 10px; }
.calc-buttons .shop-hero-btn { flex: 1; text-align: center; font-size: 12px; padding: 8px 14px; }

/* ========== WIZARD ========== */
.wizard-container {
    background: var(--shop-white); border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow); overflow: hidden; max-height: 75vh;
    display: flex; flex-direction: column;
}
.wizard-steps {
    display: flex; align-items: center; justify-content: center;
    background: var(--shop-bg-warm); padding: 8px 15px;
    border-bottom: 1px solid var(--shop-border-light); flex-shrink: 0;
}
.wizard-step {
    display: flex; align-items: center; gap: 4px; padding: 3px 8px;
    font-size: 10px; color: var(--shop-text-light); cursor: pointer;
}
.wizard-step-circle {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--shop-border-light); color: var(--shop-text-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; font-weight: 700; flex-shrink: 0;
}
.wizard-step.active { color: var(--shop-primary); font-weight: 600; }
.wizard-step.active .wizard-step-circle { background: var(--shop-primary); color: #fff; }
.wizard-step.completed .wizard-step-circle { background: var(--shop-success); color: #fff; }
.wizard-panels-wrapper { flex: 1; overflow-y: auto; position: relative; min-height: 0; }
.wizard-panel { display: none; padding: 15px; }
.wizard-panel.active { display: block; }
.wizard-panel h3 {
    font-size: 15px; color: var(--shop-primary); margin: 0 0 10px;
    padding-bottom: 6px; border-bottom: 1px solid var(--shop-border-light);
}
.wizard-form-group { margin-bottom: 10px; }
.wizard-form-group label { display: block; font-weight: 600; margin-bottom: 2px; font-size: 11px; color: var(--shop-text); }
.wizard-form-group .form-hint { font-size: 10px; color: var(--shop-text-light); margin-top: 2px; }
.wizard-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wizard-actions {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 15px; border-top: 1px solid var(--shop-border-light);
    background: var(--shop-bg-warm); flex-shrink: 0;
}
.wizard-btn {
    padding: 8px 18px; border-radius: 5px; font-size: 12px;
    font-weight: 600; cursor: pointer; border: none; font-family: var(--shop-font);
    transition: all 0.2s; text-decoration: none;
}
.wizard-btn-prev { background: var(--shop-border-light); color: var(--shop-text); }
.wizard-btn-next { background: var(--shop-primary); color: #fff; }
.wizard-btn-submit { background: var(--shop-secondary); color: #fff; }

/* ========== CART PAGE ========== */
.shop-cart-page h1 { font-size: 18px !important; }
.shop-cart-table { background: var(--shop-white); border-radius: var(--shop-radius); box-shadow: var(--shop-shadow); overflow: hidden; }
.shop-cart-header { display: none; }
.shop-cart-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid var(--shop-border-light); }
.shop-cart-item-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.shop-cart-item-info img { width: 60px; height: 60px; object-fit: contain; border-radius: 4px; background: var(--shop-bg-warm); flex-shrink: 0; }
.shop-cart-item-info .name { font-size: 12px; font-weight: 600; display: block; }
.shop-cart-item-info .ref { font-size: 10px; color: var(--shop-text-light); }
.shop-cart-item .price { font-size: 13px; font-weight: 600; white-space: nowrap; }
.shop-cart-remove { background: none; border: none; color: var(--shop-text-light); cursor: pointer; font-size: 13px; padding: 4px; }
.shop-cart-remove:hover { color: var(--shop-secondary); }
.shop-cart-summary { background: var(--shop-white); border-radius: var(--shop-radius); box-shadow: var(--shop-shadow); padding: 15px; }
.shop-cart-summary h3 { font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.shop-cart-summary-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: var(--shop-text-light); }
.shop-cart-summary-row.total { font-size: 15px; font-weight: 700; color: var(--shop-text); border-top: 1px solid var(--shop-border-light); padding-top: 8px; margin-top: 6px; }
.shop-btn-checkout {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; padding: 10px; margin-top: 10px;
    background: var(--shop-primary); color: #fff; border-radius: var(--shop-radius);
    font-size: 13px; font-weight: 600; text-decoration: none;
}
.shop-btn-checkout:hover { background: var(--shop-primary-light); color: #fff; }

/* ========== FOOTER ========== */
.shop-footer { background: var(--shop-primary-dark); color: rgba(255,255,255,0.8); padding-top: 20px; }
.shop-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 16px; padding-bottom: 16px; }
.shop-footer-about img { height: 40px; margin-bottom: 6px; }
.shop-footer-about p { font-size: 11px; line-height: 1.5; margin-bottom: 6px; }
.shop-footer h4 { color: #fff; font-size: 12px; font-weight: 600; margin-bottom: 8px; padding-bottom: 4px; position: relative; }
.shop-footer h4::after { content: ''; position: absolute; bottom: 0; left: 0; width: 20px; height: 2px; background: var(--shop-secondary); }
.shop-footer-links { list-style: none; padding: 0; margin: 0; }
.shop-footer-links li { margin-bottom: 3px; }
.shop-footer-links a { color: rgba(255,255,255,0.7); font-size: 11px; }
.shop-footer-links a:hover { color: #fff; }
.shop-footer-contact p { font-size: 11px; margin-bottom: 3px; display: flex; align-items: center; gap: 5px; }
.shop-footer-contact i { width: 12px; color: var(--shop-secondary); font-size: 11px; }
.shop-footer-social { display: flex; gap: 5px; margin-top: 8px; }
.shop-footer-social a { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }
.shop-footer-social a:hover { background: var(--shop-secondary); }
.shop-footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 8px 0; text-align: center; font-size: 10px; }

/* ========== MISC ========== */
.shop-empty-state { text-align: center; padding: 25px 15px; }
.shop-empty-state i { font-size: 32px; color: var(--shop-border); margin-bottom: 8px; }
.shop-no-image { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--shop-bg-warm); color: var(--shop-text-light); font-size: 12px; }
.shop-toast { position: fixed; bottom: 15px; right: 15px; background: #fff; border-radius: var(--shop-radius); box-shadow: 0 4px 20px rgba(0,0,0,0.15); padding: 10px 15px; display: flex; align-items: center; gap: 6px; z-index: 9999; transform: translateY(120%); opacity: 0; transition: all 0.3s; max-width: 300px; font-size: 13px; }
.shop-toast.show { transform: translateY(0); opacity: 1; }
.shop-toast.success { border-left: 3px solid var(--shop-success); }
.shop-toast.error { border-left: 3px solid var(--shop-secondary); }

/* Filter inputs */
.shop-filter-options input[type="number"] { width: 100% !important; padding: 6px 8px !important; border: 1px solid var(--shop-border) !important; border-radius: 5px !important; font-size: 12px !important; background: var(--shop-bg-warm) !important; font-family: var(--shop-font) !important; }
.shop-catalog-toolbar select { padding: 6px 10px !important; border: 1px solid var(--shop-border) !important; border-radius: 5px !important; font-size: 12px !important; background: #fff !important; font-family: var(--shop-font) !important; max-width: 140px !important; }

/* Ensure all images contained */
.shop-product-card-image img,
.shop-product-gallery img,
.shop-search-result-item img,
.shop-cart-item-info img { object-fit: contain !important; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .shop-search { max-width: 300px; }
}

@media (max-width: 1024px) {
    .shop-catalog-layout { flex-direction: column; }
    .shop-catalog-sidebar { width: 100%; }
    .shop-filter-panel { position: static; }
    .shop-footer-grid { grid-template-columns: 1fr 1fr; }
    .calculateur-container { grid-template-columns: 1fr; }
    .calculateur-panel + .calculateur-panel { position: static; }
}

@media (max-width: 768px) {
    .shop-nav-toggle { display: block; }
    .shop-nav-menu { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--shop-primary); z-index: 999; }
    .shop-nav-menu.open { display: flex; }
    .shop-nav-dropdown { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; background: rgba(0,0,0,0.1); }
    .shop-nav-item.open > .shop-nav-dropdown { display: block; }
    .shop-search { display: none; }
    .shop-mobile-search { display: block !important; padding: 6px 15px; background: var(--shop-bg-warm); }
    .shop-mobile-search input { width: 100%; padding: 6px 12px; border: 1px solid var(--shop-border); border-radius: 18px; font-size: 13px; background: #fff; font-family: var(--shop-font); }
    .shop-sidebar-toggle { display: flex; }
    .shop-header-inner { flex-wrap: wrap; }
    .shop-products-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
    .shop-product-card-image { height: 120px; }
    .shop-footer-grid { grid-template-columns: 1fr; }
    .wizard-form-row { grid-template-columns: 1fr; }
    .shop-categories-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
    .shop-category-card-icon { height: 45px; font-size: 22px; }
    .calc-buttons { flex-direction: column; }
    .wizard-container { max-height: 70vh; }
    .shop-logo img { height: 40px; }
    .shop-section-title h2 { font-size: 16px; }
}

@media (max-width: 480px) {
    .shop-products-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .shop-product-card-image { height: 100px; }
    .shop-product-card-body .name { font-size: 11px; }
    .shop-header-actions { gap: 8px; }
    .shop-header-action span { display: none; }
    .wizard-step span { display: none; }
    .calculateur-container { grid-template-columns: 1fr; }
}

.shop-mobile-search { display: none; }


/* ========== RESPONSIVE BREAKPOINTS ========== */

@media (max-width: 992px) {
    .shop-products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .shop-catalog-layout { flex-direction: column; }
    .shop-catalog-sidebar { width: 100%; position: static; }
    .shop-sidebar-toggle { display: flex; }
    #catalogSidebar { display: none; }
    #catalogSidebar.open { display: block; }
    .shop-nav-menu { flex-wrap: wrap; justify-content: center; }
    .shop-nav-item > a { padding: 6px 8px; font-size: 11px; }
    .calculateur-container { grid-template-columns: 1fr; }
    .shop-product-detail .row { flex-direction: column; }
    .shop-product-detail .col-lg-5, .shop-product-detail .col-md-6 { width: 100%; }
}



/* ========== PRODUCT CARD IMAGE FIX ========== */
.shop-product-card-image {
    background: var(--shop-bg-warm);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative;
}


/* ========== FOOTER SLOGAN ========== */
.shop-footer-slogan {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px 0;
    gap: 4px;
}
.shop-footer-slogan .slogan-line1 {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.shop-footer-slogan .slogan-line2 {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}
.shop-footer-slogan .slogan-line3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--shop-secondary);
}

/* ========== FOOTER BOTTOM LINKS ========== */
.shop-footer-bottom {
    padding: 10px 0;
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}
.shop-footer-bottom .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.shop-footer-bottom-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}
.shop-footer-bottom-links a {
    color: rgba(255,255,255,0.7);
    font-size: 10px;
    text-decoration: none;
}
.shop-footer-bottom-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ========== TOGGLE SIDEBAR ========== */


/* ========== REGISTER / LOGIN PAGES — Containerized ========== */
.shop-section .container {
    /* Removed 1000px limit - using var --shop-max-width */
    /* max-width: 1000px; */
    margin: 0 auto;
    padding: 0 20px;
}

/* Two-column layout for register/login with ad space */
.shop-auth-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
    padding: 20px 0;
}
.shop-auth-form {
    background: var(--shop-white);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    padding: 25px;
    max-width: 100%;
    overflow: hidden;
}
.shop-auth-ad {
    background: var(--shop-white);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    padding: 15px;
    min-height: 300px;
    position: sticky;
    top: 100px;
}
.shop-auth-ad img {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 10px;
}


/* Form inputs — never touch screen edges */
.shop-auth-form input,
.shop-auth-form select,
.shop-auth-form textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid var(--shop-border) !important;
    border-radius: 5px !important;
    font-size: 14px !important;
    font-family: var(--shop-font) !important;
    outline: none !important;
    background: var(--shop-bg-warm) !important;
    height: auto !important;
    line-height: 1.4 !important;
}
.shop-auth-form input:focus,
.shop-auth-form select:focus {
    border-color: var(--shop-primary) !important;
    background: #fff !important;
}
.shop-auth-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--shop-text);
}
.shop-auth-form .form-group {
    margin-bottom: 15px;
}

/* ========== CATALOG — Fix images inside containers ========== */
.shop-product-card {
    background: var(--shop-white);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 100%;
}
.shop-product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shop-shadow-hover);
}
.shop-product-card-image {
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--shop-bg-warm);
    position: relative;
}
.shop-product-card-image a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}
.shop-product-card-image a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}
.shop-product-card-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    padding: 5px !important;
}
.shop-product-card-body {
    padding: 8px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.shop-product-card-body .name {
    font-size: 12px;
    font-weight: 600;
    color: var(--shop-text);
    margin-bottom: 3px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.shop-product-card-body .ref {
    font-size: 10px;
    color: var(--shop-text-light);
    margin-bottom: 4px;
}
.shop-product-card-body .desc {
    font-size: 10px;
    color: var(--shop-text-light);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.shop-product-card-footer {
    padding: 6px 10px;
    border-top: 1px solid var(--shop-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}
.shop-product-card-footer .price {
    font-size: 14px;
    font-weight: 700;
    color: var(--shop-secondary);
}
.shop-product-card-footer .cart-btn {
    background: var(--shop-primary);
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: background 0.2s;
}
.shop-product-card-footer .cart-btn:hover {
    background: var(--shop-secondary);
}
.shop-product-card-footer .pdf-btn {
    color: var(--shop-secondary);
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
}
.shop-product-card-footer .actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== WIZARD — Better proportions ========== */
.wizard-container {
    max-width: 800px !important;
    margin: 0 auto;
    background: var(--shop-white);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    overflow: hidden;
}
.wizard-form-group input,
.wizard-form-group select,
.wizard-form-group textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid var(--shop-border) !important;
    border-radius: 5px !important;
    font-size: 14px !important;
    height: auto !important;
    line-height: 1.4 !important;
}

/* ========== CATALOG CARD BUTTONS — Ensure visible ========== */
.shop-add-cart-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--shop-primary);
    color: #fff !important;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.shop-add-cart-btn:hover {
    background: var(--shop-secondary) !important;
}
.shop-product-card-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    z-index: 2;
}
.shop-product-card-badge.new { background: var(--shop-success); }
.shop-product-card-badge.promo { background: var(--shop-secondary); }

/* Ensure cards never exceed grid cell */
.shop-products-grid .shop-product-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

@media (max-width: 576px) {
    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

/* ========== CHECKOUT PAGE ========== */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 25px;
    align-items: start;
    padding: 10px 0;
}
.checkout-form {
    background: var(--shop-white);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    padding: 25px;
}
.checkout-form h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--shop-primary);
    margin: 0 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--shop-border-light);
}
.checkout-form .form-group {
    margin-bottom: 12px;
}
.checkout-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--shop-text);
}
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid var(--shop-border) !important;
    border-radius: 5px !important;
    font-size: 14px !important;
    font-family: var(--shop-font) !important;
    outline: none !important;
    background: var(--shop-bg-warm) !important;
    height: auto !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
}
.checkout-form input:focus,
.checkout-form textarea:focus {
    border-color: var(--shop-primary) !important;
    background: #fff !important;
}
.checkout-order-summary {
    background: var(--shop-white);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    padding: 20px;
    position: sticky;
    top: 100px;
}
.checkout-order-summary img {
    max-width: 50px;
    max-height: 50px;
    object-fit: contain !important;
}
.shop-alert {
    padding: 10px 14px;
    border-radius: 5px;
    margin-bottom: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.shop-alert.info { background: #e8f4fd; color: #0d6efd; border: 1px solid #bde0fe; }
.shop-alert.error { background: #fde8e8; color: #dc3545; border: 1px solid #f5c2c7; }



/* ========== CART PAGE - Improved ========== */
.shop-cart-page {
    padding: 15px 0;
    max-width: 1200px;
    margin: 0 auto;
}
.shop-cart-page .container {
    max-width: 100% !important;
    padding: 0 15px;
}
.shop-cart-page h1 {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--shop-primary-dark) !important;
    margin-bottom: 15px !important;
}
.shop-cart-item-info img {
    width: 70px !important;
    height: 70px !important;
    object-fit: contain !important;
    border-radius: 4px;
    background: var(--shop-bg-warm);
    flex-shrink: 0;
}
.shop-cart-summary {
    background: var(--shop-white);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    padding: 20px;
}
.shop-cart-summary h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 12px;
}
.shop-cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 5px 0;
    color: var(--shop-text-light);
}
.shop-cart-summary-row.total {
    font-size: 17px;
    font-weight: 700;
    color: var(--shop-text);
    border-top: 1px solid var(--shop-border-light);
    padding-top: 10px;
    margin-top: 8px;
}

/* ========== ULTRA IMAGE CONTAINMENT ========== */
.shop-product-card-image a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}
.shop-product-card-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    padding: 5px !important;
}
.shop-product-gallery img,
.shop-cart-item-info img,
.checkout-order-summary img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
}
.shop-product-card-image {
    width: 100% !important;
    height: 140px !important;
    min-height: 100px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--shop-bg-warm) !important;
    position: relative !important;
    padding: 5px !important;
}

/* ========== WIZARD AD SPACE ========== */
.wizard-ad-container {
    background: var(--shop-white);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}
.wizard-ad-container img {
    max-width: 100%;
    border-radius: 4px;
    margin-bottom: 8px;
}
.wizard-ad-container h5 {
    font-size: 13px;
    color: var(--shop-primary);
    margin-bottom: 6px;
}
.wizard-ad-container p {
    font-size: 12px;
    color: var(--shop-text-light);
    line-height: 1.5;
}
.wizard-ad-container a {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 16px;
    background: var(--shop-secondary);
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

/* ========== REGISTER PAGE FIX ========== */
.shop-auth-layout {
    display: grid !important;
    grid-template-columns: 1fr 300px !important;
    gap: 20px !important;
    align-items: start !important;
    max-width: 1000px !important;
    margin: 0 auto !important;
    padding: 15px 0 !important;
}
.shop-auth-form {
    background: var(--shop-white) !important;
    border-radius: var(--shop-radius) !important;
    box-shadow: var(--shop-shadow) !important;
    padding: 25px !important;
    max-width: 100% !important;
    overflow: hidden !important;
    min-width: 0 !important;
}
.shop-auth-form .form-group {
    margin-bottom: 12px !important;
}
.shop-auth-ad {
    background: var(--shop-white) !important;
    border-radius: var(--shop-radius) !important;
    box-shadow: var(--shop-shadow) !important;
    padding: 15px !important;
    min-height: 200px !important;
    position: sticky !important;
    top: 100px !important;
}

