/* =====================================================================
   Foxy Art Cup - продуктова страница (B2.3). Зарежда се само при is_product().
   Първата част е 1:1 от makets/final/assets/maket.css („4.4 ПРОДУКТ" + Lightbox);
   демо блоковете на макета (.pdp-states, .state-card) не се пренасят; .reviews-empty и
   .rate-pick са приложени върху класовете на Woo (#reviews, p.stars) във втората част.
   Втората част е лепилото за разметката, която идва от Woo/WP (живия DOM,
   design/live/produkt-dom.md) и за състоянията, които макетът рисува с inline стил.
   Забранените свойства - само където PLAN 7 / REPORT 24 ги разрешават (отбелязано).
   ===================================================================== */

/* ---------- 4.4 ПРОДУКТ (maket.css 1:1) ---------- */
.pdp { display: grid; grid-template-columns: 7fr 5fr; gap: var(--sp-block) 48px; align-items: start; padding-top: 24px; }
@media (max-width: 1023px) { .pdp { grid-template-columns: 1fr; padding-top: 12px; } }
.gal { display: grid; gap: 12px; }
.gal__main { position: relative; border-radius: var(--r-card); overflow: hidden; background: var(--c-surface); } /* разрешено: снимки */
.gal__track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gal__track::-webkit-scrollbar { display: none; }
.gal__track button { scroll-snap-align: start; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gal__track img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.gal__main .badge-sale { position: absolute; top: 16px; left: 16px; z-index: 2; } /* разрешено: бадж */
.gal__count { position: absolute; right: 14px; bottom: 14px; padding: 4px 10px; border-radius: var(--r-pill); background: rgba(31,26,23,.7); color: #fff; font-size: 13px; font-weight: 600; } /* разрешено: overlay върху снимка */
.gal__thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: 72px; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.gal__thumbs::-webkit-scrollbar { display: none; }
.gal__thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; } /* разрешено: снимка */
.gal__thumbs button[aria-current="true"] { border-color: var(--c-accent); }
.gal__thumbs img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.pdp__info { display: grid; gap: 18px; align-content: start; position: sticky; top: 112px; }
@media (max-width: 1023px) { .pdp__info { position: static; } }
.pdp__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.pdp__rating { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--c-muted); }
.pdp .price { font-size: 28px; }
.pdp .price del { font-size: 18px; }
.pdp__short { color: var(--c-muted); }
.perso { display: grid; gap: 8px; padding: 16px; border-radius: var(--r-img); background: var(--c-surface); }
.perso textarea { background: #fff; }
.perso__count { justify-self: end; font-size: 13px; color: var(--c-muted); }
.buy { display: flex; flex-wrap: wrap; gap: 12px; }
.buy .btn { flex: 1 1 220px; }
.pdp__points { list-style: none; display: grid; gap: 10px; font-size: var(--t-small); padding-top: 6px; border-top: 1px solid var(--c-border); }
.pdp__points li { display: flex; gap: 10px; align-items: flex-start; padding-top: 4px; }
.pdp__points svg { width: 18px; height: 18px; color: var(--c-primary); margin-top: 1px; }
.buy-bar { display: none; }
@media (max-width: 767px) {
  .buy-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--c-border); box-shadow: 0 -8px 24px rgba(31,26,23,.08); } /* разрешено: .buy-bar (PLAN 7) */
  .buy-bar .price { font-size: 19px; }
  .buy-bar .btn { flex: 1; }
  body.has-buybar { padding-bottom: 76px; }
}
.pdp-sec { padding-top: var(--sp-section); }
.pdp-sec > h2 { margin-bottom: 20px; }
.review-form { display: grid; gap: 16px; padding: 24px; border: 1px solid var(--c-border); border-radius: var(--r-card); }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: auto 1fr auto; background: rgba(20,16,14,.94); color: #fff; opacity: 0; visibility: hidden; transition: opacity 200ms, visibility 200ms; } /* разрешено: lightbox */
.lb.is-open, .lb:target { opacity: 1; visibility: visible; }
.lb__top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; }
.lb__count { font-weight: 600; font-size: 15px; }
.lb__stage { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 0 12px; min-height: 0; }
.lb__img { justify-self: center; max-height: calc(100vh - 140px); width: auto; border-radius: var(--r-img); } /* разрешено: снимка */
.lb__btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; }
.lb__btn:hover { background: rgba(255,255,255,.24); }
.lb__btn svg { width: 22px; height: 22px; }
.lb__cap { text-align: center; padding: 14px; font-size: 14px; color: rgba(255,255,255,.75); }
@media (max-width: 767px) { .lb__stage { gap: 4px; padding: 0 4px; } .lb__btn { width: 40px; height: 40px; } }

.pdp > * { min-width: 0; }

/* =====================================================================
   ЛЕПИЛО: разметката от Woo/WP и състоянията без собствен клас в макета
   ===================================================================== */
.pdp-crumbs { padding-top: 20px; } /* макетът: inline padding-top:20px на nav */
.pdp-desc { margin-top: 16px; }    /* макетът: inline margin-top:16px на .entry-content */
.pdp-sec--last { padding-bottom: var(--sp-section); }
.pdp .product_title { overflow-wrap: anywhere; } /* дълго име (състоянието в макета) без хоризонтален скрол на 390 */

/* Без снимка (макетът: „Без снимка (ПО ПРАВИЛО)") */
.gal__empty { aspect-ratio: 1 / 1; display: grid; place-items: center; color: var(--c-muted); }
.gal__empty svg { width: 48px; height: 48px; }

/* Lightbox с една снимка няма стрелки - снимката остава в средната колона */
.lb__img { grid-column: 2; }

/* Рейтинг до чипа (само при отзиви) */
a.pdp__rating { text-decoration: none; }
.pdp__rating .stars svg { width: 16px; height: 16px; }
.stars svg.is-off { color: var(--c-border); }

/* Бутонът докато AJAX добавянето тече */
.single_add_to_cart_button.is-loading, .buy-bar .btn.is-loading { opacity: .6; pointer-events: none; }

/* Изчерпан: формата е fieldset[disabled] - без рамката на браузъра */
.cart.is-out fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.cart.is-out .qty { opacity: .55; }

/* ---------- Отзиви: #reviews на Woo (живия DOM) във визията на produkt.html#reviews ---------- */
#reviews, #reviews #comments { display: grid; gap: 18px; }
.woocommerce-Reviews-title span { font-weight: inherit; }
/* „Все още няма отзиви." = .notice от макета (иконата star) */
.woocommerce-noreviews, .woocommerce-verification-required, .must-log-in { justify-self: start; display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r-img); background: var(--c-surface); border: 1px solid var(--c-border); font-size: 15px; }
.woocommerce-noreviews::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/%3E%3C/svg%3E") center / contain no-repeat; } /* иконата е 20px - размер на икона, разрешен */
.commentlist { list-style: none; display: grid; gap: var(--gap-cards); }
.commentlist .children { list-style: none; margin-top: var(--gap-cards); padding-left: 24px; display: grid; gap: var(--gap-cards); }
.review blockquote p + p { margin-top: .6em; }
.woocommerce-pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
#review_form_wrapper, #review_form, #respond { display: grid; gap: 18px; }
.comment-reply-title { display: block; font-size: 16px; line-height: 1.65; font-weight: 400; } /* p.h4 в макета няма правило за .h4 - изчислено е базовият p (B4.9) */
.comment-reply-title small { font-size: 14px; font-weight: 500; margin-left: 8px; }

/* Формата = .review-form (класът идва от woocommerce_product_review_comment_form_args);
   полетата Име/Имейл са една до друга (is-half в макета), останалото е на цял ред. */
.review-form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.review-form > * { grid-column: 1 / -1; margin: 0; }
.review-form > .comment-form-author, .review-form > .comment-form-email { grid-column: auto; }
@media (max-width: 767px) { .review-form { grid-template-columns: 1fr; padding: 18px 16px; } .review-form > .comment-form-author, .review-form > .comment-form-email { grid-column: 1 / -1; } }
.review-form .comment-notes { font-size: 13px; color: var(--c-muted); }
.review-form .required { color: var(--c-sale); }
.review-form .comment-form-rating, .review-form .comment-form-comment, .review-form .comment-form-author, .review-form .comment-form-email { display: grid; gap: 6px; align-content: start; }
.review-form label { font-size: 14px; font-weight: 500; }
.review-form input[type="text"], .review-form input[type="email"], .review-form input[type="url"], .review-form textarea, .review-form select {
  width: 100%; padding: 13px 14px; border: 1px solid var(--c-border); border-radius: var(--r-field); background: #fff; font-size: 16px; line-height: 1.4; transition: border-color var(--ease), box-shadow var(--ease);
} /* разрешено: полето запълва клетката на грида (същото като .field в base.css) */
.review-form textarea { resize: vertical; min-height: 120px; }
.review-form input:focus, .review-form textarea:focus, .review-form select:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 1px var(--c-accent); }
.review-form .comment-form-cookies-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.review-form .comment-form-cookies-consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--c-accent); flex: none; }
.review-form .comment-form-cookies-consent label { font-weight: 400; }
.review-form .form-submit { justify-self: start; }
@media (max-width: 767px) { .review-form .form-submit { justify-self: stretch; } .review-form .form-submit .btn { width: 100%; } } /* разрешено: .btn на цял ред на 390 (3.5 Форма) */

/* Звездите на Woo (p.stars > span > a.star-1..5, рисува ги wc-single-product) във
   вида на .rate-pick от макета. Текстът „1 of 5 stars" остава за екранните четци. */
.comment-form-rating p.stars { margin: 0; }
.comment-form-rating p.stars span { display: flex; gap: 4px; }
p.stars a { display: grid; place-items: center; width: 34px; height: 34px; font-size: 0; color: var(--c-border); text-decoration: none; border-radius: 6px; } /* иконата-бутон: фиксиран размер на икона - разрешено */
p.stars a::before { content: ""; width: 26px; height: 26px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z'/%3E%3C/svg%3E") center / contain no-repeat; }
p.stars.selected a { color: var(--c-accent); }
p.stars.selected a.active ~ a { color: var(--c-border); }
p.stars:hover a, p.stars.selected:hover a.active ~ a { color: var(--c-accent); }
p.stars:hover a:hover ~ a, p.stars.selected:hover a:hover ~ a { color: var(--c-border); }
p.stars a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
