/* Page Produits : vitrine du matériel (imprimantes thermiques, caméras, POS) et panier WhatsApp. */

/* Liens de navigation */
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links > a { color: var(--muted); font-weight: 700; text-decoration: none; padding: 8px 10px; border-radius: 999px; font-size: .95rem; }
.nav-links > a:hover { color: var(--primary); }
.nav-links > a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }
@media (max-width: 480px) { .nav-links > a:first-child { display: none; } }
.cart-btn { gap: 6px; }
.cart-btn svg { width: 18px; height: 18px; }
.cart-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .8rem; display: grid; place-items: center; }

/* Héros */
.shop-hero { padding: 40px 0 8px; background: radial-gradient(1200px 500px at 85% -10%, var(--primary-soft), transparent 70%); }
@media (min-width: 900px) { .shop-hero { padding: 64px 0 16px; } }
.shop-hero .lead { margin-bottom: 18px; }

.catalog { padding-top: 32px; }
.icon-btn:focus-visible, .qty button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Grille de produits */
.products { display: grid; gap: 16px; margin-bottom: 20px; }
@media (min-width: 620px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .products { grid-template-columns: repeat(3, 1fr); } }
.product { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.product.featured { border-color: #4355b9; box-shadow: var(--shadow); }
.product-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.product h3 { margin-bottom: .4em; }
.cat-label { color: var(--primary); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 4px; }
.specs { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 4px; color: var(--muted); font-size: .93rem; }
.specs li { padding-left: 20px; position: relative; }
.specs li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }
@media (prefers-color-scheme: dark) { .specs li::before { color: #88d98d; } }
.buy { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-size: 1.45rem; font-weight: 800; }
.buy .btn { min-height: 44px; }
.buy .btn.added { background: var(--success); }

/* Photos produits : fond blanc comme les photos, cadrage sans déformation */
.art { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 12px; background: #fff; border-bottom: 1px solid var(--line); }
.art img { width: 100%; height: 100%; object-fit: contain; }
.badge { position: absolute; top: 12px; left: 12px; background: #1b1b21; color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }

.local-cta { margin-top: 28px; }

/* Panier */
.cart-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(10, 12, 30, .5); }
.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 31; width: min(420px, 100%);
  display: flex; flex-direction: column; background: var(--bg); box-shadow: -10px 0 40px rgba(0, 0, 0, .25);
  transform: translateX(105%); transition: transform .25s; visibility: hidden;
}
.cart.open { transform: none; visibility: visible; }
.cart:focus { outline: none; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: 1.3rem; margin: 0; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--primary-soft); }
.cart-items { list-style: none; margin: 0; padding: 8px 20px; overflow-y: auto; flex: 1; }
.cart-items li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-items li b { font-weight: 700; }
.cart-items .line-total { text-align: right; font-weight: 800; }
.cart-items .unit { color: var(--muted); font-size: .88rem; }
.cart-empty { padding: 24px 20px; margin: 0; flex: 1; }
.cart-empty[hidden] { display: none; }
.qty { display: inline-flex; align-items: center; gap: 4px; justify-self: end; }
.qty button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.qty button:hover { border-color: var(--primary); }
.qty span { min-width: 24px; text-align: center; font-weight: 700; }
.cart-foot.lead-form { border-radius: 24px 24px 0 0; box-shadow: 0 -6px 20px rgba(0, 0, 0, .08); padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); gap: 8px; }
.cart-foot input { min-height: 46px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.1rem; margin-bottom: 4px; }
.cart-total b { font-size: 1.4rem; }
body.cart-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .cart { transition: none; } }
.cart-foot[hidden] { display: none; }
