/**
 * ExpCarry PDP — product options (radio / checkbox / select / text / textarea)
 * Scoped to .ec-pdp-options; does not target quantity or recurring select outside #product options.
 */

.ec-pdp-options {
  --ec-surface: #0d0d14;
  --ec-surface-elevated: #161625;
  --ec-surface-2: #0d0d14;
  --ec-border: rgba(255, 255, 255, 0.12);
  --ec-text: rgba(255, 255, 255, 0.92);
  --ec-muted: rgba(255, 255, 255, 0.5);
  --ec-accent: #8b5cf6;
  font-size: 15px;
}

/* Accent tokens (TASK 8 palette; violet aligned to mockup #8b5cf6) */
.ec-pdp-options .ec-opt-accent--violet {
  --ec-a-text: #f3eaff;
  --ec-a-base: #8b5cf6;
  --ec-a-border: #a78bfa;
  --ec-a-glow: #6d28d9;
  --ec-a-tint: #1a1228;
}
.ec-pdp-options .ec-opt-accent--cyan {
  --ec-a-text: #e8faff;
  --ec-a-base: #48d6ff;
  --ec-a-border: #7be5ff;
  --ec-a-glow: #1c8cbe;
  --ec-a-tint: #0e1d24;
}
.ec-pdp-options .ec-opt-accent--amber {
  --ec-a-text: #fff7e8;
  --ec-a-base: #ffd05c;
  --ec-a-border: #ffe08f;
  --ec-a-glow: #b57d11;
  --ec-a-tint: #241b0d;
}
.ec-pdp-options .ec-opt-accent--rose {
  --ec-a-text: #fff0f4;
  --ec-a-base: #ff9ab1;
  --ec-a-border: #ffbdd0;
  --ec-a-glow: #ad314c;
  --ec-a-tint: #241118;
}
.ec-pdp-options .ec-opt-accent--green {
  --ec-a-text: #ecfff5;
  --ec-a-base: #4ee39a;
  --ec-a-border: #7beab3;
  --ec-a-glow: #1e8f60;
  --ec-a-tint: #0f1f18;
}
.ec-pdp-options .ec-opt-accent--red {
  --ec-a-text: #fff0f3;
  --ec-a-base: #ff6f8a;
  --ec-a-border: #ff97ab;
  --ec-a-glow: #b83d57;
  --ec-a-tint: #241116;
}
.ec-pdp-options .ec-opt-accent--orange {
  --ec-a-text: #fff3ea;
  --ec-a-base: #ff9a57;
  --ec-a-border: #ffb684;
  --ec-a-glow: #ba6330;
  --ec-a-tint: #24170f;
}

/* Gaming price tags (checkbox / select options text) */
.ec-pdp-options .ec-opt-price--free,
.ec-pdp-options .ec-opt-price.ec-opt-price--free {
  display: inline-flex;
  align-items: center;
  margin-left: 0;
  margin-top: 0;
  padding: 2px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 99px;
  vertical-align: middle;
  flex-shrink: 0;
}

.ec-pdp-options .ec-opt-price--paid,
.ec-pdp-options .ec-opt-price.ec-opt-price--paid {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #facc15;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.2);
  border-radius: 99px;
  flex-shrink: 0;
}

/* Radio: price / FREE as plain note — not a pill badge (GamingRadioGroup) */
.ec-pdp-options .ec-opt-price--radio-note {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.48);
  border: none;
  background: none;
  padding: 0;
  border-radius: 0;
}

.ec-pdp-options .ec-opt-price--radio-note.ec-opt-price--radio-free {
  color: rgba(74, 222, 128, 0.88);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.ec-pdp-options .ec-opt-card--checkbox:not(:has(input:checked)) .ec-opt-price--paid {
  color: rgba(250, 204, 21, 0.45);
  border-color: rgba(250, 204, 21, 0.12);
  background: rgba(250, 204, 21, 0.04);
}

/* Radio grid */
.ec-pdp-options .ec-opt-grid--radio {
  display: grid;
  gap: 0.85rem;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
}

.ec-pdp-options .ec-opt-grid--radio.ec-opt-cols-1 { grid-template-columns: minmax(0, 1fr); }
.ec-pdp-options .ec-opt-grid--radio.ec-opt-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ec-pdp-options .ec-opt-grid--radio.ec-opt-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ec-pdp-options .ec-opt-grid--radio.ec-opt-cols-auto {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

@media (max-width: 575px) {
  .ec-pdp-options .ec-opt-grid--radio.ec-opt-cols-2,
  .ec-pdp-options .ec-opt-grid--radio.ec-opt-cols-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Radio card — volumetric “game card” (no .radio: avoids main.css FA) */
.ec-pdp-options .ec-opt-card--radio {
  position: relative;
  margin: 0;
  padding: 0;
  min-height: 3.75rem;
  background: #0d0d14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.ec-pdp-options .ec-opt-card--radio label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 3.5rem;
  padding: 0.65rem 0.75rem;
  margin: 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--ec-text);
  text-align: center;
}

.ec-pdp-options .ec-opt-card--radio .ec-opt-card__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 100%;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.92);
}

/* Full-row invisible hit area: 0×0 focused input triggers scrollIntoView inside .ec-pdp-right-scroll */
.ec-pdp-options .ec-opt-card--radio input[type="radio"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  appearance: none;
  -webkit-appearance: none;
}

.ec-pdp-options .ec-opt-card--radio input[type="radio"]:focus {
  outline: none;
}

.ec-pdp-options .ec-opt-card--radio .img-thumbnail {
  max-height: 40px;
  width: auto;
  margin: 0 auto 0.25rem;
  border-radius: 8px;
  border: 1px solid var(--ec-border);
  background: #0a0a0f;
}

.ec-pdp-options .ec-opt-card--radio:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: #0f0f18;
}

.ec-pdp-options .ec-opt-card--radio:has(input:checked) {
  background: #161625;
  border: 1px solid rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.ec-pdp-options .ec-opt-card--radio:has(input:checked) .ec-opt-card__inner {
  color: #fff;
}

.ec-pdp-options .ec-opt-card--radio:has(input:checked) .img-thumbnail {
  opacity: 1;
  filter: none;
  border-color: rgba(255, 255, 255, 0.28);
}

.ec-pdp-options .ec-opt-card--radio:not(:has(input:checked)) .img-thumbnail {
  opacity: 0.72;
}

.ec-pdp-options .ec-opt-card--radio:has(input:focus-visible) {
  outline: 2px solid var(--ec-a-base);
  outline-offset: 2px;
}

.ec-pdp-options .ec-opt-card--radio label span.ec-opt-card__inner {
  position: relative;
  z-index: 0;
  pointer-events: none;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  min-height: 0;
  padding: 0;
  margin: 0;
}

/* Checkbox groups */
.ec-pdp-options .ec-opt-group--checkbox {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
}

.ec-pdp-options .ec-opt-group--checkbox.ec-opt-group--compact {
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  background: #0d0d14;
}

/* Monolith: >10 options — flush rows, dividers, radius only on outer corners */
.ec-pdp-options .ec-opt-group--checkbox.ec-opt-group--compact .ec-opt-card--checkbox {
  margin: 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.ec-pdp-options .ec-opt-group--checkbox.ec-opt-group--compact .ec-opt-card--checkbox:first-child {
  border-radius: 16px 16px 0 0;
}

.ec-pdp-options .ec-opt-group--checkbox.ec-opt-group--compact .ec-opt-card--checkbox:last-child {
  border-bottom: none;
  border-radius: 0 0 16px 16px;
}

.ec-pdp-options .ec-opt-group--checkbox.ec-opt-group--compact .ec-opt-card--checkbox:only-child {
  border-radius: 16px;
  border-bottom: none;
}

.ec-pdp-options .ec-opt-group--checkbox.ec-opt-group--compact .ec-opt-card--checkbox:hover {
  background: rgba(255, 255, 255, 0.02);
}

.ec-pdp-options .ec-opt-group--checkbox.ec-opt-group--compact .ec-opt-card--checkbox:has(input:checked) {
  background: rgba(22, 22, 37, 0.6);
  border-color: transparent;
  box-shadow: none;
}

.ec-pdp-options .ec-opt-group--compact .ec-opt-card--checkbox:not(:has(input:checked)) .ec-opt-card__title {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 500;
}

.ec-pdp-options .ec-opt-group--compact .ec-opt-card--checkbox:has(input:checked) .ec-opt-card__title {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.ec-pdp-options .ec-opt-card--checkbox {
  position: relative;
  margin: 0;
  padding: 0;
  background: var(--ec-surface-elevated);
  border: 1px solid var(--ec-border);
  border-radius: 16px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.ec-pdp-options .ec-opt-card--checkbox label {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  margin: 0;
  cursor: pointer;
  min-height: 3rem;
}

.ec-pdp-options .ec-opt-group--compact .ec-opt-card--checkbox label {
  padding: 0.5rem 0.75rem;
  min-height: 2.5rem;
}

.ec-pdp-options .ec-opt-card--checkbox input[type="checkbox"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  appearance: none;
  -webkit-appearance: none;
}

.ec-pdp-options .ec-opt-card--checkbox input[type="checkbox"]:focus {
  outline: none;
}

.ec-pdp-options .ec-opt-check-ind,
.ec-pdp-options .ec-opt-card__body {
  position: relative;
  z-index: 0;
  pointer-events: none;
}

.ec-pdp-options .ec-opt-check-ind {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
  position: relative;
  box-sizing: border-box;
}

.ec-pdp-options .ec-opt-card__body {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.ec-pdp-options .ec-opt-card__title {
  flex: 1;
  min-width: 0;
  color: var(--ec-text);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.ec-pdp-options .ec-opt-card__price {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--ec-muted);
  white-space: nowrap;
}

.ec-pdp-options .ec-opt-card__img {
  flex: 0 0 2rem;
  width: 2rem;
  min-width: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ec-pdp-options .ec-opt-card__img--empty {
  /* Keeps title column aligned when option has no image (matches mockup card mode). */
  visibility: hidden;
  pointer-events: none;
}

.ec-pdp-options .ec-opt-card__img .img-thumbnail {
  max-height: 32px;
  width: auto;
  max-width: 2rem;
  margin: 0;
}

/* Card mode (≤10): accent selection */
.ec-pdp-options .ec-opt-group--checkbox:not(.ec-opt-group--compact) .ec-opt-card--checkbox:has(input:checked) {
  border-color: var(--ec-a-border);
  background: linear-gradient(90deg, var(--ec-a-tint), var(--ec-surface-elevated));
  box-shadow: 0 0 20px color-mix(in srgb, var(--ec-a-base) 15%, transparent);
}

.ec-pdp-options .ec-opt-card--checkbox:has(input:focus-visible) {
  outline: 2px solid var(--ec-a-base);
  outline-offset: 2px;
}

/* Kill legacy checkbox UI (main.css) + never use ::before/::after on .ec-opt-check-ind (FontAwesome fights there) */
.ec-pdp-options .ec-opt-card--checkbox label::before {
  display: none !important;
  content: none !important;
}

.ec-pdp-options .ec-opt-card--checkbox label .ec-opt-card__body::after {
  display: none !important;
  content: none !important;
}

/* Custom checkbox: tick via ::after (2px white stroke) */
#product .ec-pdp-options .ec-opt-card--checkbox input[type="checkbox"]:checked + .ec-opt-check-ind {
  background: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
}

#product .ec-pdp-options .ec-opt-card--checkbox input[type="checkbox"]:checked + .ec-opt-check-ind::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
  box-sizing: border-box;
  pointer-events: none;
}

#product .ec-pdp-options .ec-opt-card--checkbox input[type="checkbox"]:not(:checked) + .ec-opt-check-ind::after {
  content: none;
}

#product .ec-pdp-options .ec-opt-card--checkbox input[type="checkbox"]:not(:checked) + .ec-opt-check-ind {
  background: rgba(0, 0, 0, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.ec-pdp-options .ec-opt-card--checkbox label:hover input:not(:checked) + .ec-opt-check-ind {
  border-color: rgba(255, 255, 255, 0.22);
}

/* Native select: closed field only (opened list is drawn by OS — alignment/colors may differ) */
.ec-pdp-options .ec-pdp-select-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#product .ec-pdp-option-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background-color: var(--ec-surface-elevated);
  color: var(--ec-text);
  border: 1px solid var(--ec-border);
  border-radius: 16px;
  padding: 0.65rem 2.35rem 0.65rem 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02);
}

#product .ec-pdp-option-select:focus {
  outline: none;
  border-color: var(--ec-a-border, #c47bff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ec-a-base, #a678ff) 25%, transparent);
}

#product .ec-pdp-option-select[data-ec-accent-selected="violet"] { --ec-a-base: #8b5cf6; --ec-a-border: #a78bfa; }
#product .ec-pdp-option-select[data-ec-accent-selected="cyan"] { --ec-a-base: #48d6ff; --ec-a-border: #7be5ff; }
#product .ec-pdp-option-select[data-ec-accent-selected="amber"] { --ec-a-base: #ffd05c; --ec-a-border: #ffe08f; }
#product .ec-pdp-option-select[data-ec-accent-selected="rose"] { --ec-a-base: #ff9ab1; --ec-a-border: #ffbdd0; }
#product .ec-pdp-option-select[data-ec-accent-selected="green"] { --ec-a-base: #4ee39a; --ec-a-border: #7beab3; }
#product .ec-pdp-option-select[data-ec-accent-selected="red"] { --ec-a-base: #ff6f8a; --ec-a-border: #ff97ab; }
#product .ec-pdp-option-select[data-ec-accent-selected="orange"] { --ec-a-base: #ff9a57; --ec-a-border: #ffb684; }

/* Text / textarea (options only) */
#product .ec-pdp-field.ec-pdp-field--text,
#product .ec-pdp-field.ec-pdp-field--textarea {
  background: var(--ec-surface-elevated);
  color: var(--ec-text);
  border: 1px solid var(--ec-border);
  border-radius: 16px;
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
}

#product .ec-pdp-field.ec-pdp-field--textarea {
  min-height: 120px;
  resize: vertical;
}

#product .ec-pdp-field.ec-pdp-field--text:focus,
#product .ec-pdp-field.ec-pdp-field--textarea:focus {
  outline: none;
  border-color: #c47bff;
  box-shadow: 0 0 0 3px rgba(166, 120, 255, 0.22);
}

/* Section title + option group labels */
.ec-pdp-options .ec-pdp-options__heading {
  margin: 0 0 1.1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}

.ec-pdp-options .ec-pdp-opt-section {
  margin-bottom: 1.35rem;
}

.ec-pdp-options .ec-pdp-opt-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
  margin-bottom: 0.65rem;
  line-height: 1.4;
}

.ec-pdp-options .ec-pdp-opt-label__text {
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.15em;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
}

.ec-pdp-options .ec-pdp-opt-label__required {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(139, 92, 246, 0.6);
  white-space: nowrap;
}

/* OpenCart default stylesheet: div.required .control-label:before { content "*" } */
#product-product .ec-pdp-options div.required .control-label::before,
#product-product .ec-pdp-options div.required .ec-pdp-opt-label::before {
  display: none !important;
  content: none !important;
}

.ec-pdp-options .form-group > .control-label {
  margin-bottom: 0.5rem;
  display: block;
}

/* Kill only ::before on indicator (legacy); ::after reserved for tick */
#product .ec-pdp-options .ec-opt-card--checkbox input[type="checkbox"] + .ec-opt-check-ind::before,
#product .ec-pdp-options .ec-opt-card--checkbox input[type="checkbox"]:checked + .ec-opt-check-ind::before {
  content: none !important;
  display: none !important;
}

