/* =========================================================================
   COMBO CARD — portable styles (js/combo.js)
   =========================================================================
   The combo card is drawn both on the product page and inside the quick-add
   sheet. product.css only loads on the product page, so this file carries what
   the card needs for the pages that render product cards (collection, home,
   new arrivals). It is a COPY of the matching product.css rules, scoped under
   .combo-card so it cannot reach any other element — product.css itself is left
   untouched, and the product page keeps using it exactly as before.
   Keep the two in step when the product page's pickers or buttons change.
   ========================================================================= */

.combo-card .color-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.combo-card .color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.15s, transform 0.15s;
  padding: 0;
}
.combo-card .color-swatch:hover {
  transform: scale(1.1);
}
.combo-card .color-swatch.active {
  outline-color: var(--text-color);
}
.combo-card .size-box.size-oos {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}
.combo-card .size-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.combo-card .size-label {
  font-size: 0.80rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.5px;
  color: var(--text-strong);
}
.combo-card .size-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
  overflow: hidden;
  background: none;
  border: 1.5px solid var(--border-color);
  border-radius: 2px;
  font-size: 0.80rem;
  /* matches .size-label */
  font-weight: 600;
  color: var(--text-strong);
  cursor: pointer;
  letter-spacing: 0.5px;
  text-transform: none;
  padding: 4px 10px;
  transition: color 0.2s, border-color 0.2s, transform 0.1s ease;
  animation: guide-pulse 2.2s ease-out infinite;
}
.combo-card .size-guide-link:hover {
  color: var(--text-color);
  border-color: var(--text-color);
  animation: none;
  /* pause pulse on hover */
}
.combo-card .size-guide-link:active {
  transform: scale(0.96);
  animation: none;
}
.combo-card .size-guide-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.10) 0%, transparent 65%);
  border-radius: inherit;
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}
.combo-card .size-guide-link:active::after {
  opacity: 1;
  transform: scale(2.5);
  transition: transform 0.45s ease-out, opacity 0.45s ease-out;
}
.combo-card .size-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.combo-card .product-size-section.size-shake .size-grid {
  animation: size-shake 0.5s ease;
}
.combo-card .size-box {
  border: 1px solid var(--border-color);
  padding: 10px 0;
  text-align: center;
  line-height: 1.4;
  /* vertical centering via line-height — avoids flex+hidden-input click bug */
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);
  transition: all 0.2s ease;
  user-select: none;
  touch-action: manipulation;
  /* eliminates 300ms tap-delay on mobile */
}
.combo-card .size-box input {
  display: none;
}
.combo-card .size-box:hover {
  border-color: var(--gray-500);
}
.combo-card .size-box:has(input:checked) {
  border-color: var(--text-color);
  background-color: var(--text-color);
  color: var(--bg-color);
}
.combo-card .btn-buy-now {
  grid-column: 1 / -1;
}
.combo-card .btn-add-to-cart,
.combo-card .btn-buy-now {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  text-transform: none;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  white-space: nowrap;
}
.combo-card .btn-add-to-cart.btn-locked,
.combo-card .btn-buy-now.btn-locked {
  opacity: 0.4;
  cursor: not-allowed;
}
.combo-card .btn-add-to-cart {
  background-color: var(--bg-color);
  color: var(--text-color);
  border: 1px solid var(--text-color);
}
.combo-card .btn-add-to-cart:hover {
  background-color: var(--surface-muted);
}
.combo-card .btn-buy-now {
  /* Auto-placed at row 2, col 2 — same column as Add to Cart → identical width */
  background-color: var(--text-color);
  color: var(--bg-color);
  border: 1px solid var(--text-color);
}
.combo-card .btn-buy-now:hover {
  opacity: 0.9;
  background-color: var(--color-ink-soft);
}

.combo-offer-section { width: 100%; padding: 8px 0 28px; margin: 0; }
.combo-card {
  border: 1px solid var(--border-color);
  border-radius: 2px;
  padding: 18px 16px;
  background: var(--bg-color);
}
.combo-desc { margin: 0 0 12px; font-size: .86rem; color: var(--text-muted, #666); }
.combo-cover-img { width: 100%; max-height: 320px; object-fit: cover; margin-bottom: 14px; }
.combo-items { display: flex; flex-direction: column; gap: 18px; }
.combo-item { display: flex; gap: 14px; min-width: 0; width: 100%; }
.combo-item-img { flex: 0 0 88px; }
.combo-item-img img { width: 88px; height: 116px; object-fit: cover; display: block; background: var(--surface-muted, #f3f3f3); }
.combo-item-body { min-width: 0; flex: 1; }
.combo-item-title { display: block; font-size: .9rem; font-weight: 600; color: var(--text-strong, #111); text-decoration: none; line-height: 1.25; }
.combo-item-title:hover { text-decoration: underline; }
.combo-item-price { font-size: .82rem; color: var(--text-muted, #777); margin: 2px 0 10px; }
.combo-item .size-selector-header { margin-bottom: 8px; padding-bottom: 6px; }
.combo-item .size-grid { gap: 8px; grid-template-columns: repeat(4, 1fr); }
.combo-item .size-box { padding: 5px 2px; line-height: 1.2; font-size: .75rem; letter-spacing: 0; min-height: 0; }
.combo-item .color-swatches { margin-bottom: 10px; }
.combo-foot {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--border-color, #eee);
  display: flex; flex-direction: column; gap: 14px;
}
.combo-pricing { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; justify-content: center; }
.combo-now { font-size: 1.45rem; font-weight: 800; color: var(--text-strong, #111); }
.combo-was { font-size: .98rem; color: #999; text-decoration: line-through; }
.combo-save { font-size: .76rem; font-weight: 700; color: #1a7f45; background: #e8f6ee; padding: 3px 10px; border-radius: 2px; }
.combo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.combo-btns .btn-add-to-cart,
.combo-btns .btn-buy-now { height: 52px; grid-column: auto; }

@keyframes guide-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.18);
  }

  60% {
    box-shadow: 0 0 0 5px rgba(0, 0, 0, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

/* ── The combo card inside the quick-add sheet ─────────────────────────────── */
/* .qa-section's own padding, so the card lines up with the sheet's other rows
   instead of bleeding to the edges. The 20px bottom replaces the gap .qa-add-btn's
   margin normally leaves — that button is hidden while a combo is shown. */
#qa-combo { padding: 16px 20px 20px; }
#qa-combo .combo-offer-section { padding: 0; }
#qa-combo .combo-card { border: none; padding: 0; }
#qa-combo .combo-item { min-width: 0; }

