/* =============================================
   DEWEAGROPAST – BOUTIQUE MODERNE
   ============================================= */

.shop-page { background: var(--bg-light); }

/* En-tête boutique — bannière boutique.png */
.shop-page .page-hero-compact .page-hero-visual {
    flex: 0 0 min(46%, 440px);
    max-width: 440px;
}
.shop-page .page-hero-compact .page-hero-visual img {
    object-fit: contain;
    object-position: center;
    background: #fff;
    aspect-ratio: auto;
    max-height: 280px;
    min-height: 200px;
}

.shop-toolbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 72px;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.shop-toolbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}
.shop-results-count {
    font-size: 0.88rem;
    color: var(--text-gray);
    font-weight: 500;
}
.shop-results-count strong { color: var(--primary-dark); }

.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    padding: 32px 0 60px;
    align-items: start;
}
.shop-sidebar {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    position: sticky;
    top: 140px;
}
.shop-sidebar h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
}
.shop-cat-list { list-style: none; padding: 0; margin: 0 0 20px; }
.shop-cat-list li { margin-bottom: 6px; }
.shop-cat-btn {
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.shop-cat-btn:hover,
.shop-cat-btn.active {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    font-weight: 600;
}
.shop-cat-btn .cat-count {
    font-size: 0.75rem;
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 20px;
}
.shop-cat-btn.active .cat-count {
    background: rgba(26,107,60,0.15);
    color: var(--primary);
}

.shop-promo-card {
    background: linear-gradient(135deg, var(--dark-green), #1a6b3c);
    border-radius: var(--radius-lg);
    padding: 18px;
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.5;
}
.shop-promo-card i { color: #34d399; font-size: 1.2rem; margin-bottom: 8px; display: block; }

.shop-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.shop-product-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.shop-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(26,107,60,0.12);
    border-color: rgba(26,107,60,0.25);
}
.spc-img-wrap {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--bg-light);
}
.spc-img-zoom-btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    position: relative;
    line-height: 0;
}
.spc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.spc-img-zoom-hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    color: #fff;
    font-size: 1.1rem;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.spc-img-zoom-btn:hover .spc-img-zoom-hint,
.spc-img-zoom-btn:focus-visible .spc-img-zoom-hint { opacity: 1; }
.shop-product-card:hover .spc-img-wrap img { transform: scale(1.06); }
.spc-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,0.95);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
}
.spc-stock {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(26,107,60,0.9);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
}
.spc-stock.low { background: rgba(245,158,11,0.95); }

.spc-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.spc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.spc-category {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
}
.spc-rating { color: #fbbf24; font-size: 0.75rem; }
.spc-body h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}
.spc-body p {
    font-size: 0.82rem;
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 14px;
    flex: 1;
}
.spc-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 16px;
}
.spc-price {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-dark);
}
.spc-unit { font-size: 0.78rem; color: var(--text-muted); }

.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-light);
}
.qty-control .qty-input {
    width: 44px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    -moz-appearance: textfield;
}
.qty-control .qty-input::-webkit-outer-spin-button,
.qty-control .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.spc-qty-btn,
.qty-control button {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}
.spc-qty-btn:hover,
.qty-control button:hover { background: var(--primary-ultra-light); color: var(--primary); }

.spc-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.btn-add-cart {
    flex: 1;
    min-width: 140px;
    padding: 11px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(26,107,60,0.3);
}
.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26,107,60,0.4);
}

.shop-trust-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}
.shop-trust-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    transition: var(--transition);
}
.shop-trust-item:hover { border-color: var(--primary); }
.shop-trust-item i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 8px;
}
.shop-trust-item strong {
    display: block;
    font-size: 0.88rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}
.shop-trust-item span { font-size: 0.78rem; color: var(--text-gray); }

body.dark-mode .shop-product-card,
body.dark-mode .shop-sidebar,
body.dark-mode .shop-trust-item { background: #1f2937; }
body.dark-mode .shop-toolbar { background: #1f2937; }

@media (max-width: 992px) {
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { position: static; }
    .shop-trust-bar { grid-template-columns: repeat(2, 1fr); }
    .shop-toolbar { top: 64px; }
    .shop-toolbar-inner { flex-direction: column; align-items: stretch; }
    .shop-results-count { text-align: center; }
}
@media (max-width: 768px) {
    .shop-products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .spc-actions { flex-direction: column; }
    .spc-actions .btn-add-cart { width: 100%; min-width: 0; }
}
@media (max-width: 576px) {
    .shop-products-grid { grid-template-columns: 1fr; }
    .shop-trust-bar { grid-template-columns: 1fr; }
    .shop-toolbar { top: 60px; padding: 12px 0; }
    .shop-sidebar { padding: 18px; }
    .shop-layout { padding: 20px 0 48px; gap: 16px; }
}
