/* ============================================================
   18+ Age gate — adult-category blur + confirmation modal.
   Cache-safe: the server always renders the gate; the client adds
   html.bigzi-age-ok (from the cookie) to neutralise it. Every gating
   rule is therefore scoped under html:not(.bigzi-age-ok) so a confirmed
   visitor (or once confirmed in-session) instantly gets the natural card.
   ============================================================ */

/* ---- Blurred adult product cards in listings/search ---- */
html:not(.bigzi-age-ok) .bigzi-adult-blur .product-card-image-wrapper{position:relative;overflow:hidden;}
html:not(.bigzi-age-ok) .bigzi-adult-blur .product-card-image-wrapper img{
  filter:blur(18px) brightness(.97);
  transform:scale(1.12);
  transition:none;
}
html:not(.bigzi-age-ok) .bigzi-adult-blur .product-card-image-wrapper::after{
  content:"18+ · Подтвердите возраст";
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  padding:0 14px;text-align:center;
  font:700 13px/1.4 "Gilroy",-apple-system,sans-serif;letter-spacing:.01em;color:#08361C;
  background:linear-gradient(180deg,rgba(247,250,248,.46),rgba(247,250,248,.74));
  -webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);
  cursor:pointer;
}
/* The product NAME and price are themselves explicit on an adult card — redact them. */
html:not(.bigzi-age-ok) .bigzi-adult-blur .product-card-title,
html:not(.bigzi-age-ok) .bigzi-adult-blur .product-card-price{filter:blur(6px);user-select:none;}
/* No quick-view / compare / add-to-cart on a blurred card (prevents gate bypass). */
html:not(.bigzi-age-ok) .bigzi-adult-blur .product-card-actions,
html:not(.bigzi-age-ok) .bigzi-adult-blur .product-card-buy{display:none !important;}

/* ---- Single adult product page: blur the gallery until confirmed ---- */
html:not(.bigzi-age-ok) body.bigzi-adult-locked .woocommerce-product-gallery img,
html:not(.bigzi-age-ok) body.bigzi-adult-locked .product-gallery img,
html:not(.bigzi-age-ok) body.bigzi-adult-locked .gallery-main img,
html:not(.bigzi-age-ok) body.bigzi-adult-locked .pdp-gallery img{filter:blur(40px);transform:scale(1.05);}

/* ---- Body scroll lock while the modal is up ---- */
html:not(.bigzi-age-ok) body.bigzi-adult-locked,
html:not(.bigzi-age-ok) body.bigzi-adult-prompt{overflow:hidden;}

/* ---- Confirmation modal ---- */
.bigzi-age-gate{
  position:fixed;inset:0;z-index:100010; /* above .city-modal (100000) — hard lock must win */
  display:none;align-items:center;justify-content:center;padding:20px;
}
html:not(.bigzi-age-ok) body.bigzi-adult-locked .bigzi-age-gate,
html:not(.bigzi-age-ok) body.bigzi-adult-prompt .bigzi-age-gate{display:flex;}

.bigzi-age-gate__backdrop{
  position:absolute;inset:0;
  background:rgba(6,18,12,.82);
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
}
.bigzi-age-gate__card{
  position:relative;width:100%;max-width:440px;
  background:#fff;border-radius:22px;padding:34px 30px 26px;text-align:center;
  box-shadow:0 30px 80px -20px rgba(0,26,52,.55);
  animation:bigziAgeIn .32s cubic-bezier(.22,1,.36,1);
}
.bigzi-age-gate__badge{
  display:inline-flex;align-items:center;justify-content:center;
  width:64px;height:64px;border-radius:50%;margin-bottom:16px;
  background:linear-gradient(135deg,#0A8538,#0A7A33);color:#fff;
  font:800 22px/1 "Gilroy",-apple-system,sans-serif;letter-spacing:-.02em;
  box-shadow:0 10px 24px -8px rgba(10,133,56,.6);
}
.bigzi-age-gate__eyebrow{
  display:block;margin-bottom:10px;
  font:700 12px/1 "Gilroy",-apple-system,sans-serif;letter-spacing:.14em;text-transform:uppercase;color:#0A7A33;
}
.bigzi-age-gate__title{font:800 26px/1.15 "Gilroy",-apple-system,sans-serif;color:#001A34;margin:0 0 10px;}
.bigzi-age-gate__text{font:400 15px/1.5 "Gilroy",-apple-system,sans-serif;color:#475467;margin:0 0 22px;}
.bigzi-age-gate__actions{display:flex;flex-direction:column;gap:10px;}
.bigzi-age-gate__yes{
  display:flex;align-items:center;justify-content:center;width:100%;height:52px;border:0;border-radius:999px;cursor:pointer;
  background:#0A8538;color:#fff;font:700 16px/1 "Gilroy",-apple-system,sans-serif;text-decoration:none;
  box-shadow:0 10px 24px -8px rgba(10,133,56,.5);transition:transform .2s,background .2s;
}
.bigzi-age-gate__yes:hover{background:#0A7A33;transform:translateY(-2px);}
.bigzi-age-gate__yes:focus-visible{outline:3px solid rgba(10,133,56,.5);outline-offset:3px;}
.bigzi-age-gate__no{
  display:flex;align-items:center;justify-content:center;height:48px;border-radius:999px;
  background:transparent;color:#667085;font:600 15px/1 "Gilroy",-apple-system,sans-serif;text-decoration:none;
  transition:color .2s;
}
.bigzi-age-gate__no:hover{color:#475467;}
.bigzi-age-gate__fine{font:400 12px/1.5 "Gilroy",-apple-system,sans-serif;color:#98A2B3;margin:16px 0 0;}

@keyframes bigziAgeIn{from{opacity:0;transform:translateY(14px) scale(.97);}to{opacity:1;transform:none;}}

/* ---- Mobile: bottom sheet ---- */
@media (max-width:560px){
  .bigzi-age-gate{align-items:flex-end;padding:0;}
  .bigzi-age-gate__card{
    max-width:none;border-radius:22px 22px 0 0;
    padding:28px 22px calc(26px + env(safe-area-inset-bottom,0px));
    animation:bigziAgeUp .34s cubic-bezier(.22,1,.36,1);
  }
  @keyframes bigziAgeUp{from{transform:translateY(100%);}to{transform:none;}}
}

@media (prefers-reduced-motion:reduce){
  .bigzi-age-gate__card{animation:none;}
}
