/* ===== OTIT Shop & Checkout Styles ===== */

/* ===== STEP INDICATOR ===== */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 auto 48px;
  max-width: 400px;
  padding: 0 24px;
}
.step-indicator .step {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0e0e0;
  color: var(--gray-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all .4s ease;
  position: relative;
  border: 2px solid transparent;
}
.step-indicator .step.active {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-light);
}
.step-indicator .step.completed {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
.step-indicator .step.completed::after {
  content: '\2713';
  font-size: 18px;
}
.step-indicator .step.completed span {
  display: none;
}
.step-indicator .step-line {
  flex: 1;
  height: 3px;
  background: #e0e0e0;
  transition: background .4s ease;
}
.step-indicator .step-line.completed {
  background: var(--teal);
}
.step-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-dark);
  position: absolute;
  bottom: -22px;
  white-space: nowrap;
  transition: color .4s ease;
}
.step.active .step-label,
.step.completed .step-label {
  color: var(--teal-dark);
}

/* ===== CHECKOUT SECTIONS / FADE ===== */
.checkout-step {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .4s ease, transform .4s ease;
}
.checkout-step.visible {
  display: block;
}
.checkout-step.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PRODUCT CARDS ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.product-card {
  background: var(--white);
  border: 2px solid #e8e8e8;
  border-radius: var(--radius-lg);
  padding: 32px;
  cursor: pointer;
  transition: all .3s ease;
  position: relative;
}
.product-card:hover {
  border-color: var(--teal-light);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.product-card.selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-light), var(--shadow-lg);
}
.product-card.selected::before {
  content: '\2713';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  background: var(--teal);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.product-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--black);
}
.product-card .product-description {
  color: var(--gray-dark);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.product-card .product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.product-card .price-net {
  font-size: 28px;
  font-weight: 800;
  color: var(--teal);
}
.product-card .price-suffix {
  font-size: 14px;
  color: var(--gray-dark);
  font-weight: 500;
}
.product-card .price-gross {
  font-size: 13px;
  color: var(--gray-dark);
  margin-bottom: 20px;
}
.product-card .btn-select {
  width: 100%;
  justify-content: center;
  padding: 12px 24px;
}
.product-card.selected .btn-select {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

/* ===== EARLY BIRD & SUBSCRIPTION PRICING ===== */
.earlybird-badge {
  margin: 12px 0;
}
.earlybird-bar {
  height: 8px;
  background: #e5e5e5;
  border-radius: 4px;
  overflow: hidden;
}
.earlybird-fill {
  height: 100%;
  background: linear-gradient(90deg, #0d9488, #ff6b35);
  border-radius: 4px;
  transition: width 0.5s;
}
.earlybird-text {
  font-size: 13px;
  color: #ff6b35;
  font-weight: 600;
  margin-top: 6px;
  display: block;
}
.product-pricing {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}
.price-current {
  font-size: 28px;
  font-weight: 800;
  color: var(--teal);
}
.price-original {
  font-size: 16px;
  color: #999;
  text-decoration: line-through;
  margin-left: 8px;
}
.price-note {
  font-size: 12px;
  color: #888;
  display: block;
  width: 100%;
  margin-top: 2px;
}
.price-interval {
  font-size: 14px;
  color: var(--gray-dark);
  font-weight: 500;
  margin-bottom: 20px;
}
.summary-interval {
  font-size: 13px;
  color: var(--gray-dark);
  font-weight: 400;
}

/* ===== FORM STYLES ===== */
.shop-form {
  max-width: 640px;
  margin: 0 auto;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 6px;
}
.form-group label .required {
  color: var(--cta);
  margin-left: 2px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--black);
  background: var(--white);
  border: 2px solid #e0e0e0;
  border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.form-input::placeholder {
  color: #b0b0b0;
}
.form-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-light);
}
.form-input.has-error {
  border-color: #D32F2F;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, .1);
}
.form-input.is-valid {
  border-color: #2E7D32;
}
.form-error {
  display: none;
  font-size: 13px;
  color: #D32F2F;
  margin-top: 4px;
  line-height: 1.4;
}
.form-error.visible {
  display: block;
}
.form-hint {
  font-size: 12px;
  color: var(--gray-dark);
  margin-top: 4px;
}
.form-hint.validating {
  color: var(--teal);
}
.form-hint.valid {
  color: #2E7D32;
}
.form-hint.invalid {
  color: #D32F2F;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
}
@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ===== CHECKBOX GROUPS ===== */
.checkbox-group {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--teal);
  cursor: pointer;
}
.checkbox-group label {
  font-size: 14px;
  color: var(--gray-dark);
  line-height: 1.5;
  cursor: pointer;
}
.checkbox-group label a {
  color: var(--teal);
  text-decoration: underline;
}
.checkbox-group label a:hover {
  color: var(--teal-dark);
}

/* ===== ORDER SUMMARY ===== */
.order-summary {
  background: var(--white);
  border: 2px solid #e8e8e8;
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 640px;
  margin: 0 auto 32px;
}
.order-summary h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--black);
}
.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 15px;
  border-bottom: 1px solid #f0f0f0;
}
.summary-line:last-child {
  border-bottom: none;
}
.summary-line .label {
  color: var(--gray-dark);
}
.summary-line .value {
  font-weight: 600;
  color: var(--black);
}
.summary-line.total {
  border-top: 2px solid #e8e8e8;
  margin-top: 8px;
  padding-top: 16px;
  font-size: 18px;
}
.summary-line.total .value {
  font-size: 22px;
  font-weight: 800;
  color: var(--teal);
}

.customer-summary {
  background: var(--gray-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 32px;
}
.customer-summary h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--black);
}
.customer-summary p {
  font-size: 14px;
  color: var(--gray-dark);
  line-height: 1.6;
  margin: 0;
}

/* ===== CTA BUTTON LARGE ===== */
.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 40px;
  font-size: 18px;
  font-weight: 700;
  background: var(--cta);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
}
.btn-checkout:hover {
  background: var(--cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 107, 53, .3);
}
.btn-checkout:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-checkout .spinner-inline {
  display: none;
}
.btn-checkout.loading .spinner-inline {
  display: inline-block;
}
.btn-checkout.loading .btn-text {
  display: none;
}

/* ===== SPINNER ===== */
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--teal-light);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}
.spinner-inline {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== SUCCESS CHECKMARK ===== */
.success-check {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #E8F5E9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: scaleIn .5s ease;
}
.success-check::after {
  content: '\2713';
  font-size: 40px;
  color: #2E7D32;
  font-weight: 700;
  animation: checkPop .4s ease .2s both;
}
@keyframes scaleIn {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes checkPop {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== ERROR ICON ===== */
.error-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #FFEBEE;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.error-icon::after {
  content: '\2717';
  font-size: 40px;
  color: #D32F2F;
  font-weight: 700;
}

/* ===== LICENSE BOX ===== */
.license-box {
  background: var(--gray-light);
  border: 2px solid var(--teal);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px auto;
  max-width: 560px;
  position: relative;
}
.license-box h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-dark);
  margin-bottom: 12px;
}
.license-key {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 8px;
}
.license-key:last-child {
  margin-bottom: 0;
}
.license-key code {
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 16px;
  font-weight: 500;
  color: var(--teal-dark);
  background: none;
  padding: 0;
  letter-spacing: .5px;
  word-break: break-all;
}
.copy-btn {
  flex-shrink: 0;
  background: var(--teal-light);
  color: var(--teal-dark);
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
  white-space: nowrap;
}
.copy-btn:hover {
  background: var(--teal);
  color: var(--white);
}
.copy-btn.copied {
  background: #2E7D32;
  border-color: #2E7D32;
  color: var(--white);
}

/* ===== CONFIRMATION PAGE ===== */
.confirmation-content {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 0;
}
.confirmation-content h1 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--black);
}
.confirmation-content .order-number {
  font-size: 16px;
  color: var(--gray-dark);
  margin-bottom: 8px;
}
.confirmation-content p {
  font-size: 16px;
  color: var(--gray-dark);
  line-height: 1.7;
  margin-bottom: 12px;
}
.confirmation-content .instructions {
  background: var(--teal-light);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px auto;
  max-width: 480px;
  text-align: left;
}
.confirmation-content .instructions p {
  font-size: 14px;
  margin-bottom: 0;
  color: var(--teal-dark);
}
.confirmation-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ===== PROCESSING STATE ===== */
.processing-state {
  text-align: center;
  padding: 80px 24px;
}
.processing-state p {
  font-size: 18px;
  color: var(--gray-dark);
}

/* ===== SECTION HEADING IN SHOP ===== */
.shop-section-heading {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--black);
}

/* ===== BACK LINK ===== */
.step-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  margin-bottom: 24px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}
.step-back:hover {
  color: var(--teal-dark);
}

/* ===== LOADING SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-lg);
  min-height: 200px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== RESPONSIVE SHOP ===== */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .order-summary {
    padding: 24px 20px;
  }
  .license-key {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .license-key code {
    font-size: 14px;
  }
  .copy-btn {
    text-align: center;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .step-indicator {
    margin-bottom: 36px;
  }
}
