/* ============================
   Variants (Age/Size) Blocks
   ============================ */

.cc-variant-block {
  margin: 14px 0 18px;
}

.cc-variant-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.cc-variant-label {
  display: block;
  font-weight: 700;
  margin: 0;
  color: #222;
}

.cc-size-guide-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(184, 150, 88, 0.34);
  border-radius: 999px;
  background: linear-gradient(180deg, #fffdfa 0%, #f8f1e2 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.78) inset,
    0 4px 10px rgba(17,17,17,0.04);
  color: #5e4513;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px 3px 5px;
  margin: 0;
  min-height: 30px;
  text-align: left;
  white-space: nowrap;
  transition:
    color .18s ease,
    border-color .18s ease,
    background-color .18s ease,
    box-shadow .18s ease,
    transform .12s ease;
}

.cc-size-guide-trigger {
  align-self: center;
}

.cc-size-guide-trigger__icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(184, 150, 88, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, #f5ead0 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset;
}

.cc-size-guide-trigger__icon svg {
  display: block;
  width: 13px;
  height: 13px;
  stroke: #6f5925;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.cc-size-guide-trigger__label {
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.cc-size-guide-trigger:hover,
.cc-size-guide-trigger:focus {
  color: #4d3b12;
  border-color: rgba(184, 150, 88, 0.64);
  background: linear-gradient(180deg, #fffdf7 0%, #f5ebd1 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.78) inset,
    0 12px 28px rgba(17,17,17,0.10);
  transform: translateY(-1px);
}

.cc-size-guide-trigger:hover .cc-size-guide-trigger__icon,
.cc-size-guide-trigger:focus .cc-size-guide-trigger__icon {
  border-color: rgba(184, 150, 88, 0.22);
}

.cc-size-guide-trigger:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(184, 150, 88, 0.18),
    0 12px 28px rgba(17,17,17,0.10);
}

.cc-variant-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Base */
.cc-variant-pill {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: #222;

  border-radius: 12px;
  padding: 10px 16px;

  min-width: 56px;
  height: 42px;

  font-weight: 700;
  letter-spacing: 0.2px;

  cursor: pointer;

  box-shadow:
    0 1px 0 rgba(0,0,0,0.04),
    0 10px 22px rgba(0,0,0,0.06);

  transition:
    transform .08s ease,
    border-color .15s ease,
    box-shadow .15s ease,
    background-color .15s ease,
    color .15s ease;
}

.cc-variant-pill:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(184, 150, 88, 0.70);
  box-shadow:
    0 2px 0 rgba(0,0,0,0.05),
    0 16px 30px rgba(0,0,0,0.10);
}

.cc-variant-pill:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(184, 150, 88, 0.22),
    0 16px 30px rgba(0,0,0,0.10);
  border-color: rgba(184, 150, 88, 0.95);
}

/* Selected: premium filled look */
.cc-variant-pill.is-active {
  border-color: rgba(184, 150, 88, 0.95);
  background: rgba(184, 150, 88, 0.10);
  box-shadow:
    0 0 0 2px rgba(184, 150, 88, 0.20),
    0 16px 30px rgba(0,0,0,0.10);
}


@media (max-width: 480px) {
  .cc-variant-pill {
    min-width: 52px;
    height: 40px;
    padding: 10px 14px;
  }
}

/* Out of stock: dashed + diagonal slash overlay (no text) */
.cc-variant-pill.is-oos,
.cc-variant-pill:disabled {
  border-style: dashed;
  background: rgba(0,0,0,0.02);
  color: rgba(0,0,0,0.45);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  position: relative;
  overflow: hidden;
}

/* diagonal slash */
.cc-variant-pill.is-oos::after,
.cc-variant-pill:disabled::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  /* one clean diagonal line */
 background: repeating-linear-gradient(
  -18deg,
  transparent 0,
  transparent 46%,
  rgba(0,0,0,0.22) 46%,
  rgba(0,0,0,0.22) 50%,
  transparent 50%,
  transparent 54%
);

}

.cc-variant-offer-hint {
    margin: 6px 0 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cc-variant-offer-pill {
    display: inline-block;
    font-size: 12px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 999px;
    background: #111;
    color: #fff;
}

.cc-variant-offer-note {
    font-size: 12px;
    color: #666;
}

.cc-variant-pill.has-offer {
    position: relative;
}

.cc-variant-pill.has-offer::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #111;
    opacity: 0.7;
}

.cc-size-chart-modal .modal-dialog {
  width: calc(100% - 120px);
  max-width: 920px;
  margin: 40px auto;
}

.cc-size-chart-modal .modal-content {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 22px 58px rgba(0,0,0,0.16);
}

.cc-size-chart-modal__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-bottom: 1px solid #ece4d3;
  background: #fff;
}

.cc-size-chart-modal .modal-title {
  color: #2a241b;
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 700;
  text-align: center;
}

.cc-size-chart-modal__actions {
  position: absolute;
  top: 50%;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 0;
  transform: translateY(-50%);
}

.cc-size-chart-modal__close {
  float: none;
  width: 32px;
  height: 32px;
  margin: 0;
  border-radius: 50%;
  background: #f4f1e9;
  color: #2f281d;
  opacity: 1;
  text-shadow: none;
}

.cc-size-chart-modal__close:hover,
.cc-size-chart-modal__close:focus {
  background: #eae4d8;
  color: #1f1a12;
}

.cc-size-chart-modal__body {
  padding: 14px;
  background: #faf7f1;
}

.cc-size-chart-modal__viewport {
  position: relative;
  max-height: calc(100vh - 170px);
  min-height: 320px;
  overflow: auto;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #ece4d3;
}

.cc-size-chart-modal__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  font-size: 13px;
  color: #7a7468;
}

.cc-size-chart-modal__viewport img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  opacity: 0;
  transition: opacity .18s ease;
}

.cc-size-chart-modal__viewport.is-loaded .cc-size-chart-modal__loading {
  display: none;
}

.cc-size-chart-modal__viewport.is-loaded img {
  opacity: 1;
}

@media (max-width: 1024px) {
  .cc-size-chart-modal.in {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
  }

  .cc-size-chart-modal .modal-dialog {
    width: calc(100% - 40px);
    max-width: 820px;
    margin: 0 auto;
  }

  .cc-size-chart-modal__body {
    padding: 10px;
  }

  .cc-size-chart-modal__viewport {
    max-height: calc(100vh - 140px);
    padding: 6px;
  }
}

@media (max-width: 767px) {
  .cc-size-guide-trigger {
    min-height: 32px;
    padding: 4px 9px 4px 6px;
  }

  .cc-size-chart-modal .modal-dialog {
    width: calc(100% - 16px);
    max-width: 440px;
    margin: 0 auto;
  }

  .cc-size-chart-modal .modal-content {
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(0,0,0,0.16);
  }

  .cc-size-chart-modal__header {
    padding: 10px 40px 10px 12px;
  }

  .cc-size-chart-modal .modal-title {
    font-size: 15px;
    color: #2a241b;
  }

  .cc-size-chart-modal__actions {
    right: 10px;
  }

  .cc-size-chart-modal__body {
    padding: 10px;
    background: #faf7f1;
  }

  .cc-size-chart-modal__viewport {
    max-height: calc(100vh - 120px);
    min-height: 180px;
    padding: 6px;
    border-radius: 14px;
    background: #fff;
  }

  .cc-size-chart-modal__close {
    width: 30px;
    height: 30px;
  }
}

@media (min-width: 768px) {
  .cc-size-chart-modal.in {
    background: rgba(22, 19, 12, 0.22);
  }
}

@media (max-width: 767px) {
  .cc-size-chart-modal.in {
    background: rgba(22, 19, 12, 0.22);
  }
}
