/* ===== Shop-Xpress — Design e-commerce ===== */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #14181f;
  --muted: #5c6672;
  --line: #e4e7ec;
  --brand: #D71A21;
  --brand-dark: #b01218;
  --accent: #0e7c66;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 24, 31, .08);
  --maxw: 1200px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-family: 'Sora', sans-serif; font-weight: 800; font-size: 15px;
  box-shadow: 0 3px 10px rgba(215, 26, 33, .35);
}
.logo-text { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 19px; letter-spacing: .3px; }
.logo-text em { font-style: normal; color: var(--brand); }
.main-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; font-weight: 500; font-size: 14.5px; }
.main-nav > a { color: var(--ink); padding: 6px 2px; border-bottom: 2px solid transparent; }
.main-nav > a:hover { color: var(--brand); border-color: var(--brand); }
.nav-cats { position: relative; }
.nav-cats > span { cursor: pointer; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav-cats:hover > span { color: var(--brand); border-color: var(--brand); }
.nav-cats-drop {
  position: absolute; top: 100%; left: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  min-width: 210px; padding: 8px; display: none; flex-direction: column; gap: 2px;
}
.nav-cats:hover .nav-cats-drop { display: flex; }
.nav-cats-drop a { padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.nav-cats-drop a:hover { background: #f1f2f5; color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.btn-account { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.btn-account:hover { border-color: var(--brand); color: var(--brand); }
.cart-btn {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--ink); color: #fff; border: none; cursor: pointer;
}
.cart-btn:hover { background: var(--brand); }
.cart-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--brand); color: #fff; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; display: none; align-items: center; justify-content: center;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #14181f 0%, #232a35 55%, #2e1c1e 100%);
  color: #fff; padding: 72px 0 64px; text-align: center;
}
.hero h1 { font-family: 'Sora', sans-serif; font-size: clamp(30px, 5vw, 46px); font-weight: 800; line-height: 1.15; margin-bottom: 14px; }
.hero h1 span { color: #ff6b70; }
.hero p { color: #c7ccd6; max-width: 640px; margin: 0 auto 30px; font-size: 16.5px; }
.hero-badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-badge { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); padding: 8px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500; }

/* ===== Section produits ===== */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; }
.section-head h2 { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 700; }
.section-head a { color: var(--brand); font-weight: 600; font-size: 14.5px; }
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.card-product {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
}
.card-product:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-product-img { aspect-ratio: 1/1; overflow: hidden; background: #f1f2f5; position: relative; }
.card-product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card-product:hover .card-product-img img { transform: scale(1.05); }
.card-badge {
  position: absolute; top: 12px; left: 12px; background: var(--brand); color: #fff;
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.card-product-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-product-cat { font-size: 11.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-weight: 600; }
.card-product-title { font-weight: 600; font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 41px; }
.card-product-title:hover { color: var(--brand); }
.card-product-price { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.price { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 18px; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 13.5px; }
.btn-add {
  margin-top: 12px; width: 100%; padding: 11px; border: none; border-radius: 10px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .15s ease;
}
.btn-add:hover { background: var(--brand); }

/* ===== Fiche produit ===== */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; padding: 48px 0; }
.product-gallery { position: sticky; top: 96px; }
.gallery-main { border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); }
.gallery-main img { width: 100%; aspect-ratio: 1/1; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 2px solid transparent; cursor: pointer; }
.gallery-thumbs img.active { border-color: var(--brand); }
.product-info h1 { font-family: 'Sora', sans-serif; font-size: clamp(22px, 3vw, 30px); line-height: 1.2; margin-bottom: 10px; }
.product-cat { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.product-cat a { color: var(--brand); font-weight: 600; }
.product-price-row { display: flex; align-items: center; gap: 14px; margin: 18px 0; }
.product-price-row .price { font-size: 30px; }
.product-price-row .price-old { font-size: 17px; }
.stock-badge { font-size: 13px; font-weight: 600; color: var(--accent); background: #e6f6f1; padding: 5px 12px; border-radius: 999px; }
.product-desc { color: var(--muted); margin-bottom: 24px; }
.buy-row { display: flex; gap: 14px; align-items: stretch; margin-bottom: 18px; }
.qty-selector { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.qty-selector button { width: 42px; height: 48px; border: none; background: none; font-size: 18px; cursor: pointer; color: var(--ink); }
.qty-selector span { min-width: 36px; text-align: center; font-weight: 600; }
.btn-buy {
  flex: 1; border: none; border-radius: 10px; background: var(--brand); color: #fff;
  font-size: 15.5px; font-weight: 700; cursor: pointer; transition: background .15s;
}
.btn-buy:hover { background: var(--brand-dark); }
.btn-buy:active { transform: scale(.99); }
.pay-icons { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12.5px; }
.pay-icons span { border: 1px solid var(--line); background: var(--surface); padding: 4px 10px; border-radius: 6px; font-weight: 600; font-size: 11.5px; }
.product-details { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 26px; }
.product-details h3 { font-family: 'Sora', sans-serif; margin-bottom: 12px; }
.product-details ul { padding-left: 20px; display: grid; gap: 6px; color: #2c333d; }
.product-details li { margin-bottom: 4px; }
.product-details p { margin-bottom: 10px; color: #2c333d; }

/* ===== Blog ===== */
.grid-blog { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.card-blog { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .18s, box-shadow .18s; }
.card-blog:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-blog-img { aspect-ratio: 16/9; overflow: hidden; background: #eee; }
.card-blog-img img { width: 100%; height: 100%; object-fit: cover; }
.card-blog-body { padding: 16px 18px 20px; }
.card-blog-date { font-size: 12px; color: var(--muted); }
.card-blog-title { font-weight: 600; font-size: 16px; margin: 6px 0 8px; line-height: 1.35; }
.card-blog-title:hover { color: var(--brand); }
.article-body { padding: 48px 0; max-width: 760px; margin: 0 auto; }
.article-body h1 { font-family: 'Sora', sans-serif; font-size: clamp(24px, 4vw, 34px); margin-bottom: 10px; }
.article-meta { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }
.article-body img { border-radius: var(--radius); margin: 18px 0; }
.article-body p { margin-bottom: 16px; color: #2c333d; font-size: 16px; }
.article-body h2 { font-family: 'Sora', sans-serif; margin: 26px 0 12px; font-size: 22px; }
.article-body h3 { font-family: 'Sora', sans-serif; margin: 20px 0 10px; font-size: 18px; }
.article-body ul, .article-body ol { padding-left: 22px; margin-bottom: 16px; }
.article-body li { margin-bottom: 6px; }

/* ===== Pages ===== */
.page-wrap { padding: 52px 0; max-width: 820px; margin: 0 auto; }
.page-wrap h1 { font-family: 'Sora', sans-serif; font-size: clamp(26px, 4vw, 36px); margin-bottom: 8px; }
.page-wrap h2 { font-family: 'Sora', sans-serif; font-size: 21px; margin: 28px 0 12px; }
.page-wrap h3 { font-size: 17px; margin: 20px 0 10px; }
.page-wrap p { margin-bottom: 14px; color: #2c333d; }
.page-wrap ul, .page-wrap ol { padding-left: 22px; margin-bottom: 14px; }
.page-wrap li { margin-bottom: 6px; color: #2c333d; }
.page-wrap a { color: var(--brand); text-decoration: underline; }
.page-intro { color: var(--muted); font-size: 17px; margin-bottom: 30px; }

/* ===== Catégories ===== */
.cat-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 40px 0; }
.cat-hero h1 { font-family: 'Sora', sans-serif; font-size: 30px; }
.cat-hero p { color: var(--muted); margin-top: 6px; }

/* ===== Footer ===== */
.site-footer { background: #14181f; color: #aeb4bf; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: 52px 24px 34px; }
.site-footer h4 { color: #fff; font-size: 14.5px; margin-bottom: 14px; font-family: 'Sora', sans-serif; }
.site-footer a { display: block; padding: 4px 0; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-tag { margin-top: 14px; font-size: 13.5px; line-height: 1.6; max-width: 300px; }
.footer-logo .logo-text { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; border-top: 1px solid #262d38; padding: 18px 24px; font-size: 12.5px; color: #7b828d; }

/* ===== Panier (drawer) ===== */
.cart-overlay { position: fixed; inset: 0; background: rgba(15, 18, 24, .5); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 90; }
.cart-overlay.show { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw);
  background: var(--surface); z-index: 100; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease; box-shadow: -10px 0 40px rgba(0,0,0,.12);
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.cart-drawer-head h2 { font-family: 'Sora', sans-serif; font-size: 18px; }
.cart-close { border: none; background: none; font-size: 18px; cursor: pointer; color: var(--muted); width: 34px; height: 34px; border-radius: 8px; }
.cart-close:hover { background: #f1f2f5; color: var(--ink); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 22px; display: flex; flex-direction: column; gap: 16px; }
.cart-empty { color: var(--muted); text-align: center; margin-top: 40px; }
.cart-item { display: flex; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title { font-weight: 600; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item-price { color: var(--muted); font-size: 12.5px; margin: 3px 0 6px; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.cart-item-qty button { width: 26px; height: 26px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; cursor: pointer; font-size: 14px; line-height: 1; }
.cart-item-qty button:hover { background: #f1f2f5; }
.cart-item-qty span { min-width: 20px; text-align: center; font-weight: 600; font-size: 13.5px; }
.cart-item-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.cart-item-right strong { font-size: 14px; }
.cart-item-remove { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.cart-item-remove:hover { color: var(--brand); }
.cart-drawer-foot { border-top: 1px solid var(--line); padding: 18px 22px 22px; }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.cart-total-row.small { font-weight: 400; color: var(--muted); font-size: 13px; }
.btn-checkout {
  width: 100%; margin-top: 12px; padding: 14px; border: none; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 15.5px; font-weight: 700; cursor: pointer;
}
.btn-checkout:hover { background: var(--brand-dark); }
.btn-checkout:disabled { background: #c9ccd2; cursor: not-allowed; }
.cart-secure { text-align: center; font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ===== Page panier (plein écran) ===== */
.cart-page { max-width: 820px; margin: 0 auto; padding: 52px 24px; }
.cart-page h1 { font-family: 'Sora', sans-serif; margin-bottom: 24px; }
.cart-page-item { display: grid; grid-template-columns: 90px 1fr auto; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px; }
.cart-page-item img { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; }
.cart-page-total { text-align: right; margin: 24px 0; font-size: 19px; font-weight: 700; }
.btn-checkout-lg { background: var(--brand); color: #fff; border: none; padding: 15px 34px; font-size: 16px; font-weight: 700; border-radius: 10px; cursor: pointer; }
.btn-checkout-lg:hover { background: var(--brand-dark); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; gap: 24px; }
  .product-gallery { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { gap: 14px; }
  .nav-cats { display: none; }
}
@media (max-width: 600px) {
  .main-nav a:nth-child(2), .main-nav a:nth-child(4) { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-inner { gap: 14px; }
  .logo-text { font-size: 16px; }
}
