/* ==========================================================
   ENERZEX — Battery Store page styles
   Layered on top of the existing Tailwind/theme_head.php system —
   overrides the same utility class names so nothing else changes.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root{
  --ez-red:#E31E24; --ez-red-dark:#A9141A; --ez-red-glow:rgba(227,30,36,0.35);
  --ez-black:#0B0B0D; --ez-charcoal:#17181C; --ez-ink:#111214;
  --ez-grey:#6B6E76; --ez-line:#E8E8EA; --ez-amber:#FFB300;
}

/* ---------- Re-skin the shared theme's color utilities, red/black/white ---------- */
.text-primary{ color:var(--ez-red) !important; }
.bg-primary{ background-color:var(--ez-red) !important; }
.text-on-primary{ color:#fff !important; }
.bg-on-primary{ background-color:#fff !important; }
.border-outline-variant{ border-color:var(--ez-line) !important; }
.text-on-surface{ color:var(--ez-ink) !important; }
.text-on-surface-variant{ color:var(--ez-grey) !important; }
.bg-surface-container-lowest{ background-color:#fff !important; }
.bg-surface-container-low{ background-color:#FAFAFA !important; }
.text-secondary{ color:var(--ez-red-dark) !important; }

body{ font-family:'Inter',sans-serif !important; background:#fff; }
h1,h2,h3,h4,h5,.font-headline-lg,.font-headline-sm,.font-headline-md{ font-family:'Sora',sans-serif !important; letter-spacing:-0.01em; }

/* ---------- PAGE LOADER ---------- */
#pageLoader{ background:linear-gradient(135deg, var(--ez-black) 0%, var(--ez-charcoal) 100%) !important; }
#pageLoader .absolute.border-white\/20{ border-color:rgba(255,255,255,0.15) !important; border-top-color:var(--ez-red) !important; }
#pageLoader span.material-symbols-outlined{ color:var(--ez-red) !important; filter:drop-shadow(0 0 14px var(--ez-red-glow)); animation:loaderPulse 1.4s ease-in-out infinite; }
@keyframes loaderPulse{ 0%,100%{transform:scale(1);} 50%{transform:scale(1.15);} }

/* ---------- PAGE HEADER ---------- */
.store-header{ position:relative; padding-bottom:8px; margin-bottom:8px; }
.store-header h1{ display:flex; align-items:center; gap:10px; }
.store-header .store-bolt{
  display:inline-flex; width:34px; height:34px; border-radius:10px; background:#FFF1F1; color:var(--ez-red);
  align-items:center; justify-content:center; font-size:18px; animation:ezBreathe 3.2s ease-in-out infinite;
}
@keyframes ezBreathe{ 0%,100%{transform:scale(1);} 50%{transform:scale(1.08);} }
.store-header::after{
  content:""; display:block; width:56px; height:3px; background:linear-gradient(90deg,var(--ez-red),var(--ez-amber));
  border-radius:3px; margin-top:14px;
}

/* ---------- REVEAL ---------- */
.reveal{ opacity:0; transform:translateY(20px); transition:opacity .55s ease, transform .55s ease; }
.reveal.in{ opacity:1; transform:translateY(0); }

/* ---------- FEATURED ---------- */
#featuredWrap a{ transition:transform .35s ease, box-shadow .35s ease, border-color .35s ease !important; position:relative; }
#featuredWrap a:hover{ transform:translateY(-6px); box-shadow:0 20px 40px rgba(0,0,0,0.1) !important; border-color:rgba(227,30,36,0.3) !important; }
#featuredWrap a::after{
  content:"★ Featured"; position:absolute; top:10px; left:10px; z-index:2; background:var(--ez-red); color:#fff;
  font-size:11px; font-weight:700; padding:4px 10px; border-radius:999px; font-family:'Sora',sans-serif;
  box-shadow:0 6px 14px var(--ez-red-glow);
}

/* ---------- FILTER SIDEBAR ---------- */
#filterForm{ border-radius:18px !important; box-shadow:0 10px 30px rgba(0,0,0,0.05); }
#filterForm label{ font-family:'Sora',sans-serif; color:var(--ez-ink) !important; }
#filterForm input, #filterForm select{
  background:#FAFAFA; transition:border-color .2s, box-shadow .2s, background .2s;
}
#filterForm input:focus, #filterForm select:focus{
  border-color:var(--ez-red) !important; box-shadow:0 0 0 3px rgba(227,30,36,0.12) !important; background:#fff !important; outline:none !important;
}
#filterForm button[type="submit"]{
  background:var(--ez-red) !important; font-family:'Sora',sans-serif; transition:transform .2s, box-shadow .2s, background .2s !important;
  display:flex; align-items:center; justify-content:center; gap:8px;
}
#filterForm button[type="submit"]:hover{ background:var(--ez-red-dark) !important; transform:translateY(-2px); box-shadow:0 10px 22px var(--ez-red-glow); }
#clearFilters{ font-family:'Sora',sans-serif; transition:color .2s; }
#clearFilters:hover{ color:var(--ez-red-dark) !important; text-decoration:underline; text-underline-offset:3px; }

.filter-badge{
  display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px;
  border-radius:999px; background:var(--ez-red); color:#fff; font-size:10.5px; font-weight:700; font-family:'IBM Plex Mono',monospace;
  margin-left:6px; vertical-align:middle;
}

/* ---------- RESULTS BAR ---------- */
.results-bar{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; flex-wrap:wrap; gap:10px; }
.results-count{ font-size:13.5px; color:var(--ez-grey); font-family:'Inter',sans-serif; }
.results-count strong{ color:var(--ez-ink); }
.active-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.active-chip{
  display:inline-flex; align-items:center; gap:6px; background:#FFF1F1; color:var(--ez-red-dark); border:1px solid rgba(227,30,36,0.25);
  font-size:12px; font-weight:600; padding:5px 10px; border-radius:999px; font-family:'Inter',sans-serif;
}
.active-chip button{ background:none; border:none; color:var(--ez-red-dark); font-weight:800; cursor:pointer; font-size:13px; line-height:1; padding:0; }

/* ---------- PRODUCT GRID (generic — matches whatever cards filter_ajax.php renders) ---------- */
#productGrid{ min-height:200px; }
#productGrid > *{
  opacity:0; transform:translateY(16px) scale(.98);
  animation:cardIn .5s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay:calc(var(--card-i, 0) * 70ms);
  transition:transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
#productGrid > *:hover{ transform:translateY(-6px) !important; box-shadow:0 18px 34px rgba(0,0,0,0.08) !important; border-color:rgba(227,30,36,0.25) !important; }
@keyframes cardIn{ to{ opacity:1; transform:translateY(0) scale(1); } }

.empty-state{ grid-column:1/-1; text-align:center; padding:56px 20px; color:var(--ez-grey); }
.empty-state .es-icon{ font-size:38px; margin-bottom:10px; }
.empty-state p{ font-family:'Inter',sans-serif; }

/* ---------- SKELETON (warmer neutral tone) ---------- */
.skeleton{ background:linear-gradient(90deg, #ECECEE 25%, #F5F5F6 37%, #ECECEE 63%) !important; }

/* ---------- MOBILE FILTER DRAWER ---------- */
.filters-fab{
  display:none; position:fixed; right:18px; bottom:18px; z-index:120; background:var(--ez-black); color:#fff;
  border:none; border-radius:999px; padding:13px 20px; font-family:'Sora',sans-serif; font-weight:700; font-size:14px;
  align-items:center; gap:8px; box-shadow:0 12px 26px rgba(0,0,0,0.3); cursor:pointer; transition:transform .2s, background .2s;
}
.filters-fab:hover{ background:var(--ez-red); }
.filters-backdrop{
  display:none; position:fixed; inset:0; background:rgba(0,0,0,0.45); z-index:130; opacity:0; transition:opacity .3s ease;
}
.filters-backdrop.show{ display:block; opacity:1; }

@media(max-width:1023px){
  .filters-fab{ display:inline-flex; }
  aside.store-sidebar{
    position:fixed !important; left:0; right:0; bottom:0; top:auto !important; z-index:140; max-height:85vh; overflow-y:auto;
    border-radius:22px 22px 0 0 !important; transform:translateY(105%); transition:transform .35s cubic-bezier(.2,.8,.3,1);
    box-shadow:0 -14px 40px rgba(0,0,0,0.25);
  }
  aside.store-sidebar.open{ transform:translateY(0); }
  aside.store-sidebar #filterForm{ box-shadow:none; border:none !important; }
  .drawer-handle{ width:40px; height:4px; border-radius:99px; background:var(--ez-line); margin:10px auto 4px; }
  .drawer-close{
    position:absolute; top:14px; right:16px; width:30px; height:30px; border-radius:50%; background:#F5F5F6; border:none;
    display:flex; align-items:center; justify-content:center; font-size:15px; color:var(--ez-ink); cursor:pointer;
  }
}

@media (prefers-reduced-motion: reduce){ *{ animation-duration:.001ms !important; transition-duration:.001ms !important; } }

/* ==========================================================
   PRODUCT DETAIL PAGE — additive styles (product.php)
   ========================================================== */

/* "Featured" badge — custom class not covered by Tailwind defaults */
.badge.approved{
  display:inline-flex; align-items:center; gap:6px; background:var(--ez-red); color:#fff;
  font-family:'Sora',sans-serif; font-size:11.5px; font-weight:700; padding:5px 12px; border-radius:999px;
  box-shadow:0 6px 14px var(--ez-red-glow); animation:badgePulse 2s ease-in-out infinite;
}
.badge.approved::before{ content:"★"; font-size:11px; }
@keyframes badgePulse{ 0%,100%{ box-shadow:0 6px 14px var(--ez-red-glow); } 50%{ box-shadow:0 6px 20px rgba(227,30,36,0.55); } }

/* Selected thumbnail / focus-ring color */
.border-secondary{ border-color:var(--ez-red) !important; }
.focus\:ring-secondary:focus{ --tw-ring-color:rgba(227,30,36,0.25) !important; }
.focus\:border-secondary:focus{ border-color:var(--ez-red) !important; }

/* Primary button hover target (Tailwind's bg-primary-container utility) */
.hover\:bg-primary-container:hover, .bg-primary-container{ background-color:var(--ez-red-dark) !important; }
.text-secondary-container{ color:#fff !important; }

/* Gallery */
#gallerySkeleton{ transition:opacity .3s ease; }
.gallery-fade-in{ animation:fadeInGallery .5s ease both; }
@keyframes fadeInGallery{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:translateY(0); } }
.product-main-img{ position:relative; }
.product-main-img img{ transition:transform .5s cubic-bezier(.2,.7,.2,1); }
.product-main-img:hover img{ transform:scale(1.06); }
.thumb-btn{ transition:transform .2s ease, border-color .2s ease, box-shadow .2s ease !important; cursor:pointer; }
.thumb-btn:hover{ transform:translateY(-3px); box-shadow:0 8px 16px rgba(0,0,0,0.12); }

/* Warranty card */
.warranty-card{ transition:box-shadow .3s ease; }
.warranty-card:hover{ box-shadow:0 10px 24px rgba(0,0,0,0.06); }
.warranty-icon{ display:inline-flex; animation:ezBreathe 3.2s ease-in-out infinite; }

/* Send Enquiry jump button */
.btn-enquiry-jump{ position:relative; overflow:hidden; }
.btn-enquiry-jump::after{
  content:""; position:absolute; inset:0; background:linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
  transform:translateX(-120%); transition:transform .6s ease;
}
.btn-enquiry-jump:hover::after{ transform:translateX(120%); }

/* Spec group cards */
.spec-group{ transition:transform .3s ease, box-shadow .3s ease, border-color .3s ease !important; }
.spec-group:hover{ transform:translateY(-4px); box-shadow:0 14px 30px rgba(0,0,0,0.06); border-color:rgba(227,30,36,0.2) !important; }

/* Enquiry submit spinner + notice banners */
#enquirySubmitBtn{ transition:transform .2s, box-shadow .2s, background .2s !important; }
#enquirySubmitBtn:hover:not(:disabled){ transform:translateY(-2px); box-shadow:0 12px 24px var(--ez-red-glow); }
#enquiryNotice > div{ animation:fadeSlide .3s ease; }
@keyframes fadeSlide{ from{ opacity:0; transform:translateY(-6px); } to{ opacity:1; transform:translateY(0); } }
.bg-error-container{ background-color:#FFF4F4 !important; }
.text-on-error-container{ color:var(--ez-red-dark) !important; }
.border-error\/20{ border-color:rgba(227,30,36,0.2) !important; }