/* ============================================================
   ShipItAll — Redesign CSS (v1.0.82+)
   Bob-Shop-style dense product grid sections with interleaved
   banner tiles. Loaded on homepage and WooCommerce archive pages.

   Reuses the existing .sia-product-card partial (defined in
   products.css). Only adds: grid containers, section wrappers,
   banner tiles, "See more" affordances, and the .premium modifier
   for card gold-outline styling.
   ============================================================ */

/* ----- Section wrapper ---------------------------------------- */

.sia-rd-section {
  padding: 28px 0 8px;
}

.sia-rd-section + .sia-rd-section {
  padding-top: 4px;
}

.sia-rd-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.sia-rd-section-title {
  font-family: var(--sia-font-display);
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  color: var(--sia-text);
  letter-spacing: -0.01em;
}

.sia-rd-section-title em {
  font-style: normal;
  color: var(--sia-primary);
}

.sia-see-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--sia-primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.sia-see-more:hover {
  color: var(--sia-primary-dark);
}

/* ----- Products grid ------------------------------------------ */

.sia-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 600px) {
  .sia-products-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

@media (min-width: 900px) {
  .sia-products-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

@media (min-width: 1200px) {
  .sia-products-grid { grid-template-columns: repeat(5, 1fr); gap: 18px; }
}

/* ----- Product card modifiers --------------------------------- */

/* Premium tier: 5px gold border (static, no glow). */
/* v1.3.0.5: doubled from 2.5px, dropped the static ring shadow since the
   border is already dominant, and removed the breathing halo. */
.sia-product-card.premium {
  border: 5px solid var(--sia-accent);
}

.sia-product-card.premium:hover {
  box-shadow: 0 8px 32px rgba(245, 166, 35, 0.45), 0 0 0 1px rgba(245, 166, 35, 0.55);
}

/* v1.0.92.4: Sponsored card treatment
   Premium (is-promoted-premium): V2 breathing gold glow + Sponsored tag.
   Featured (is-promoted-featured / data-variant="featured"): silver
     breathing glow + matching border + Sponsored tag (v1.3.0.2).

   Glow: GPU-composited via transform + opacity on a ::before pseudo-element
   (not animated box-shadow). Negligible perf cost at 16-card grid density. */

.sia-rd-card-wrap.is-promoted-premium,
.sia-rd-card-wrap.is-promoted-featured,
.sia-rd-card-wrap[data-variant="featured"] {
  position: relative;
}

/* v1.3.0.5: Premium halo (::before breathing glow) removed. The 5px
   static gold border now carries the tier signal on its own. */
.sia-rd-card-wrap.is-promoted-premium .sia-product-card {
  position: relative;
  z-index: 1;
}

/* v1.3.0.5: Featured halo removed; border doubled to 5px and static
   ring shadow dropped (border is dominant enough on its own). Silver
   #C0C6D2 preserved so Premium gold > Featured silver still reads by
   colour alone. */
.sia-rd-card-wrap.is-promoted-featured .sia-product-card,
.sia-rd-card-wrap[data-variant="featured"] .sia-product-card {
  position: relative;
  z-index: 1;
  border: 5px solid #C0C6D2;
}
.sia-rd-card-wrap.is-promoted-featured .sia-product-card:hover,
.sia-rd-card-wrap[data-variant="featured"] .sia-product-card:hover {
  box-shadow: 0 8px 32px rgba(192, 198, 210, 0.5), 0 0 0 1px rgba(192, 198, 210, 0.6);
}

/* Sponsored tag — applied to every sponsored tier.
   Positioned top-right, left of the wishlist heart (which sits at
   top:8px right:8px ~28px wide). Small dark pill, backdrop-blurred
   for readability over white or image backgrounds. */
.sia-rd-card-wrap.is-promoted-premium::after,
.sia-rd-card-wrap.is-promoted-featured::after,
.sia-rd-card-wrap[data-variant="featured"]::after {
  content: 'Sponsored';
  position: absolute;
  top: 10px;
  right: 44px;
  background: rgba(13, 27, 42, 0.82);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  z-index: 3;
  pointer-events: none;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* v1.3.0.5: reduced-motion block removed; there is no motion to
   disable now that the breathing halos are gone. */

/* Featured (homepage_featured / category_featured): cream ribbon pill */
.sia-product-card.featured .sia-rd-featured-ribbon {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #FFF4D6 0%, #FFE79A 100%);
  color: #7A5900;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  z-index: 2;
}

/* Premium badge (gold pill) — alt to default badges on premium cards */
.sia-badge-premium {
  background: linear-gradient(135deg, #FFC107 0%, #F5A623 100%);
  color: #5C4100;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* ----- Banner tile (interleaved) ------------------------------ */

.sia-rd-banner-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 20px 0 8px;
}

@media (min-width: 720px) {
  .sia-rd-banner-row.two-up { grid-template-columns: 1fr 1fr; }
}

.sia-banner-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 180px;
  padding: 22px 22px 20px;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: white;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform .2s ease, box-shadow .2s ease;
  isolation: isolate;
}

.sia-banner-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
  z-index: 0;
}

.sia-banner-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}

.sia-banner-tile > * { position: relative; z-index: 1; }

.sia-banner-tile-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.sia-banner-tile-title {
  font-family: var(--sia-font-display);
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.sia-banner-tile-sub {
  font-size: 13px;
  opacity: 0.92;
  margin: 0 0 12px;
  max-width: 44ch;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.sia-banner-tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  color: var(--sia-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 100px;
  align-self: flex-start;
  transition: background .15s ease;
}

.sia-banner-tile:hover .sia-banner-tile-cta {
  background: var(--sia-accent);
}

/* Theme variants (used when no image, fallback gradients) */
.sia-banner-tile.tile-primary  { background-image: linear-gradient(135deg, #E8380D 0%, #FF5733 60%, #FFA07A 100%); }
.sia-banner-tile.tile-dark     { background-image: linear-gradient(135deg, #0D1B2A 0%, #1A1A2E 60%, #2a2a4e 100%); }
.sia-banner-tile.tile-accent   { background-image: linear-gradient(135deg, #FFC107 0%, #FF8E00 60%, #E8380D 100%); }

/* ----- "See more" outlined pill at bottom of section ---------- */

.sia-rd-section-foot {
  display: flex;
  justify-content: center;
  margin: 14px 0 6px;
}

.sia-see-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--sia-primary);
  color: var(--sia-primary);
  background: white;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 100px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.sia-see-more-btn:hover {
  background: var(--sia-primary);
  color: white;
}

/* ----- Flash Sale inline banner (placeholder slot) ------------ */

.sia-rd-flash-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, #0D0D0D 0%, #E8380D 100%);
  color: white;
  padding: 22px 26px;
  border-radius: 16px;
  margin: 20px 0 8px;
  flex-wrap: wrap;
}

.sia-rd-flash-banner-text h3 {
  font-family: var(--sia-font-display);
  font-size: 22px;
  margin: 0 0 4px;
  font-weight: 800;
}

.sia-rd-flash-banner-text p {
  margin: 0;
  font-size: 13px;
  opacity: 0.9;
}

.sia-rd-flash-banner-cta {
  background: var(--sia-accent);
  color: var(--sia-dark);
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.sia-rd-flash-banner-cta:hover { background: white; }

/* ----- Category archive: breadcrumb, subcat pills, hero ------- */

.sia-rd-archive-top {
  background: var(--sia-surface);
  border-bottom: 1px solid var(--sia-border);
  padding: 10px 0;
}

.sia-rd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--sia-text-muted);
  margin: 0;
  flex-wrap: wrap;
}

.sia-rd-breadcrumb a {
  color: var(--sia-primary);
  text-decoration: none;
}

.sia-rd-breadcrumb a:hover { text-decoration: underline; }

.sia-rd-breadcrumb-sep { color: var(--sia-text-muted); }

.sia-rd-refine-trigger {
  margin-left: auto;
  background: white;
  border: 1px solid var(--sia-border);
  color: var(--sia-text);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sia-rd-refine-trigger:hover { border-color: var(--sia-primary); color: var(--sia-primary); }

.sia-rd-archive-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.sia-rd-archive-heading {
  font-family: var(--sia-font-display);
  font-size: 26px;
  font-weight: 800;
  margin: 0;
  color: var(--sia-text);
}

.sia-rd-subcats-rail {
  position: relative;
  margin-bottom: 16px;
}

.sia-rd-subcats-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 6px 2px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.sia-rd-subcats-scroll::-webkit-scrollbar { display: none; }

.sia-rd-subcat-pill {
  flex-shrink: 0;
  background: white;
  border: 1px solid var(--sia-border);
  color: var(--sia-text);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 100px;
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s ease;
}

.sia-rd-subcat-pill:hover,
.sia-rd-subcat-pill.active {
  background: var(--sia-primary);
  border-color: var(--sia-primary);
  color: white;
}

.sia-rd-subcats-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 1px solid var(--sia-border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 2;
}

@media (min-width: 720px) {
  .sia-rd-subcats-arrow { display: flex; }
  .sia-rd-subcats-arrow.left { left: -4px; }
  .sia-rd-subcats-arrow.right { right: -4px; }
  .sia-rd-subcats-scroll { padding-left: 36px; padding-right: 36px; }
}

/* Hero banner for current category */
.sia-rd-cat-hero {
  position: relative;
  min-height: 110px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-end;
  padding: 14px 16px;
  background-size: cover;
  background-position: center;
  color: white;
  isolation: isolate;
}

.sia-rd-cat-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.6) 100%);
  z-index: 0;
}

.sia-rd-cat-hero-content { position: relative; z-index: 1; max-width: 60ch; }

.sia-rd-cat-hero-title {
  font-family: var(--sia-font-display);
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 3px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.sia-rd-cat-hero-sub {
  font-size: 12px;
  margin: 0;
  opacity: 0.95;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

/* Fallback (no banner set) */
.sia-rd-cat-hero.fallback {
  background: linear-gradient(135deg, var(--sia-dark) 0%, #1a1a2e 60%, var(--sia-primary) 100%);
}

/* Sort/toolbar row */
.sia-rd-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--sia-border);
  border-bottom: 1px solid var(--sia-border);
  margin-bottom: 20px;
  font-size: 13px;
}

.sia-rd-toolbar-count { color: var(--sia-text-muted); }

/* Empty/zero-results fallback */
.sia-rd-empty {
  background: white;
  border-radius: 14px;
  border: 1px solid var(--sia-border);
  padding: 48px 24px;
  text-align: center;
}

.sia-rd-empty-icon { font-size: 42px; margin-bottom: 12px; }

.sia-rd-empty h3 {
  font-family: var(--sia-font-display);
  margin: 0 0 6px;
  font-size: 20px;
}

.sia-rd-empty p {
  color: var(--sia-text-muted);
  margin: 0 0 16px;
  font-size: 14px;
}
