/* ==========================================================================
   Local Shop — base styles
   Colours come from CSS custom properties set inline in wp_head (see
   localshop_inline_theme_vars() in functions.php) so each site can change
   its accent colours from the Customizer without editing this file.
   ========================================================================== */

:root {
  --ls-accent: #1B4332;
  --ls-accent2: #E8734A;
  --ls-bg: #FAF8F3;
  --ls-text: #17301F;
  --ls-muted: #6E6A5E;
  --ls-border: #E4DFD3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--ls-bg);
  color: var(--ls-text);
}

a { color: var(--ls-accent); text-decoration: none; }
a:hover { color: var(--ls-accent2); }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---- Header ---- */
.ls-header { width: 100%; background: var(--ls-bg); }
.ls-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ls-shop-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ls-accent) !important;
  flex-shrink: 0;
}
.ls-search-bar {
  flex-grow: 1;
  max-width: 440px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 1.5px solid var(--ls-border);
  border-radius: 999px;
  padding: 10px 18px;
  color: #8A8578;
}
.ls-search-bar input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  width: 100%;
  color: var(--ls-text);
}
.ls-cart-button {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--ls-border);
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ls-text) !important;
  flex-shrink: 0;
}
.ls-cart-button-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--ls-accent2);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.ls-cart-button-count[data-zero="true"] { display: none; }

/* ---- Hero ---- */
.ls-hero { width: 100%; background: var(--ls-accent); color: #FFFFFF; }
.ls-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px clamp(16px, 4vw, 48px) 34px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ls-hero-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #B7CFC0;
}
.ls-hero h1 {
  margin: 0;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 640px;
  line-height: 1.05;
}
.ls-hero-tagline {
  margin: 0;
  font-size: 17px;
  color: #D7E5DC;
  max-width: 520px;
}

.ls-fulfilment-toggle {
  display: inline-flex;
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 4px;
  margin-top: 6px;
  width: fit-content;
}
.ls-fulfilment-btn {
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: #FFFFFF;
}
.ls-fulfilment-btn.is-active {
  background: #FFFFFF;
  color: var(--ls-accent);
}

.ls-fulfilment-panel { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ls-fulfilment-panel[hidden] { display: none; }
.ls-picker-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B7CFC0;
}
.ls-chip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.ls-picker-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,0.35);
  background: transparent;
  color: #FFFFFF;
}
.ls-picker-chip.is-active {
  border-color: #FFFFFF;
  background: #FFFFFF;
  color: var(--ls-text);
}
.ls-fulfilment-note {
  font-size: 14px;
  color: #D7E5DC;
  font-weight: 600;
  margin-top: 2px;
}

/* ---- Category chip nav ---- */
.ls-cat-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  background: var(--ls-bg);
  border-bottom: 1px solid var(--ls-border);
}
.ls-cat-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px clamp(16px, 4vw, 48px);
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.ls-cat-nav-inner::-webkit-scrollbar { height: 0; }
.ls-chip {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 9px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  border: 1.5px solid var(--ls-border);
  background: #FFFFFF;
  color: var(--ls-text);
}
.ls-chip.is-active {
  border-color: var(--ls-accent2);
  background: var(--ls-accent2);
  color: #FFFFFF;
}

/* ---- Product grid ---- */
.ls-shop-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px clamp(16px, 4vw, 48px) 120px;
}
.ls-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.ls-product-card {
  background: #FFFFFF;
  border: 1px solid #EFEBE1;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.ls-product-card:hover {
  box-shadow: 0 8px 24px rgba(23,48,31,0.12);
  transform: translateY(-2px);
}
.ls-product-card.ls-hidden { display: none; }
.ls-product-media { display: block; }
.ls-product-media img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}
.ls-product-tile {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}
.ls-product-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--ls-text) !important;
}
.ls-product-excerpt {
  margin: 0;
  font-size: 13.5px;
  color: var(--ls-muted);
  line-height: 1.4;
}
.ls-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.ls-product-price { font-size: 16px; font-weight: 800; }

/* Restyle WooCommerce's own Add to Basket button/link to match the design */
.ls-product-row a.button,
.ls-product-row a.add_to_cart_button {
  width: 34px;
  height: 34px;
  border-radius: 50% !important;
  border: none !important;
  background: var(--ls-accent2) !important;
  color: #FFFFFF !important;
  font-size: 20px !important;
  font-weight: 700;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-indent: -9999px;
  position: relative;
  padding: 0 !important;
}
.ls-product-row a.button::after,
.ls-product-row a.add_to_cart_button::after {
  content: '+';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-indent: 0;
  font-size: 20px;
}
.ls-product-row a.button:hover,
.ls-product-row a.add_to_cart_button:hover { background: var(--ls-text) !important; }

/* ---- Floating basket bar ---- */
.ls-floating-cart {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: calc(100% - 32px);
  max-width: 420px;
  display: flex;
  justify-content: center;
}
.ls-floating-cart-link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ls-text);
  color: #FFFFFF !important;
  border-radius: 999px;
  padding: 16px 24px;
  font-size: 14.5px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ls-floating-cart-count {
  background: var(--ls-accent2);
  border-radius: 999px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.ls-floating-cart-dot { opacity: 0.6; }

/* ---- Footer ---- */
.ls-footer { border-top: 1px solid var(--ls-border); margin-top: 40px; }
.ls-footer-inner { max-width: 1280px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 48px); color: var(--ls-muted); }

.ls-generic-wrap { max-width: 1000px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 48px) 100px; }
.ls-page-title { font-size: 28px; font-weight: 800; margin: 0 0 24px; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .ls-hero h1 { font-size: 32px; }
  .ls-search-bar { display: none; }
}
