/* as_product_page — product page layout (PP3, PP6, PP7, PP8, PP10, PP12). Linked with ?v=<mtime>. */

/* Never let a stray wide element (e.g. a third-party badge) scroll the page sideways */
html, body { overflow-x: clip; }

/* Mobile: "‹ parent category" instead of the full breadcrumb */
.as-pp-back { margin: .5rem 0 .6rem; font-size: .9rem; }
.as-pp-back a { text-decoration: none; }
.as-pp-back i { font-size: .75em; }

/* Title + wishlist heart */
#product-info .as-pp-head { display: flex; align-items: flex-start; gap: .5rem; }
#product-info .as-pp-head h1 { flex: 1 1 auto; min-width: 0; margin-bottom: .35rem; overflow-wrap: anywhere; }
.as-pp-wish-form { flex: 0 0 auto; margin: 0; }
.as-pp-wish { width: 42px; height: 42px; padding: 0; border: 1px solid #dee2e6; border-radius: 50%; background: #fff; color: #dc3545; font-size: 1.15rem; line-height: 1; }
.as-pp-wish:hover, .as-pp-wish:focus { background: #fff5f5; color: #b02a37; border-color: #dc3545; }

.as-pp-meta { font-size: .85rem; color: #6c757d; margin-bottom: .5rem; }
.as-pp-meta .list-inline-item:not(:last-child)::after { content: "·"; margin-left: .5rem; }

/* Price + stock badge */
.as-pp-price-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; margin-bottom: .4rem; }
.as-pp-price .price-new { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.as-pp-price .price-old { color: #6c757d; text-decoration: line-through; margin-left: .35rem; }
.as-pp-stock { display: inline-block; padding: .2rem .6rem; border-radius: 1rem; font-size: .85rem; font-weight: 600; line-height: 1.4; }
.as-pp-stock-in, .as-pp-stock-low { background: #e8f5ee; color: #146c43; }
.as-pp-stock-pre, .as-pp-stock-order { background: #fff4e0; color: #8a5300; }
.as-pp-stock-out { background: #eceff1; color: #495057; }
.as-pp-price-extra { font-size: .85rem; color: #6c757d; margin-bottom: .4rem; }

/* Delivery line */
.as-pp-delivery { margin: .25rem 0 .75rem; }
.as-pp-delivery-main { font-weight: 600; }
.as-pp-delivery-main i { color: #198754; }
.as-pp-flat { font-weight: 400; color: #6c757d; }
.as-pp-delivery-gcc { font-size: .85rem; color: #6c757d; padding-left: 1.6em; }
.as-pp-note { font-size: .9rem; margin-bottom: .5rem; }

/* Quantity + Add to Cart on one row */
.as-pp-buy { display: flex; gap: .5rem; align-items: stretch; margin: .5rem 0 .25rem; }
.as-pp-qty { flex: 0 0 4.5rem; width: 4.5rem; text-align: center; }
/* cart_quantity_button wraps the field in [-][qty][+] */
.as-pp-buy .wrapper-qty-action { flex: 0 0 auto; }
.as-pp-buy .wrapper-qty-action .form-control { width: 3rem; min-width: 3rem; padding-left: .25rem; padding-right: .25rem; text-align: center; }
.as-pp-cart { flex: 1 1 auto; }

/* Pay in 4 (Tabby + Tamara): space reserved so the lazy widgets do not shift the page */
.as-pay4 { display: grid; grid-template-columns: 1fr; gap: .4rem; margin: .6rem 0; }
.as-pay4-item { min-width: 0; }
.as-pay4 #TabbyPromo { margin: 0; }
/* reserved heights = rendered widget heights (measured Oct 2026), so the lazy load causes no layout shift */
.as-pay4-tabby { min-height: 89px; }
.as-pay4-tamara { min-height: 106px; }
@media (max-width: 374.98px) { .as-pay4-tamara { min-height: 130px; } }
@media (min-width: 576px) and (max-width: 991.98px) { .as-pay4-tabby { min-height: 110px; } .as-pay4-tamara { min-height: 130px; } }
@media (min-width: 992px) {
  .as-pay4-two { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .as-pay4-two .as-pay4-item { min-height: 139px; }
}
.as-pay4-item.is-empty { display: none; }

/* Slim WhatsApp button */
.as-pp-whatsapp { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin: .5rem 0; }
.as-pp-wa { padding: .35rem .9rem; font-size: .95rem; }
.as-pp-wa-hours { font-size: .8rem; color: #6c757d; }
.as-pp-links { font-size: .85rem; margin: .25rem 0 .5rem; }
.as-pp-links .list-inline-item { margin-right: 1rem; }
.as-pp-rating p { margin-bottom: .5rem; }

/* "You may also like": product cards (same extras as the category cards) */
.as-pp-related { margin: 1rem 0 1.5rem; }
/* custom.js (global) pins every .product-thumb to one inline min/max height computed before lazy images load; let the grid size them */
.as-pp-related .product-thumb { height: 100%; margin-bottom: 0; min-height: 0 !important; max-height: none !important; display: flex; flex-direction: column; }
.as-pp-related .product-thumb .content { flex: 1 1 auto; display: flex; flex-direction: column; }
.as-pp-related .product-thumb .description { flex: 1 1 auto; }
.as-pp-related .product-thumb .content .product-action { position: static !important; margin-top: auto; }
.as-pp-related .product-thumb .image img { height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
.as-pp-related .product-thumb h4 { font-size: .9rem; line-height: 1.3; }
.as-pp-related .product-thumb .as-card-brand { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: #6c757d; margin-bottom: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-pp-related .product-thumb .as-card-tabby { font-size: .75rem; color: #3d3d3d; margin-top: .1rem; }
.as-pp-related .product-thumb .as-card-stock { font-size: .75rem; font-weight: 600; margin-top: .2rem; }
.as-pp-related .as-stock-in { color: #198754; }
.as-pp-related .as-stock-low { color: #b45309; }
.as-pp-related .as-stock-pre, .as-pp-related .as-stock-order { color: #0b5ed7; }
.as-pp-related .as-stock-out { color: #6c757d; }
@media (max-width: 575.98px) {
  .as-pp-related .product-thumb .content { padding: .5rem; }
  .as-pp-related .product-thumb h4 { font-size: .82rem; }
  .as-pp-related .product-thumb .as-card-tabby { display: none; }
  .as-pp-related .product-thumb .button-group button { font-size: .78rem; padding: .4rem .2rem; white-space: nowrap; }
  .as-pp-related .product-thumb .button-group button .fa-shopping-cart { display: none; }
}

/* Review form: reCAPTCHA v3 badge hidden (allowed when the notice is shown in the form) */
.grecaptcha-badge { visibility: hidden; }
.as-recaptcha-note { font-size: .75rem; margin-top: .5rem; }

/* Sticky add-to-cart bar (mobile) */
.as-sticky-cart { display: none; }
@media (max-width: 768px) {
  .as-sticky-cart { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fff; border-top: 1px solid #ddd; box-shadow: 0 -2px 8px rgba(0,0,0,.12); transform: translateY(110%); transition: transform .2s ease-in-out; }
  .as-sticky-cart.is-visible { transform: translateY(0); }
  .as-sticky-cart-info { flex: 1; min-width: 0; }
  .as-sticky-cart-name { font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .as-sticky-cart-price { font-weight: 700; }
  .as-sticky-cart .btn { white-space: nowrap; }
  body.as-has-sticky-cart { padding-bottom: 64px; }
}

/* Mobile: tighter product header so image + name + price fit the first screen */
@media (max-width: 767.98px) {
  #product-info .image .img-thumbnail { padding: 0; border: 0; }
  #product-info .image > div a .img-thumbnail { width: 56px; height: 56px; }
  #product-info .image .mb-3 { margin-bottom: .4rem !important; }
  #product-info .as-pp-head h1 { font-size: 1.3rem; line-height: 1.3; }
  .as-pp-price .price-new { font-size: 1.5rem; }
}
