/* =========================================================================
   Single product page (woocommerce/single-product.php,
   content-single-product.php, single-product/add-to-cart/*.php,
   single-product/tabs/tabs.php, single-product/related.php).
   Reuses base.css tokens + shared components (.str-container,
   .str-breadcrumb, .str-btn, .str-kicker, .str-h1/.str-h2, .str-panel,
   .str-spec-row, .str-swatch/.str-swatch-row, .str-option-card, .str-badge,
   .str-products/.str-product-card). Only new product-page-specific classes
   are defined below (gallery, rating stars, price row, variations table
   restyle, qty stepper, trust list, panels grid, extra tabs).
   Personalized-product-only styling (upload dropzone, live preview) lives
   in page-personalized.css.
   ========================================================================= */

.str-product__main{
  display:grid;grid-template-columns:1.05fr .95fr;gap:44px;
  padding:26px 0 50px;
}
@media (max-width:900px){
  .str-product__main{grid-template-columns:1fr;gap:30px;padding:20px 0 36px}
}

/* ---------- gallery (restyles WooCommerce's default gallery output) ---------- */
.str-product__gallery{position:relative}
.str-product__gallery .woocommerce-product-gallery{position:relative}
.str-product__gallery .woocommerce-product-gallery__wrapper{margin:0;padding:0;list-style:none}
.str-product__gallery .woocommerce-product-gallery__image{
  border-radius:16px;overflow:hidden;background:var(--c-panel);
}
.str-product__gallery .woocommerce-product-gallery__image img{
  width:100%;height:520px;object-fit:cover;border-radius:16px;
}
.str-product__gallery .woocommerce-product-gallery__trigger{
  position:absolute;top:14px;right:14px;z-index:2;
  width:38px;height:38px;border-radius:50%;background:#fff;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 14px rgba(15,47,52,.15);
}
.str-product__gallery .flex-control-thumbs{
  display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:12px 0 0;padding:0;list-style:none;
}
.str-product__gallery .flex-control-thumbs li{list-style:none}
.str-product__gallery .flex-control-thumbs img{
  height:96px;width:100%;object-fit:cover;border-radius:11px;cursor:pointer;
  border:2px solid transparent;opacity:.75;
}
.str-product__gallery .flex-control-thumbs img.flex-active,
.str-product__gallery .flex-control-thumbs img:hover{
  border-color:var(--c-accent);opacity:1;
}
@media (max-width:600px){
  .str-product__gallery .woocommerce-product-gallery__image img{height:360px}
}

/* ---------- summary column ---------- */
.str-product__summary{display:flex;flex-direction:column}
.str-product__summary .product_title{
  font-family:var(--font-display);font-weight:700;font-size:46px;line-height:1;margin:0 0 12px;
}
@media (max-width:600px){
  .str-product__summary .product_title{font-size:34px}
}

/* ---------- rating ---------- */
.str-rating{display:flex;align-items:center;gap:10px;margin-bottom:20px}
.str-rating__stars{
  position:relative;display:inline-block;font-size:15px;letter-spacing:2px;
  color:var(--c-line-strong);
}
.str-rating__stars::before{
  content:'★★★★★';position:absolute;inset:0;width:var(--rating,0%);overflow:hidden;
  color:var(--c-accent);white-space:nowrap;
}
.str-rating__meta{font:500 13.5px var(--font-body);color:var(--c-ink-mute)}

/* ---------- price row ---------- */
.str-product__price-row{display:flex;align-items:baseline;gap:12px;margin-bottom:18px;flex-wrap:wrap}
.str-product__price-row .price{
  font-family:var(--font-display);font-weight:700;font-size:38px;color:var(--c-ink);
}
.str-product__price-row .price del{
  font-family:var(--font-body);font-weight:500;font-size:15px;color:var(--c-ink-line);
  text-decoration:line-through;opacity:1;
}
.str-product__price-row .price ins{
  text-decoration:none;
}
.str-badge--sale-inline{
  position:static;background:var(--c-accent-soft);color:var(--c-accent-ink);
}

/* ---------- short description ---------- */
.woocommerce-product-details__short-description{
  font:500 15.5px/1.6 var(--font-body);color:var(--c-ink-soft);margin:0 0 22px;
}
.woocommerce-product-details__short-description > *:first-child{margin-top:0}
.woocommerce-product-details__short-description > *:last-child{margin-bottom:0}

/* ---------- variations table (turns the semantic <table> into a stacked block layout) ---------- */
table.str-variations{width:100%;border-collapse:collapse;margin-bottom:10px}
table.str-variations tbody,
table.str-variations tr,
table.str-variations td{display:block;width:auto}
table.str-variations tr{margin-bottom:22px}
table.str-variations tr:last-child{margin-bottom:0}
table.str-variations td.label{
  font:700 13.5px var(--font-body);margin-bottom:10px;padding:0;
}
table.str-variations td.value{padding:0}
.str-variation-selected{font-weight:500;color:var(--c-ink-mute)}
.str-variation-selected:not(:empty)::before{content:' · '}

/* the real <select> stays in the DOM (for WooCommerce's JS + as the source
   of truth our swatch buttons read/write) but is visually replaced by the
   swatch/option-card row below it. */
.str-hidden-select{
  position:absolute;width:1px;height:1px;overflow:hidden;
  clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;
}
.str-hidden-select select{pointer-events:none}

.str-option-row{display:flex;gap:10px;flex-wrap:wrap}
.str-option-row .str-option-card{flex:1;min-width:96px}
.str-option-card__title{font:700 14px var(--font-body)}
.str-option-card__sub{font:500 12px var(--font-body);color:var(--c-ink-mute);margin-top:2px}

a.reset_variations{
  display:inline-block;margin-top:10px;font:600 12.5px var(--font-body);color:var(--c-ink-faint);
}
a.reset_variations:hover{color:var(--c-accent-ink)}

/* variation description/price/availability populated via variation.php's JS templates */
.woocommerce-variation{margin:6px 0 18px}
.woocommerce-variation-description p{font:500 14px/1.6 var(--font-body);color:var(--c-ink-soft);margin:0}
.str-variation-price .price{font-family:var(--font-display);font-weight:700;font-size:26px}
.woocommerce-variation-availability .stock{font:600 13px var(--font-body);color:var(--c-ok)}
.woocommerce-variation-availability .stock.out-of-stock{color:#c0392b}

/* ---------- quantity stepper + add to cart ---------- */
.str-qty-add-row{display:flex;gap:12px;margin:4px 0 16px;flex-wrap:wrap}
.str-qty-stepper{
  display:flex;align-items:stretch;border:1.5px solid var(--c-line-strong);border-radius:11px;overflow:hidden;flex:none;
}
.str-qty-stepper__btn{
  border:none;background:none;padding:0 18px;font:700 18px var(--font-body);color:var(--c-ink-mute);
  cursor:pointer;
}
.str-qty-stepper__btn:hover{color:var(--c-accent-ink)}
.str-qty-stepper .quantity{margin:0}
.str-qty-stepper input.qty{
  width:44px;border:none;text-align:center;font:700 16px var(--font-body);color:var(--c-ink);
  padding:14px 0;-moz-appearance:textfield;
}
.str-qty-stepper input.qty::-webkit-outer-spin-button,
.str-qty-stepper input.qty::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.str-qty-stepper input.qty:focus{outline:none}

/* generic fallback so a stock (unwrapped) WooCommerce quantity input —
   e.g. WooCommerce's default simple.php for a simple, non-variable
   product — still looks on-brand even without the .str-qty-stepper markup. */
.quantity input.qty{
  border:1.5px solid var(--c-line-strong);border-radius:11px;padding:14px 12px;
  font:700 16px var(--font-body);color:var(--c-ink);width:64px;text-align:center;
}

.single_add_to_cart_button{flex:1;min-width:180px}
.single_add_to_cart_button.disabled,
.single_add_to_cart_button:disabled{
  opacity:.5;cursor:not-allowed;
}
.str-buy-now{margin-bottom:22px}

/* ---------- trust list ---------- */
.str-product__trust{
  display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--c-line);
  padding-top:20px;margin-bottom:6px;font:500 13.5px var(--font-body);color:var(--c-ink-soft);
}
.str-product__trust-item{display:flex;gap:10px;align-items:center}
.str-product__trust-icon{width:22px;height:22px;border-radius:6px;background:var(--c-accent-soft);flex:none}

/* ---------- product meta (SKU, categories, tags) ---------- */
.product_meta{
  margin-top:18px;padding-top:14px;border-top:1px solid var(--c-line);
  font:500 12.5px/1.9 var(--font-body);color:var(--c-ink-faint);
}
.product_meta > span{display:block}
.product_meta a{color:var(--c-ink-faint)}
.product_meta a:hover{color:var(--c-accent)}

/* ---------- description + specs panels ---------- */
.str-product__below{padding:10px 0 50px}
.str-product__panels{display:grid;grid-template-columns:1.4fr 1fr;gap:44px;margin-bottom:30px}
@media (max-width:900px){
  .str-product__panels{grid-template-columns:1fr}
}
.str-product__about-copy{font:500 15px/1.65 var(--font-body);color:var(--c-ink-soft)}
.str-product__about-copy > *:first-child{margin-top:0}
.str-product__about-copy > *:last-child{margin-bottom:0}
.str-product__specs-empty{font:500 14px var(--font-body);color:var(--c-ink-faint);margin:0}

.str-product__extra-tabs{display:flex;flex-direction:column;gap:24px;margin-bottom:10px}
.str-product__extra-tab-title{font-size:26px;margin-bottom:18px}

/* light restyle for the default WooCommerce reviews tab when it renders
   inside .str-product__extra-tab */
#reviews #comments{list-style:none;margin:0 0 24px;padding:0}
#reviews .comment_container{display:flex;gap:14px;margin-bottom:20px}
#reviews .avatar{border-radius:50%;width:44px;height:44px}
#reviews .star-rating{color:var(--c-accent);font-size:14px}
#reviews #respond input,
#reviews #respond textarea{
  width:100%;font:500 14.5px var(--font-body);border:1.5px solid var(--c-line-strong);
  border-radius:10px;padding:12px 14px;margin-bottom:14px;background:#fff;color:var(--c-ink);
}
#reviews #respond .form-submit input{
  width:auto;background:var(--c-dark);color:#fff;border:none;font-weight:700;cursor:pointer;
}

/* ---------- related products ---------- */
.str-product__related{margin-top:10px}
.str-product__related .str-h2{margin-bottom:26px}

/* ---------- swatch color palette (mirrors page-shop.css's pa_cor slugs so
   the same term looks identical on the shop archive and product page) ---------- */
.str-swatch--fallback{background:var(--c-canvas)}
.str-swatch--terracota{background:#c9622e}
.str-swatch--preto{background:#0f2f34}
.str-swatch--branco{background:#e8e2d6}
.str-swatch--verde{background:#2f7d6b}
.str-swatch--roxo{background:#7d5cc9}
.str-swatch--amarelo{background:#c9b52e}
.str-swatch--branco-quente{background:#f2ead9}
.str-swatch--cinza{background:#e8e2d6}
.str-swatch--dourado{background:#f0c88a}
