/* ==========================================================================
   HOMEPAGE + SITE-WIDE — Announcement bar, hero slider, sliding product
   rows, category grid, promo banners, sticky bottom nav.
   Uses the design tokens defined in style.css (including any per-category
   override injected inline by the PHP snippet).
   ========================================================================== */

/* -----------------------------------------------------------------------
   ANNOUNCEMENT BAR — site-wide, above the header
   ----------------------------------------------------------------------- */
.tbol-announcement-bar {
  background: var(--tbol-accent);
  color: var(--tbol-accent-ink);
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
}

.tbol-homepage {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* -----------------------------------------------------------------------
   HERO SLIDER
   ----------------------------------------------------------------------- */
.tbol-hero-slider { position: relative; margin: 16px 0 32px; border-radius: var(--tbol-radius-lg); overflow: hidden; }
.tbol-hero-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tbol-hero-track::-webkit-scrollbar { display: none; }
.tbol-hero-slide { flex: 0 0 100%; scroll-snap-align: start; min-height: 260px; background-size: cover; background-position: center; background-color: var(--tbol-ink-raised); display: flex; align-items: flex-end; position: relative; }
.tbol-hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 60%); }
@media (min-width: 768px) { .tbol-hero-slide { min-height: 400px; } }
.tbol-hero-content { position: relative; z-index: 2; padding: 24px; color: var(--tbol-text); max-width: 480px; }
.tbol-hero-content h2 { font-family: var(--tbol-font-heading); font-size: 22px; font-weight: 700; margin: 0 0 6px; }
@media (min-width: 768px) { .tbol-hero-content h2 { font-size: 32px; } }
.tbol-hero-content p { font-size: 14px; color: var(--tbol-text-soft); margin: 0 0 14px; }
.tbol-hero-btn { display: inline-block; background: var(--tbol-accent); color: var(--tbol-accent-ink); font-weight: 700; font-size: 13px; padding: 10px 18px; border-radius: var(--tbol-radius-sm); text-decoration: none; }
.tbol-hero-btn:hover { background: var(--tbol-accent-dark); color: var(--tbol-accent-ink); }
.tbol-hero-dots { position: absolute; bottom: 14px; right: 20px; z-index: 3; display: flex; gap: 6px; }
.tbol-hero-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(244, 237, 227, .4); border: none; padding: 0; cursor: pointer; }
.tbol-hero-dot.tbol-active { background: var(--tbol-lime); width: 18px; border-radius: 999px; transition: width .2s ease; }

/* -----------------------------------------------------------------------
   SECTION TITLES + VIEW ALL
   ----------------------------------------------------------------------- */
.tbol-home-section { margin: 36px 0; }
.tbol-row-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.tbol-section-title { font-family: var(--tbol-font-heading); font-size: 19px; font-weight: 700; color: var(--tbol-text); margin: 0; }
.tbol-home-section > .tbol-section-title { margin-bottom: 16px; }
.tbol-view-all { font-size: 12.5px; font-weight: 600; color: var(--tbol-accent); text-decoration: none; white-space: nowrap; }
.tbol-view-all:hover { color: var(--tbol-accent-dark); }

/* Shop by category — style WooCommerce's native [product_categories] output */
.tbol-home-section ul.products.product-category { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (min-width: 768px) { .tbol-home-section ul.products.product-category { grid-template-columns: repeat(6, 1fr); } }
.tbol-home-section ul.products.product-category li.product-category { background: var(--tbol-ink-raised); border: 1px solid var(--tbol-border); border-radius: var(--tbol-radius-md); padding: 14px 8px; text-align: center; }
.tbol-home-section ul.products.product-category li.product-category img { border-radius: var(--tbol-radius-sm); }
.tbol-home-section ul.products.product-category li.product-category h2 { color: var(--tbol-text); font-size: 12.5px; font-weight: 600; margin: 8px 0 0; }
.tbol-home-section ul.products.product-category li.product-category .count { color: var(--tbol-text-soft); font-size: 11px; }

/* -----------------------------------------------------------------------
   SLIDING PRODUCT ROWS — app-style horizontal swipe
   Touch devices: native finger swipe. Desktop: visible arrow buttons
   (no swipe gesture exists with a mouse, so arrows are the correct
   desktop-equivalent interaction).
   ----------------------------------------------------------------------- */
.tbol-scroll-wrap { position: relative; }

ul.products.tbol-scroll-row {
  display: flex !important;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
ul.products.tbol-scroll-row::-webkit-scrollbar { display: none; }

ul.products.tbol-scroll-row li.product {
  flex: 0 0 42%;
  scroll-snap-align: start;
}
@media (min-width: 640px) { ul.products.tbol-scroll-row li.product { flex: 0 0 30%; } }
@media (min-width: 900px) { ul.products.tbol-scroll-row li.product { flex: 0 0 22%; } }
@media (min-width: 1200px) { ul.products.tbol-scroll-row li.product { flex: 0 0 18.5%; } }

.tbol-scroll-arrow {
  display: none;
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--tbol-border);
  background: var(--tbol-ink-raised);
  color: var(--tbol-text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 4;
  box-shadow: var(--tbol-shadow-sm);
}
.tbol-scroll-prev { left: -14px; }
.tbol-scroll-next { right: -14px; }

/* Only show arrows where a real hover/pointer device exists (desktop) —
   phones and tablets rely on native touch-swipe instead. */
@media (hover: hover) and (pointer: fine) {
  .tbol-scroll-arrow { display: flex; align-items: center; justify-content: center; }
}

/* -----------------------------------------------------------------------
   PROMO BANNERS
   ----------------------------------------------------------------------- */
.tbol-banner-row { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .tbol-banner-row { grid-template-columns: 1fr 1fr; } }
.tbol-promo-banner { display: block; border-radius: var(--tbol-radius-md); overflow: hidden; }
.tbol-promo-banner img { width: 100%; display: block; aspect-ratio: 16 / 7; object-fit: cover; }

/* -----------------------------------------------------------------------
   AGE GATE — see PHP snippet for markup, this only covers page-scroll lock
   ----------------------------------------------------------------------- */

/* -----------------------------------------------------------------------
   STICKY BOTTOM APP NAV
   ----------------------------------------------------------------------- */
.tbol-app-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 998; display: flex; background: var(--tbol-ink-raised); border-top: 1px solid var(--tbol-border); padding: 8px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0, 0, 0, .4); }
@media (min-width: 901px) { .tbol-app-nav { display: none; } }
.tbol-app-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--tbol-text-soft); font-size: 10.5px; position: relative; }
.tbol-app-nav a:hover, .tbol-app-nav a:active { color: var(--tbol-accent); }

.tbol-icon { width: 20px; height: 20px; display: inline-block; background-color: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.tbol-icon-home { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M3 11l9-8 9 8'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M3 11l9-8 9 8'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3C/svg%3E"); }
.tbol-icon-shop { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M3 7h18l-1.5 12h-15z'/%3E%3Cpath d='M8 7V5a4 4 0 018 0v2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M3 7h18l-1.5 12h-15z'/%3E%3Cpath d='M8 7V5a4 4 0 018 0v2'/%3E%3C/svg%3E"); }
.tbol-icon-grid { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E"); }
.tbol-icon-cart { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2 3h2l2.6 12.4a2 2 0 002 1.6h9a2 2 0 002-1.9L21 7H6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2 3h2l2.6 12.4a2 2 0 002 1.6h9a2 2 0 002-1.9L21 7H6'/%3E%3C/svg%3E"); }
.tbol-icon-user { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E"); }

.tbol-app-nav-cart { position: relative; }
.tbol-cart-count { position: absolute; top: -2px; right: 18px; background: var(--tbol-lime); color: var(--tbol-lime-ink); font-size: 9px; font-weight: 700; min-width: 15px; height: 15px; line-height: 15px; border-radius: 999px; text-align: center; }

body:not(.single-product) { padding-bottom: 64px; }
@media (min-width: 901px) { body:not(.single-product) { padding-bottom: 0; } }
