/* IVO-PDP-POLISH-20261113 — продуктова страница (armadabg.eu): първият екран да продава.
   Цена, номера и бутон „Добави в кошницата“ са по-едри и по-близо един до друг; на телефон има лента с бутона най-долу
   (скриптът е ivo-pdp.js). Зарежда се само на продуктова страница (виж functions.php на темата).
   Спиране: махни блока IVO-SHOP-POLISH-20261113 от functions.php (файловете могат да останат). */

.single-product .custom-product-page {
  --ipd-ink: #1b1b1b;
  --ipd-muted: #666b63;
  --ipd-line: #dcdfd8;
  --ipd-soft: #f7f8f5;
  --ipd-green: #15803d;
  --ipd-cta: #f02a71;
}

/* 1) Заглавие, код и марка */
.single-product .custom-product-page h1.product_title {
  margin: 0 0 6px;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--ipd-ink);
}
.single-product .custom-product-page h1.product_title .short-description {
  margin-top: 3px;
  font-size: 15px !important;
  line-height: 1.4;
  color: var(--ipd-muted) !important;
}
.single-product .custom-product-page h1.product_title ~ span:not([class]) {
  display: inline-block;
  vertical-align: middle;
  margin-right: 14px;
  color: var(--ipd-muted) !important;
}
.single-product .custom-product-page .product-brand-box {
  display: inline-flex !important;
  vertical-align: middle;
  margin: 0 !important;
  font-size: 13px;
  color: var(--ipd-muted);
}
.single-product .custom-product-page .product-brand-box .brand-logo { max-width: 96px !important; }
.single-product .custom-product-page .product-brand-box img { display: block; margin: 0; max-height: 22px; width: auto; }

/* 2) Цената: най-едрото нещо след снимката */
.single-product .custom-product-page .product-brand-box + .gap-element,
.single-product .custom-product-page h1.product_title + span + .gap-element,
.single-product .custom-product-page h1.product_title + .gap-element { padding-top: 12px !important; }
.single-product .custom-product-page .product-price-container { margin: 0 0 2px; }
.single-product .custom-product-page .product-price-container .price {
  margin: 0;
  font-size: 26px !important;
  line-height: 1.15;
  font-weight: 700;
  color: var(--ipd-ink);
}
.single-product .custom-product-page .product-price-container .price .amount { font-weight: 700; color: inherit; }
.single-product .custom-product-page .product-price-container .price del {
  margin-right: 8px;
  font-size: .62em;
  font-weight: 400;
  color: #6f6f6f;
  opacity: 1;
}
.single-product .custom-product-page .product-price-container .price del .amount { font-weight: 400; }
.single-product .custom-product-page .product-price-container .price ins { text-decoration: none; }

.single-product .product.outofstock .custom-product-page .product-price-container .price {
  font-size: 18px !important;
  font-weight: 600;
  color: var(--ipd-muted);
}
.single-product .custom-product-page .product-price-container.ipd-zero { display: none; }

/* 3) „Безплатна доставка“ и „100% естествена кожа“ — на един ред, когато се събират */
.single-product .custom-product-page .add-to-cart-container .free-shipping-wrap {
  margin: 8px 0 6px !important;
}
.single-product .custom-product-page .add-to-cart-container .free-shipping-badge { padding: 6px 11px; font-size: 13px; }
.single-product .custom-product-page .add-to-cart-container > .custom-category-icon2 { vertical-align: middle; }
.single-product .custom-product-page .add-to-cart-container > .custom-category-icon2 + a { vertical-align: middle; }

/* 4) Номерата: „Размери“ и „таблица с размери“ на един ред; кутийките са удобни за пръст */
.single-product .custom-product-page form.cart { margin-bottom: 0; }
.single-product .custom-product-page .ts-sizechart-wrap:has(+ table.variations) {
  position: relative;
  z-index: 2;
  height: 0 !important;
  margin: 0 !important;
  align-items: flex-start !important;
}
.single-product .custom-product-page .ts-sizechart-wrap > .ts-sizechart-btn {
  min-height: 36px;
  margin: 0;
  padding: 0 0 0 8px !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}
.single-product .custom-product-page table.variations { margin: 4px 0 0; }
.single-product .custom-product-page table.variations th.label,
.single-product .custom-product-page table.variations td.value { padding: 0; border: 0; }
.single-product .custom-product-page table.variations .label label {
  margin: 0;
  min-height: 36px;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ipd-ink);
}
.single-product .custom-product-page .variations_form .ux-swatches:not(.ux-swatches-in-loop) { gap: 6px; margin: 0 0 4px; }
.single-product .custom-product-page .variations_form .ux-swatches:not(.ux-swatches-in-loop) .ux-swatch--label {
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 10px !important;
  border-radius: 9px !important;
  font-size: 15px !important;
  font-weight: 600;
  color: var(--ipd-ink);
  transition: box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.single-product .custom-product-page .variations_form .ux-swatches:not(.ux-swatches-in-loop) .ux-swatch--label:not(.disabled) { background: #fff; }
.single-product .custom-product-page .variations_form .ux-swatches:not(.ux-swatches-in-loop) .ux-swatch--label .ux-swatch__text { border-radius: 0; }
/* номерата на обувките: всички на един ред, докато са до 8 */
.single-product .custom-product-page .variations_form .ux-swatches[data-attribute_name*="size"] .ux-swatch--label {
  flex: 1 1 38px;
  min-width: 38px !important;
  max-width: 58px;
  padding: 0 2px !important;
}
.single-product .custom-product-page .variations_form .ux-swatches:not(.ux-swatches-in-loop) .ux-swatch--label.selected {
  background: var(--ipd-ink);
  color: #fff;
  box-shadow: 0 0 0 2px var(--ipd-ink) !important;
}
.single-product .custom-product-page .variations_form .ux-swatches:not(.ux-swatches-in-loop) .ux-swatch--label.selected .ux-swatch__text { color: #fff !important; }
.single-product .custom-product-page .variations_form .ux-swatches:not(.ux-swatches-in-loop) .ux-swatch--label.disabled { color: #555; }
/* избраният номер личи от кутийката — без „Размери:: 38“ до надписа */
.single-product .custom-product-page table.variations .label .ux-swatch-selected-value { display: none; }
.single-product .custom-product-page .variations_form .ux-swatches .ux-swatch--label.ipd-diff {
  flex: 0 0 auto;
  min-width: 58px !important;
  max-width: none;
  padding: 0 6px !important;
}
.single-product .custom-product-page .variations_form .ux-swatch--label.ipd-diff .ux-swatch__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}
.single-product .custom-product-page .variations_form .ux-swatch--label .ivo-price-diff {
  margin: 2px 0 0;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}
.single-product .custom-product-page .variations_form .ux-swatch--label.selected .ivo-price-diff { color: #b7efc5; }
/* не е избран номер → показваме къде се избира (вместо изскачащ прозорец) */
.single-product .custom-product-page .ipd-hint {
  display: none;
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
  color: #b42318;
}
.single-product .custom-product-page form.ipd-need .ipd-hint { display: block; }
.single-product .custom-product-page form.ipd-need .ux-swatches:not(.ux-swatches-in-loop) .ux-swatch--label:not(.selected):not(.disabled) {
  box-shadow: 0 0 0 2px var(--ipd-cta) !important;
  animation: ipd-nudge .45s ease 1;
}
@keyframes ipd-nudge {
  0%, 100% { transform: none; }
  30% { transform: translateX(-3px); }
  70% { transform: translateX(3px); }
}

/* 5) Количество + бутон на един ред; бутонът е висок 52px */
.single-product .custom-product-page form.cart .woocommerce-variation-add-to-cart,
.single-product .custom-product-page form.cart:not(.variations_form):not(.grouped_form) {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px !important;
  margin-top: 12px;
}
.single-product .custom-product-page form.cart .ux-quantity {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: stretch;
  height: 52px;
  margin: 0 !important;
  border: 1px solid #cdd1c9;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  opacity: 1;
}
.single-product .custom-product-page form.cart .ux-quantity .ux-quantity__button,
.single-product .custom-product-page form.cart .ux-quantity .qty {
  height: 50px !important;
  min-height: 0;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 15px;
  line-height: 50px;
  color: var(--ipd-ink);
}
.single-product .custom-product-page form.cart .ux-quantity .ux-quantity__button { width: 34px; padding: 0; }
.single-product .custom-product-page form.cart .ux-quantity .qty { width: 34px; max-width: 34px; padding: 0; text-align: center; font-weight: 600; }
.single-product .custom-product-page form.cart .single_add_to_cart_button {
  flex: 1 1 180px;
  min-width: 0 !important;
  width: auto;
  min-height: 52px;
  margin: 0 !important;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: .03em;
  box-shadow: 0 6px 16px rgba(240, 42, 113, .22);
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
.single-product .custom-product-page form.cart .single_add_to_cart_button:hover { filter: brightness(.96); box-shadow: 0 8px 20px rgba(240, 42, 113, .28); }
.single-product .custom-product-page form.cart .single_add_to_cart_button:active { transform: translateY(1px); }
.single-product .custom-product-page form.cart .single_add_to_cart_button:focus-visible { outline: 2px solid var(--ipd-ink); outline-offset: 2px; }
/* без избран номер бутонът не избледнява — при натискане показва къде се избира */
.single-product .custom-product-page form.cart .single_add_to_cart_button.wc-variation-selection-needed { opacity: 1 !important; cursor: pointer; }
.single-product .custom-product-page form.cart .single_add_to_cart_button.wc-variation-is-unavailable { box-shadow: none; }
.single-product .custom-product-page form.cart .woocommerce-variation-add-to-cart > .ivo-delivery-box,
.single-product .custom-product-page form.cart > .ivo-delivery-box { flex: 0 0 100%; margin-top: 4px; }
.single-product .custom-product-page .ivo-delivery-box,
.single-product .custom-product-page .ivo-delivery-box * { font-size: 13px !important; line-height: 1.4 !important; }
.single-product .custom-product-page .ivo-delivery-box .ivo-delivery-main { gap: 5px; }
.single-product .custom-product-page .ivo-delivery-box .ivo-delivery-note { margin-top: 6px; gap: 5px; }
.single-product .custom-product-page .woocommerce-variation.single_variation { margin: 0; }
/* цената на избрания номер вече е горе (голямата цена се сменя сама) — без второ, дребно повторение */
.single-product .custom-product-page .woocommerce-variation.single_variation .woocommerce-variation-price { display: none; }
.single-product .custom-product-page .woocommerce-variation.single_variation .woocommerce-variation-description:empty { display: none; }
.single-product .custom-product-page .woocommerce-variation-availability p.stock { margin: 10px 0 0; font-size: 13px; line-height: 1.3; }
.single-product .custom-product-page .woocommerce-variation-availability p.stock.in-stock { color: var(--ipd-green); font-weight: 600; }
.single-product .custom-product-page .woocommerce-variation.single_variation:empty { display: none; }

/* 6) Под бутона: по-малко празно, „Доставка и връщане“ като спретната карта с отметки */
.single-product .custom-product-page .add-to-cart-container + .gap-element { padding-top: 14px !important; }
.single-product .custom-product-page a.plain + .is-divider + .gap-element { padding-top: 22px !important; }
.single-product .custom-product-page .icon-box + .text > ul {
  list-style: none;
  margin: 0 0 4px;
  padding: 10px 14px;
  border: 1px solid var(--ipd-line);
  border-radius: 12px;
  background: var(--ipd-soft);
}
.single-product .custom-product-page .icon-box + .text > ul > li {
  position: relative;
  margin: 0 !important;
  padding: 6px 0 6px 28px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ipd-ink);
}
.single-product .custom-product-page .icon-box + .text > ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dff3e6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px 11px no-repeat;
}
.single-product .custom-product-page .icon-box + .text > ul > li[hidden] { display: none; }
.single-product .custom-product-page.ux-layout-18375:has(.free-shipping-badge) .icon-box + .text > ul > li:first-child { display: none; }
.single-product .custom-product-page .icon-box + .text > ul > li img { vertical-align: -1px; margin: 0 4px 0 0; }
.single-product .custom-product-page .icon-box + .text > ul > li .ipd-free { color: var(--ipd-green); font-weight: 600; white-space: nowrap; }

/* 7) Описанието се чете по-леко */
.single-product .custom-product-page .col-inner > div[class~="3424gg4r4sf"] > p { line-height: 1.6; margin-bottom: .9em; }

/* 8) Телефон и таблет: кубчетата под снимката отпадат (точките остават), лента с бутона най-долу */
@media (max-width: 849px) {
  .single-product .custom-product-page .product-thumbnails { display: none !important; }
  .single-product .custom-product-page .product-images { margin-bottom: 6px; }
  .single-product .custom-product-page .product-breadcrumb-container { margin-bottom: 8px; }
  .single-product .custom-product-page .col:has(> .col-inner > .product-images) { padding-bottom: 2px; }
  .single-product .custom-product-page .col:has(> .col-inner > .product-images) > .col-inner { padding-top: 12px !important; }
  .single-product .custom-product-page .col[class~="32423ssdfw2"] .is-sticky-column__inner > .col-inner { margin-top: 8px !important; }
  .single-product .custom-product-page h1.product_title .short-description { font-size: 14px !important; }
  .single-product .custom-product-page form.cart .single_add_to_cart_button { font-size: 15px; }
}
.ipd-bar { display: none; }
@media (max-width: 849px) {
  .ipd-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #dcdfd8;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, .08);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform .22s ease, visibility 0s linear .22s;
  }
  .ipd-bar.is-on { transform: none; visibility: visible; transition: transform .22s ease, visibility 0s; }
  .ipd-bar__info { flex: 0 0 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; line-height: 1.2; }
  .ipd-bar__price { font-size: 18px; font-weight: 700; color: #1b1b1b; white-space: nowrap; }
  .ipd-bar__price .price, .ipd-bar__price p { margin: 0; font-size: inherit; font-weight: inherit; color: inherit; }
  .ipd-bar__price .amount { font-weight: 700; color: inherit; }
  .ipd-bar__price del { margin-right: 5px; font-size: .68em; font-weight: 400; color: #6f6f6f; opacity: 1; }
  .ipd-bar__price del .amount { font-weight: 400; }
  .ipd-bar__price ins { text-decoration: none; }
  .ipd-bar__note { font-size: 12px; color: #666b63; white-space: nowrap; }
  .ipd-bar__note:empty { display: none; }
  .ipd-bar .ipd-bar__btn {
    flex: 1 1 auto;
    min-height: 48px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: #f02a71;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .03em;
    text-transform: uppercase;
    box-shadow: none;
  }
  .ipd-bar .ipd-bar__btn:focus-visible { outline: 2px solid #1b1b1b; outline-offset: 2px; }
  body.ipd-bar-on { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  body.ipd-bar-on .back-to-top { bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important; }
  /* иконата за бисквитки (долу вляво) не стои върху цената в лентата */
  body.ipd-bar-on .brlbs-cmpnt-widget.brlbs-bottom-0.brlbs-left-0 { transform: translateY(calc(-68px - env(safe-area-inset-bottom, 0px))) !important; }
}

@media (max-width: 379px) {
  .single-product .custom-product-page form.cart .single_add_to_cart_button { font-size: 14px; letter-spacing: 0; padding: 0 10px; }
  .ipd-bar__price del { display: none; }
  .ipd-bar .ipd-bar__btn { font-size: 13px; letter-spacing: 0; padding: 0 10px; }
}

/* 9) Компютър */
@media (min-width: 850px) {
  .single-product .custom-product-page h1.product_title { font-size: 27px; }
  .single-product .custom-product-page h1.product_title .short-description { font-size: 16px !important; }
  .single-product .custom-product-page .product-price-container .price { font-size: 30px !important; }
  .single-product .custom-product-page .add-to-cart-container .free-shipping-wrap {
    display: inline-block !important;
    width: auto !important;
    margin: 8px 14px 8px 0 !important;
    vertical-align: middle;
  }
  .single-product .custom-product-page .variations_form .ux-swatches[data-attribute_name*="size"] .ux-swatch--label { flex: 0 1 50px; min-width: 44px !important; }
  .single-product .custom-product-page form.cart .single_add_to_cart_button { font-size: 16px; }
  .single-product .custom-product-page form.cart .ux-quantity .ux-quantity__button,
  .single-product .custom-product-page form.cart .ux-quantity .qty { width: 38px; max-width: 38px; }
}

/* 850–1299px: колоната е тясна — значката остава на свой ред; до 1199px бутонът е на цял ред */
@media (min-width: 850px) and (max-width: 1299px) {
  .single-product .custom-product-page .add-to-cart-container .free-shipping-wrap { display: block !important; width: auto !important; margin: 8px 0 6px !important; }
}
@media (min-width: 850px) and (max-width: 1199px) {
  .single-product .custom-product-page form.cart .single_add_to_cart_button { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .single-product .custom-product-page form.ipd-need .ux-swatch--label { animation: none !important; }
  .ipd-bar, .ipd-bar.is-on { transition: none; }
  .single-product .custom-product-page form.cart .single_add_to_cart_button { transition: none; }
}
