/* ============================================================
   XFUEL v2 — Clean Sport Nutrition Store
   Design : Minimal Clean Athletic (inspired by Nutripure/Bulk)
   Fonts  : Syne (headings) · Plus Jakarta Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ── VARIABLES ────────────────────────────────────────────── */
:root {
  --bg:         #F7F7F5;
  --bg-2:       #FFFFFF;
  --surface:    #EFEFEC;
  --border:     #E2E2DE;
  --border-d:   #D0D0CA;
  --primary:    #FF4D00;
  --primary-d:  #D93E00;
  --primary-l:  #FF7040;
  --text:       #111110;
  --text-2:     #44443F;
  --text-3:     #888880;
  --text-4:     #BDBDB5;
  --success:    #1A7A4A;
  --success-bg: #EAF5EE;
  --tag-bg:     #EEEEE9;
  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 4px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.05);
  --transition: .18s cubic-bezier(.4,0,.2,1);
  --header-h:   64px;
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; }

/* ── TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3 { font-family: 'Syne', sans-serif; line-height: 1.1; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }

/* ── UTILITIES ────────────────────────────────────────────── */
.container { max-width: 1340px; margin: 0 auto; padding: 0 24px; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 22px; font-size: .875rem; font-weight: 600;
  border-radius: var(--radius); transition: var(--transition); white-space: nowrap;
  letter-spacing: -.01em;
}
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px rgba(255,77,0,.28);
}
.btn-primary:hover { background: var(--primary-d); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,77,0,.32); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border-d); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-2); padding: 8px 14px; }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-sm { padding: 8px 16px; font-size: .82rem; }
.btn-full { width: 100%; }

/* ── HEADER ───────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,247,245,.92); backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  display: flex; align-items: center; gap: 0;
  height: 100%;
}
.header-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.35rem; letter-spacing: -.03em;
  color: var(--text); flex-shrink: 0;
  margin-right: 32px;
}
.header-logo span { color: var(--primary); }
.logo-mark {
  width: 32px; height: 32px;
  background: var(--primary); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem; font-weight: 800;
}

.header-nav {
  display: flex; align-items: center; gap: 2px; flex: 1;
}
.nav-link {
  padding: 6px 13px; font-size: .875rem; font-weight: 500;
  color: var(--text-2); border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface); }

.header-actions {
  display: flex; align-items: center; gap: 8px; margin-left: auto;
}
.cart-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  font-size: .875rem; font-weight: 600; color: var(--text);
  transition: var(--transition); position: relative;
}
.cart-btn:hover { background: var(--border); }
.cart-icon { font-size: 1.1rem; }
.cart-count {
  background: var(--primary); color: #fff;
  font-size: .7rem; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  display: none;
}
.cart-count.show { display: flex; }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; border-radius: var(--radius-sm);
}
.hamburger span { display: block; width: 20px; height: 1.5px; background: var(--text); transition: var(--transition); }

/* ── HERO BAR ─────────────────────────────────────────────── */
.hero-bar {
  background: var(--text); color: #fff;
  padding: 64px 0 56px;
}
.hero-bar-inner {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
}
.hero-bar h1 { color: #fff; max-width: 560px; }
.hero-bar h1 em { color: var(--primary); font-style: normal; }
.hero-bar-sub {
  font-size: .9rem; color: rgba(255,255,255,.55); margin-top: 12px;
  max-width: 420px; line-height: 1.6;
}
.hero-bar-stats {
  display: flex; flex-direction: column; gap: 16px; flex-shrink: 0;
}
.hero-stat { text-align: right; }
.hero-stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem; font-weight: 800; color: #fff; line-height: 1;
}
.hero-stat-label { font-size: .78rem; color: rgba(255,255,255,.45); margin-top: 2px; }

/* ── FILTER BAR ───────────────────────────────────────────── */
.filter-bar {
  background: var(--bg-2); border-bottom: 1px solid var(--border);
  position: sticky; top: var(--header-h); z-index: 90;
}
.filter-bar-inner {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 0; overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar-inner::-webkit-scrollbar { display: none; }
.filter-btn {
  padding: 7px 16px; font-size: .82rem; font-weight: 600;
  border-radius: 100px; border: 1.5px solid var(--border);
  color: var(--text-2); white-space: nowrap; transition: var(--transition);
  background: transparent;
}
.filter-btn:hover { border-color: var(--text-3); color: var(--text); }
.filter-btn.active {
  background: var(--text); color: #fff; border-color: var(--text);
}
.filter-sep { width: 1px; height: 20px; background: var(--border); flex-shrink: 0; margin: 0 6px; }
.sort-select {
  margin-left: auto; padding: 7px 12px; font-size: .82rem; font-weight: 500;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-2); cursor: pointer;
  flex-shrink: 0;
}
.sort-select:focus { outline: none; border-color: var(--text-3); }

/* ── PRODUCT GRID ─────────────────────────────────────────── */
.shop-section { padding: 40px 0 80px; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* ── PRODUCT CARD ─────────────────────────────────────────── */
.product-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: var(--transition); display: flex; flex-direction: column;
  cursor: pointer;
}
.product-card:hover {
  border-color: var(--border-d);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.product-img-wrap {
  position: relative; aspect-ratio: 1/1;
  background: var(--surface); overflow: hidden;
}
.product-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.product-card:hover .product-img { transform: scale(1.04); }
.product-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--primary); color: #fff;
  font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 100px;
}
.product-badge.new { background: var(--text); }
.product-badge.promo { background: var(--success); }
.product-quick-add {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(17,17,16,.85); backdrop-filter: blur(6px);
  padding: 12px; transform: translateY(100%);
  transition: transform .22s ease;
}
.product-card:hover .product-quick-add { transform: translateY(0); }
.product-quick-add button {
  width: 100%; padding: 9px; font-size: .82rem; font-weight: 700;
  background: var(--primary); color: #fff; border-radius: var(--radius-sm);
  letter-spacing: .01em;
}
.product-quick-add button:hover { background: var(--primary-d); }

.product-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-brand {
  font-size: .72rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary);
}
.product-name {
  font-family: 'Syne', sans-serif; font-size: .95rem; font-weight: 700;
  color: var(--text); line-height: 1.25;
}
.product-format { font-size: .78rem; color: var(--text-3); }
.product-rating {
  display: flex; align-items: center; gap: 5px; margin-top: 2px;
}
.stars { color: #F5A623; font-size: .78rem; letter-spacing: 1px; }
.rating-val { font-size: .78rem; color: var(--text-3); }

.product-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.product-price {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem; font-weight: 800; color: var(--text);
}
.product-price-old {
  font-size: .78rem; color: var(--text-4); text-decoration: line-through; display: block;
}
.product-add-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 400; transition: var(--transition);
  flex-shrink: 0;
}
.product-add-btn:hover { background: var(--primary-d); transform: scale(1.08); }

/* ── RESULTS COUNT ────────────────────────────────────────── */
.results-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 20px;
}
.results-count { font-size: .875rem; color: var(--text-3); }
.results-count strong { color: var(--text); }

/* ── CART DRAWER ──────────────────────────────────────────── */
.cart-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.35); opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-drawer {
  position: fixed; top: 0; right: -420px; width: 420px; max-width: 96vw;
  height: 100vh; z-index: 201;
  background: var(--bg-2); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: right .3s cubic-bezier(.4,0,.2,1);
  box-shadow: var(--shadow-lg);
}
.cart-drawer.open { right: 0; }
.cart-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.cart-title { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; }
.cart-close {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 1rem; transition: var(--transition);
}
.cart-close:hover { background: var(--surface); color: var(--text); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 12px; color: var(--text-3);
}
.cart-empty-icon { font-size: 3rem; opacity: .4; }
.cart-item {
  display: flex; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 72px; height: 72px; border-radius: var(--radius-sm);
  background: var(--surface); overflow: hidden; flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: .875rem; font-weight: 600; line-height: 1.3; margin-bottom: 4px; }
.cart-item-variant { font-size: .78rem; color: var(--text-3); margin-bottom: 10px; }
.cart-item-actions { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 26px; height: 26px; border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
  transition: var(--transition);
}
.qty-btn:hover { background: var(--border); }
.qty-val { font-size: .875rem; font-weight: 600; min-width: 24px; text-align: center; }
.cart-item-remove {
  margin-left: auto; font-size: .78rem; color: var(--text-4);
  text-decoration: underline; background: none; border: none; cursor: pointer;
}
.cart-item-remove:hover { color: var(--text-3); }
.cart-item-price { font-size: .9rem; font-weight: 700; flex-shrink: 0; margin-top: 2px; }

.cart-footer { padding: 20px 24px; border-top: 1px solid var(--border); }
.cart-shipping-note {
  font-size: .8rem; padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--success-bg); color: var(--success); margin-bottom: 16px;
  text-align: center; font-weight: 500;
}
.cart-totals { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.cart-total-row {
  display: flex; justify-content: space-between;
  font-size: .875rem; color: var(--text-2);
}
.cart-total-row.main { font-size: 1.05rem; font-weight: 700; color: var(--text); padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px; }

/* ── TOAST ────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 500; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--text); color: #fff;
  padding: 12px 20px; border-radius: var(--radius);
  font-size: .875rem; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s cubic-bezier(.34,1.56,.64,1);
  pointer-events: all;
}
.toast.success { background: #1A7A4A; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(8px); }
}

/* ── MOBILE MENU ──────────────────────────────────────────── */
.mobile-menu {
  display: none; flex-direction: column;
  background: var(--bg-2); border-bottom: 1px solid var(--border);
  padding: 8px 16px 16px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 10px 4px; font-size: .9rem; font-weight: 500;
  color: var(--text-2); border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--primary); }

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  background: var(--text); color: rgba(255,255,255,.6);
  padding: 48px 0 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-logo-wrap {
  font-family: 'Syne', sans-serif; font-size: 1.3rem; font-weight: 800;
  color: #fff; margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.footer-logo-wrap span { color: var(--primary); }
.footer-desc { font-size: .85rem; line-height: 1.7; max-width: 300px; }
.footer-col-title {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.3); margin-bottom: 14px; font-weight: 600;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: .875rem; transition: var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .8rem;
}
.footer-siret { color: rgba(255,255,255,.3); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-bar-stats { display: none; }
}

@media (max-width: 768px) {
  :root { --header-h: 56px; }
  .header-nav { display: none; }
  .hamburger { display: flex; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-bar { padding: 40px 0 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .cart-drawer { width: 100%; max-width: 100%; }

  /* ── Touch targets minimum 44px ── */
  .cart-btn {
    min-height: 44px;
    padding: 10px 16px;
  }
  .btn {
    min-height: 44px;
    padding: 12px 20px;
  }
  .btn-sm { min-height: 44px; padding: 10px 16px; }

  /* ── Filtre bar ── */
  .filter-btn {
    min-height: 44px;
    padding: 10px 18px;
    font-size: .85rem;
  }

  /* ── Product card ── */
  .product-quick-add button { min-height: 44px; }
  .product-add-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  .product-footer { padding: 12px 14px; }

  /* ── Cart drawer ── */
  .qty-btn { width: 36px; height: 36px; }
  .cart-close { width: 44px; height: 44px; }

  /* ── Hero bar ── */
  .hero-bar h1 { font-size: clamp(1.8rem, 8vw, 2.8rem); }
  .hero-bar-sub { font-size: .88rem; }
  .hero-bar .btn { width: 100%; justify-content: center; }
  .hero-bar > .container > .hero-bar-inner > div:first-child > div[style] {
    flex-direction: column;
  }

  /* ── Mobile menu links ── */
  .mobile-menu a {
    min-height: 52px;
    display: flex;
    align-items: center;
    font-size: 1rem;
    padding: 14px 8px;
  }

  /* ── Footer ── */
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .footer-siret { font-size: .72rem; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-body { padding: 10px; gap: 4px; }
  .product-footer { padding: 10px; }
  .product-name { font-size: .85rem; }
  .product-price { font-size: 1rem; }
  .product-format { font-size: .72rem; }
  .rating-val { display: none; }

  .filter-bar-inner { gap: 6px; padding: 10px 0; }
  .filter-btn { padding: 9px 14px; font-size: .8rem; min-height: 40px; }
  .sort-select { font-size: .8rem; padding: 9px 10px; }

  .hero-bar { padding: 32px 0 28px; }
  .hero-bar h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); }

  /* ── Container padding réduit ── */
  .container { padding: 0 16px; }

  /* ── Results bar ── */
  .results-bar { flex-direction: column; gap: 8px; align-items: flex-start; }
  .results-bar > div:last-child { font-size: .75rem; }

  /* ── Shop section ── */
  .shop-section { padding: 28px 0 60px; }

  /* ── Trust bar ── */
  .trust-items-wrap { gap: 16px; }

  /* ── Cart drawer full screen ── */
  .cart-drawer { border-left: none; }
  .cart-header { padding: 16px 20px; }
  .cart-items { padding: 12px 20px; }
  .cart-footer { padding: 16px 20px; }

  /* ── Buttons full width sur mobile ── */
  .summary-cta .btn { width: 100%; }
}