/* ============================================================
   TCS Spotlight Layout — Clean, Organized, Responsive
   - Tokens/skin come from CSS variables (Advanced Settings)
   - Desktop-first; tablet & mobile tweaks at the end
   ============================================================ */


/* ========== 1) BASE / WRAPPERS ============================================ */

.tcs-spotlight {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  background: #fff;
}

.tcs-shell {
  width: 100%;
  margin: 0;
  background: #fff;
}


/* ========== 2) HEADER & TOPBAR ============================================ */

/* Header wrapper fills the top; bg uses --tcs-header-bg */
.tcs-header-wrap {
  background: var(--tcs-header-bg);
  padding: 55px clamp(16px, 4vw, 32px) 28px;
}

/* Topbar (locations / pills / actions) */
.tcs-topbar {
  background: var(--tcs-pills-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px clamp(16px, 4vw, 32px);
}

/* Make center pills transparent (requested) */
.tcs-topbar-center .tcs-pills { background: transparent; }

/* Optional: location links look like pills on white */
.tcs-locations-pills a { background: #fff; }


/* ========== 3) BANNER (INSIDE HEADER) ===================================== */

/* Banner sits inside header bg so the header color frames it */
.tcs-header-banner {
  width: 90%;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #e9f2fb;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}

.tcs-header-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Spotlight banner swap (desktop vs mobile) */
.tcs-spot-banner__img { height: <?php echo (int)$store_banner_height; ?>px; }
.tcs-spot-banner--desktop { display: block; }
.tcs-spot-banner--mobile { display: none; }


/* ========== 4) HEADER INNER — TWO-COLUMN BLOCK ============================ */

.tcs-header-inner {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr 1fr; /* 50/50 */
  width: 90%;
  margin: 4% auto 50px auto;
}

/* Left: logo => name => info */
.tcs-left {
  display: grid;
  gap: 14px;
  align-content: start;
  margin-top: 15px;
}

.tcs-logo {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.tcs-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Store name & descriptive text */
.tcs-store-name {
  margin: 0;
  font-size: 2rem;
  line-height: 1.15;
  font-weight: 800;
  color: var(--tcs-name-color); /* default/fallback name color */
}

/* Override header text colors via Advanced Settings when inside header */
.tcs-header-wrap .tcs-store-name {
  color: var(--tcs-header-title-color, var(--tcs-name-color));
}

.tcs-store-desc,
.tcs-info {
  color: var(--tcs-subtitle-color, #64748b);
}

.tcs-header-wrap .tcs-store-desc,
.tcs-header-wrap .tcs-info {
  color: var(--tcs-header-subtitle-color, var(--tcs-subtitle-color, #64748b));
}

.tcs-info { display: grid; gap: 6px; }
.tcs-info p { margin: 0; }
.tcs-info a { text-decoration: none; color: inherit; }

/* Right: featured products block */
.tcs-featured {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.tcs-featured h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

/* Featured grid (auto-fit 1–3 columns) */
.tcs-featured-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.tcs-featured-card {
  text-align: center;
  border: 0;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.tcs-fthumb {
  position: relative; /* for overlay badge */
  width: 100%;
  height: 173px;
  margin: 0 auto 8px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tcs-fthumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tcs-thumb-overlay {
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 55px;
  height: 55px;
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.tcs-thumb-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tcs-ftitle {
  margin: 0 0 4px;
  min-height: 34px;
  color: var(--tcs-pro-title-color);
  font-size: var(--tcs-pro-title-size);
  font-weight: var(--tcs-pro-title-weight);
}

.tcs-fprice {
  color: var(--tcs-price-color);
  font-size: var(--tcs-price-size);
}


/* ========== 5) MAIN PRODUCT GRID (BELOW HEADER) =========================== */

.tcs-grid {
  padding: 18px clamp(16px, 4vw, 32px);
  display: grid;
  gap: 22px; /* clean vertical rhythm for cards */
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  background: var(--tcs-grid-bg);
}

/* Product card */
.tcs-card {
  background: #fff;
  border: 0;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
}

.tcs-thumb {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 10px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tcs-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Title / Price via shared vars */
.tcs-title {
  color: var(--tcs-pro-title-color);
  font-size: var(--tcs-pro-title-size);
  font-weight: var(--tcs-pro-title-weight);
  margin: 10px 0 6px;
  min-height: 36px;
  line-height: 1.25;
}

.tcs-spotlight .woocommerce-Price-amount.amount {
  color: var(--tcs-price-color);
  font-size: var(--tcs-price-size);
}

/* Simple color swatches */
.tcs-swatches {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
}

.tcs-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  display: inline-block;
  overflow: hidden;
}

.tcs-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ========== 6) FILTERS / INPUTS / PILLS =================================== */

.tcs-catsbar { padding: 0; background: transparent; }

.tcs-filters {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  background: transparent;
}

.tcs-input,
.tcs-select {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 38px;
  background: #fff;
  font-size: 14px;
}

.tcs-btn {
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Pills wrap */
.tcs-pills {
  display: grid;
  justify-content: center;
  padding: 10px 0 16px;
  background: transparent;
}

/* Optional: outline for locations pills */
.tcs-locations-pills a {
  border: 1px solid #000000;
}


/* ========== 7) PAGINATION TWEAKS ========================================== */

.page-numbers.dots { margin-top: 0 !important; }


/* ========== 8) HORIZONTAL SCROLL — CATEGORY PILLS ========================= */

ul.categories_list {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch; /* smooth iOS scroll */
  scrollbar-width: none;             /* hide Firefox scrollbar */
  flex-wrap: nowrap;
}

ul.categories_list::-webkit-scrollbar { display: none; }

ul.categories_list li { flex: 0 0 auto; }

ul.categories_list a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #111827;
  background: #ffffff;
  white-space: nowrap; /* prevent wrapping */
}

ul.categories_list a:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}


/* ========================================================================== */
/* ======================= RESPONSIVE BREAKPOINTS =========================== */
/* ========================================================================== */

/* ---- Tablet-ish: ≤1200px (product columns reduce) ----------------------- */
@media (max-width: 1200px) {
  .tcs-grid {
    grid-template-columns: repeat(var(--cols-md, 3), minmax(0, 1fr));
  }
}

/* ---- Narrow desktops / big tablets: ≤900px (header stack) --------------- */
@media (max-width: 900px) {
  .tcs-header-inner {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px auto 28px;
  }
}

/* ---- Tablets: ≤820px (2-up product grid) -------------------------------- */
@media (max-width: 820px) {
  .tcs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- Phones: ≤640px (mobile layout) ------------------------------------- */
@media (max-width: 640px) {
  .tcs-header-wrap {
    padding: 28px 1px 20px 1px;
  }

  .tcs-logo {
    width: 84px;
    height: 84px;
  }

  .tcs-store-name {
    font-size: 1.5rem;
  }

  .tcs-featured {
    padding: 12px;
  }

  .tcs-thumb {
    width: 160px;
    height: 160px;
  }

  /* Swap to mobile banner image/height */
  .tcs-spot-banner__img {
    height: <?php echo (int)$store_banner_mheight; ?>px;
  }
  .tcs-spot-banner--desktop { display: none; }
  .tcs-spot-banner--mobile { display: block; }
}

/* ---- Very small phones: optional featured grid simplification ------------ */
@media (max-width: 559px) {
  .tcs-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .tcs-featured-grid {
    grid-template-columns: 1fr;
  }
}
