/*
Theme Name: JSBBIL Storefront
Theme URI: https://jsbbil.local
Description: Child theme of Storefront, restyled to match the JSBBIL Piping Rock–style storefront (deep-green primary, orange accent, sage background, Poppins/Inter type, product-card styling).
Author: JSBBIL
Template: storefront
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jsbbil-storefront
*/

/* ==========================================================================
   Design tokens (mirror assets/css/styles.css)
   ========================================================================== */
:root {
  --c-primary: #0F5132;
  --c-primary-dark: #0B3B24;
  --c-primary-soft: #E7F2EC;
  --c-primary-tint: #F3F9F5;
  --c-accent: #E8590C;
  --c-accent-dark: #D9480F;
  --c-accent-soft: #FDEEE3;
  --c-sale: #C92A2A;
  --c-star: #F59F00;
  --c-text: #212529;
  --c-text-muted: #5C646C;
  --c-bg: #F2F7F3;
  --c-bg-soft: #E4EEE7;
  --c-border: #E9ECEB;
  --c-success: #2F9E44;
  --c-error: #C92A2A;
  --font-head: 'Poppins', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

body {
  font-family: var(--font-body);
  color: var(--c-text);
  background-color: var(--c-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--c-text);
}

a {
  color: var(--c-primary);
}
a:hover {
  color: var(--c-primary-dark);
}

/* ==========================================================================
   Header — deep green bar, Piping Rock feel
   ========================================================================== */
.site-header {
  background-color: var(--c-primary);
  border-bottom: none;
}
.site-header a,
.site-header .site-title a,
.main-navigation ul li a,
.main-navigation ul.menu > li > a,
.storefront-primary-navigation {
  color: #fff;
}
.main-navigation ul.menu > li > a:hover {
  color: var(--c-accent-soft);
}
.main-navigation ul.menu ul {
  background-color: #fff;
}
.main-navigation ul.menu ul li a {
  color: var(--c-text);
}
.site-search .search-field,
.site-header-cart .cart-contents {
  background-color: #fff;
  color: var(--c-text);
}
.site-header-cart .cart-contents .amount {
  color: var(--c-accent);
}

/* ==========================================================================
   Buttons — primary green / accent orange
   ========================================================================== */
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button,
.added_to_cart,
.wp-block-button__link {
  background-color: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
}
button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.button:hover,
.added_to_cart:hover {
  background-color: var(--c-primary-dark);
  border-color: var(--c-primary-dark);
  color: #fff;
}
.single_add_to_cart_button.button.alt,
a.button.alt {
  background-color: var(--c-accent);
  border-color: var(--c-accent);
}
.single_add_to_cart_button.button.alt:hover,
a.button.alt:hover {
  background-color: var(--c-accent-dark);
  border-color: var(--c-accent-dark);
}

/* ==========================================================================
   Product cards — mirror the JSBBIL .product-card look
   ========================================================================== */
ul.products li.product {
  background-color: #fff;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(33, 37, 41, .08);
  transition: box-shadow .2s ease, transform .2s ease;
}
ul.products li.product:hover {
  box-shadow: 0 8px 24px rgba(33, 37, 41, .14);
  transform: translateY(-3px);
}
ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  color: var(--c-text);
}
ul.products li.product .price {
  color: var(--c-primary);
  font-weight: 700;
  font-family: var(--font-head);
}
ul.products li.product .price del {
  color: var(--c-text-muted);
  font-weight: 400;
  opacity: .7;
}
ul.products li.product .price ins {
  color: var(--c-sale);
  text-decoration: none;
}
ul.products li.product .star-rating span::before {
  color: var(--c-star);
}
ul.products li.product .button {
  background-color: var(--c-primary);
  border-radius: 999px;
}
ul.products li.product .button:hover {
  background-color: var(--c-accent);
}

/* sale badge */
.onsale {
  background-color: var(--c-sale);
  border-radius: 999px;
  font-family: var(--font-head);
}

/* ==========================================================================
   Single product page
   ========================================================================== */
.single-product .product_title {
  font-family: var(--font-head);
  color: var(--c-text);
}
.single-product .price {
  color: var(--c-primary);
  font-weight: 700;
}
.single-product .price del {
  color: var(--c-text-muted);
  opacity: .7;
}
.single-product .price ins {
  color: var(--c-sale);
  text-decoration: none;
}
.woocommerce-tabs ul.tabs li a {
  color: var(--c-text-muted);
}
.woocommerce-tabs ul.tabs li.active a {
  color: var(--c-primary);
}
.related.products h2,
.woocommerce-tabs h2 {
  font-family: var(--font-head);
}

/* ==========================================================================
   Page sections / containers
   ========================================================================== */
.site-main,
.woocommerce-breadcrumb {
  color: var(--c-text-muted);
}
.woocommerce-breadcrumb a {
  color: var(--c-primary);
}
.hentry .entry-title {
  font-family: var(--font-head);
}

/* ==========================================================================
   Homepage replication — promo bar, hero carousel, goal dock, product grid
   ========================================================================== */
.jsbbil-home {
  background-color: var(--c-bg);
}

/* ---- Promo countdown bar ---- */
.jsbbil-promo-bar {
  background-color: var(--c-accent);
  color: #fff;
  text-align: center;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
}
.jsbbil-promo-bar a {
  color: #fff;
  text-decoration: underline;
  font-weight: 700;
}
.jsbbil-promo-bar a:hover {
  color: #fff;
}
.jsbbil-promo-sep {
  opacity: .7;
  margin: 0 6px;
}
.jsbbil-promo-suffix {
  opacity: .9;
  margin-right: 6px;
}
.jsbbil-countdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.jsbbil-countdown .cd-cell {
  display: inline-block;
  min-width: 26px;
  padding: 1px 6px;
  background-color: rgba(0, 0, 0, .22);
  border-radius: 6px;
  text-align: center;
}

/* ---- Hero carousel ---- */
.jsbbil-hero {
  position: relative;
  background: linear-gradient(180deg, #E7F2EC 0%, var(--c-bg) 100%);
  overflow: hidden;
}
.jsbbil-hero-track {
  position: relative;
}
.jsbbil-hero-slide {
  display: none;
}
.jsbbil-hero-slide.is-active {
  display: block;
}
.jsbbil-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
  min-height: 380px;
}
.jsbbil-hero-copy .eyebrow {
  color: var(--c-accent);
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
  margin-bottom: 12px;
}
.jsbbil-hero-copy h2 {
  font-size: 42px;
  line-height: 1.15;
  margin-bottom: 16px;
  font-weight: 700;
}
.jsbbil-hero-copy p {
  font-size: 17px;
  color: var(--c-text-muted);
  max-width: 460px;
  margin-bottom: 24px;
}
.jsbbil-hero-copy .btn {
  font-size: 16px;
}
.jsbbil-hero-media img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(33, 37, 41, .18);
  aspect-ratio: 8 / 5;
  object-fit: cover;
  background: var(--c-border);
}
.jsbbil-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--c-border);
  color: var(--c-primary);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(33, 37, 41, .12);
  z-index: 5;
}
.jsbbil-hero-arrow:hover {
  background: var(--c-primary);
  color: #fff;
}
.jsbbil-hero-arrow--prev {
  left: 24px;
}
.jsbbil-hero-arrow--next {
  right: 24px;
}
.jsbbil-hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.jsbbil-hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--c-border);
  cursor: pointer;
  padding: 0;
}
.jsbbil-hero-dots button.is-active {
  background: var(--c-accent);
  transform: scale(1.3);
}

/* ---- Sections ---- */
.jsbbil-section {
  padding: 48px 0;
}
.jsbbil-section--soft {
  background-color: #fff;
}
.jsbbil-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
}
.link-arrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  color: var(--c-accent);
}

/* ---- Goal dock ---- */
.jsbbil-goals-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.goal-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 14px;
  text-align: center;
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.goal-tile:hover {
  border-color: var(--c-primary);
  box-shadow: 0 6px 18px rgba(33, 37, 41, .10);
  transform: translateY(-2px);
  text-decoration: none;
}
.goal-tile .goal-ico {
  color: var(--c-primary);
}
.goal-tile span:last-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.3;
}

/* ---- Product grid (replicated cards) ---- */
ul.jsbbil-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.jsbbil-products li.product.jsbbil-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(33, 37, 41, .08);
  transition: box-shadow .2s ease, transform .2s ease;
  display: block;
  padding: 0;
}
ul.jsbbil-products li.product.jsbbil-card:hover {
  box-shadow: 0 8px 24px rgba(33, 37, 41, .14);
  transform: translateY(-3px);
}
.jsbbil-card .pc-media {
  display: block;
  position: relative;
  aspect-ratio: 1;
  background: var(--c-bg-soft);
}
.jsbbil-card .pc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.jsbbil-card .pc-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--c-sale);
  color: #fff;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 2;
}
.jsbbil-card .pc-body {
  padding: 16px;
}
.jsbbil-card .pc-title {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  color: var(--c-text);
  margin-bottom: 8px;
  text-decoration: none;
}
.jsbbil-card .pc-title:hover {
  color: var(--c-primary);
  text-decoration: none;
}
.jsbbil-card .stars {
  position: relative;
  display: inline-block;
  font-size: 14px;
  letter-spacing: 2px;
  color: #ddd;
  line-height: 1;
  margin-bottom: 6px;
}
.jsbbil-card .stars-fill {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--c-star);
}
.jsbbil-card .stars-bg {
  color: #ddd;
}
.jsbbil-card .pc-reviews {
  font-size: 12px;
  color: var(--c-text-muted);
  margin-left: 6px;
}
.jsbbil-card .pc-price {
  margin-top: 6px;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--c-primary);
}
.jsbbil-card .pc-price del {
  color: var(--c-text-muted);
  font-weight: 400;
  opacity: .7;
  margin-right: 6px;
}
.jsbbil-card .pc-price ins {
  color: var(--c-sale);
  text-decoration: none;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .jsbbil-hero-inner {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .jsbbil-hero-media {
    order: -1;
  }
  .jsbbil-hero-copy h2 {
    font-size: 30px;
  }
  .jsbbil-goals-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  ul.jsbbil-products {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .jsbbil-goals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  ul.jsbbil-products {
    grid-template-columns: 1fr;
  }
}
