/*
Theme Name: Jubayl
Theme URI: https://jubayl.nl
Description: Custom Jubayl storefront theme — matches the app-style mockups (light, cream/gold, serif + sans). Child theme of Hello Elementor. Requires WooCommerce.
Author: Custom build for Jubayl
Template: hello-elementor
Version: 1.0.0
Text Domain: jubayl
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root{
  --jb-bg: #ffffff;
  --jb-bg-alt: #faf7f2;
  --jb-text: #1a1a1a;
  --jb-text-muted: #767267;
  --jb-gold: #c9a876;
  --jb-gold-light: #e9dcc3;
  --jb-border: #ebe5da;
  --jb-black-btn: #1a1a1a;

  --jb-font-serif: 'Cormorant', serif;
  --jb-font-sans: 'Poppins', sans-serif;

  --jb-radius-lg: 20px;
  --jb-radius-md: 14px;
  --jb-radius-pill: 999px;

  --jb-bottom-nav-height: 68px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
body{
  font-family: var(--jb-font-sans);
  color: var(--jb-text);
  background: var(--jb-bg);
  font-size: 15px;
  line-height: 1.6;
  padding-bottom: var(--jb-bottom-nav-height);
}
h1, h2, h3, h4, .jb-logo{
  font-family: var(--jb-font-serif);
  color: var(--jb-text);
  letter-spacing: .02em;
  margin: 0;
}
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin: 0; padding: 0; }
img{ max-width: 100%; display: block; }

.jb-accent{ color: var(--jb-gold); }

/* ==========================================================================
   3. Buttons
   ========================================================================== */
.jb-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--jb-radius-pill);
  padding: 14px 28px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: var(--jb-font-sans);
  border: none;
  cursor: pointer;
}
.jb-btn-gold{ background: var(--jb-gold); color: var(--jb-text); }
.jb-btn-dark{ background: var(--jb-black-btn); color: #f5f2ec; }

/* Style WooCommerce/WordPress native buttons to match */
.button, button.single_add_to_cart_button, input[type="submit"], .wp-block-button__link{
  background: var(--jb-black-btn) !important;
  color: #f5f2ec !important;
  border: none !important;
  border-radius: var(--jb-radius-pill) !important;
  padding: 15px 28px !important;
  font-size: 13px !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  font-family: var(--jb-font-sans) !important;
}

/* ==========================================================================
   4. Header
   ========================================================================== */
.jb-header{
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--jb-bg);
  border-bottom: 1px solid var(--jb-border);
}
.jb-header-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.jb-logo{
  font-size: 20px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.jb-header-icons{ display: flex; gap: 14px; align-items: center; }
.jb-icon-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--jb-text);
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}
.jb-cart-count{
  position: absolute;
  top: -2px; right: -2px;
  background: var(--jb-gold);
  color: var(--jb-text);
  font-size: 10px;
  min-width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--jb-font-sans);
}
.jb-mobile-menu{
  display: none;
  flex-direction: column;
  padding: 0 20px 16px;
  gap: 10px;
  font-family: var(--jb-font-sans);
}
.jb-mobile-menu.open{ display: flex; }

/* ==========================================================================
   5. Bottom mobile tab bar
   ========================================================================== */
.jb-bottom-nav{
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--jb-bottom-nav-height);
  background: var(--jb-bg);
  border-top: 1px solid var(--jb-border);
  display: flex;
  z-index: 50;
}
.jb-bn-item{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  color: var(--jb-text-muted);
}
.jb-bn-item.active{ color: var(--jb-text); }
@media (min-width: 1024px){
  .jb-bottom-nav{ display: none; }
  body{ padding-bottom: 0; }
}

/* ==========================================================================
   6. Footer
   ========================================================================== */
.jb-footer{
  background: #1a1a1a;
  color: #e8e3da;
  margin-bottom: var(--jb-bottom-nav-height);
  padding: 48px 20px 24px;
}
@media (min-width: 1024px){ .jb-footer{ margin-bottom: 0; } }
.jb-footer-inner{
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px){
  .jb-footer-inner{ grid-template-columns: repeat(3, 1fr); }
}
.jb-footer-col h4{
  font-family: var(--jb-font-sans);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--jb-gold);
  margin-bottom: 12px;
}
.jb-footer-col a{ display: block; margin-bottom: 8px; color: #cfc9c0; font-size: 14px; }
.jb-footer-logo{ color: #f5f2ec; margin-bottom: 8px; }
.jb-footer-bottom{
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 12px;
  color: #9a948a;
}

/* ==========================================================================
   7. Home — hero
   ========================================================================== */
.jb-home{ max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.jb-hero{
  position: relative;
  padding: 48px 0 40px;
  overflow: hidden;
}
.jb-hero-arch{
  position: absolute;
  right: -60px; top: -20px;
  width: 260px; height: 340px;
  background: var(--jb-bg-alt);
  border-radius: 50% 50% 0 0 / 60% 60% 0 0;
  opacity: .8;
  z-index: 0;
}
.jb-hero-content{ position: relative; z-index: 1; max-width: 480px; }
.jb-hero-title{ font-size: 34px; font-weight: 500; line-height: 1.25; margin-bottom: 16px; }
.jb-hero-sub{ color: var(--jb-text-muted); margin-bottom: 24px; font-size: 14px; }

/* ==========================================================================
   8. Home — feature strip
   ========================================================================== */
.jb-features{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--jb-border);
}
@media (min-width: 768px){ .jb-features{ grid-template-columns: repeat(4, 1fr); } }
.jb-feature{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--jb-text-muted);
}
.jb-feature-icon{
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--jb-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--jb-text);
}

/* ==========================================================================
   9. Home — categories & sections
   ========================================================================== */
.jb-section-header{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}
.jb-section-header h2{ font-size: 22px; }
.jb-section-header a{ font-size: 13px; color: var(--jb-text-muted); }

.jb-categories{ padding: 24px 0; }
.jb-category-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 768px){ .jb-category-grid{ grid-template-columns: repeat(4, 1fr); } }
.jb-category-card{
  border: 1px solid var(--jb-border);
  border-radius: var(--jb-radius-md);
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--jb-text);
}
.jb-category-icon{ color: var(--jb-gold); }

.jb-new-collection{ padding: 24px 0 56px; }
.jb-new-collection ul.products{
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
}
@media (min-width: 768px){
  .jb-new-collection ul.products{ grid-template-columns: repeat(4, 1fr) !important; }
}
.jb-new-collection ul.products li.product{
  border: 1px solid var(--jb-border);
  border-radius: var(--jb-radius-md);
  padding: 12px;
}
.jb-new-collection ul.products li.product img{ border-radius: 10px; }

/* ==========================================================================
   10. Single product
   ========================================================================== */
.jb-product-page{ max-width: 560px; margin: 0 auto; padding: 24px 20px 56px; }

.jb-product-gallery-frame{
  background: linear-gradient(180deg, var(--jb-bg-alt) 0%, var(--jb-gold-light) 100%);
  border-radius: 50% 50% 16px 16px / 55% 55% 8% 8%;
  padding: 28px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.jb-product-gallery-frame img{
  max-height: 420px;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}
.jb-product-gallery-frame .flex-control-nav{ display: none; }

.jb-product-summary .product_title{
  text-align: center;
  font-size: 26px;
  margin-bottom: 6px;
}
.jb-product-summary .woocommerce-product-details__short-description{
  text-align: center;
  color: var(--jb-text-muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.jb-product-summary p.price{
  text-align: center;
  font-size: 20px;
  font-family: var(--jb-font-serif);
  margin-bottom: 24px;
  display: block;
}

.jb-product-form .variations{ width: 100%; border: none; }
.jb-product-form .variations tbody,
.jb-product-form .variations tr,
.jb-product-form .variations td,
.jb-product-form .variations th{
  display: block; width: 100%; border: none; padding: 0;
}
.jb-product-form .variations tr{ margin-bottom: 20px; }
.jb-product-form .variations label{
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--jb-text-muted); margin-bottom: 10px; display: block;
}
.jb-product-form .reset_variations{ display: block; font-size: 12px; color: #999; margin-top: -8px; margin-bottom: 16px; }
.jb-product-form .single_variation_wrap .woocommerce-variation-price,
.jb-product-form .single_variation_wrap .woocommerce-variation-availability{ display: none; }
.jb-product-form .quantity{ display: none; } /* default qty=1; remove this rule to show quantity input */
.jb-product-form button.single_add_to_cart_button{ width: 100%; }

/* Built-in swatches (shared with assets/js/swatches.js) */
.jubayl-sw-hidden{ display: none !important; }
ul.jubayl-swatches{ display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 4px; }
li.jubayl-swatch{ cursor: pointer; }
li.jubayl-swatch-color{
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
li.jubayl-swatch-color.selected{ border-color: var(--jb-text); }
li.jubayl-swatch-size{
  min-width: 44px; height: 44px; padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--jb-border);
  background: #fff;
  color: var(--jb-text);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
li.jubayl-swatch-size.selected{
  background: var(--jb-gold); border-color: var(--jb-gold); color: var(--jb-text);
}
li.jubayl-swatch.disabled{ opacity: .3; pointer-events: none; }

.jb-product-tabs{ margin-top: 48px; }
.jb-related-products{ margin-top: 48px; }

/* ==========================================================================
   11. Shop / category archive
   ========================================================================== */
.jb-shop-page{ max-width: 720px; margin: 0 auto; padding: 20px 20px 56px; }
.jb-shop-header{
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.jb-shop-title{ font-size: 20px; letter-spacing: .1em; text-transform: uppercase; }

.jb-shop-badges{
  display: flex; gap: 24px; margin-bottom: 28px; flex-wrap: wrap;
}
.jb-badge{
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--jb-text-muted);
}

.jb-product-list{ display: flex; flex-direction: column; gap: 16px; }
.jb-product-list-item{
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--jb-border);
  border-radius: var(--jb-radius-md);
  padding: 12px;
}
.jb-product-list-thumb{ width: 72px; height: 72px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: var(--jb-bg-alt); }
.jb-product-list-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.jb-product-list-info{ flex: 1; }
.jb-product-list-info h3{ font-size: 15px; font-weight: 500; margin-bottom: 4px; font-family: var(--jb-font-sans); }
.jb-product-list-price{ font-size: 14px; color: var(--jb-text-muted); }
.jb-product-list-arrow{
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--jb-gold);
  display: flex; align-items: center; justify-content: center;
  color: var(--jb-text);
  flex-shrink: 0;
}

/* ==========================================================================
   12. Secondary pages baseline (cart, checkout, my-account, page/post)
   ========================================================================== */
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content,
.woocommerce-account .entry-content,
.page .entry-content,
.single .entry-content{
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 56px;
  font-family: var(--jb-font-sans);
}
.woocommerce table.shop_table{
  border-color: var(--jb-border);
  border-radius: var(--jb-radius-md);
}
.woocommerce input.input-text,
.woocommerce select,
.woocommerce textarea{
  border: 1px solid var(--jb-border) !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-family: var(--jb-font-sans) !important;
}
