/* ============================================================
   BattleCredits — PUBLIC PAGES shared styles
   Loaded on: shop, category, product-details, reviews, blogs,
              contact, policies (and index, alongside home.css).
   Load order: design-tokens, base, components, responsive,
               layout.css, THEN public.css (this file).
   ============================================================ */

/* ---- Grid base definitions (responsive.css overrides at breakpoints) ---- */
.bc-grid-2, .bc-grid-3, .bc-grid-4, .bc-stat-row { display:grid; gap:20px; }
.bc-grid-2 { grid-template-columns: repeat(2, 1fr); }
.bc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.bc-grid-4 { grid-template-columns: repeat(4, 1fr); }
.bc-stat-row { grid-template-columns: repeat(4, 1fr); }

/* ---- Prevent horizontal overflow (mobile sidebar safety) ---- */
html { overflow-x: clip; }
.bc-main { overflow-x: hidden; }

/* ---- Page header (inner pages) ---- */
.bc-page-head {
  background: var(--bc-gradient-banner);
  color: #fff;
  padding: 44px 0 40px;
  position: relative;
  overflow: hidden;
}
.bc-page-head::before {
  content:''; position:absolute; inset:0;
  background: radial-gradient(600px 200px at 80% -20%, rgba(0,215,232,.18), transparent 70%);
  pointer-events:none;
}
.bc-page-head h1 { color:#fff; margin-bottom:6px; position:relative; }
.bc-page-head p { color:#9FB3CF; max-width:640px; margin:0; position:relative; }
.bc-breadcrumb { font-size:.82rem; color:#7E93B5; margin-bottom:10px; position:relative; }
.bc-breadcrumb a { color:#9FB3CF; }
.bc-breadcrumb a:hover { color: var(--bc-cyan); }

/* ---- Filter pills (shop / category) ---- */
.bc-filter-pills { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:24px; }
.bc-filter-pill {
  padding:8px 18px; border-radius: var(--bc-r-pill); border:1.5px solid var(--bc-border);
  background:#fff; color: var(--bc-text-2); font-weight:600; font-size:.88rem;
  cursor:pointer; transition: all .2s var(--bc-ease); text-decoration:none; display:inline-flex; align-items:center; gap:6px;
}
.bc-filter-pill:hover { border-color: var(--bc-primary); color: var(--bc-primary); }
.bc-filter-pill.active { background: var(--bc-gradient-btn); color:#fff; border-color: transparent; }

/* ---- Category card ---- */
.bc-cat-card {
  background: var(--bc-card); border:1px solid var(--bc-border); border-radius: var(--bc-r);
  padding:22px 16px; text-align:center; box-shadow: var(--bc-shadow-card);
  transition: transform .25s var(--bc-ease), box-shadow .25s var(--bc-ease), border-color .25s;
  display:flex; flex-direction:column; align-items:center; gap:10px; color: var(--bc-text);
}
.bc-cat-card:hover { transform: translateY(-4px); box-shadow: var(--bc-shadow-hover); border-color: var(--bc-primary); text-decoration:none; }
.bc-cat-icon { width:64px; height:64px; border-radius:16px; object-fit:contain; background: var(--bc-bg-soft); padding:8px; }
.bc-cat-card h3 { font-size:1rem; margin:0; }
.bc-cat-card small { color: var(--bc-muted); }

/* ---- Product card ---- */
.bc-product-card {
  background: var(--bc-card); border:1px solid var(--bc-border); border-radius: var(--bc-r);
  overflow:hidden; box-shadow: var(--bc-shadow-card); display:flex; flex-direction:column;
  transition: transform .25s var(--bc-ease), box-shadow .25s var(--bc-ease);
  position:relative;
}
.bc-product-card:hover { transform: translateY(-4px); box-shadow: var(--bc-shadow-hover); }
.bc-product-img-wrap { position:relative; background: var(--bc-bg-soft); aspect-ratio: 4/3; overflow:hidden; }
.bc-product-img { width:100%; height:100%; object-fit:contain; padding:16px; }
.bc-product-badge {
  position:absolute; top:10px; left:10px; z-index:2;
}
.bc-product-unavailable {
  position:absolute; inset:0; background: rgba(255,255,255,.6); backdrop-filter: blur(1px);
  display:flex; align-items:center; justify-content:center; z-index:3;
}
.bc-product-body { padding:16px; display:flex; flex-direction:column; gap:8px; flex:1; }
.bc-product-name { font-weight:700; color: var(--bc-navy); font-size:.98rem; line-height:1.3; margin:0; }
.bc-product-qty { color: var(--bc-muted); font-size:.82rem; }
.bc-product-price { font-size:1.25rem; font-weight:800; color: var(--bc-primary-deep); margin-top:auto; }
.bc-product-card .btn { width:100%; margin-top:6px; }

/* ---- Review card ---- */
.bc-review-card {
  background: var(--bc-card); border:1px solid var(--bc-border); border-radius: var(--bc-r);
  padding:22px; box-shadow: var(--bc-shadow-card); display:flex; flex-direction:column; gap:10px; height:100%;
}
.bc-review-head { display:flex; align-items:center; gap:12px; }
.bc-review-avatar { width:44px; height:44px; border-radius:50%; object-fit:cover; background: var(--bc-bg-soft); flex-shrink:0; }
.bc-review-name { font-weight:700; color: var(--bc-navy); margin:0; font-size:.95rem; }
.bc-review-meta { font-size:.78rem; color: var(--bc-muted); }
.bc-review-stars { color: var(--bc-gold); letter-spacing:2px; font-size:.9rem; }
.bc-review-text { color: var(--bc-text-2); font-size:.92rem; flex:1; margin:0; }
.bc-verified-badge {
  display:inline-flex; align-items:center; gap:4px; font-size:.7rem; font-weight:700;
  color: var(--bc-success); background: var(--bc-success-soft); padding:2px 8px; border-radius: var(--bc-r-pill);
}

/* ---- Blog card ---- */
.bc-blog-card {
  background: var(--bc-card); border:1px solid var(--bc-border); border-radius: var(--bc-r);
  overflow:hidden; box-shadow: var(--bc-shadow-card); display:flex; flex-direction:column;
  transition: transform .25s var(--bc-ease), box-shadow .25s var(--bc-ease); color: var(--bc-text);
}
.bc-blog-card:hover { transform: translateY(-4px); box-shadow: var(--bc-shadow-hover); text-decoration:none; }
.bc-blog-img { width:100%; aspect-ratio:16/9; object-fit:cover; background: var(--bc-bg-soft); }
.bc-blog-body { padding:18px; display:flex; flex-direction:column; gap:8px; flex:1; }
.bc-blog-date { font-size:.78rem; color: var(--bc-muted); }
.bc-blog-title { font-weight:700; color: var(--bc-navy); font-size:1.05rem; margin:0; }
.bc-blog-excerpt { color: var(--bc-text-2); font-size:.9rem; flex:1; margin:0; }

/* ---- Contact / form card ---- */
.bc-form-card { background: var(--bc-card); border:1px solid var(--bc-border); border-radius: var(--bc-r); padding:28px; box-shadow: var(--bc-shadow-card); }
.bc-info-list { display:flex; flex-direction:column; gap:16px; }
.bc-info-item { display:flex; gap:14px; align-items:flex-start; }
.bc-info-icon { width:42px; height:42px; border-radius:12px; background: var(--bc-info-soft); color: var(--bc-primary); display:flex; align-items:center; justify-content:center; font-size:1.05rem; flex-shrink:0; }
.bc-info-item h4 { font-size:.95rem; margin:0 0 2px; }
.bc-info-item p { margin:0; color: var(--bc-muted); font-size:.88rem; word-break: break-word; }

/* ---- Policies ---- */
.bc-policy-section { background: var(--bc-card); border:1px solid var(--bc-border); border-radius: var(--bc-r); padding:28px; margin-bottom:24px; box-shadow: var(--bc-shadow-card); }
.bc-policy-section h2 { font-size:1.3rem; margin-bottom:14px; display:flex; align-items:center; gap:10px; }
.bc-policy-section h3 { font-size:1.05rem; margin:18px 0 8px; }
.bc-policy-section p, .bc-policy-section li { color: var(--bc-text-2); font-size:.93rem; }
.bc-policy-section ul { padding-left:20px; display:flex; flex-direction:column; gap:6px; }

/* ---- Product details ---- */
.bc-pd-gallery { background: var(--bc-card); border:1px solid var(--bc-border); border-radius: var(--bc-r); padding:24px; text-align:center; box-shadow: var(--bc-shadow-card); }
.bc-pd-gallery img { max-height:320px; object-fit:contain; margin:0 auto; }
.bc-pd-info { background: var(--bc-card); border:1px solid var(--bc-border); border-radius: var(--bc-r); padding:28px; box-shadow: var(--bc-shadow-card); }
.bc-pd-price { font-size:2rem; font-weight:800; color: var(--bc-primary-deep); margin:10px 0; }
.bc-pd-meta { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }

/* ---- Dashboard promo cards (home section D) ---- */
.bc-promo-card {
  background: var(--bc-card); border:1px solid var(--bc-border); border-radius: var(--bc-r);
  padding:22px; box-shadow: var(--bc-shadow-card); display:flex; flex-direction:column; gap:8px;
  transition: transform .25s var(--bc-ease), box-shadow .25s; color: var(--bc-text); height:100%;
}
.bc-promo-card:hover { transform: translateY(-3px); box-shadow: var(--bc-shadow-hover); text-decoration:none; }
.bc-promo-icon { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:1.15rem; margin-bottom:4px; }
.bc-promo-card h3 { font-size:1rem; margin:0; }
.bc-promo-card .bc-promo-value { font-size:1.4rem; font-weight:800; color: var(--bc-navy); }
.bc-promo-card small { color: var(--bc-muted); }
.bc-promo-card .btn { margin-top:auto; }

/* ============================================================
   MOBILE SAFETY (320px viewport) — patches navbar overflow
   without modifying frozen layout.css.
   ============================================================ */
@media (max-width: 480px) {
  /* Keep topnav actions compact so hamburger + brand + actions fit in 320px */
  .bc-topnav-inner { gap:8px; }
  .bc-avatar-btn { padding:6px 10px; font-size:0; }
  .bc-avatar-btn i { font-size:1.15rem; }
  .bc-wallet-pill { padding:8px 10px; }
  .bc-topnav-actions { gap:6px; }
  .bc-topnav-actions .btn-sm { padding:6px 10px; }
  .bc-logo { height:32px; }
  .bc-grid-2, .bc-grid-3, .bc-grid-4 { gap:12px; }
  .bc-form-card, .bc-pd-info, .bc-pd-gallery, .bc-policy-section { padding:18px; }
  .bc-pd-price { font-size:1.5rem; }
}
@media (max-width: 360px) {
  .bc-hamburger { min-width:40px; padding:6px; }
  .bc-topnav-actions .btn-secondary { display:none; } /* hide Login text btn, keep Register */
}
/* Ensure sidebar + overlay always sit above page content */
.bc-mobile-sidebar { z-index:1101; }
.bc-sidebar-overlay { z-index:1100; }
.bc-support-widget { z-index:900; }
