/* Product page (views/single-catalog.twig, core/includes/front/product-page.php). Hand-written, no build. */

.sfPdpWrapper { --pdp-line: #e9e7e2; --pdp-soft: #f7f6f3; --pdp-muted: #6b6b6b; --pdp-star: #f5a623; font-family: 'Montserrat', sans-serif; color: #111; }
.sfPdpWrapper .singleCatalogItem.sfPdp { min-height: 0; padding: 32px 0 72px; }

/* Breadcrumbs */
.sfPdpCrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 22px; color: var(--pdp-muted); font-size: 13px; line-height: 1.4; }
.sfPdpCrumbs a { color: var(--pdp-muted); text-decoration: none; }
.sfPdpCrumbs a:hover { color: #111; text-decoration: underline; }
.sfPdpCrumbs span[aria-current] { color: #111; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Two columns: gallery and information */
.sfPdpWrapper .singleCatalogItem > .columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; margin: 0; }
.sfPdpWrapper .singleCatalogItem > .columns > .col:nth-child(1),
.sfPdpWrapper .singleCatalogItem > .columns > .col:nth-child(2) { width: auto; padding: 0; margin: 0; }
.sfPdpWrapper .singleCatalogItem > .columns > .col:nth-child(1) { position: sticky; top: 110px; }
.sfPdpWrapper .sticky { position: static; border: 1px solid var(--pdp-line); border-radius: 20px; padding: 14px; background: #fff; }
.sfPdpWrapper .sticky .frame { border-radius: 14px; overflow: hidden; }
.sfPdpNoPhoto { aspect-ratio: 1; display: grid; place-items: center; width: 100%; background: var(--pdp-soft); border-radius: 14px; }
.sfPdpNoPhoto .sfProductPlaceholder { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #b4b1aa; font-size: 15px; }
.sfPdpNoPhoto .sfProductPlaceholder svg { width: 96px; height: auto; }

/* Heading block */
.sfPdpEyebrow { display: inline-block; margin-bottom: 10px; color: var(--pdp-muted); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.sfPdpEyebrow:hover { color: #111; }
.sfPdpTitle { margin: 0 0 16px; font-size: 36px; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.sfPdpMeta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 26px; font-size: 14px; }
.sfPdpStock { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 30px; background: #ecf8f1; color: #18794e; font-weight: 600; line-height: 1.2; }
.sfPdpStock::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sfPdpStock.is-to_order { background: #fff4e0; color: #a15c00; }
.sfPdpStock.is-out_of_stock { background: #fdecea; color: #b42318; }
.sfPdpMetaItem { color: var(--pdp-muted); }
.sfPdpRating { display: inline-flex; align-items: center; gap: 8px; color: #111; text-decoration: none; }
.sfPdpRating strong { font-weight: 700; }
.sfPdpRating span:last-child { color: var(--pdp-muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #c9c9c9; }
.sfPdpRating:hover span:last-child { color: #111; text-decoration-color: currentColor; }

/* Stars */
.sfStars { position: relative; display: inline-block; flex: none; line-height: 0; }
.sfStars svg { display: inline-block; width: 17px; height: 17px; margin-right: 2px; }
.sfStarsBase svg { fill: #e2e0da; }
.sfStarsFill { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; }
.sfStarsFill svg { fill: var(--pdp-star); }

/* Price and actions */
.sfPdpBuy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 22px 24px; margin-bottom: 18px; border-radius: 20px; background: var(--pdp-soft); }
.sfPdpPrice { margin: 0; font-size: 38px; font-weight: 700; line-height: 1; white-space: nowrap; }
.sfPdpPrice small { font-size: 24px; font-weight: 600; }
.sfPdpActions { display: flex; flex-wrap: wrap; gap: 10px; }
.sfPdpWrapper .sfPdpCart { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 30px; border: 0; border-radius: 40px; background: #111; color: #fff; font: 600 16px/1 'Montserrat', sans-serif; cursor: pointer; transition: background .2s, transform .2s; }
.sfPdpWrapper .sfPdpCart:hover { background: #333; }
.sfPdpWrapper .sfPdpCart:active { transform: scale(.98); }
.sfPdpWrapper .sfPdpCart svg { width: 22px; height: 22px; fill: #fff; }
.sfPdpWrapper .sfPdpCart span { color: #fff; }
.sfPdpWrapper .sfPdpActions .sfFavWide { height: 50px; padding: 0 20px; }
.sfPdpWrapper .sfPdpActions .sfFavWide svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.sfPdpWrapper .sfPdpActions .sfFavWide.is-active svg { fill: currentColor; }

.sfPdpNote { margin-bottom: 14px; padding: 14px 18px; border-radius: 14px; background: linear-gradient(128deg, #fde3f2 0%, #fffbd6 100%); font-size: 15px; }
.sfPdpNote p { margin: 0; }

/* Delivery and payment */
.sfPdpFacts { display: grid; gap: 12px; margin: 0 0 34px; padding: 18px 0 0; list-style: none; border-top: 1px solid var(--pdp-line); }
.sfPdpFacts li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.45; }
.sfPdpFacts svg { flex: none; width: 22px; height: 22px; fill: none; stroke: #111; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sfPdpFacts strong { display: block; font-weight: 600; }
.sfPdpFacts span { display: block; color: var(--pdp-muted); }

/* Description and characteristics */
.sfPdpHeading { margin: 0 0 18px; font-size: 24px; font-weight: 700; line-height: 1.25; }
.sfPdpHeading span { color: var(--pdp-muted); font-weight: 500; }
.sfPdpDetails { margin-bottom: 44px; }
.sfPdpTabs { display: flex; gap: 28px; margin-bottom: 20px; border-bottom: 1px solid var(--pdp-line); }
.sfPdpTabs button { position: relative; padding: 0 0 12px; border: 0; background: none; color: var(--pdp-muted); font: 600 18px/1.3 'Montserrat', sans-serif; cursor: pointer; }
.sfPdpTabs button::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: #111; transform: scaleX(0); transition: transform .2s; }
.sfPdpTabs button[aria-selected="true"] { color: #111; }
.sfPdpTabs button[aria-selected="true"]::after { transform: scaleX(1); }
.sfPdpTabs button:hover { color: #111; }
.sfPdpFoldBody { font-size: 16px; line-height: 1.7; }
.sfPdpFold.is-folded .sfPdpFoldBody { max-height: var(--fold, 320px); overflow: hidden; -webkit-mask-image: linear-gradient(#000 calc(100% - 90px), transparent); mask-image: linear-gradient(#000 calc(100% - 90px), transparent); }
.sfPdpFoldToggle { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 10px 18px; border: 1.5px solid #111; border-radius: 40px; background: #fff; color: #111; font: 600 14px/1 'Montserrat', sans-serif; cursor: pointer; transition: background .2s, color .2s; }
.sfPdpFoldToggle[hidden] { display: none; }
.sfPdpFoldToggle:hover { background: #111; color: #fff; }
.sfPdpFoldToggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s; }
.sfPdpFoldToggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.sfPdpChars { margin: 0; border-top: 1px solid var(--pdp-line); }
.sfPdpChars > div { display: grid; grid-template-columns: minmax(140px, 36%) minmax(0, 1fr); gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--pdp-line); font-size: 15px; line-height: 1.55; }
.sfPdpChars dt { color: var(--pdp-muted); }
.sfPdpChars dd { margin: 0; }

/* Reviews */
.sfPdpReviewsHead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.sfPdpReviewsHead .sfPdpHeading { margin: 0; }
.sfPdpScore { display: flex; align-items: center; gap: 12px; }
.sfPdpScore > strong { font-size: 34px; font-weight: 700; line-height: 1; }
.sfPdpScore > div { display: grid; gap: 4px; font-size: 13px; color: var(--pdp-muted); }
.sfPdpReviewList { display: grid; gap: 14px; margin-bottom: 26px; }
.sfReview { padding: 20px 22px; border: 1px solid var(--pdp-line); border-radius: 18px; background: #fff; }
.sfReviewHead { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.sfReviewAvatar { position: relative; flex: none; display: grid; place-items: center; width: 46px; height: 46px; overflow: hidden; border-radius: 50%; background: linear-gradient(128deg, #fbb2de 0%, #fff287 100%); color: #111; font-size: 16px; font-weight: 700; letter-spacing: .02em; }
.sfReviewAvatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.sfReviewWho { min-width: 0; }
.sfReviewWho h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.sfReviewMeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--pdp-muted); font-size: 13px; }
.sfReviewMeta .sfStars svg { width: 15px; height: 15px; }
.sfReviewText { font-size: 15px; line-height: 1.65; }
.sfReviewText p:last-child { margin-bottom: 0; }
.sfReviewAnswer { display: flex; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--pdp-soft); font-size: 14px; line-height: 1.6; }
.sfReviewAnswerLogo { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(128deg, #fbb2de 0%, #fff287 100%); }
.sfReviewAnswerLogo svg { width: 20px; height: 20px; fill: #111; color: #111; }
.sfReviewAnswerWho { margin: 0 0 2px; font-weight: 700; }
.sfReviewAnswer .typo p:last-child { margin-bottom: 0; }
.sfPdpEmpty { margin: 0 0 22px; color: var(--pdp-muted); font-size: 15px; }

.sfReviewForm, .sfReviewGuest { padding: 24px; border-radius: 20px; background: var(--pdp-soft); }
.sfReviewForm h3 { margin: 0 0 14px; font-size: 18px; font-weight: 700; }
.sfStarPicker { margin: 0 0 16px; padding: 0; border: 0; }
.sfStarPicker legend { margin-bottom: 8px; padding: 0; font-size: 14px; font-weight: 600; }
.sfStarPicker.red legend { color: #b42318; }
.sfStarPickerStars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.sfStarPickerStars input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.sfStarPickerStars label { display: block; padding: 2px; cursor: pointer; line-height: 0; }
.sfStarPickerStars svg { width: 34px; height: 34px; fill: #dcd9d1; transition: fill .15s, transform .15s; }
.sfStarPickerStars label:hover svg, .sfStarPickerStars label:hover ~ label svg,
.sfStarPickerStars input:checked ~ label svg { fill: var(--pdp-star); }
.sfStarPickerStars label:hover svg { transform: scale(1.08); }
.sfStarPickerStars input:focus-visible + label { outline: 2px solid #111; outline-offset: 2px; border-radius: 6px; }
.sfReviewField { display: block; margin-bottom: 16px; }
.sfReviewField > span { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.sfReviewField textarea { box-sizing: border-box; display: block; width: 100%; min-height: 110px; padding: 14px 16px; border: 1.5px solid #dedbd4; border-radius: 14px; background: #fff; font: 400 15px/1.55 'Montserrat', sans-serif; color: #111; resize: vertical; transition: border-color .2s; }
.sfReviewField textarea:focus { outline: none; border-color: #111; }
.sfReviewField textarea.red { border-color: #b42318; }
.sfPdpWrapper .sfPdpSubmit { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 28px; border: 0; border-radius: 40px; background: #111; color: #fff; font: 600 15px/1 'Montserrat', sans-serif; text-decoration: none; cursor: pointer; transition: background .2s; }
.sfPdpWrapper .sfPdpSubmit:hover { background: #333; }
.sfReviewForm.busy .sfPdpSubmit { opacity: .6; pointer-events: none; }
.sfReviewGuest { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.sfReviewGuest p { margin: 0; font-size: 15px; }

/* Similar products: full width, two rows on desktop */
.sfPdpSimilar { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--pdp-line); }
.sfPdpSimilarHead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 24px; }
.sfPdpSimilarHead .sfPdpHeading { margin: 0; font-size: 30px; }
.sfPdpSimilarHead a { color: #111; font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.sfPdpSimilarGrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

@media (max-width: 1200px) {
    .sfPdpWrapper .singleCatalogItem > .columns { gap: 36px; }
    .sfPdpTitle { font-size: 30px; }
    .sfPdpSimilarGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sfPdpSimilarCell:nth-child(n+7) { display: none; }
}
@media (max-width: 860px) {
    .sfPdpWrapper .singleCatalogItem.sfPdp { padding: 20px 0 56px; }
    .sfPdpWrapper .singleCatalogItem > .columns { grid-template-columns: minmax(0, 1fr); gap: 26px; }
    .sfPdpWrapper .singleCatalogItem > .columns > .col:nth-child(1) { position: static; }
    .sfPdpWrapper .sticky { padding: 8px; border-radius: 16px; }
    .sfPdpCrumbs { margin-bottom: 14px; font-size: 12px; }
    .sfPdpTitle { font-size: 25px; }
    .sfPdpBuy { padding: 18px; }
    .sfPdpPrice { font-size: 32px; }
    .sfPdpSimilar { margin-top: 48px; padding-top: 36px; }
    .sfPdpSimilarHead .sfPdpHeading { font-size: 24px; }
    .sfPdpSimilarGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .sfPdpSimilarCell:nth-child(n+7) { display: block; }
}
@media (max-width: 540px) {
    .sfPdpBuy { flex-direction: column; align-items: stretch; }
    .sfPdpWrapper .sfPdpBuy .sfPdpActions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .sfPdpWrapper .sfPdpCart { width: 100%; }
    .sfPdpWrapper .sfPdpActions .sfFavWide .sfFavText { display: none; }
    .sfPdpChars > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .sfReview { padding: 16px; }
    .sfReviewForm, .sfReviewGuest { padding: 18px; }
    .sfPdpSimilarGrid { gap: 10px; }
}

.sfPdpWrapper .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sfPdpWrapper :is(a, button):focus-visible { outline: 2px solid #111; outline-offset: 3px; }

/* «Кульки»: sold from 3 per order (views/single-catalog.twig, core/includes/back/balls.php). */
.sfPdpBall { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 18px; padding: 14px 18px; border-radius: 18px; background: linear-gradient(128deg, rgba(251,178,222,.35) 0%, rgba(255,242,135,.45) 100%); }
.sfPdpBallDots { display: inline-flex; gap: 4px; }
.sfPdpBallDots i { width: 14px; height: 14px; border-radius: 50%; background: #111; box-shadow: inset 0 -3px 0 rgba(255,255,255,.18); }
.sfPdpBall p { flex: 1 1 220px; margin: 0; font-size: 14px; line-height: 1.45; color: #222; }
.sfPdpBall strong { color: #111; }
.sfPdpBall a { flex: none; padding: 9px 16px; border-radius: 40px; background: #111; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; transition: opacity .2s; }
.sfPdpBall a:hover { opacity: .85; }

/* «Хочу цей товар» / «Повідомити, коли з'явиться» (core/includes/back/product-request.php) */
.sfPdpWrapper .sfPdpRequest { background: linear-gradient(128deg, #fbb2de 0%, #fff287 100%); color: #111; }
.sfPdpWrapper .sfPdpRequest:hover { background: linear-gradient(128deg, #f7a3d4 0%, #fbe96d 100%); }
.sfPdpWrapper .sfPdpRequest span { color: #111; }
.sfPdpWrapper .sfPdpRequest svg { fill: none; stroke: #111; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sfPdpWrapper .sfPdpRequest.is-notify { background: #fff; box-shadow: inset 0 0 0 1.5px #111; }
.sfPdpWrapper .sfPdpRequest.is-notify:hover { background: #f7f6f3; }
.sfRequest { width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 0; border: 0; border-radius: 24px; background: #fff; color: #111; box-shadow: 0 30px 80px rgba(0, 0, 0, .25); font-family: 'Montserrat', sans-serif; }
.sfRequest::backdrop { background: rgba(17, 17, 17, .45); }
.sfRequestForm, .sfRequestDone { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px; }
.sfRequest h2 { margin: 0 52px 0 0; font-size: 22px; font-weight: 800; line-height: 1.25; }
.sfRequestProduct { margin: -6px 0 0; font-size: 15px; font-weight: 600; color: #444; }
.sfRequestLead { margin: 0; color: #555; font-size: 14px; line-height: 1.55; }
.sfRequestClose { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #f7f6f3; color: #111; font-size: 24px; line-height: 1; cursor: pointer; }
.sfRequestForm label { display: flex; flex-direction: column; gap: 6px; color: #6f6f6f; font-size: 13px; font-weight: 600; }
.sfRequestForm input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid #e1e1e1; border-radius: 14px; background: #fff; color: #111; font: 500 15px 'Montserrat', sans-serif; box-sizing: border-box; }
.sfRequestForm input:focus { outline: none; border-color: #111; }
.sfRequestError { margin: 0; color: #b42318; font-size: 14px; font-weight: 500; }
.sfRequestError:empty { display: none; }
.sfRequestSubmit { min-height: 52px; border: 0; border-radius: 48px; background: linear-gradient(128deg, #fbb2de 0%, #fff287 100%); color: #111; font: 700 16px/1.2 'Montserrat', sans-serif; cursor: pointer; }
.sfRequestSubmit:disabled { opacity: .6; cursor: default; }
.sfRequestDone { align-items: center; text-align: center; }
.sfRequestDone > span { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #e6f6ec; color: #18794e; font-size: 28px; font-weight: 700; }
.sfRequestDone p { margin: 0; font-size: 16px; line-height: 1.5; }
.sfRequestDone .sfRequestSubmit { align-self: stretch; }
html.sfRequestLocked { overflow: hidden; }
.sfRequestForm[hidden], .sfRequestDone[hidden] { display: none !important; }
