/**
 * KuzeyDC OS + Control Panel picker
 * Card UI adapted from OwnHost configureproduct (dark theme)
 */
#productConfigurableOptions,
.main-content #productConfigurableOptions {
  --kd-pick-accent: var(--kd-cart-primary, #0066ff);
  --kd-pick-accent-soft: rgba(0, 102, 255, 0.18);
  --kd-pick-border: var(--kd-cart-border, rgba(255, 255, 255, 0.12));
  --kd-pick-surface: var(--kd-cart-surface, #0f1b33);
  --kd-pick-surface-2: var(--kd-cart-surface-2, #152447);
  --kd-pick-text: var(--kd-cart-text-strong, #f8fafc);
  --kd-pick-muted: var(--kd-cart-text-muted, #94a3b8);
}

#productConfigurableOptions .col-sm-6:has(.oh-os-picker),
#productConfigurableOptions .col-sm-6:has(.oh-order__choice-grid),
#productConfigurableOptions .col-sm-6:has(.oh-order__field--os),
#productConfigurableOptions .col-sm-6:has(.oh-order__field--choices) {
  flex: 0 0 100%;
  max-width: 100%;
  width: 100%;
}

#productConfigurableOptions .oh-choice-native-select,
#productConfigurableOptions .oh-os-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#productConfigurableOptions .form-group.oh-order__field--os > label,
#productConfigurableOptions .form-group.oh-order__field--os > .control-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}

#productConfigurableOptions .oh-os-picker {
  width: 100%;
  margin-top: 0.25rem;
}

#productConfigurableOptions .oh-os-picker__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  color: var(--kd-pick-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

#productConfigurableOptions .oh-os-picker__head-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  background: var(--kd-pick-accent-soft);
  color: var(--kd-pick-accent);
  font-size: 0.95rem;
}

#productConfigurableOptions .oh-os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.75rem;
  align-items: start;
}

#productConfigurableOptions .oh-os-card {
  position: relative;
  border: 1px solid var(--kd-pick-border);
  border-radius: 0.875rem;
  background: var(--kd-pick-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#productConfigurableOptions .oh-os-card--tint {
  background: linear-gradient(180deg, rgba(0, 102, 255, 0.08), var(--kd-pick-surface));
}

#productConfigurableOptions .oh-os-card.is-active,
#productConfigurableOptions .oh-os-card.is-open {
  border-color: var(--kd-pick-accent);
  box-shadow: 0 0 0 2px var(--kd-pick-accent-soft);
  z-index: 3;
}

#productConfigurableOptions .oh-os-card__trigger {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin: 0;
  padding: 0.9rem 1rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

#productConfigurableOptions .oh-os-card__logo {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#productConfigurableOptions .oh-os-card__logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

#productConfigurableOptions .oh-os-card__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

#productConfigurableOptions .oh-os-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--kd-pick-text);
  line-height: 1.2;
}

#productConfigurableOptions .oh-os-card__choice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--kd-pick-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

#productConfigurableOptions .oh-os-card.is-active .oh-os-card__choice-text {
  color: #cbd5e1;
}

#productConfigurableOptions .oh-os-card__caret {
  font-size: 0.65rem;
  transition: transform 0.15s ease;
}

#productConfigurableOptions .oh-os-card.is-open .oh-os-card__caret {
  transform: rotate(180deg);
}

#productConfigurableOptions .oh-os-card__menu {
  position: absolute;
  left: -1px;
  right: -1px;
  top: calc(100% - 2px);
  z-index: 30;
  padding: 0.4rem;
  border: 1px solid var(--kd-pick-accent);
  border-top: 0;
  border-radius: 0 0 0.75rem 0.75rem;
  background: var(--kd-pick-surface-2);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

#productConfigurableOptions .oh-os-card__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--kd-pick-text);
  font-size: 0.86rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

#productConfigurableOptions .oh-os-card__option:hover,
#productConfigurableOptions .oh-os-card__option.is-selected {
  background: rgba(0, 102, 255, 0.16);
}

#productConfigurableOptions .oh-os-card__badge {
  flex: 0 0 auto;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  background: #16a34a;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.4;
}

#productConfigurableOptions .oh-order__choice-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.65rem;
  width: 100%;
  margin-top: 0.35rem;
}

#productConfigurableOptions .oh-order__choice,
#productConfigurableOptions button.oh-order__choice {
  display: block !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

#productConfigurableOptions .oh-order__choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 74px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--kd-pick-border);
  border-radius: 0.875rem;
  background: var(--kd-pick-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

#productConfigurableOptions .oh-order__choice:hover .oh-order__choice-card {
  border-color: rgba(0, 102, 255, 0.45);
  background: var(--kd-pick-surface-2);
}

#productConfigurableOptions .oh-order__choice.is-selected .oh-order__choice-card {
  border-color: var(--kd-pick-accent) !important;
  background: rgba(0, 102, 255, 0.12) !important;
  box-shadow: 0 0 0 2px var(--kd-pick-accent-soft);
}

#productConfigurableOptions .oh-order__choice-name {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--kd-pick-text);
  padding-right: 1.5rem;
}

#productConfigurableOptions .oh-order__choice-price {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0.1rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(0, 102, 255, 0.16);
  color: #93c5fd;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

#productConfigurableOptions .oh-order__choice-check {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--kd-pick-border);
  background: transparent;
  color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#productConfigurableOptions .oh-order__choice.is-selected .oh-order__choice-check {
  background: var(--kd-pick-accent);
  border-color: var(--kd-pick-accent);
  color: #fff;
}

@media (max-width: 640px) {
  #productConfigurableOptions .oh-os-grid {
    grid-template-columns: 1fr;
  }
}


/* Lagom section layout */
#productConfigurableOptions .section.oh-order__field--os .panel.panel-form,
#productConfigurableOptions .section.oh-order__field--choices .panel.panel-form {
  display: none !important;
}
#productConfigurableOptions .section.oh-order__field--os > .section-header .section-title,
#productConfigurableOptions .section.oh-order__field--os > .section-header {
  /* OS picker brings its own heading */
}
#productConfigurableOptions .section.oh-order__field--os > .section-header {
  display: none !important;
}
#productConfigurableOptions .section.oh-order__field--choices > .section-header {
  display: block;
}
#productConfigurableOptions .oh-os-picker,
#productConfigurableOptions .oh-order__choice-grid {
  margin-top: 0;
}
#productConfigurableOptions .section-body:has(.oh-os-picker),
#productConfigurableOptions .section-body:has(.oh-order__choice-grid) {
  padding: 0;
}
