/* ==========================================================================
   עמוד מוצר. שפת עמוד הבית: מסגרת לבנה פנימית, חול, דיו וזהב.
   ========================================================================== */

/* פירורי לחם */
.pdp-top{padding-top:clamp(14px,1.6vw,24px)}
.pdp-crumbs{padding-top:14px;font-size:14px;color:var(--muted);display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px}
.pdp-crumbs a{color:var(--ink-soft)}
.pdp-crumbs .sep{color:var(--gold);opacity:.7}

/* פריסה: גלריה ועמודת קנייה, שתיהן נצמדות בגלילה */
.pdp{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:clamp(28px,4vw,64px);align-items:start;margin-top:clamp(18px,2vw,28px)}
.pdp-gallery{position:relative;align-self:start}
.pdp-side{position:static}

/* גלריה */
.pdp-main{--r:30px;aspect-ratio:4/5;max-height:min(calc(100vh - 170px),820px);width:100%;background:var(--tile)}
.pdp.is-out .pdp-main{aspect-ratio:1}
.pdp-main::after{inset:16px;border-radius:21px}
.pdp-main img{width:100%;height:100%;object-fit:cover}
.pdp-main .badge{position:absolute;top:30px;right:30px;z-index:3;background:rgba(255,255,255,.95);font-size:14px;padding:4px 14px;border-radius:999px}
.pdp-main .badge.out{background:var(--ink);color:#fff}
.pdp.is-out .pdp-main img{filter:grayscale(.85) brightness(1.04);opacity:.62}
.pdp.is-out .pdp-main{background:#EEEAE4}
.pdp-thumbs{display:flex;gap:12px;margin-top:14px;flex-wrap:wrap}
.pdp-thumb{--r:14px;width:84px;aspect-ratio:1;background:var(--tile);padding:0;opacity:.62;transition:opacity .2s}
.pdp-thumb::after{inset:6px;border-radius:9px}
.pdp-thumb img{width:100%;height:100%;object-fit:cover}
.pdp-thumb.on{opacity:1}
.pdp-thumb.on{box-shadow:0 0 0 1.5px var(--gold)}

/* עמודת הקנייה: לוח חול ממוסגר, כמו בלוק החריטה בעמוד הבית */
.pdp-buy{--r:30px;background:var(--tile);padding:clamp(28px,3vw,46px) clamp(24px,3vw,46px) clamp(26px,2.8vw,40px)}
.pdp-buy::after{inset:14px;border-radius:21px}
.pdp-buy>:not(.deco){position:relative;z-index:3}
.pdp-buy .deco.pdp-deco{z-index:0;width:clamp(220px,19vw,300px);top:-96px;left:-92px;opacity:.3}
.pdp-buy .eyebrow{font-size:14px}
.pdp-buy h1{font-weight:500;font-size:clamp(32px,3vw,46px);line-height:1.1;margin-top:18px;text-wrap:balance}
.pdp-price{display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin-top:20px}
html body .pdp .pdp-price span.price{font-size:clamp(30px,2.6vw,38px);font-weight:500;line-height:1;color:var(--ink);margin:0}
html body .pdp.is-out .pdp-price span.price{color:var(--muted)}
.pdp-note{font-size:14px;color:var(--muted)}
.pdp-color{margin-top:22px;color:var(--ink-soft);font-size:16px}
.pdp-color b{font-weight:500;color:var(--ink)}
.pdp-short{margin-top:20px;color:var(--ink-soft);max-width:34em}
.pdp-short p+p{margin-top:10px}

/* גוונים נוספים מאותו דגם */
.pdp-shades{margin-top:22px;padding-top:20px;border-top:1px solid rgba(138,106,67,.22)}
.pdp-shades .pdp-color{margin-top:0}
.pdp-swatches{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:12px 10px}
.pdp-swatches .sw{display:flex;flex-direction:column;align-items:center;gap:7px;width:72px;text-align:center}
.pdp-swatches .ph{display:block;width:64px;height:64px;border-radius:14px;overflow:hidden;background:var(--white);box-shadow:0 0 0 1px rgba(31,30,28,.08);transition:box-shadow .2s,transform .2s}
.pdp-swatches .ph img{width:100%;height:100%;object-fit:cover}
.pdp-swatches .nm{font-size:13px;line-height:1.25;color:var(--ink-soft)}
.pdp-swatches .sw.on .ph{box-shadow:0 0 0 2px var(--white),0 0 0 3.5px var(--ink)}
.pdp-swatches .sw.on .nm{color:var(--ink);font-weight:500}
.pdp-swatches .sw.oos .ph img{filter:grayscale(.85);opacity:.55}
.pdp-swatches .sw.oos .nm{color:var(--muted)}

/* טופס ההוספה */
.pdp-cart{margin-top:24px}
.pdp-cart form.cart{display:flex;flex-wrap:wrap;gap:12px;align-items:stretch}
html body .pdp .pdp-cart form.cart{margin:0}
html body .pdp .pdp-cart form.cart::before,html body .pdp .pdp-cart form.cart::after{display:none}
html body .pdp .pdp-cart form.cart>*{margin:0;float:none}
.pdp-cart .quantity{display:flex;align-items:center;border:1px solid #D6CCBE;border-radius:12px;background:#FBF9F6;height:58px;overflow:hidden}
.pdp-cart .quantity.is-hidden{display:none}
.pdp-cart .quantity label{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.pdp-cart .quantity input.qty{width:44px;height:100%;border:0;background:none;text-align:center;font-family:var(--font);font-size:18px;color:var(--ink);-moz-appearance:textfield;appearance:textfield;outline:none}
.pdp-cart .quantity input.qty::-webkit-inner-spin-button,.pdp-cart .quantity input.qty::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.pdp-cart .q-btn{width:46px;height:100%;font-size:22px;line-height:1;color:var(--ink-soft);transition:background .2s,color .2s}
body .pdp .pdp-cart button.single_add_to_cart_button{flex:1;min-width:200px;height:58px;display:inline-flex;align-items:center;justify-content:center;gap:12px;background:var(--ink);color:#fff;border:1px solid var(--ink);border-radius:12px;font-family:var(--font);font-size:18px;font-weight:400;padding:0 30px;transition:background .25s,color .25s}
body .pdp .pdp-cart button.single_add_to_cart_button.loading,body .pdp .pdp-cart button.single_add_to_cart_button.loading:hover{opacity:1!important;cursor:progress;background:var(--ink)!important;border-color:var(--ink)!important}
body .pdp .pdp-cart button.single_add_to_cart_button.added{background:var(--gold-text);border-color:var(--gold-text);color:#fff}
.pdp-err{margin-top:12px;font-size:15px;color:#9B2C2C}

/* החריטה האישית (מהתוסף): כרטיס לבן על לוח החול, שלבים ממוספרים */
.av-personalize{position:relative;width:100%;background:#FBF9F6;border-radius:18px;padding:clamp(20px,2vw,26px);box-shadow:0 18px 40px -30px rgba(31,30,28,.4);counter-reset:avstep}
.av-personalize__head{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.av-personalize__head h2{display:flex;align-items:center;gap:10px;font-weight:500;font-size:22px;line-height:1.2}
.av-personalize__head h2 svg{width:26px;height:26px;color:var(--gold);stroke-width:1.2;flex:none}
.av-personalize__fee{font-size:15px;color:var(--gold-text);white-space:nowrap;border:1px solid rgba(184,149,107,.5);border-radius:999px;padding:3px 12px}
.av-personalize__fee .amount{font-weight:500}
.av-personalize>p{color:var(--ink-soft);font-size:15px;margin-top:12px;line-height:1.55;text-wrap:pretty}
.av-pers-line{position:relative;margin-top:16px;counter-increment:avstep}
.av-pers-line .av-label{display:flex;align-items:baseline;gap:8px;font-size:15px;color:var(--ink);margin-bottom:7px}
.av-pers-line .av-label::before{content:counter(avstep);font-size:13px;font-weight:500;color:var(--gold-text);min-width:22px;padding-bottom:1px;border-bottom:1px solid var(--gold);text-align:center;line-height:1.3}
.av-optional{font-size:13px;color:var(--muted)}
.av-optional::before{content:"· "}
.av-pers-line input{width:100%;font-family:var(--font);font-size:20px;padding:13px 18px 13px 82px;border:1px solid #DCD3C7;border-radius:12px;background:var(--white);outline:none;color:var(--ink);transition:border-color .2s,box-shadow .2s}
.av-pers-line input::placeholder{color:#B9B0A4}
.av-pers-line input:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(184,149,107,.16)}
.av-personalize__count{position:absolute;left:12px;bottom:14px;font-size:13px;line-height:1;color:var(--ink-soft);direction:ltr;pointer-events:none;background:var(--tile);border-radius:999px;padding:5px 10px}
.av-pers-consent{counter-increment:avstep;display:flex;flex-wrap:wrap;gap:10px;align-items:flex-start;margin-top:18px;padding-top:16px;border-top:1px dashed #DCD3C7;font-size:14px;color:var(--ink-soft);line-height:1.5;cursor:pointer}
.av-pers-consent::before{content:counter(avstep);flex-basis:22px;font-size:13px;font-weight:500;color:var(--gold-text);padding-bottom:1px;border-bottom:1px solid var(--gold);text-align:center;line-height:1.3}
.av-pers-consent input{appearance:none;-webkit-appearance:none;width:20px;height:20px;margin:1px 0 0;flex:none;border:1.5px solid #BFB3A3;border-radius:6px;background:var(--white) center/14px no-repeat;cursor:pointer;transition:background-color .2s,border-color .2s}
.av-pers-consent input:checked{background-color:var(--ink);border-color:var(--ink);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")}
.av-pers-consent input:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.av-pers-consent span{flex:1;min-width:0}

/* אזל מהמלאי */
.pdp-oos{margin-top:24px;background:#FBF9F6;border-radius:18px;padding:22px 24px}
.pdp-oos p{margin-top:0;color:var(--ink-soft)}
.pdp-oos .btn{margin-top:18px;gap:12px;width:100%}
.pdp-oos .btn svg{width:22px;height:22px}

/* מקודיון: פרטים, חריטה, משלוח */
.pdp-acc{margin-top:18px;padding-inline:clamp(4px,1vw,12px)}
.pdp-acc details{border-bottom:1px solid var(--line)}
.pdp-acc summary{list-style:none;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 0;font-size:18px;font-weight:500;cursor:pointer}
.pdp-acc summary::-webkit-details-marker{display:none}
.pdp-acc summary::after{content:"";width:9px;height:9px;border-left:1.5px solid var(--gold-text);border-bottom:1.5px solid var(--gold-text);transform:rotate(-45deg) translate(2px,-2px);transition:transform .25s;flex:none}
.pdp-acc details[open] summary::after{transform:rotate(135deg) translate(-2px,2px)}
.acc-body{padding:0 0 22px}
.pdp-prose{color:var(--ink-soft);line-height:1.75}
.pdp-prose p+p,.pdp-prose ul,.pdp-prose ol{margin-top:10px}
.pdp-prose ul,.pdp-prose ol{padding-inline-start:20px}
.pdp-prose a{color:var(--gold-text);border-bottom:1px solid currentColor}
.pdp-prose b{font-weight:500;color:var(--ink)}
.pdp-specs{margin-top:16px}
.pdp-specs>div{display:flex;justify-content:space-between;gap:20px;padding:11px 0;border-bottom:1px solid var(--line);font-size:15px}
.pdp-specs>div:first-child{border-top:1px solid var(--line)}
.pdp-specs>div:last-child{border-bottom:0}
.pdp-specs dt{color:var(--muted)}
.pdp-specs dd{font-weight:500;text-align:left}
.acc-note{margin-top:14px;font-size:14px;color:var(--muted);line-height:1.6}

/* רצועת אמון: אותה רצועה של עמוד הבית */
.pdp-feat{margin-top:clamp(56px,6vw,96px)}

/* מוצרים קשורים */
.pdp-related .rail{grid-auto-columns:calc((100% - 4*20px)/5)}

/* סרגל קנייה צף (מובייל בלבד). יושב ישירות ב-body (page-product.php מעביר אותו), כדי שלא ייבלע מתחת לפוטר */
.pdp-bar{position:fixed;inset-inline:max(10px,calc(50% - 330px));bottom:calc(10px + env(safe-area-inset-bottom));z-index:35;padding:8px;background:rgba(255,255,255,.97);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:18px;box-shadow:0 16px 34px -14px rgba(31,30,28,.38);transform:translateY(calc(100% + 24px));visibility:hidden;transition:transform .32s cubic-bezier(.2,.7,.2,1),visibility 0s .32s}
.pdp-bar.on{transform:none;visibility:visible;transition:transform .32s cubic-bezier(.2,.7,.2,1)}
.pdp-bar-in{display:flex;align-items:center;gap:10px;max-width:640px;margin-inline:auto}
.pdp-bar .th{flex:none;width:44px;height:44px;border-radius:11px;overflow:hidden;background:var(--tile)}
.pdp-bar .th img{width:100%;height:100%;object-fit:cover;display:block}
.pdp-bar .t{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px;line-height:1.3}
.pdp-bar .t b{font-weight:500;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pdp-bar .t .price{font-size:14px;color:var(--ink-soft)}
.pdp-bar .btn{flex:none;min-height:44px;padding:0 16px;gap:8px;font-size:15px;border-radius:12px;white-space:nowrap}
.pdp-bar .btn svg{width:17px;height:17px}
/* במובייל הפס תופס את כל הרוחב: הוואטסאפ וכפתור הנגישות עולים מעליו (כולל השוליים של האייפון) */
@media (max-width:820px){
  body.pdp-bar-on .fab{bottom:calc(86px + env(safe-area-inset-bottom))}
  body.pdp-bar-on .uwy .userway_buttons_wrapper{bottom:calc(86px + env(safe-area-inset-bottom))!important}
}
@media (min-width:821px){
  .pdp-bar{bottom:20px;padding:10px}
  .pdp-bar .th{width:52px;height:52px}
  .pdp-bar .t b{font-size:16px}
  .pdp-bar .t .price{font-size:15px}
  .pdp-bar .btn{min-height:48px;padding:0 22px}
}
.fab{transition:bottom .3s ease}

@media (max-width:1100px){
  .pdp{gap:28px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .pdp-gallery{position:relative}
  .pdp-buy{padding:30px 24px 26px}
  .pdp-related .rail{grid-auto-columns:calc((100% - 3*16px)/3.3)}
}
@media (max-width:820px){
  .pdp{grid-template-columns:1fr;gap:22px}
  .pdp-gallery,.pdp-side{position:static}
  .pdp-main{max-width:560px;margin-inline:auto;width:100%}
  .pdp-thumbs{justify-content:center}
}
@media (max-width:680px){
  .pdp-crumbs{font-size:13px;flex-wrap:nowrap;white-space:nowrap;overflow:hidden}
  .pdp-crumbs>:last-child{overflow:hidden;text-overflow:ellipsis;min-width:0}
  .pdp-main{--r:22px}
  .pdp-main::after{inset:10px;border-radius:15px}
  .pdp-main .badge{top:20px;right:20px;font-size:13px}
  .pdp-thumb{width:64px}
  .pdp-buy{--r:22px;padding:28px 18px 20px}
  .pdp-buy::after{inset:9px;border-radius:15px}
  .pdp-buy .deco.pdp-deco{width:200px;top:-70px;left:-70px;opacity:.26}
  .pdp-buy h1{font-size:clamp(28px,8vw,34px);margin-top:14px}
  html body .pdp .pdp-price span.price{font-size:28px}
  .pdp-swatches{gap:10px 6px}
  .pdp-swatches .sw{width:64px}
  .pdp-swatches .ph{width:56px;height:56px;border-radius:12px}
  .av-personalize{padding:18px 14px}
  .av-personalize__head h2{font-size:20px}
  .av-pers-line input{font-size:18px}
  .pdp-cart .quantity{height:54px}
  body .pdp .pdp-cart button.single_add_to_cart_button{height:54px;min-width:0;padding:0 18px}
  .pdp-oos{padding:20px 16px}
  .pdp-acc{padding-inline:2px}
  .pdp-feat{margin-top:48px}
  .pdp-related .rail{grid-auto-columns:62%}
}

/* תצוגה חיה של החריטה (inc/page-engrave-preview.php, assets/js/engrave-preview.js, engrave.css).
   הבמה נדלקת רק מ-JS (.is-eng), ובלי JS רואים את התמונה הרגילה. */
.pdp-main .eng-stage{position:absolute;left:0;top:0;width:100%;height:100%;display:none;z-index:1}
.pdp-main.is-eng .eng-stage{display:block}
.pdp-main.is-eng>img[data-pdp-main]{visibility:hidden}
.pdp-main .eng-stage img,.eng-mini .eng-stage img{width:100%;height:100%;object-fit:fill;display:block}
.pdp-main>.eng-note{display:none}
.pdp-main.is-eng>.eng-note{display:block}
.eng-note{position:absolute;bottom:28px;left:50%;transform:translateX(-50%);z-index:3;white-space:nowrap;font-size:13px;line-height:1;color:var(--ink-soft);background:rgba(255,255,255,.92);border-radius:999px;padding:7px 14px;pointer-events:none}
.pdp-thumb[data-eng]{position:relative}
.pdp-thumb[data-eng]::before{content:"";position:absolute;inset:auto 8px 8px auto;width:20px;height:20px;border-radius:50%;z-index:3;background:var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A6A43' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E") center/12px no-repeat;box-shadow:0 1px 3px rgba(0,0,0,.15)}

/* במסך רחב הגלריה נצמדת, כדי שהתמונה תישאר מול העיניים בזמן ההקלדה */
@media (min-width:1101px){
  .pdp.has-eng .pdp-gallery{position:sticky;top:var(--eng-top,110px)}
}

/* תצוגה מוגדלת ליד השדות (טאבלט ונייד), נבנית ב-JS */
.eng-mini{--r:14px;height:clamp(132px,40vw,200px);margin-top:16px;background:var(--tile);box-shadow:inset 0 0 0 1px rgba(31,30,28,.05)}
.eng-mini::after{inset:6px;border-radius:9px}
.eng-mini .eng-stage{position:absolute;left:0;top:0;display:block}
.eng-mini .eng-note{top:12px;bottom:auto;left:12px;transform:none;font-size:13px;padding:5px 11px}
.eng-hint{margin-top:8px;font-size:13px;line-height:1.5;color:var(--gold-text)}
@media (min-width:1101px){.eng-mini{display:none}}
@media (max-width:680px){
  .eng-note{bottom:18px;font-size:13px;padding:6px 12px}
}

/* שורת אמון מתחת לכפתור ההוספה לסל */
.pdp-trust{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;margin-top:14px;font-size:13px;color:var(--muted)}
.pdp-trust svg{width:15px;height:15px;stroke:currentColor}
.pdp-trust a{color:var(--ink-soft);border-bottom:1px solid var(--line)}

/* ביקורות (woocommerce/single-product-reviews.php) */
.pdp-reviews{font-size:15px}
.pdp-rev__sum{display:flex;align-items:center;gap:10px;margin-bottom:14px;color:var(--ink-soft)}
.pdp-reviews .star-rating{color:var(--gold)}
.pdp-rev__list{list-style:none;display:grid;gap:14px;margin:0 0 18px;padding:0}
.pdp-rev{padding:14px 16px;background:var(--white);border:1px solid var(--line);border-radius:12px}
.pdp-rev::before{display:none}
.pdp-rev__head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-bottom:6px}
.pdp-rev__head b{font-weight:500;color:var(--ink)}
.pdp-rev__head time{font-size:13px;color:var(--muted)}
.pdp-rev__ok{font-size:12px;padding:2px 8px;border-radius:999px;background:var(--tile);color:var(--gold-text)}
.pdp-rev__text{margin-top:6px;color:var(--ink-soft)}
.pdp-rev__wait{font-size:13px;color:var(--gold-text)}
.pdp-rev__empty{color:var(--ink-soft)}
.pdp-rev__form{margin-top:14px;border-top:1px solid var(--line);padding-top:12px}
.pdp-rev__form > summary{cursor:pointer;font-weight:500;color:var(--ink);list-style:none;padding:6px 0}
.pdp-rev__form > summary::-webkit-details-marker{display:none}
.pdp-rev__form > summary::after{content:" +";color:var(--gold)}
.pdp-rev__form[open] > summary::after{content:" −"}
.pdp-rev__note{font-size:13px;color:var(--muted);margin:8px 0 12px}
.pdp-rev__note a{color:var(--ink-soft);border-bottom:1px solid var(--line)}
.pdp-reviews .comment-form{display:grid;gap:12px}
.pdp-reviews .comment-form label{display:block;font-size:14px;color:var(--ink-soft);margin-bottom:5px}
.pdp-reviews .comment-form .required{color:var(--gold-text)}
.pdp-reviews .comment-form input[type=text],.pdp-reviews .comment-form input[type=email],.pdp-reviews .comment-form select,.pdp-reviews .comment-form textarea{width:100%;font:inherit;font-size:16px;padding:11px 14px;border:1px solid #DCD3C7;border-radius:10px;background:#FBF9F6;color:var(--ink)}
.pdp-reviews .comment-form :is(input,select,textarea):focus{outline:none;border-color:var(--gold)}
.pdp-reviews .form-submit{margin:4px 0 0}
.pdp-reviews .form-submit .btn{width:auto}
.pdp-reviews .comment-form-cookies-consent{display:none}
.pdp-reviews .form-submit input.btn,#respond .pdp-reviews input#submit{background:var(--ink)!important;color:#fff!important;border:1px solid var(--ink)!important;padding:14px 28px!important;border-radius:12px!important;font:inherit!important;font-size:16px!important;cursor:pointer}
.pdp-rev__form > summary::after{content:none}

/* הדגשת תיבת האישור כשמנסים להוסיף בלי לסמן */
.av-attn{outline:2px solid var(--gold-text);outline-offset:4px;border-radius:8px;transition:outline-color .3s}
