/* ==========================================================================
   Krista Upsell — upsell.css  v4.1.0
   ========================================================================== */

:root {
  --ku-page-btn-bg:          #1a1a1a;
  --ku-page-btn-text:        #ffffff;
  --ku-popup-primary-bg:     #1a1a1a;
  --ku-popup-primary-text:   #ffffff;
  --ku-popup-secondary-bg:   #ffffff;
  --ku-popup-secondary-text: #555555;
}

/* ── Shared ──────────────────────────────────────────────────────────────── */
.ku-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: 4px;
  font-size: 0.875rem; font-weight: 600; line-height: 1.2;
  cursor: pointer; text-decoration: none;
  border: 2px solid transparent;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap; font-family: inherit;
}
.ku-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.ku-btn--small { padding: 7px 14px; font-size: 0.8125rem; }
.ku-btn--full  { width: 100%; justify-content: center; }
.ku-btn--added { color: #16a34a !important; border-color: #16a34a !important; background: transparent !important; }

/* Product page */
.ku-btn--primary {
  background: var(--ku-page-btn-bg);
  color: var(--ku-page-btn-text);
  border-color: var(--ku-page-btn-bg);
}
.ku-btn--primary:hover { opacity: 0.85; }

/* Popup primary (qty карти border + bundle добави) */
.ku-btn--popup-primary {
  background: var(--ku-popup-primary-bg);
  color: var(--ku-popup-primary-text);
  border-color: var(--ku-popup-primary-bg);
}
.ku-btn--popup-primary:hover { opacity: 0.85; }

/* Popup secondary (skip) */
.ku-btn--popup-secondary {
  background: var(--ku-popup-secondary-bg);
  color: var(--ku-popup-secondary-text);
  border-color: var(--ku-popup-secondary-text);
}
.ku-btn--popup-secondary:hover { opacity: 0.8; }

/* ── Bundle section ──────────────────────────────────────────────────────── */
.ku-bundle-section { margin-top: 28px; padding-top: 22px; border-top: 1px solid #e5e5e5; }
.ku-bundle-section__title { font-size: 0.9375rem; font-weight: 700; margin: 0 0 14px; }
.ku-bundle-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

/* ── Bundle card ─────────────────────────────────────────────────────────── */
.ku-bundle-card {
  display: flex; flex-direction: column;
  border: 1px solid #e5e5e5; border-radius: 8px;
  overflow: hidden; transition: box-shadow 0.15s;
}
.ku-bundle-card:hover { box-shadow: 0 2px 14px rgba(0,0,0,.09); }
.ku-bundle-card__img-link { display: block; aspect-ratio: 1; overflow: hidden; background: #f8f8f8; }
.ku-bundle-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s; }
.ku-bundle-card:hover .ku-bundle-card__img { transform: scale(1.04); }
.ku-bundle-card__body { padding: 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ku-bundle-card__title { font-size: 0.85rem; font-weight: 600; color: inherit; text-decoration: none; line-height: 1.35; }
.ku-bundle-card__title:hover { text-decoration: underline; }
.ku-bundle-card__pricing { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ku-bundle-card__atc { margin-top: auto; width: 100%; }

.ku-badge { display: inline-block; background: #dc2626; color: #fff !important; font-size: 0.72rem; font-weight: 700; padding: 2px 7px; border-radius: 3px; }

/* ── Popup overlay ───────────────────────────────────────────────────────── */
.ku-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.52);
  z-index: 999999;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: ku-fade .18s ease;
}
.ku-overlay[hidden] { display: none !important; }
@keyframes ku-fade { from { opacity: 0; } to { opacity: 1; } }
body.ku-open { overflow: hidden; }

/* ── Popup box ───────────────────────────────────────────────────────────── */
.ku-popup {
  background: #fff; border-radius: 10px;
  width: 100%; max-width: 680px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  padding: 0;
  animation: ku-rise .2s ease;
}
.ku-popup__body {
  flex: 1; overflow-y: auto;
  padding: 28px 24px 0;
}
@keyframes ku-rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.ku-popup__heading { font-size: 1rem; font-weight: 700; margin: 0 0 20px; }

/* ── Popup sections ───────────────────────────────────────────────────────── */
.ku-popup__section { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #ebebeb; }
.ku-popup__section:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.ku-popup__section[hidden] { display: none; }
.ku-popup__section-title { font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #666; margin: 0 0 12px; }

/* ── Qty cards ───────────────────────────────────────────────────────────── */
.ku-qty-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.ku-qty-card {
  flex: 1; min-width: 120px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 10px 12px;
  border: 2px solid #ddd; border-radius: 8px;
  background: #fff; cursor: pointer; font-family: inherit; text-align: center;
  position: relative; transition: border-color .15s, background .15s;
}
.ku-qty-card:hover { border-color: var(--ku-popup-primary-bg); background: rgba(0,0,0,.02); }
.ku-qty-card.is-selected { border-color: var(--ku-popup-primary-bg); background: rgba(0,0,0,.03); }
.ku-qty-card__badge-top {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--ku-popup-primary-bg); color: var(--ku-popup-primary-text);
  font-size: 0.68rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.ku-qty-card__qty   { font-size: 1.1rem; font-weight: 700; }
.ku-qty-card__price { font-size: 0.8rem; color: #555; }
.ku-qty-card__save  { font-size: 0.78rem; font-weight: 700; color: #16a34a; }
.ku-qty-card__total { font-size: 0.85rem; color: #222; font-weight: 600; }

/* ── Popup bundle list — 2 на ред ────────────────────────────────────────── */
.ku-popup-bundles {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px;
}
.ku-popup-bundle {
  display: flex; flex-direction: column;
  border: 1px solid #e5e5e5; border-radius: 8px; overflow: hidden;
}
.ku-popup-bundle__img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #f8f8f8; }
.ku-popup-bundle__info { padding: 8px; flex: 1; }
.ku-popup-bundle__title {
  font-size: 0.78rem; font-weight: 600; color: inherit; text-decoration: none; display: block;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.3; margin-bottom: 4px;
}
.ku-popup-bundle__title:hover { text-decoration: underline; }
.ku-popup-bundle__price { font-size: 0.75rem; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ku-popup-bundle__atc { margin: 0 8px 8px; width: calc(100% - 16px); justify-content: center; }

/* ── Popup footer — sticky ───────────────────────────────────────────────── */
.ku-popup__footer {
  position: sticky; bottom: 0;
  background: #fff;
  padding: 14px 24px 20px;
  border-top: 1px solid #ebebeb;
  margin-top: 0;
}
.ku-popup__footer .ku-btn { padding: 13px; font-size: 0.9rem; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .ku-popup { padding: 22px 16px 18px; }
  .ku-bundle-section__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ── Popup header row (heading + X) ──────────────────────────────────────── */
.ku-popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.ku-popup__heading { margin: 0; padding: 0; font-size: 1rem; font-weight: 700; }
.ku-popup__close {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.ku-popup__close:hover { background: #f0f0f0; color: #333; }
/* cache-bust: 1781638562 */

/* ── ATC + Morkva един до друг ───────────────────────────────────────────── */
.single_add_to_cart_button + .mrkv_buy-one-click__open-call {
  display: inline-flex !important;
  vertical-align: middle;
  margin-left: 8px;
}

/* ── BGN конверсия в bundle карти ────────────────────────────────────────── */
.amount-bgn-ku {
  font-size: 0.85em;
  color: #666;
}
