/* ===============================================================
   BUKO Design System — Components
   Version: 1.0 (2026-05-20)
   Source of truth: docs/ds/03-* and onwards
   ---------------------------------------------------------------
   Залежить від buko-tokens.css (підключати ПІСЛЯ tokens).
   Цей файл росте з кожним новим компонентом.
   =============================================================== */


/* =====================================================================
   BUTTONS
   docs/ds/03-components-buttons.md
   ===================================================================== */

/* ---- Base — спільні правила для .btn-primary і .btn-secondary ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 40px;
  padding: 0 12px;
  font-family: var(--buko-font-body);
  font-size: var(--buko-fs-body);
  font-weight: var(--buko-fw-regular);
  line-height: var(--buko-lh-base);
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.btn:focus-visible {
  outline: 2px solid var(--buko-color-primary);
  outline-offset: 2px;
}

.btn:disabled,
.btn[disabled] {
  cursor: not-allowed;
  pointer-events: none;
}

/* Icons всередині кнопок — однакові розміри */
.btn .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

/* ---- Primary ---- */
.btn-primary {
  background: var(--buko-color-primary);
  color: var(--buko-color-text-on-dark);
  border-color: var(--buko-color-primary);
}

.btn-primary:hover {
  background: var(--buko-color-primary-dark);
  border-color: var(--buko-color-primary-dark);
}

.btn-primary:disabled,
.btn-primary[disabled] {
  background: transparent;
  border-color: transparent;
  color: var(--buko-color-border-muted);
}

/* ---- Secondary ---- */
.btn-secondary {
  gap: 8px;
  background: #ffffff;
  color: var(--buko-color-text-black);
  border-color: var(--buko-color-border-muted);
}

.btn-secondary:hover {
  border-color: var(--buko-color-primary);
}

.btn-secondary:active,
.btn-secondary.is-active {
  border-width: 2px;
  border-color: var(--buko-color-primary);
}

.btn-secondary:disabled,
.btn-secondary[disabled] {
  border-color: var(--buko-color-border-default);
  color: var(--buko-color-border-default);
}

/* ---- Icon-only Secondary (40×40 квадратна) ---- */
.btn-icon {
  width: 40px;
  padding: 0;
}

/* ---- Tertiary — окрема геометрія, не наслідує .btn ---- */
.btn-tertiary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  font-family: var(--buko-font-body);
  font-size: var(--buko-fs-body);
  font-weight: var(--buko-fw-regular);
  line-height: var(--buko-lh-base);
  color: var(--buko-color-primary);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--buko-color-primary);
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.btn-tertiary:hover {
  background: var(--buko-color-primary-light);
}

.btn-tertiary:active,
.btn-tertiary.is-active {
  background: transparent;
  border: 1px solid var(--buko-color-primary-light);
  border-radius: 10px;
}

.btn-tertiary:disabled,
.btn-tertiary[disabled] {
  color: var(--buko-color-border-muted);
  border-bottom-color: var(--buko-color-border-muted);
  cursor: not-allowed;
  pointer-events: none;
}

.btn-tertiary .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}


/* =====================================================================
   TAGS — filter chips
   ===================================================================== */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: var(--buko-color-bg-light);
  border-radius: 10px;
  font-family: var(--buko-font-body);
  font-size: var(--buko-fs-body);
  font-weight: var(--buko-fw-regular);
  line-height: var(--buko-lh-base);
  white-space: nowrap;
  transition: background-color 150ms ease;
}

.tag:hover {
  background: var(--buko-color-border-default);
}

.tag__title {
  color: var(--buko-color-text-muted);
}

.tag__text {
  color: var(--buko-color-text-black);
}

.tag__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--buko-color-text-muted);
}

.tag__close .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
}


/* =====================================================================
   PAGINATION
   ===================================================================== */

.pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pagination__item,
.pagination__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--buko-font-body);
  font-size: var(--buko-fs-body);
  line-height: var(--buko-lh-base);
  background: var(--buko-color-bg-light);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.pagination__item {
  min-width: 32px;
  height: 32px;
  padding: 6px 12px;
  color: var(--buko-color-text-black);
}

.pagination__item:hover {
  background: var(--buko-color-primary-light);
}

.pagination__item--current,
.pagination__item[aria-current="page"] {
  background: var(--buko-color-primary);
  color: var(--buko-color-text-on-dark);
  cursor: default;
}

.pagination__arrow {
  width: 32px;
  height: 32px;
  padding: 4px;
}

.pagination__arrow:hover {
  background: var(--buko-color-primary-light);
}

.pagination__arrow[disabled],
.pagination__arrow:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

.pagination__arrow .material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
}


/* =====================================================================
   ARROWS — slider/carousel nav
   ===================================================================== */

.btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: var(--buko-color-bg-light);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.btn-arrow:hover {
  background: var(--buko-color-primary-light);
}

.btn-arrow:disabled,
.btn-arrow[disabled] {
  cursor: not-allowed;
  color: var(--buko-color-border-muted);
  pointer-events: none;
}

.btn-arrow .material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
}


/* =====================================================================
   INPUTS
   docs/ds/05-components-inputs.md
   ===================================================================== */

/* ---- Base input — text, email, search, number, password, tel etc ---- */
.input {
  display: block;
  width: 100%;
  height: 40px;
  padding: 10px 8px;
  font-family: var(--buko-font-body);
  font-size: var(--buko-fs-body);
  font-weight: var(--buko-fw-regular);
  line-height: var(--buko-lh-base);
  color: var(--buko-color-text-primary);
  background: #ffffff;
  border: 1px solid var(--buko-color-border-muted);
  border-radius: 10px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  box-sizing: border-box;
}

.input::placeholder {
  color: var(--buko-color-text-muted);
  opacity: 1;
}

.input:hover {
  border-color: var(--buko-color-primary-dark);
}

.input:focus,
.input:focus-visible {
  border-color: var(--buko-color-primary);
}

.input:disabled,
.input[disabled] {
  color: var(--buko-color-border-muted);
  border-color: var(--buko-color-border-default);
  cursor: not-allowed;
}

.input:disabled::placeholder,
.input[disabled]::placeholder {
  color: var(--buko-color-border-muted);
}

.input--error,
.input[aria-invalid="true"] {
  border-color: var(--buko-color-error);
}

.input--error:focus,
.input[aria-invalid="true"]:focus {
  border-color: var(--buko-color-error);
}

/* ---- Textarea — same as input, але висота auto + min-height ---- */
.textarea {
  /* успадковує .input стилі через подвійний клас: <textarea class="input textarea"> */
  height: auto;
  min-height: 80px;
  resize: vertical;
  padding: 10px 8px;
  line-height: var(--buko-lh-base);
}

/* ---- Native select — input стилі + кастомний chevron ---- */
.input--select,
select.input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'><path d='M5 7.5L10 12.5L15 7.5' stroke='%23747474' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 20px 20px;
  cursor: pointer;
}

.input--select:disabled,
select.input:disabled {
  cursor: not-allowed;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'><path d='M5 7.5L10 12.5L15 7.5' stroke='%23CACACB' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

/* ---- Wrap for inputs з іконками всередині ---- */
.input-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.input-wrap--icon-left .input {
  padding-left: 32px;
}

.input-wrap--icon-right .input {
  padding-right: 32px;
}

.input-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  line-height: 1;
  color: var(--buko-color-text-muted);
  pointer-events: none;
}

.input-wrap--icon-left .input-icon {
  left: 8px;
}

.input-wrap--icon-right .input-icon {
  right: 8px;
}

/* Якщо input у :focus — змінюємо колір іконки на primary */
.input-wrap:focus-within .input-icon {
  color: var(--buko-color-primary);
}

/* ---- Group: input + повідомлення помилки ---- */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-error {
  font-size: var(--buko-fs-small);
  line-height: var(--buko-lh-small);
  color: var(--buko-color-error);
  margin: 0;
}

.input-label {
  display: block;
  font-size: var(--buko-fs-small);
  line-height: var(--buko-lh-small);
  color: var(--buko-color-text-primary);
  font-weight: var(--buko-fw-semibold);
  margin-bottom: 4px;
}


/* =====================================================================
   CHECKBOX & RADIO
   docs/ds/06-components-checkbox-radio.md
   ===================================================================== */

/* ---- Base — спільні правила для checkbox і radio ---- */
.checkbox,
.radio {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border: 1px solid var(--buko-color-border-muted);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  margin: 0;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.checkbox {
  border-radius: 2px;
}

.radio {
  border-radius: 50%;
}

/* ---- Hover (unchecked) ---- */
.checkbox:hover:not(:disabled):not(:checked),
.radio:hover:not(:disabled):not(:checked) {
  border-color: var(--buko-color-primary);
}

/* ---- Focus ---- */
.checkbox:focus-visible,
.radio:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--buko-color-primary-light);
}

/* ---- Checked state ---- */
.checkbox:checked,
.radio:checked {
  background-color: var(--buko-color-primary);
  border-color: var(--buko-color-primary);
}

.checkbox:checked:hover,
.radio:checked:hover {
  background-color: var(--buko-color-primary-dark);
  border-color: var(--buko-color-primary-dark);
}

/* ---- Checkbox checkmark — створений через CSS border + rotate trick ---- */
.checkbox:checked::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 5px;
  width: 6px;
  height: 11px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---- Radio dot ---- */
.radio:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
}

/* ---- Disabled ---- */
.checkbox:disabled,
.radio:disabled,
.checkbox[disabled],
.radio[disabled] {
  cursor: not-allowed;
  border-color: var(--buko-color-border-default);
  background-color: #ffffff;
}

.checkbox:disabled:checked,
.radio:disabled:checked {
  background-color: var(--buko-color-border-default);
  border-color: var(--buko-color-border-default);
}

/* ---- Labels ---- */
.checkbox-label,
.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--buko-font-body);
  font-size: var(--buko-fs-body);
  line-height: var(--buko-lh-base);
  color: var(--buko-color-text-black);
  user-select: none;
  transition: color 150ms ease;
}

/* Hover на лейблі — перетягуємо колір тексту і бордер бокса до primary */
.checkbox-label:hover:not(:has(:disabled)),
.radio-label:hover:not(:has(:disabled)) {
  color: var(--buko-color-primary);
}

.checkbox-label:hover:not(:has(:disabled)) .checkbox:not(:checked),
.radio-label:hover:not(:has(:disabled)) .radio:not(:checked) {
  border-color: var(--buko-color-primary);
}

.checkbox-label:has(:disabled),
.radio-label:has(:disabled) {
  cursor: not-allowed;
  color: var(--buko-color-text-muted);
}

/* ---- Radio group (fieldset wrapper) ---- */
.radio-group {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-group--horizontal {
  flex-direction: row;
  gap: 16px;
}

.radio-group > legend {
  padding: 0;
  margin-bottom: 4px;
}


/* =====================================================================
   CARD — product card
   docs/ds/07-components-card.md
   ===================================================================== */

.card {
  display: flex;
  flex-direction: column;
  width: 299px;
  height: 502px;
  background: #ffffff;
  border: 1px solid var(--buko-color-border-default);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card:focus-visible {
  outline: 2px solid var(--buko-color-primary);
  outline-offset: 2px;
}

/* ---- Image section ---- */
.card__image {
  position: relative;
  width: 100%;
  height: 374px;
  overflow: hidden;
  flex-shrink: 0;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: transform 300ms ease;
}

.card:hover .card__image img {
  transform: scale(1.05);
}

/* ---- Sale badge (top-left) ---- */
.card__badge-sale {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 7px;
  background: var(--buko-color-accent);
  border-radius: 4px;
  font-family: var(--buko-font-body);
  font-size: var(--buko-fs-small);
  font-weight: var(--buko-fw-semibold);
  line-height: normal;
  color: var(--buko-color-primary);
  white-space: nowrap;
}

/* ---- Favorite button (top-right) ---- */
.card__favorite {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: background-color 150ms ease;
}

.card__favorite:hover {
  background: rgba(0, 0, 0, 0.1);
}

.card__favorite.is-favorited {
  color: var(--buko-color-accent);
}

.card__favorite .material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
}

/* ---- Content ---- */
.card__content {
  display: flex;
  flex-direction: column;
  padding: 14px 14px 16px;
  flex-grow: 1;
  overflow: hidden;
}

.card__title {
  font-family: var(--buko-font-body);
  font-size: var(--buko-fs-body);
  font-weight: var(--buko-fw-regular);
  line-height: var(--buko-lh-base);
  color: var(--buko-color-primary);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Bottom row ---- */
.card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

/* ---- Price group ---- */
.card__price-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.card__price-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card__price-old {
  font-family: var(--buko-font-body);
  font-size: var(--buko-fs-small);
  font-weight: var(--buko-fw-regular);
  line-height: normal;
  color: var(--buko-color-primary-60);
  text-decoration: line-through;
  white-space: nowrap;
}

.card__discount {
  padding: 3px 7px;
  background: var(--buko-color-accent-60);
  border-radius: 4px;
  font-family: var(--buko-font-body);
  font-size: 11px;
  font-weight: var(--buko-fw-semibold);
  line-height: normal;
  color: var(--buko-color-primary-60);
  white-space: nowrap;
}

.card__price-current {
  font-family: var(--buko-font-body);
  font-size: 24px;
  font-weight: var(--buko-fw-semibold);
  line-height: 1.2;
  color: var(--buko-color-primary);
}

/* ---- Rating group ---- */
.card__rating-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.card__stars {
  font-size: 20px;
  line-height: 1;
  color: var(--buko-color-rating);
  white-space: nowrap;
}

.card__reviews {
  font-family: var(--buko-font-body);
  font-size: var(--buko-fs-body);
  font-weight: var(--buko-fw-regular);
  line-height: normal;
  color: var(--buko-color-primary-60);
  white-space: nowrap;
}

/* ===============================================================
   BUKO Wishlist — heart toggle (7D.1)
   Figma: node 2:15757 card + reviewer spec (icon-only, no bg)
   Default: stroke #194039, fill none
   Active:  fill + stroke #E6B372 (gold)
   =============================================================== */

.buko-wishlist-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 200ms ease, opacity 200ms ease;
  /* Override Bootstrap .btn styles if present */
  box-shadow: none;
  outline-offset: 2px;
}

.buko-wishlist-toggle:hover,
.buko-wishlist-toggle:focus-visible {
  transform: scale(1.1);
  background: transparent;
  box-shadow: none;
}

.buko-wishlist-toggle__icon {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  pointer-events: none;
}

/* Outline → gold filled when active */
.buko-wishlist-toggle.is-active .buko-wishlist-toggle__icon path {
  fill: var(--buko-color-accent);
  stroke: var(--buko-color-accent);
}

/* ===============================================================
   BUKO Toast notifications (7D.1)
   Figma: node 2:16240 "List"
   bg: rgba(25,64,57,0.85) | padding: 12px | radius: 10px
   font: Open Sans 13px / 1.4 | text: #FFF9F4
   Position: fixed top (below header) centered
   =============================================================== */

#buko-toast-container {
  position: fixed;
  top: calc(var(--buko-header-height, 96px) + 8px); /* JS overrides via offsetHeight; token fallback */
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 24px);
  max-width: 336px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.buko-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  background: rgba(25, 64, 57, 0.85);
  border-radius: 10px;
  box-shadow: 2px 2px 12px 0px rgba(0, 0, 0, 0.13);
  pointer-events: auto;
  /* Initial state — invisible, shifted up */
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.buko-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.buko-toast__text {
  font-family: var(--buko-font-body);
  font-size: 13px; /* between --buko-fs-small (12) and --buko-fs-body (14) — per Figma */
  font-weight: var(--buko-fw-regular);
  line-height: var(--buko-lh-base); /* 1.4 */
  color: var(--buko-color-text-on-dark); /* #FFF9F4 */
  flex: 1;
}

.buko-toast__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--buko-color-text-on-dark);
  opacity: 0.75;
  flex-shrink: 0;
  transition: opacity 200ms ease;
}

.buko-toast__close:hover {
  opacity: 1;
}

/* ===============================================================
   BUKO Wishlist page (7D.1 Phase 2)
   =============================================================== */

.buko-wishlist-page {
  padding-top: 24px;
  padding-bottom: 48px;
}

.buko-wishlist-page h1 {
  margin-bottom: 24px;
}

/* Loading spinner */
.buko-wishlist-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 48px 16px;
}

.buko-spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--buko-color-primary-light, #B5D3CD);
  border-top-color: var(--buko-color-primary, #194039);
  border-radius: 50%;
  animation: buko-spin 0.75s linear infinite;
}

@keyframes buko-spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.buko-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 16px;
  text-align: center;
}

.buko-empty-icon {
  color: var(--buko-color-primary, #194039);
  margin-bottom: 16px;
  opacity: 0.45;
}

.buko-empty-text {
  font-family: var(--buko-font-body);
  font-size: var(--buko-fs-body);
  color: var(--buko-color-text-muted, #747474);
  margin-bottom: 24px;
}

/* Primary CTA button — matches brand style */
.buko-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: var(--buko-color-primary, #194039);
  color: var(--buko-color-text-on-dark, #FFF9F4);
  font-family: var(--buko-font-body);
  font-size: var(--buko-fs-body);
  font-weight: var(--buko-fw-semibold);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: background 200ms ease;
}

.buko-btn-primary:hover,
.buko-btn-primary:focus {
  background: var(--buko-color-primary-dark, #13302A);
  color: var(--buko-color-text-on-dark, #FFF9F4);
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════
   PRODUCT CARD v2 (7D.0.2)
   Figma: node 169:5814 (Sale)
   Container Queries — fluid scaling via cqi units + clamp()
   Browser support: Chrome 105+, Firefox 110+, Safari 16+ (2022)
   Used by: category.twig (include) + wishlist.php items() (view)
   ═══════════════════════════════════════════════════════════════ */

/* ── Grid row — flex override on Bootstrap 3 .row for equal-height cards ── */
.product-grid-row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -4px;
  margin-right: -4px;
}

/* ── Column wrapper (Bootstrap grid integration) ── */
.product-card-col {
  padding-left: 4px;
  padding-right: 4px;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .product-card-col {
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 20px;
  }
  .product-grid-row {
    margin-left: -10px;
    margin-right: -10px;
  }
}

/* ── Card root ── */
.product-card {
  container-type: inline-size;
  container-name: card;
  position: relative;
  background: var(--buko-color-surface, #FFFFFF);
  border: 1px solid var(--buko-color-border-card, #EAEAEA);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ── Image section ── */
.product-card__image-section {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

.product-card__image-link {
  display: block;
  width: 100%;
  height: 100%;
}

/* OVERLAY — positions relative to .product-card (relative) → covers full card */
.product-card__image-link::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.product-card__image-section img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.product-card:hover .product-card__image-section img {
  transform: scale(1.03);
}

/* ── Badges wrapper — top-left, Sale + Tag vertical stack ── */
.product-card__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  pointer-events: none;
}

/* ── Sale badge ── */
.product-card__sale-badge {
  background: var(--buko-color-accent, #E6B372);
  color: var(--buko-color-primary, #194039);
  padding: 3px 7px;
  border-radius: 4px;
  font-family: var(--buko-font-body, 'Open Sans', sans-serif);
  font-size: clamp(10px, 4.01cqi, 14px);
  font-weight: 600;
  line-height: 1.4;
}

/* ── Tag badge — Variant A: cream bg + primary border ── */
.product-card__tag-badge {
  background: var(--buko-color-bg-cream, #FFF9F4);
  color: var(--buko-color-primary, #194039);
  border: 1px solid var(--buko-color-primary, #194039);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--buko-font-body, 'Open Sans', sans-serif);
  font-size: clamp(10px, 4.01cqi, 14px);
  font-weight: 600;
  line-height: 1.4;
}

/* ── Heart button — top-right, above overlay ── */
/* .buko-wishlist-toggle handles reset + .is-active; this adds positioning */
.product-card__favorite {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  border-radius: 4px;
  width: clamp(32px, 13.38cqi, 44px);
  height: clamp(32px, 13.38cqi, 44px);
}

.product-card__favorite svg {
  width: clamp(18px, 8.03cqi, 28px);
  height: clamp(18px, 8.03cqi, 28px);
}

/* ── Content area ── */
.product-card__content {
  padding: clamp(10px, 4.68cqi, 16px) clamp(10px, 4.68cqi, 16px) clamp(12px, 5.35cqi, 18px);
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Product name — raised above overlay ── */
.product-card__name-link {
  position: relative;
  z-index: 2;
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card__name-link:hover {
  text-decoration: none;
}

.product-card__name {
  font-family: var(--buko-font-body, 'Open Sans', sans-serif);
  font-size: clamp(11px, 4.68cqi, 16px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--buko-color-primary, #194039);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Bottom row (price + rating) — layout керує card-layout.js ── */
.product-card__bottom-row {
  margin-top: clamp(8px, 4cqi, 14px);
  gap: clamp(6px, 2.68cqi, 10px);
}

/* ── Price group ── */
.product-card__price-group {
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 1cqi, 4px);
  min-width: 0;
}

.product-card__price-old-row {
  display: flex;
  gap: clamp(4px, 2cqi, 8px);
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
}

.product-card__price-old {
  font-family: var(--buko-font-body, 'Open Sans', sans-serif);
  font-size: clamp(10px, 4.01cqi, 13px);
  font-weight: 400;
  text-decoration: line-through;
  color: var(--buko-color-primary-60, rgba(25, 64, 57, 0.6));
  white-space: nowrap;
}

.product-card__discount-badge {
  background: var(--buko-color-accent-60, rgba(230, 179, 114, 0.6));
  padding: 3px 7px;
  border-radius: 4px;
  font-family: var(--buko-font-body, 'Open Sans', sans-serif);
  font-size: clamp(9px, 3.68cqi, 12px);
  font-weight: 600;
  color: var(--buko-color-primary-60, rgba(25, 64, 57, 0.6));
  white-space: nowrap;
}

.product-card__price-new {
  font-family: var(--buko-font-body, 'Open Sans', sans-serif);
  font-size: clamp(16px, 6.69cqi, 22px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--buko-color-primary, #194039);
}

/* ── Rating group — align-items керує card-layout.js ── */
.product-card__rating-group {
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 1cqi, 4px);
  flex-shrink: 0;
}

.product-card__stars {
  font-size: clamp(14px, 6.69cqi, 22px);
  color: var(--buko-color-rating, #F5A523);
  letter-spacing: 1px;
  line-height: 1;
}

.product-card__reviews-count {
  font-family: var(--buko-font-body, 'Open Sans', sans-serif);
  font-size: clamp(11px, 4.68cqi, 15px);
  font-weight: 400;
  color: var(--buko-color-primary-60, rgba(25, 64, 57, 0.6));
  white-space: nowrap;
}

/* ── Mobile overrides — вузький card (~175px) на col-xs-6 ── */
@media (max-width: 575px) {
  .product-card__content {
    padding: 10px;
  }

  .product-card__name {
    font-size: 12px;
  }

  .product-card__bottom-row {
    margin-top: 6px;
    gap: 4px;
  }

  .product-card__price-group {
    gap: 2px;
  }

  .product-card__price-old-row {
    gap: 3px;
  }

  .product-card__price-old {
    font-size: 9px;
  }

  .product-card__discount-badge {
    font-size: 8px;
    padding: 1px 4px;
  }

  .product-card__price-new {
    font-size: 16px;
  }

  .product-card__stars {
    font-size: 12px;
    letter-spacing: 0;
  }

  .product-card__reviews-count {
    font-size: 9px;
  }
}

/* ===============================================================
   CONTROL ARROW — reusable button for carousels/sliders
   Used by: home banners (1L), category subcats (1M planned).
   Figma reference: 2:51244 (states Normal/Hover/Disable).
   =============================================================== */

.buko-control-arrow {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--buko-color-bg-light);    /* #F8F8F8 Normal bg */
  color: var(--buko-color-error);             /* #EA0000 — ЧЕРВОНА іконка */
  border: none;
  border-radius: var(--buko-radius-lg);       /* 10px */
  padding: 8px;
  box-sizing: border-box;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.buko-control-arrow:hover:not(:disabled) {
  background: var(--buko-color-primary-light);  /* #B5D3CD Hover bg */
  color: var(--buko-color-error);                /* іконка залишається червоною */
}

.buko-control-arrow:disabled {
  background: var(--buko-color-bg-light);
  color: var(--buko-color-border-muted);         /* #CACACB Disable icon */
  cursor: not-allowed;
}

.buko-control-arrow svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* ---- Dots indicator (для carousel-карусель) ---- */

.buko-control-dots {
  display: flex;
  gap: var(--buko-space-2);          /* 8px */
  align-items: center;
}

.buko-control-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--buko-radius-circle);
  background: var(--buko-color-border-default);   /* #DEDEDE inactive */
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.buko-control-dot.is-active {
  background: var(--buko-color-primary);          /* #194039 active */
}

/* ================================================================
   Product card — equal heights (7D.3 cards-equal-height fix)
   .product-card already has display:flex; flex-direction:column; height:100%
   .product-card__content already has flex:1; flex-direction:column
   ================================================================ */

/* Name reserves 2 lines minimum — prevents short names shrinking card */
.product-card__name {
  min-height: calc(1.4em * 2);
}

/* Bottom-row pushed to bottom of content area (price+rating always aligned) */
.product-card__bottom-row {
  margin-top: auto;
}

/* Old-price placeholder — invisible but reserves vertical space */
.product-card__price-old-row--placeholder {
  visibility: hidden;
}

/* ════════════════════════════════════════════════════════════════
   Breadcrumbs — universal pattern для всього сайту
   (Figma 2:28381 desktop / 2:36278 mobile)
   ════════════════════════════════════════════════════════════════ */

.buko-breadcrumbs {
  padding: 16px 0 12px;
}

.buko-breadcrumbs__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px 8px;
}

.buko-breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--buko-font-body);
  font-size: 14px;
  line-height: 1.4;
}

.buko-breadcrumbs__link {
  color: var(--buko-color-text-primary, #101820);
  text-decoration: none;
  transition: color 150ms ease;
}

.buko-breadcrumbs__link:hover {
  color: var(--buko-color-primary);
  text-decoration: underline;
}

.buko-breadcrumbs__sep {
  display: inline-flex;
  align-items: center;
  color: var(--buko-color-text-muted, #747474);
  flex-shrink: 0;
}

.buko-breadcrumbs__text {
  color: var(--buko-color-text-muted, #747474);
}

.buko-breadcrumbs__item--current {
  /* current item — last в списку */
}

@media (max-width: 767px) {
  .buko-breadcrumbs {
    padding: 12px 0 8px;
  }
  .buko-breadcrumbs__item {
    font-size: 13px;
  }
}

/* =====================================================================
   iOS SAFARI: prevent auto-zoom on input focus
   Safari zooms in when focused input font-size < 16px.
   Universal element selector (not class-based) covers ALL inputs:
   .header__search-input, .header__drawer-contact-callback-input,
   .buko-lead-modal__input (inline <style>), bare contact-page inputs.
   !important required to override hardcoded 14px in custom classes
   and inline <style> blocks that load after linked stylesheets.
   Desktop (≥768px) untouched — 14px design intent preserved.
   ===================================================================== */
@media (max-width: 767px) {
  input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="submit"]):not([type="button"]),
  textarea,
  select {
    font-size: 16px !important;
  }
}
