/* pages/home.css — homepage-only sections, loaded in addition to base.css
   (see templates/layout.php's per-$template <link> switch). Split out of
   the old single style.css (2026-09-26). */

/* ---- Homepage hero banner slider (admin-managed, Admin -> Banners) ---- */
.banner-slider{
  position:relative; overflow:hidden;
  background:var(--brand-gradient-soft);
  border-bottom:1px solid var(--line);
}
.banner-slider-track{ display:flex; transition:transform .5s var(--ease); }
.banner-slide{ flex:0 0 100%; min-width:0; line-height:0; }
.banner-slide a{ display:block; }
.banner-slide img{
  display:block; width:100%; height:clamp(180px, 32vw, 540px);
  /* Changed contain -> cover (user asked for a full-width banner): "contain"
     letterboxed left/right whenever a banner's own aspect ratio was narrower
     than the slider's clamp(180px,32vw,420px) box at wide viewports — visibly
     leaving grey gutters on both sides instead of a true full-bleed banner
     (confirmed via screenshot at 1440px). "cover" fills the full width edge
     to edge, cropping top/bottom instead of shrinking+letterboxing — the
     standard full-width-hero behavior. Trade-off: a source image whose
     interesting content isn't centered can now get cropped; object-position
     stays center as the reasonable default (matches how the existing product
     banners — wide, subject-centered promo graphics — are actually composed). */
  object-fit:cover; object-position:center;
}
.banner-slider-arrow{
  position:absolute; top:50%; transform:translateY(-50%); width:40px; height:40px; border-radius:99px;
  border:none; background:rgba(1,15,28,.45); color:#fff; font-size:22px; line-height:1;
  display:flex; align-items:center; justify-content:center; cursor:pointer; backdrop-filter:blur(2px);
  transition:background .15s var(--ease); z-index:2;
}
.banner-slider-arrow:hover{ background:rgba(1,15,28,.7); }
.banner-slider-arrow-prev{ left:14px; }
.banner-slider-arrow-next{ right:14px; }
.banner-slider-dots{
  position:absolute; bottom:14px; left:50%; transform:translateX(-50%); display:flex; gap:7px; z-index:2;
}
.banner-slider-dot{
  width:8px; height:8px; border-radius:99px; border:none; background:rgba(255,255,255,.55);
  cursor:pointer; padding:0; transition:background .15s var(--ease), width .15s var(--ease);
}
.banner-slider-dot.is-active{ background:#fff; width:22px; border-radius:99px; }
@media (max-width:575.98px){
  .banner-slider-arrow{ width:32px; height:32px; font-size:18px; }
  .banner-slider-arrow-prev{ left:8px; }
  .banner-slider-arrow-next{ right:8px; }
}


/* ---- Hero ---- */
.hero{
  position:relative; overflow:hidden;
  /* Apple-minimal: flat, calm background — no colored glows. A plain
     alternating light-grey (--paper) field, same as the light sections in
     the apple.com screenshots, replaces the old red/gold radial wash. */
  background:var(--paper);
  padding:96px 0 88px; border-bottom:1px solid var(--line);
}
.hero::before{
  /* Decorative dot-grid texture removed — Apple's light sections are plain
     flat color, no background texture. */
  content:none;
}
.hero .container{ position:relative; }
/* Apple shows small category-context labels as plain uppercase text, not a
   colored pill — see the thin "Mac" / "iPhone" eyebrow labels in the
   reference screenshots, which carry no background fill at all. */
.eyebrow{ font-size:12px; letter-spacing:.07em; text-transform:uppercase; color:var(--muted); font-weight:600; display:inline-flex; align-items:center; gap:7px; margin-bottom:16px; }
.eyebrow::before{ content:none; }
.hero h1{ font-size:clamp(34px,5vw,56px); line-height:1.07; margin-bottom:18px; font-weight:700; letter-spacing:-.02em; }
.hero p{ color:var(--ink-soft); max-width:52ch; font-size:17px; line-height:1.6; margin-bottom:30px; }
/* Floating real-photo cluster behind the hero stat card — see $heroShots in
   home.php. Purely decorative positioning (absolute, anchored to
   .hero-visual-col), hidden below md (.d-none.d-md-block on the cluster
   itself) since there's no room for it once the stat card stacks full-width
   on mobile. */
.hero-visual-col{ position:relative; }
.hero-photo-cluster{ position:absolute; inset:0; pointer-events:none; z-index:1; }
.hero-photo-item{
  position:absolute; border-radius:var(--radius); overflow:hidden; background:var(--surface);
  border:3px solid var(--surface); box-shadow:var(--shadow);
}
.hero-photo-item img{ display:block; width:100%; height:100%; object-fit:contain; background:var(--paper); }
.hero-photo-item-1{ width:88px; height:88px; top:-18px; left:36px; transform:rotate(-6deg); }
.hero-photo-item-2{ width:64px; height:64px; top:-30px; left:150px; transform:rotate(5deg); }
.hero-photo-item-3{ width:58px; height:58px; top:-16px; right:28px; transform:rotate(7deg); }

.hero-stat-card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); position:relative; z-index:3; }
.hero-stat-card .row-line{ display:flex; justify-content:space-between; align-items:center; padding:11px 0; border-bottom:1px solid var(--line); font-size:13.5px; color:var(--ink-soft); }
.hero-stat-card .row-line:last-child{ border-bottom:none; }
.hero-stat-card .row-line b{ font-family:var(--font-heading); font-size:17px; color:var(--ink); font-weight:700; }

/* Live-stock pulse readout at the top of the hero stat card */
.hero-stat-pulse{
  display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:var(--ink);
  padding-bottom:14px; margin-bottom:2px; border-bottom:1px solid var(--line);
}
.pulse-dot{ width:8px; height:8px; border-radius:99px; background:var(--ok); flex-shrink:0; position:relative; }
.pulse-dot::after{
  content:''; position:absolute; inset:-4px; border-radius:99px; background:var(--ok); opacity:.4;
  animation:pulse-ring 1.8s ease-out infinite;
}
@keyframes pulse-ring{ 0%{ transform:scale(.6); opacity:.5; } 100%{ transform:scale(2.2); opacity:0; } }

/* "Shop by budget" quick-filter chips in the hero */
.hero-budget-row{ display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.hero-budget-label{ font-size:12.5px; color:var(--ink-soft); font-weight:600; margin-right:2px; }
.hero-budget-chip{
  font-size:12.5px; font-weight:600; color:var(--ink); background:var(--surface); border:1px solid var(--line-strong);
  border-radius:99px; padding:6px 14px; transition:border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease), transform .12s var(--ease);
}
.hero-budget-chip:hover{ border-color:var(--brand); color:var(--brand-ink); background:var(--brand-soft); transform:translateY(-1px); }


/* ---- Category tiles v2 (icon-led, homepage "Shop by Category") ----
   .cat-tile-v2 is the card (a plain div, not a link) so it can hold both the
   parent link (.cat-tile-v2-link) AND an always-visible row of child-category
   chips (.cat-tile-subs) underneath — hierarchy shown via a bigger card with
   its children listed directly beneath it, never a click-to-expand accordion
   (this project has repeatedly rejected collapsible category UI). Categories
   with no qualifying children just render the link with nothing below it,
   same look as before this change. */
.cat-tile-v2{
  display:flex; flex-direction:column; gap:8px; background:var(--paper); border:1px solid transparent;
  border-radius:var(--radius); box-shadow:none; padding:24px 20px; height:100%;
  transition:transform .18s var(--ease), background .18s var(--ease);
}
.cat-tile-v2:hover{ transform:translateY(-2px); background:var(--line); }
.cat-tile-v2-link{ display:flex; flex-direction:column; gap:8px; }
.cat-tile-subs{ margin-top:2px; padding-top:12px; border-top:1px solid var(--line-strong); }
.cat-tile-v2-icon,
.cat-tile-icon{
  display:flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:12px;
  background:var(--surface); color:var(--ink); flex-shrink:0;
  transition:background .18s, color .18s;
}
.cat-tile-icon svg{ width:22px; height:22px; }
.cat-tile-v2:hover .cat-tile-icon{ background:var(--surface); color:var(--brand); }
/* Real sourced category photo (categories.image_url) instead of the generic SVG glyph above —
   same "real image if present, tinted icon badge otherwise" fallback already used for brand tiles/
   logos. Kept the same 44x44 footprint as .cat-tile-icon but dropped the tinted-badge background
   (a photo doesn't read well tinted) and used object-fit:contain like .brand-tile-logo so a
   non-square sourced photo never stretches or crops awkwardly. */
.cat-tile-icon-img{ background:none; padding:0; overflow:hidden; }
.cat-tile-icon-img img{ width:100%; height:100%; object-fit:contain; display:block; border-radius:8px; }
.cat-tile-v2:hover .cat-tile-icon-img{ background:none; }

/* Category listing page header image (templates/category.php) — same sourced
   categories.image_url, shown next to the <h2> when present. Small fixed box +
   object-fit:contain, same treatment as .brand-tile-logo/.cat-tile-icon-img so
   a non-square photo never stretches. */
.cat-header-image{ width:48px; height:48px; object-fit:contain; border-radius:8px; border:1px solid var(--line); background:#fff; flex-shrink:0; }
.cat-tile-v2 h3{ margin:2px 0 0; font-size:15px; color:var(--ink); transition:color .15s; font-weight:600; }
.cat-tile-v2:hover h3{ color:var(--ink); }
.cat-tile-count{ font-size:12.5px; color:var(--muted); }

/* ---- Accent-color rotation utility — RETIRED (2026-09-20 Apple-minimal
   pass). The bold-local pass used this to color-cycle tile/badge/avatar
   accents per index; Apple's reference design uses no per-tile color
   cycling at all (plain white/light-grey cards throughout "Explore the
   lineup" style sections). Markup in home.php/testimonials.php/store-info.php
   still applies these classes (accent_class() helper, $avatarAccents array)
   so they're kept defined here rather than ripped out of every template,
   but every variant now resolves to the exact same neutral values — so
   whichever class lands on a tile, it renders identically, i.e. no visible
   cycling. This is the surgical "restyle, don't delete the plumbing" approach:
   the underlying feature (deterministic per-item accent selection) still
   runs, it's just no longer visually expressed as color. ---- */
.accent-red, .accent-teal, .accent-green, .accent-maroon{
  --tile-accent:var(--ink); --tile-accent-soft:var(--paper);
}


/* ---- Shop by Need tiles (homepage "Shop by Need") ---- */
.usecase-band{ background:var(--surface); }
.usecase-tile{
  display:flex; flex-direction:column; gap:6px; background:var(--paper); border:1px solid transparent;
  border-radius:var(--radius); box-shadow:none; padding:26px 24px; height:100%;
  transition:transform .18s var(--ease), background .18s var(--ease);
}
.usecase-tile:hover{ transform:translateY(-2px); background:var(--line); }
.usecase-tile-icon{
  display:flex; align-items:center; justify-content:center; width:46px; height:46px; border-radius:12px;
  background:var(--surface); color:var(--ink); flex-shrink:0; margin-bottom:4px;
  transition:background .18s, color .18s;
}
.usecase-tile-icon svg{ width:24px; height:24px; }
.usecase-tile:hover .usecase-tile-icon{ background:var(--surface); color:var(--brand); }
.usecase-tile h3{ margin:0; font-size:17px; color:var(--ink); transition:color .15s; font-weight:600; }
.usecase-tile p{ margin:0; font-size:14px; color:var(--ink-soft); flex-grow:1; }
.usecase-tile-cta{ font-size:13px; font-weight:600; color:var(--brand); margin-top:4px; }


/* ---- Shop by Price band (homepage price-band merchandising) ---- */
.price-band-section{ background:var(--surface); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.price-band-tile{
  display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:2px;
  background:var(--paper); border:1px solid transparent; border-radius:var(--radius); padding:30px 12px; height:100%;
  transition:transform .18s var(--ease), background .18s var(--ease);
}
.price-band-tile:hover{ transform:translateY(-2px); background:var(--line); }
.price-band-tile-count{ font-family:var(--font-heading); font-size:32px; font-weight:700; color:var(--ink); line-height:1; }
.price-band-tile-label{ font-size:11.5px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; margin-bottom:6px; }
.price-band-tile-range{ font-size:14px; font-weight:500; color:var(--ink-soft); }


/* ---- Recently Viewed rail (Amazon-style, homepage — real per-visitor cookie, see track_recently_viewed()) ---- */
.recently-viewed-band{ background:var(--paper); }

/* ---- Horizontal product carousel (homepage "Recently Listed" / "Best Deals") ---- */
.product-carousel{
  display:flex; gap:16px; overflow-x:auto; scroll-snap-type:x proximity; padding-bottom:6px;
  scrollbar-width:thin;
}
/* Card width sized so ~4 cards are visible per row/viewport on desktop —
   these homepage carousels never sit beside a sidebar (full-width section),
   matching the "no sidebar = 4-up, sidebar present = 3-up" rule applied to
   the category/brand/finder-results grids below. */
.product-carousel-item{ flex:0 0 minmax(220px, calc((100% - 48px) / 4)); scroll-snap-align:start; }
@media (max-width:991.98px){ .product-carousel-item{ flex-basis:calc((100% - 16px) / 2); } }
@media (max-width:575.98px){ .product-carousel-item{ flex-basis:80vw; } }


/* ---- Product grid density (Apple-minimal, 2026-09-20) ----
   REVERSES the previous bold-local pass, which tightened gutters and forced
   a 5-up column on wide desktop for a dense marketplace-listing feel.
   Apple's own "Explore the lineup" reference sections show 3-4 large cards
   per row with generous gutters, never a dense 5+ grid — per explicit
   correction, this site locks to exactly 3 per row at desktop width
   everywhere multiple product cards render as a grid (category/brand/
   finder-results listing pages via .col-lg-4 in their templates; see
   category.php, product.php related-products, finder-results.php,
   brand.php). Gutters are intentionally left at Bootstrap's default g-3
   (1rem/16px) — no gutter-tightening override — for the calmer, airier
   spacing the reference calls for. */
.carousel-nav{ display:flex; gap:6px; flex-shrink:0; }
.carousel-arrow{
  width:34px; height:34px; border-radius:99px; border:1px solid var(--line-strong); background:var(--surface);
  color:var(--ink); font-size:18px; line-height:1; display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:border-color .15s, color .15s, background .15s;
}
.carousel-arrow:hover{ border-color:var(--brand); color:var(--brand-ink); background:var(--brand-soft); }

.deals-band{ background:var(--paper); }
/* "Today's Best Deals" eyebrow — plain understated text like every other
   .eyebrow, no colored fill/shadow. Real urgency here comes from the actual
   discounted prices in the cards below, not from badge styling. */
.brand-band{ background:var(--surface); }


/* ---- Brand marks strip (homepage) ---- */
.brand-marks{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:18px 28px; }
.brand-mark{ display:inline-flex; align-items:center; gap:8px; font-family:var(--font-heading); font-weight:700; font-size:18px; color:var(--muted); letter-spacing:.01em; opacity:.85; transition:color .15s, opacity .15s; }
.brand-mark:hover{ color:var(--brand-ink); opacity:1; }
.brand-mark-icon{ width:20px; height:20px; flex-shrink:0; color:var(--tile-accent, currentColor); opacity:.8; }
.brand-mark-logo{ height:24px; max-width:110px; object-fit:contain; opacity:.85; transition:opacity .15s; }
.brand-mark:hover .brand-mark-logo{ opacity:1; }


/* ---- Testimonials (homepage) ---- */
/* Apple-minimal: no colored top border/badges on cards — plain --paper
   card, star rating kept in its own conventional amber (.stars, defined
   above) since a 5-star rating glyph reads universally in that color and
   isn't part of the retired red/gold brand system. */
.testimonial-card{ position:relative; }
.testimonial-quote-icon{ width:26px; height:26px; color:var(--line-strong); }
.testimonial-card p{ font-size:14px; color:var(--ink-soft); }
.testimonial-avatar{
  display:flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:99px; flex-shrink:0;
  background:var(--surface); color:var(--ink);
  font-family:var(--font-heading); font-weight:600; font-size:13px;
}
.testimonial-card .author{ font-size:12.5px; font-weight:600; color:var(--ink); }
.testimonial-card .source{ font-size:11.5px; color:var(--muted); }


/* ---- FAQ (homepage) ---- */
.faq-list{ background:var(--line); border-radius:var(--radius); overflow:hidden; }
.faq-item{ background:var(--surface); }
.faq-item summary{ padding:18px 20px; font-weight:500; font-size:15px; cursor:pointer; list-style:none; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item-q{ display:flex; align-items:center; gap:10px; }
.faq-item-icon{ width:18px; height:18px; color:var(--muted); flex-shrink:0; }
.faq-item summary::after{ content:'+'; font-size:20px; color:var(--muted); font-weight:300; flex-shrink:0; line-height:1; }
.faq-item[open] summary::after{ content:'−'; }
.faq-item p{ margin:0; padding:0 20px 18px 48px; font-size:14px; color:var(--ink-soft); max-width:70ch; }
/* .store-info-card/.store-hours-row (rendered here via partials/store-info.php)
   now live in base.css — contact.php uses the same classes directly and has
   no page-specific bundle of its own. */

