/*
 * Borpiac Atelier 1.14.0 – összehangolás a Borpiac frissítések bővítménnyel.
 *
 * Ezt a fájlt a sablon a bővítmény stíluslapja UTÁN tölti be, ezért a
 * bővítmény kódjához nem kell hozzányúlni: a színeket a bővítmény saját
 * változóin keresztül, a betűket és a kis elemeket felülírással igazítjuk
 * az új színvilághoz. Ha a bővítmény nincs bekapcsolva, a fájl nem töltődik be.
 */

:root {
  --bpfix-burgundy: #6b1e34;
  --bpfix-burgundy-dark: #46121f;
  --bpfix-ink: #171313;
  --bpfix-muted: #6a5f58;
  --bpfix-beige: #f6f1ea;
  --bpfix-beige-deep: #ebe0d2;
  --bpfix-line: rgba(23, 19, 19, .12);
}

/* Egy betűpár mindenhol: Cormorant Garamond a címekhez, Manrope a szöveghez. */
.bpfix-news-copy h2,
.bpfix-gift-panel__heading h2,
.bpfix-gift-card__copy h3,
.bpfix-recommendations__heading h2,
.bpfix-bundle-offer__heading h2,
.bpfix-recommendation-card__copy h3,
.bpfix-bundle-offer__copy strong,
.bpfix-cart-drawer__header h2,
.bpfix-cart-drawer__name,
.bpfix-cart-drawer__empty p,
.bpfix-age-gate h2 {
  font-family: var(--bp-serif) !important;
  font-weight: 500 !important;
  letter-spacing: -.005em !important;
}
.bpfix-gift-panel--checkout .bpfix-gift-card__copy h3 { font-family: var(--bp-serif) !important; font-weight: 500 !important; }
.bpfix-cart-drawer__name { font-size: 1.2rem; line-height: 1.15; }
.bpfix-recommendation-card__copy h3 { font-size: 1.2rem; }
.bpfix-bundle-offer__copy strong { font-size: 1.35rem; }
.bpfix-cart-drawer__header h2 { font-size: 2.3rem; }
.bpfix-cart-drawer__empty p { font-size: 1.75rem; }
.bpfix-gift-widget,
.bpfix-age-gate,
.bpfix-cart-drawer { font-family: var(--bp-sans) !important; }

/* Akciós jelvény: kis bordó címke a kép bal felső sarkában, mint a kezdőlapon. */
.woocommerce ul.products li.product .onsale,
.woocommerce ul.products li.product .bpfix-sale-percent,
.woocommerce div.product .onsale,
.woocommerce div.product .bpfix-sale-percent,
.products .product .onsale {
  top: 12px !important;
  right: auto !important;
  left: 12px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 5px 9px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--bp-wine) !important;
  color: var(--bp-white) !important;
  font: 700 11px/1.2 var(--bp-sans) !important;
  letter-spacing: .04em;
  transform: none !important;
}
.woocommerce div.product .onsale,
.woocommerce div.product .bpfix-sale-percent { top: 16px !important; left: 16px !important; z-index: 9 !important; }

/* Terméklisták képe: bézs, 4:5-ös keret, a palack középen. */
.woocommerce ul.products li.product a img,
.products .product img {
  aspect-ratio: 4 / 5;
  height: auto !important;
  margin: 0 !important;
  padding: 6% 6% 9% !important;
  border-radius: var(--bp-radius) !important;
  background: var(--bp-beige) !important;
  object-fit: contain !important;
}
.bpfix-recommendation-card .bpfix-recommendation-card__image img,
.bpfix-cart-drawer__image img,
.bpfix-cart-drawer__item > img { background: transparent !important; }
.bpfix-cart-drawer__image,
.bpfix-recommendation-card__image { border-radius: var(--bp-radius-sm) !important; background: var(--bp-beige) !important; }

/* Ár: az aktuális ár elöl, az áthúzott eredeti ár mögötte, halkabban. */
.price ins,
.products .product .price ins { order: 1 !important; color: var(--bp-wine) !important; font-weight: 700 !important; }
.price del,
.products .product .price del { order: 2 !important; color: var(--bp-muted) !important; font-weight: 500 !important; }

/* --------------------------------------------------------------------------
   Kosárvezérlő a termékkép sarkában: fekete „+ Kosárba” kapszula. Ha a bor
   már a kosárban van, ugyanott, ugyanakkora fekete „− 1 +” léptető váltja.
   -------------------------------------------------------------------------- */
.bp-card__cart .bpfix-cart-control,
.woocommerce ul.products li.product > .bpfix-cart-control {
  width: auto !important;
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent !important;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}
.bp-card__cart .bpfix-cart-add,
.bp-card__cart .bp-btn,
.woocommerce ul.products li.product > .bpfix-cart-control .bpfix-cart-add,
.woocommerce ul.products li.product > .bp-bundle-more,
.woocommerce ul.products li.product .bpfix-cart-add {
  display: inline-flex !important;
  width: auto !important;
  min-height: 40px !important;
  align-items: center;
  gap: 8px;
  padding: 0 16px !important;
  border: 1px solid var(--bp-ink) !important;
  border-radius: 999px !important;
  background: var(--bp-ink) !important;
  color: var(--bp-paper) !important;
  font: 600 13px/1 var(--bp-sans) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow: 0 6px 18px rgba(23, 19, 19, .14);
  transition: background .2s ease, border-color .2s ease;
}
.bp-card__cart button.bpfix-cart-add::before,
.woocommerce ul.products li.product button.bpfix-cart-add::before {
  width: 13px;
  height: 13px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.6px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.6px 100% no-repeat;
  content: "";
}
.bp-card__cart .bpfix-cart-add:hover,
.bp-card__cart .bpfix-cart-add:focus-visible,
.bp-card__cart .bp-btn:hover,
.woocommerce ul.products li.product .bpfix-cart-add:hover,
.woocommerce ul.products li.product > .bp-bundle-more:hover {
  border-color: var(--bp-wine) !important;
  background: var(--bp-wine) !important;
  color: var(--bp-white) !important;
}
.bp-card__cart .bpfix-cart-control.has-quantity .bpfix-cart-add,
.woocommerce ul.products li.product .bpfix-cart-control.has-quantity .bpfix-cart-add { display: none !important; }
.bp-card__cart .bpfix-cart-control:not(.has-quantity) .bpfix-cart-stepper,
.woocommerce ul.products li.product .bpfix-cart-control:not(.has-quantity) .bpfix-cart-stepper { display: none !important; }
.bp-card__cart .bpfix-cart-stepper,
.woocommerce ul.products li.product > .bpfix-cart-control .bpfix-cart-stepper {
  width: 116px !important;
  min-height: 40px !important;
  height: 40px;
  grid-template-columns: 36px 1fr 36px !important;
  overflow: hidden;
  border: 1px solid var(--bp-ink) !important;
  border-radius: 999px !important;
  background: var(--bp-ink) !important;
  color: var(--bp-paper) !important;
  box-shadow: 0 6px 18px rgba(23, 19, 19, .14);
}
.bp-card__cart .bpfix-cart-stepper button,
.woocommerce ul.products li.product .bpfix-cart-stepper button {
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  color: var(--bp-paper) !important;
  font: 400 18px/1 var(--bp-sans) !important;
  transition: background .2s ease;
}
.bp-card__cart .bpfix-cart-stepper output,
.woocommerce ul.products li.product .bpfix-cart-stepper output { color: var(--bp-paper) !important; font: 700 14px/1 var(--bp-sans) !important; }
.bp-card__cart .bpfix-cart-stepper button:hover:not(:disabled),
.bp-card__cart .bpfix-cart-stepper button:focus-visible:not(:disabled),
.woocommerce ul.products li.product .bpfix-cart-stepper button:hover:not(:disabled),
.woocommerce ul.products li.product .bpfix-cart-stepper button:focus-visible:not(:disabled) { background: var(--bp-wine) !important; color: var(--bp-white) !important; }
.bp-card__cart .bpfix-cart-stepper button:disabled,
.woocommerce ul.products li.product .bpfix-cart-stepper button:disabled { opacity: .35; }
.bp-card__cart .bpfix-cart-control.is-loading,
.woocommerce ul.products li.product .bpfix-cart-control.is-loading { opacity: .7; }
.bp-card__cart .bpfix-cart-unavailable,
.woocommerce ul.products li.product .bpfix-cart-unavailable {
  display: inline-flex !important;
  width: auto !important;
  min-height: 32px !important;
  padding: 0 12px !important;
  border: 1px solid var(--bp-line) !important;
  border-radius: 999px !important;
  background: var(--bp-paper) !important;
  color: var(--bp-ink) !important;
  font: 600 11px/1 var(--bp-sans) !important;
  letter-spacing: .06em !important;
}

@media (max-width: 560px) {
  /* Mobilon csak a „+” jel látszik, a felirat a képernyőolvasónak megmarad. */
  .bp-card__cart button.bpfix-cart-add,
  .woocommerce ul.products li.product button.bpfix-cart-add {
    width: 40px !important;
    justify-content: center;
    padding: 0 !important;
    font-size: 0 !important;
    gap: 0;
  }
  .bp-card__cart button.bpfix-cart-add::before,
  .woocommerce ul.products li.product button.bpfix-cart-add::before { width: 14px; height: 14px; }
  .bp-card__cart .bpfix-cart-stepper,
  .woocommerce ul.products li.product > .bpfix-cart-control .bpfix-cart-stepper { width: 104px !important; grid-template-columns: 32px 1fr 32px !important; }
}

/* --------------------------------------------------------------------------
   Ajándékbor-widget: az eredeti rajzos kártya újragondolva. Bordó lap,
   kilógó ajándékdoboz-rajz, nagy talpas szöveg és „Részletek” gomb.
   A szöveg és a céloldal továbbra is a bővítmény Ajándékbor beállításaiból jön.
   -------------------------------------------------------------------------- */
.bpfix-gift-widget {
  right: auto !important;
  bottom: max(22px, env(safe-area-inset-bottom, 0px)) !important;
  left: max(22px, env(safe-area-inset-left, 0px)) !important;
  width: min(410px, calc(100vw - 44px)) !important;
  max-width: none !important;
  color: var(--bp-paper);
}
.bpfix-gift-widget__panel {
  overflow: visible !important;
  padding: 18px 46px 18px 18px !important;
  border: 0 !important;
  border-radius: 24px !important;
  background:
    radial-gradient(130% 160% at 0% 0%, rgba(214, 161, 171, .28) 0%, rgba(214, 161, 171, 0) 46%),
    linear-gradient(135deg, #7a2540 0%, var(--bp-wine) 48%, var(--bp-wine-deep) 100%) !important;
  box-shadow: 0 26px 60px rgba(70, 18, 31, .34), 0 2px 0 rgba(255, 255, 255, .08) inset !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.bpfix-gift-widget__panel::before {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(246, 241, 234, .16);
  border-radius: 18px;
  content: "";
  pointer-events: none;
}
.bpfix-gift-widget__link {
  position: relative;
  grid-template-columns: 124px minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: center !important;
  min-height: 0 !important;
  padding: 0 !important;
  color: var(--bp-paper) !important;
}
.bpfix-gift-widget__art {
  width: 124px !important;
  height: 124px !important;
  margin-top: -44px;
  border: 4px solid var(--bp-paper) !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 50% 38%, #fff 0%, var(--bp-rose-soft) 62%, #ebcfd3 100%) !important;
  box-shadow: 0 14px 30px rgba(23, 19, 19, .28);
  transform: rotate(-5deg);
  transition: transform .35s var(--bp-ease) !important;
}
.bpfix-gift-widget__art img,
.bpfix-gift-widget__svg {
  display: block !important;
  width: 104px !important;
  height: 98px !important;
  object-fit: contain;
}
.bpfix-gift-widget__link:hover .bpfix-gift-widget__art,
.bpfix-gift-widget__link:focus-visible .bpfix-gift-widget__art { transform: rotate(3deg) translateY(-4px) scale(1.04) !important; }
.bpfix-gift-widget__copy { display: block !important; min-width: 0; }
.bpfix-gift-widget__eyebrow {
  display: block !important;
  margin: 0 0 7px !important;
  color: var(--bp-rose) !important;
  font: 700 10.5px/1.2 var(--bp-sans) !important;
  letter-spacing: .18em !important;
  text-transform: uppercase;
}
.bpfix-gift-widget__message {
  display: block !important;
  color: var(--bp-paper) !important;
  font: 500 25px/1.08 var(--bp-serif) !important;
  letter-spacing: -.005em;
}
.bpfix-gift-widget__message em {
  color: #f4b4c1 !important;
  font-style: normal !important;
  font-weight: 600 !important;
  white-space: nowrap;
  text-decoration: underline 1.5px rgba(244, 180, 193, .55);
  text-underline-offset: 5px;
}
.bpfix-gift-widget__cta {
  display: inline-flex !important;
  align-items: center;
  gap: 8px !important;
  margin-top: 14px !important;
  padding: 9px 16px !important;
  border-radius: 999px;
  background: var(--bp-paper);
  color: var(--bp-wine) !important;
  font: 700 11.5px/1 var(--bp-sans) !important;
  letter-spacing: .1em !important;
  text-transform: uppercase;
  transition: background .2s ease;
}
.bpfix-gift-widget__cta span { font-size: 14px !important; line-height: 1 !important; }
.bpfix-gift-widget__link:hover .bpfix-gift-widget__cta { background: var(--bp-rose-soft); }
.bpfix-gift-widget__close {
  top: 12px !important;
  right: 12px !important;
  width: 30px !important;
  height: 30px !important;
  color: rgba(246, 241, 234, .8) !important;
  font: 400 20px/1 var(--bp-sans) !important;
  transform: none !important;
}
.bpfix-gift-widget__close:hover { background: rgba(246, 241, 234, .14) !important; color: var(--bp-white) !important; transform: none !important; }

/* Összecsukva: nagy, kerek ajándékjelvény „Ajándék” címkével. */
.bpfix-gift-widget.is-collapsed { width: 88px !important; }
.bpfix-gift-widget__launcher {
  position: relative;
  width: 88px !important;
  height: 88px !important;
  padding: 0 !important;
  border: 4px solid var(--bp-wine) !important;
  border-radius: 50% !important;
  background: radial-gradient(circle at 50% 38%, #fff 0%, var(--bp-rose-soft) 62%, #ebcfd3 100%) !important;
  box-shadow: 0 16px 36px rgba(70, 18, 31, .3) !important;
  animation: bp-gift-bob 3.2s ease-in-out infinite;
}
.bpfix-gift-widget__launcher .bpfix-gift-widget__svg { width: 70px !important; height: 66px !important; }
.bpfix-gift-widget__launcher::after {
  position: absolute;
  top: -8px;
  right: -16px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--bp-wine);
  box-shadow: 0 0 0 3px var(--bp-paper);
  color: var(--bp-paper);
  content: "Ajándék";
  font: 700 10px/1 var(--bp-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.bpfix-gift-widget__launcher:hover { animation-play-state: paused; transform: translateY(-3px) rotate(-4deg) !important; }
@keyframes bp-gift-bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-5px) rotate(-3deg); }
}
.bpfix-gift-widget__link:focus-visible,
.bpfix-gift-widget__close:focus-visible,
.bpfix-gift-widget__launcher:focus-visible { outline: 2px solid var(--bp-paper) !important; outline-offset: 3px !important; }
.bpfix-gift-widget__launcher:focus-visible { outline-color: var(--bp-wine) !important; }

@media (max-width: 760px) {
  /* Mobilon teljes szélességű, alacsonyabb kártya; a × kis jelvénnyé csukja. */
  .bpfix-gift-widget {
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
    bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
    left: max(12px, env(safe-area-inset-left, 0px)) !important;
    width: auto !important;
  }
  .bpfix-gift-widget.is-collapsed { right: auto !important; width: 76px !important; }
  .bpfix-gift-widget__panel { padding: 13px 40px 13px 13px !important; border-radius: 20px !important; }
  .bpfix-gift-widget__panel::before { inset: 5px; border-radius: 16px; }
  .bpfix-gift-widget__link { grid-template-columns: 88px minmax(0, 1fr) !important; gap: 13px !important; }
  .bpfix-gift-widget__art { width: 88px !important; height: 88px !important; margin-top: -30px; border-width: 3px !important; }
  .bpfix-gift-widget__art img,
  .bpfix-gift-widget__svg { width: 74px !important; height: 70px !important; }
  .bpfix-gift-widget__eyebrow { margin-bottom: 4px !important; font-size: 9.5px !important; }
  .bpfix-gift-widget__message { font-size: 19.5px !important; }
  .bpfix-gift-widget__cta { margin-top: 9px !important; padding: 7px 12px !important; font-size: 10.5px !important; }
  .bpfix-gift-widget__close { top: 8px !important; right: 8px !important; }
  .bpfix-gift-widget__launcher { width: 76px !important; height: 76px !important; border-width: 3px !important; }
  .bpfix-gift-widget__launcher .bpfix-gift-widget__svg { width: 60px !important; height: 57px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .bpfix-gift-widget__launcher { animation: none; }
}

/* --------------------------------------------------------------------------
   18+ korhatárkapu: a Borpiac pohár-logójával, a sablon színeivel
   -------------------------------------------------------------------------- */
.bpfix-age-gate {
  background: rgba(23, 19, 19, .82) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--bp-ink) !important;
}
.bpfix-age-gate__panel {
  width: min(100%, 560px) !important;
  padding: clamp(32px, 6vw, 56px) !important;
  border: 0 !important;
  border-radius: 22px !important;
  background: var(--bp-paper) !important;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .35) !important;
}
.bpfix-age-gate__panel::before {
  display: block;
  width: 96px;
  height: 88px;
  margin: 0 auto 18px;
  background: url("../../glass-with-text-black.svg") center / contain no-repeat;
  content: "";
}
.bpfix-age-gate__eyebrow { margin-bottom: 10px !important; color: var(--bp-wine) !important; font-size: 11px !important; font-weight: 600 !important; letter-spacing: .16em !important; }
.bpfix-age-gate h2 { margin-bottom: 16px !important; font-size: clamp(40px, 7vw, 56px) !important; line-height: 1 !important; }
.bpfix-age-gate__copy { color: var(--bp-muted) !important; font-size: 15px !important; }
.bpfix-age-gate__actions { gap: 10px !important; margin-top: 26px !important; }
.bpfix-age-gate button {
  min-height: 50px !important;
  border: 1px solid var(--bp-ink) !important;
  border-radius: 999px !important;
  font: 600 14px/1 var(--bp-sans) !important;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.bpfix-age-gate__confirm { background: var(--bp-ink) !important; color: var(--bp-paper) !important; }
.bpfix-age-gate__confirm:hover { border-color: var(--bp-wine) !important; background: var(--bp-wine) !important; }
.bpfix-age-gate__decline,
.bpfix-age-gate__declined button { background: transparent !important; color: var(--bp-ink) !important; }
.bpfix-age-gate__decline:hover,
.bpfix-age-gate__declined button:hover { background: var(--bp-beige) !important; }
.bpfix-age-gate button:focus-visible { outline: 2px solid var(--bp-wine) !important; outline-offset: 3px !important; }
.bpfix-age-gate__declined { border-radius: var(--bp-radius) !important; background: var(--bp-beige) !important; }
.bpfix-age-gate__legal { color: var(--bp-muted) !important; font-size: 12px !important; }
.bpfix-age-confirmation,
.bpfix-order-age-notice { border-color: var(--bp-line) !important; border-radius: var(--bp-radius-sm) !important; background: var(--bp-beige) !important; }

/* Kosárfiók: azonos gombstílus, mint a sablonban. */
.bpfix-cart-drawer__panel { background: var(--bp-paper) !important; }
.bpfix-cart-drawer__eyebrow { color: var(--bp-wine) !important; letter-spacing: .16em !important; }
.bpfix-cart-drawer__continue { background: var(--bp-ink) !important; color: var(--bp-paper) !important; font-weight: 600; }
.bpfix-cart-drawer__continue:hover,
.bpfix-cart-drawer__continue:focus-visible { background: var(--bp-wine) !important; color: var(--bp-white) !important; }

/* Nyitott mobilmenü alatt az ajándékbor-jelzés ne takarja a menüpontokat. */
body.bp-menu-open .bpfix-gift-widget { visibility: hidden; }

/* A bővítmény fehérre festi a bolt hátterét; az új dizájnban a törtfehér alap fut végig. */
body.post-type-archive-product .bp-main,
body.tax-product_cat .bp-main,
body.tax-product_tag .bp-main { background: transparent !important; }

/* Egységes elsődleges gomb: fekete, rámutatáskor bordó (a bővítmény bordóra festené). */
.single_add_to_cart_button,
.add_to_cart_button,
.button.product_type_simple {
  border-color: var(--bp-ink) !important;
  background: var(--bp-ink) !important;
  color: var(--bp-paper) !important;
}
.single_add_to_cart_button:hover,
.single_add_to_cart_button:focus-visible,
.add_to_cart_button:hover,
.button.product_type_simple:hover {
  border-color: var(--bp-wine) !important;
  background: var(--bp-wine) !important;
}
