/* ============================================================
   GBECHI BONIFACE — STORE.CSS v1
   Boutique de produits digitaux
   Palette héritée de styles.css
   ============================================================ */

/* ---- Variables locales store ---- */
:root {
  --store-hero-bg: linear-gradient(135deg, #060A18 0%, #0F172A 35%, #111D8A 70%, #1B2CC1 100%);
  --badge-ebook:     rgba(24,119,242,0.12);
  --badge-formation: rgba(249,115,22,0.12);
  --badge-template:  rgba(6,182,212,0.12);
  --badge-preset:    rgba(139,92,246,0.12);
  --badge-audio:     rgba(16,185,129,0.12);
  --badge-logiciel:  rgba(245,158,11,0.12);
}

/* ============================================================
   STORE HERO
   ============================================================ */
.store-hero {
  background: var(--store-hero-bg);
  padding: 120px 0 60px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.store-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.store-hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(6,182,212,.15); border: 1px solid rgba(6,182,212,.35);
  color: #A5F3FC; padding: 6px 16px; border-radius: var(--radius-full);
  font-size: .8rem; font-weight: 700; margin-bottom: 18px;
  letter-spacing: .08em; text-transform: uppercase;
}
.store-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  font-weight: 900; color: #fff; line-height: 1.1;
  margin-bottom: 14px; letter-spacing: -.02em;
}
.store-hero h1 span { color: #A5B4FC; }
.store-hero p {
  color: rgba(255,255,255,.75); font-size: 1rem;
  max-width: 560px; margin: 0 auto 32px; line-height: 1.7;
}
.store-hero-stats {
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
}
.store-hero-stat { text-align: center; }
.store-hero-stat strong {
  display: block; font-family: var(--font-heading);
  font-size: 1.8rem; font-weight: 800; color: #fff;
}
.store-hero-stat span { font-size: .78rem; color: rgba(255,255,255,.55); }

/* ============================================================
   STORE LAYOUT
   ============================================================ */
.store-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 48px 0;
}
@media (max-width: 1024px) { .store-layout { grid-template-columns: 1fr; } }

/* ============================================================
   STORE SIDEBAR (Filtres)
   ============================================================ */
.store-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  height: fit-content;
}
.sidebar-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 16px;
}
[data-theme="dark"] .sidebar-card {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}
.sidebar-title {
  font-family: var(--font-heading);
  font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); margin-bottom: 14px;
}
.sidebar-search {
  position: relative;
}
.sidebar-search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: .88rem;
  background: var(--bg); color: var(--text-dark);
  transition: var(--t);
  outline: none;
}
.sidebar-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.sidebar-search i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: .82rem; pointer-events: none;
}
[data-theme="dark"] .sidebar-search input {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1);
  color: var(--text-dark);
}

/* Catégories filtre */
.filter-cats { display: flex; flex-direction: column; gap: 4px; }
.filter-cat-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: var(--radius-md);
  font-size: .85rem; font-weight: 500; color: var(--text-mid);
  cursor: pointer; transition: var(--t);
  background: transparent; border: none; text-align: left; width: 100%;
}
.filter-cat-btn:hover { background: var(--blue-bg); color: var(--blue); }
.filter-cat-btn.active { background: var(--blue); color: #fff; font-weight: 700; }
.filter-cat-btn .cat-icon { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; margin-right: 9px; font-size: .78rem; flex-shrink: 0; }
.filter-cat-btn .cat-count { background: rgba(0,0,0,.08); padding: 2px 7px; border-radius: var(--radius-full); font-size: .7rem; font-weight: 700; }
.filter-cat-btn.active .cat-count { background: rgba(255,255,255,.2); }

/* Filtre prix */
.price-range { margin-top: 8px; }
.price-slider {
  width: 100%; accent-color: var(--blue);
  height: 4px; cursor: pointer;
}
.price-labels {
  display: flex; justify-content: space-between;
  font-size: .78rem; color: var(--text-muted); margin-top: 6px;
}
#price-display {
  font-family: var(--font-heading); font-weight: 700;
  color: var(--blue); font-size: .88rem; text-align: center;
  margin-top: 8px; display: block;
}

/* Tri */
.sort-select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: .85rem;
  background: var(--bg); color: var(--text-dark);
  cursor: pointer; outline: none; transition: var(--t);
}
.sort-select:focus { border-color: var(--blue); }
[data-theme="dark"] .sort-select {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1);
  color: var(--text-dark);
}

/* Mobile filter toggle */
.filter-toggle-bar {
  display: none;
  align-items: center; justify-content: space-between;
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 16px;
  cursor: pointer; margin-bottom: 16px;
  font-weight: 600; font-size: .9rem; color: var(--text-dark);
}
.filter-toggle-bar i { color: var(--blue); }
@media (max-width: 1024px) {
  .filter-toggle-bar { display: flex; }
  .store-sidebar { position: static; }
  .store-sidebar-inner { display: none; }
  .store-sidebar-inner.open { display: block; }
}

/* ============================================================
   STORE MAIN
   ============================================================ */
.store-main {}
.store-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 24px;
}
.store-results-count {
  font-size: .88rem; color: var(--text-muted);
}
.store-results-count strong { color: var(--text-dark); font-weight: 700; }
.store-view-toggle { display: flex; gap: 4px; }
.view-btn {
  width: 36px; height: 36px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-card); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--t); font-size: .85rem;
}
.view-btn.active, .view-btn:hover {
  background: var(--blue); border-color: var(--blue); color: #fff;
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.products-grid.list-view {
  grid-template-columns: 1fr;
}
@media (max-width: 1280px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .products-grid { grid-template-columns: 1fr; } }

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.product-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--t);
  display: flex; flex-direction: column;
  position: relative;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-blue);
}
[data-theme="dark"] .product-card {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .product-card:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(24,119,242,.35);
}

/* Badge featured */
.product-featured-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--orange); color: #fff;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-family: var(--font-heading); font-size: .68rem; font-weight: 700;
  display: flex; align-items: center; gap: 4px;
}

/* Cover image */
.product-cover {
  position: relative; height: 180px; overflow: hidden;
  background: var(--bg-dark2);
}
.product-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.product-card:hover .product-cover img { transform: scale(1.06); }
.product-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 10px;
  font-size: 2.5rem;
}
/* Couleurs placeholder par catégorie */
.placeholder-ebook     { background: linear-gradient(135deg, #0D5ECC, #1877F2); color: rgba(255,255,255,.6); }
.placeholder-formation { background: linear-gradient(135deg, #C2410C, #F59E0B); color: rgba(255,255,255,.6); }
.placeholder-template  { background: linear-gradient(135deg, #0891B2, #06B6D4); color: rgba(255,255,255,.6); }
.placeholder-preset    { background: linear-gradient(135deg, #6D28D9, #8B5CF6); color: rgba(255,255,255,.6); }
.placeholder-audio     { background: linear-gradient(135deg, #065F46, #059669); color: rgba(255,255,255,.6); }
.placeholder-logiciel  { background: linear-gradient(135deg, #D97706, #F59E0B); color: rgba(255,255,255,.6); }
.product-cover-placeholder span {
  font-family: var(--font-heading);
  font-size: .72rem; font-weight: 700; color: rgba(255,255,255,.7);
  text-transform: uppercase; letter-spacing: .06em;
}

/* Product body */
.product-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.product-cat-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-family: var(--font-heading); font-size: .68rem; font-weight: 700;
  margin-bottom: 10px; width: fit-content;
}
.cat-ebook     { background: var(--badge-ebook);     color: var(--blue); }
.cat-formation { background: var(--badge-formation); color: var(--orange); }
.cat-template  { background: var(--badge-template);  color: var(--cyan); }
.cat-preset    { background: var(--badge-preset);    color: #8B5CF6; }
.cat-audio     { background: var(--badge-audio);     color: #059669; }
.cat-logiciel  { background: var(--badge-logiciel);  color: var(--orange); }

.product-title {
  font-family: var(--font-heading);
  font-size: .95rem; font-weight: 700;
  color: var(--text-dark); margin-bottom: 8px; line-height: 1.3;
}
.product-title a { color: inherit; transition: var(--t); }
.product-title a:hover { color: var(--blue); }
.product-desc {
  font-size: .82rem; color: var(--text-muted);
  line-height: 1.6; margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* Rating */
.product-rating {
  display: flex; align-items: center; gap: 6px; margin-bottom: 12px;
}
.product-stars { color: var(--orange); font-size: .78rem; letter-spacing: 1px; }
.product-rating-num { font-size: .78rem; font-weight: 700; color: var(--text-dark); }
.product-rating-count { font-size: .73rem; color: var(--text-muted); }

/* Product meta (format, taille) */
.product-meta {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.product-meta-item {
  display: flex; align-items: center; gap: 5px;
  font-size: .73rem; color: var(--text-muted);
}
.product-meta-item i { color: var(--blue); font-size: .68rem; }

/* Footer (prix + bouton) */
.product-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--border);
}
[data-theme="dark"] .product-footer { border-color: rgba(255,255,255,.08); }
.product-price { font-family: var(--font-heading); }
.product-price-main {
  font-size: 1.2rem; font-weight: 800; color: var(--blue);
  display: block; line-height: 1;
}
.product-price-currency {
  font-size: .72rem; color: var(--text-muted); margin-top: 2px; display: block;
}
.product-buy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue); color: #fff;
  padding: 9px 16px; border-radius: var(--radius-full);
  font-family: var(--font-heading); font-size: .8rem; font-weight: 700;
  transition: var(--t); white-space: nowrap;
}
.product-buy-btn:hover {
  background: var(--blue-mid); transform: translateY(-1px);
  box-shadow: var(--shadow-blue);
}

/* List view card */
.products-grid.list-view .product-card {
  flex-direction: row;
}
.products-grid.list-view .product-cover {
  width: 200px; min-width: 200px; height: auto;
}
.products-grid.list-view .product-body {
  flex: 1;
}
@media (max-width: 600px) {
  .products-grid.list-view .product-card { flex-direction: column; }
  .products-grid.list-view .product-cover { width: 100%; height: 160px; }
}

/* Sales count */
.product-sales {
  font-size: .73rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.product-sales i { color: var(--orange); }

/* ============================================================
   PAGINATION
   ============================================================ */
.store-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 32px 0 0;
}
.page-btn {
  width: 38px; height: 38px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-card); color: var(--text-mid);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-family: var(--font-heading);
  font-size: .85rem; font-weight: 600; transition: var(--t);
}
.page-btn:hover, .page-btn.active {
  background: var(--blue); border-color: var(--blue); color: #fff;
}
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   NO RESULTS
   ============================================================ */
.no-results {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.no-results i { font-size: 3rem; color: var(--border); margin-bottom: 14px; display: block; }
.no-results h3 { font-size: 1.1rem; color: var(--text-dark); margin-bottom: 8px; }

/* ============================================================
   CURRENCY SWITCHER (hero + sidebar)
   ============================================================ */
.currency-switch {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1); border-radius: var(--radius-full);
  padding: 4px; width: fit-content;
}
.currency-btn {
  padding: 5px 12px; border-radius: var(--radius-full);
  font-family: var(--font-heading); font-size: .75rem; font-weight: 700;
  cursor: pointer; transition: var(--t); color: rgba(255,255,255,.7);
  border: none; background: transparent;
}
.currency-btn.active { background: var(--blue); color: #fff; }

.currency-switch-light {
  display: flex; gap: 4px; background: var(--bg2);
  border-radius: var(--radius-full); padding: 3px;
}
.currency-btn-light {
  padding: 5px 12px; border-radius: var(--radius-full);
  font-family: var(--font-heading); font-size: .75rem; font-weight: 700;
  cursor: pointer; transition: var(--t);
  color: var(--text-muted); border: none; background: transparent;
}
.currency-btn-light.active { background: var(--blue); color: #fff; }

/* ============================================================
   TAGS
   ============================================================ */
.product-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.product-tag {
  padding: 2px 8px; border-radius: var(--radius-full);
  background: var(--bg2); color: var(--text-muted);
  font-size: .68rem; font-weight: 600; border: 1px solid var(--border);
  transition: var(--t); cursor: pointer;
}
.product-tag:hover { background: var(--blue-bg); color: var(--blue); border-color: var(--border-blue); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--text-muted); padding: 16px 0;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); transition: var(--t); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb i { font-size: .65rem; color: var(--text-light); }
.breadcrumb span { color: var(--text-dark); font-weight: 600; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .store-hero { padding: 100px 0 40px; }
  .store-hero h1 { font-size: clamp(1.6rem, 8vw, 2.4rem); }
  .store-hero-stats { gap: 24px; }
  .store-hero-stat strong { font-size: 1.4rem; }
  .store-toolbar { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   MOBILE EXTRA — breakpoints fins
   ============================================================ */

/* iOS zoom fix */
@media (max-width: 768px) {
  .sidebar-search input,
  .sort-select,
  .form-group input,
  .form-group select { font-size: 16px !important; }

  /* Hero store */
  .store-hero { padding: 90px 0 32px; }
  .store-hero-stats { gap: 16px; flex-wrap: wrap; justify-content: center; }

  /* Product card footer en colonne sur très petit écran */
  .product-footer { flex-direction: column; align-items: flex-start; gap: 10px; }
  .product-buy-btn { width: 100%; justify-content: center; }

  /* Currency switch centré */
  .currency-switch, .currency-switch-light { margin: 0 auto; }

  /* Pagination scroll horizontal */
  .store-pagination { overflow-x: auto; justify-content: flex-start; padding-bottom: 6px; }
  .store-pagination::-webkit-scrollbar { display: none; }
}

@media (max-width: 480px) {
  /* Payment info grid 2 colonnes sur mobile */
  .payment-info-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .payment-info-badge { padding: 8px 4px; }
  .payment-info-badge span { font-size: .65rem; }

  /* Store hero */
  .store-hero h1 { font-size: clamp(1.4rem, 8vw, 1.9rem); }
  .store-hero p { font-size: .82rem; }
  .store-hero-stat strong { font-size: 1.2rem; }
  .store-hero-stat span { font-size: .7rem; }
}
