/* ============================================================
   JJ Stuff — Product Page
   ============================================================ */

/* Breadcrumb */
.breadcrumb{
  max-width:var(--wrap);margin:0 auto;padding:14px clamp(16px,4vw,24px);
  font-size:12px;color:var(--light);display:flex;gap:6px;align-items:center;flex-wrap:wrap;
}
.breadcrumb a{color:var(--muted);text-decoration:none;font-weight:600}
.breadcrumb a:hover{color:var(--coral)}
.breadcrumb .current{color:var(--navy);font-weight:600}

/* Layout */
.product{
  max-width:var(--wrap);margin:0 auto;padding:0 clamp(16px,4vw,24px) 56px;
  display:grid;grid-template-columns:1fr 420px;gap:40px;align-items:start;
}

/* Gallery */
.gallery{position:sticky;top:74px}
.gallery__main{
  border-radius:14px;overflow:hidden;background:var(--cream);aspect-ratio:1;
  display:flex;align-items:center;justify-content:center;margin-bottom:10px;position:relative;
}
.gallery__ph{
  width:100%;height:100%;display:flex;align-items:center;justify-content:center;
  font-family:var(--font-hand);font-size:16px;color:rgba(255,255,255,.75);text-align:center;
  transition:background .2s;
}
.gallery__tag{position:absolute;top:14px;left:14px}
.gallery__thumbs{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.thumb{
  border-radius:var(--radius-sm);aspect-ratio:1;border:2px solid transparent;cursor:pointer;overflow:hidden;
  display:flex;align-items:center;justify-content:center;font-size:11px;font-family:var(--font-hand);
  color:rgba(255,255,255,.85);transition:border-color .15s;background:var(--cream);padding:0;
}
.thumb[aria-pressed="true"]{border-color:var(--coral)}
.thumb:hover{border-color:var(--coral-lt)}

/* Product info */
.pinfo__badges{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.pinfo__cat{font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-text);margin-bottom:6px}
.pinfo__title{font-family:var(--font-head);font-size:clamp(28px,5vw,34px);line-height:1.05;margin-bottom:10px}
.pinfo__rating{display:flex;align-items:center;gap:8px;margin-bottom:14px}
.stars{color:var(--gold);font-size:15px;letter-spacing:1px}
.pinfo__rating a{font-size:12px;color:var(--muted);text-decoration:none}
.pinfo__rating a:hover{color:var(--coral)}
.pinfo__price{display:flex;align-items:baseline;gap:10px;margin-bottom:8px}
.pinfo__price-main{font-family:var(--font-head);font-size:36px;color:var(--navy)}
.pinfo__price-was{font-size:18px;color:var(--light);text-decoration:line-through}
.pinfo__desc{
  font-size:14px;color:var(--muted);line-height:1.75;margin-bottom:22px;
  padding-bottom:22px;border-bottom:1px solid var(--cream);
}

/* Variants */
.var{margin-bottom:18px}
.var__label{font-size:12px;font-weight:700;color:var(--navy);margin-bottom:8px}
.var__label em{font-style:normal;font-weight:400;color:var(--muted)}
.size-opts{display:flex;gap:8px;flex-wrap:wrap}
.size-opt{
  border:2px solid var(--cream);border-radius:var(--radius-sm);padding:6px 16px;font-size:13px;font-weight:700;
  cursor:pointer;background:var(--warm-white);transition:all .15s;color:var(--navy);font-family:var(--font-body);
}
.size-opt:hover{border-color:var(--coral-lt)}
.size-opt[aria-pressed="true"]{border-color:var(--coral);background:var(--coral-pale);color:var(--coral)}
.size-opt:disabled{color:var(--light);border-color:var(--cream);cursor:not-allowed;text-decoration:line-through;opacity:.7}
.color-opts{display:flex;gap:10px}
.color-dot{
  width:30px;height:30px;border-radius:50%;cursor:pointer;border:3px solid var(--warm-white);
  outline:2px solid transparent;outline-offset:2px;transition:outline-color .15s;padding:0;box-shadow:0 0 0 1px var(--cream);
}
.color-dot[aria-pressed="true"]{outline-color:var(--coral)}

/* Made to order notice */
.mto-notice{
  background:var(--coral-pale);border-left:3px solid var(--coral);border-radius:0 8px 8px 0;
  padding:12px 16px;margin-bottom:16px;
}
.mto-notice strong{font-size:13px;color:var(--coral);display:block;margin-bottom:2px}
.mto-notice span{font-size:12px;color:var(--muted)}

/* Qty + ATC */
.qty-atc{display:flex;gap:10px;margin-bottom:14px;align-items:center}
.qty{display:flex;align-items:center;border:2px solid var(--cream);border-radius:var(--radius-sm);overflow:hidden;background:var(--warm-white)}
.qty button{width:36px;height:44px;background:none;border:none;font-size:18px;cursor:pointer;color:var(--navy);font-weight:700}
.qty button:hover{background:var(--linen)}
.qty input{width:40px;height:44px;border:none;text-align:center;font-family:var(--font-body);font-size:14px;font-weight:700;color:var(--navy);background:none}
.qty input::-webkit-outer-spin-button,.qty input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.atc-btn{flex:1}
.atc-btn.added{background:var(--success)}
.wishlist-btn{
  width:44px;height:44px;border:2px solid var(--cream);border-radius:var(--radius-sm);background:var(--warm-white);
  cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;transition:border-color .15s,color .15s;color:var(--muted);
}
.wishlist-btn:hover,.wishlist-btn[aria-pressed="true"]{border-color:var(--coral);color:var(--coral)}

/* Perks */
.perks{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:20px}
.perk{
  display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;padding:12px 8px;
  background:var(--warm-white);border:1px solid var(--cream);border-radius:var(--radius-sm);
}
.perk:nth-child(3){background:var(--coral-pale);border-color:var(--coral-lt)}
.perk__icon{font-size:22px}
.perk__text{font-size:11px;color:var(--muted);line-height:1.4;font-weight:600}

/* Handwritten note */
.hand-note{
  font-family:var(--font-hand);font-size:17px;color:var(--gold-text);
  border-top:1px solid var(--cream);padding-top:14px;
}

/* Tabs */
.tabs{max-width:var(--wrap);margin:0 auto;padding:0 clamp(16px,4vw,24px) 48px}
.tabs__nav{display:flex;border-bottom:2px solid var(--cream);gap:0;overflow-x:auto;-webkit-overflow-scrolling:touch}
.tab-btn{
  padding:12px 24px;font-family:var(--font-body);font-size:14px;font-weight:700;color:var(--muted);
  background:none;border:none;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-2px;
  transition:all .15s;white-space:nowrap;
}
.tab-btn[aria-selected="true"]{color:var(--coral);border-bottom-color:var(--coral)}
.tab-btn:hover{color:var(--navy)}
.tab-panel{padding:28px 0}
.tab-panel[hidden]{display:none}
.tab-prose{max-width:660px;font-size:14px;color:var(--muted);line-height:1.85;font-family:var(--font-editorial)}
.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;max-width:660px;font-size:13px;color:var(--muted);line-height:1.9}
.detail-grid strong{color:var(--navy);display:block;margin-bottom:6px;font-family:var(--font-body)}

.review-card{background:var(--warm-white);border:1px solid var(--cream);border-radius:10px;padding:16px 20px;margin-bottom:12px}
.review-card__head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.review-card .stars{font-size:13px}
.reviewer{font-weight:700;font-size:13px;margin-bottom:3px}
.review-date{font-size:11px;color:var(--light)}
.review-body{font-size:13px;color:var(--muted);line-height:1.7;margin-top:8px;font-family:var(--font-editorial)}

.ship-row{background:var(--warm-white);border:1px solid var(--cream);border-radius:10px;padding:14px 18px;font-size:13px;color:var(--muted);line-height:1.7;margin-bottom:12px}
.ship-row strong{color:var(--navy);display:block;margin-bottom:3px}
.ship-row--mto{background:var(--coral-pale);border-color:var(--coral-lt)}
.ship-row--mto strong{color:var(--coral)}

/* Related */
.related{max-width:var(--wrap);margin:0 auto;padding:0 clamp(16px,4vw,24px) 56px}
.related h2{font-family:var(--font-head);font-size:28px;margin-bottom:20px;font-weight:600}
.related__grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}

/* Sticky mobile add-to-cart bar */
.sticky-atc{
  position:fixed;left:0;right:0;bottom:0;z-index:90;display:none;
  background:var(--warm-white);border-top:1px solid var(--cream);
  box-shadow:0 -4px 16px rgba(28,46,71,.08);
  padding:10px clamp(12px,4vw,16px);align-items:center;gap:12px;
}
.sticky-atc__price{font-family:var(--font-head);font-size:20px;color:var(--navy)}
.sticky-atc .btn{flex:1}

/* ---------- Responsive ---------- */
@media (max-width:900px){
  .product{grid-template-columns:1fr;gap:24px}
  .gallery{position:static}
  .gallery__main{max-width:460px;margin:0 auto 10px}
  .gallery__thumbs{max-width:460px;margin:0 auto}
  .pinfo{max-width:560px}
}
@media (max-width:600px){
  .detail-grid{grid-template-columns:1fr;gap:14px}
  .related__grid{grid-template-columns:repeat(2,1fr)}
  .perks{grid-template-columns:1fr;gap:6px}
  .perk{flex-direction:row;justify-content:center;gap:8px;padding:9px 8px}
  .sticky-atc{display:flex}
  main{padding-bottom:72px}
}

/* ---------------------------------------------------------------------------
   WooCommerce single-product bridge.

   Two separate collisions with WooCommerce's own markup:

   1. `.product` above is the PDP's two-column grid (1fr 420px), but
      WooCommerce also puts class="product" on every <li> in a product loop
      (wc_product_class). Without the reset below, each shop card tries to
      become a two-column 420px grid. The shop grid currently overrides this,
      but stating it here means a loop rendered anywhere else cannot inherit
      a PDP layout by accident.

   2. The theme styles .gallery__main / .gallery__ph, which are the static
      prototype's classes. The live gallery is WooCommerce's own -
      .woocommerce-product-gallery.images - so none of that styling applied,
      and WooCommerce's default `div.images{width:48%;float:left}` left the
      photo at roughly half the width of its column with dead space beside it.
--------------------------------------------------------------------------- */
li.product{display:block;grid-template-columns:none;padding:0;max-width:none}

.gallery .woocommerce-product-gallery,
.woocommerce div.product div.images{width:100%;float:none;margin:0}

.gallery .woocommerce-product-gallery__wrapper{border-radius:14px;overflow:hidden;background:var(--cream)}
.gallery .woocommerce-product-gallery__image img,
.woocommerce div.product div.images img{
  width:100%;height:auto;display:block;border-radius:14px;
}

/* Gallery thumbnails, when a product has more than one photo. */
.gallery .flex-control-thumbs{
  display:grid;grid-template-columns:repeat(4,1fr);gap:8px;list-style:none;margin:10px 0 0;padding:0;
}
.gallery .flex-control-thumbs li{margin:0}
.gallery .flex-control-thumbs img{border-radius:8px;cursor:pointer;opacity:.72;transition:opacity .15s}
.gallery .flex-control-thumbs img:hover,
.gallery .flex-control-thumbs img.flex-active{opacity:1}

/* ---------------------------------------------------------------------------
   Make the product gallery visible.

   WooCommerce ships .woocommerce-product-gallery{opacity:0} and relies on its
   JavaScript to reveal it — but that only happens inside FlexSlider's `start`
   callback, and FlexSlider is configured with allowOneSlide:false. Nearly every
   product here has a single photo, so FlexSlider declines to start, `start`
   never fires, and the gallery stays invisible. Every product page was showing
   a blank cream box where the photograph should be.

   Forcing opacity decouples "can the customer see the product" from "did a
   slider library decide to initialise". Zoom and the lightbox still work when
   they do initialise; when they do not, the photo is simply there.
   --------------------------------------------------------------------------- */
.woocommerce-product-gallery,
.gallery .woocommerce-product-gallery{opacity:1 !important}
