/**
 * Ktech Add on - Frontend Configurator Stylesheet
 * Responsive, Accessible, Clean Eyewear Configurator UI
 */

:root {
  --ktech-navy: #0f172a;
  --ktech-navy-light: #1e293b;
  --ktech-accent: #00a676;
  --ktech-accent-hover: #008f65;
  --ktech-accent-light: #ecfdf5;
  --ktech-muted: #64748b;
  --ktech-muted-light: #94a3b8;
  --ktech-border: #e2e8f0;
  --ktech-border-hover: #cbd5e1;
  --ktech-bg-light: #f8fafc;
  --ktech-bg-card: #ffffff;
  --ktech-radius-card: 16px;
  --ktech-radius-btn: 12px;
  --ktech-radius-pill: 9999px;
  --ktech-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --ktech-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --ktech-shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.12);
  --ktech-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Hide default WooCommerce Add to Cart & Quantity when Ktech Add on is active */
.ktech-addon-active-product form.cart .single_add_to_cart_button:not(#ktech-open-configurator-btn),
.ktech-addon-active-product form.cart .quantity,
.ktech-addon-active-product form.cart .woocommerce-variation-add-to-cart .single_add_to_cart_button:not(#ktech-open-configurator-btn),
.ktech-addon-active-product form.cart .woocommerce-variation-add-to-cart .quantity,
.ktech-addon-active-product .woocommerce-variation-add-to-cart-enabled .single_add_to_cart_button:not(#ktech-open-configurator-btn),
.ktech-addon-active-product .woocommerce-variation-add-to-cart-enabled .quantity,
.ktech-addon-active-product .single_add_to_cart_button:not(#ktech-open-configurator-btn),
body.ktech-addon-active-product button[name="add-to-cart"],
body.ktech-addon-active-product .single_add_to_cart_button:not(.ktech-trigger-btn) {
  display: none !important;
}

/* Trigger Button on Single Product Page */
.ktech-btn-container {
  margin: 16px 0;
  width: 100%;
}

.ktech-trigger-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  padding: 14px 24px !important;
  background-color: var(--ktech-navy) !important;
  color: #ffffff !important;
  font-family: var(--ktech-font);
  font-size: 16px !important;
  font-weight: 600 !important;
  border-radius: var(--ktech-radius-btn) !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

.ktech-trigger-btn:hover {
  background-color: var(--ktech-navy-light) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.2);
}

.ktech-btn-icon {
  font-size: 20px;
}

/* Modal Overlay & Backdrop */
.ktech-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ktech-font);
  color: var(--ktech-navy);
  box-sizing: border-box;
}

.ktech-modal-overlay *,
.ktech-modal-overlay *::before,
.ktech-modal-overlay *::after {
  box-sizing: border-box;
}

.ktech-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Modal Container */
.ktech-modal-container {
  position: relative;
  width: 100%;
  max-width: 540px;
  height: 90vh;
  max-height: 840px;
  background: var(--ktech-bg-card);
  border-radius: 20px;
  box-shadow: var(--ktech-shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ktechSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ktechSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
.ktech-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ktech-border);
  background: #ffffff;
}

.ktech-header-title {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--ktech-navy) !important;
  text-align: center;
  flex: 1;
}

.ktech-header-btn {
  background: none;
  border: none;
  padding: 8px;
  color: var(--ktech-navy);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.ktech-header-btn:hover {
  background: var(--ktech-bg-light);
}

/* Stepper Progress Bar */
.ktech-stepper-wrap {
  position: relative;
  background: #ffffff;
  padding: 14px 24px 0;
  border-bottom: 1px solid var(--ktech-border);
}

.ktech-stepper-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ktech-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  color: var(--ktech-muted);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.ktech-step-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: #e2e8f0;
  color: var(--ktech-muted);
}

.ktech-step-check {
  display: none;
}

.ktech-step-item.ktech-step-active {
  color: var(--ktech-navy);
}

.ktech-step-item.ktech-step-active .ktech-step-icon {
  background: var(--ktech-navy);
  color: #ffffff;
}

.ktech-step-item.ktech-step-complete {
  color: var(--ktech-accent);
}

.ktech-step-item.ktech-step-complete .ktech-step-icon {
  background: var(--ktech-accent);
  color: #ffffff;
}

.ktech-step-item.ktech-step-complete .ktech-step-num {
  display: none;
}

.ktech-step-item.ktech-step-complete .ktech-step-check {
  display: inline-block;
  font-size: 14px;
}

.ktech-stepper-progress-bar {
  position: relative;
  width: 100%;
  height: 3px;
  background: #e2e8f0;
  margin-top: 12px;
}

.ktech-stepper-progress-fill {
  height: 100%;
  width: 33.33%;
  background: var(--ktech-accent);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal Body */
.ktech-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 20px 40px 20px;
  background: #fbfcfe;
}

.ktech-panel-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ktech-section-title {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--ktech-navy) !important;
}

.ktech-learn-more-link {
  background: none;
  border: none;
  color: var(--ktech-accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.ktech-learn-more-link:hover {
  color: var(--ktech-accent-hover);
}

/* Step 1: Power Type Cards */
.ktech-power-type-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ktech-power-card {
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--ktech-bg-card);
  border: 1.5px solid var(--ktech-border);
  border-radius: var(--ktech-radius-card);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--ktech-shadow-sm);
  text-decoration: none;
  color: inherit;
}

.ktech-power-card:hover {
  border-color: var(--ktech-navy-light);
  transform: translateY(-2px);
  box-shadow: var(--ktech-shadow-md);
}

.ktech-power-card.ktech-selected {
  border-color: var(--ktech-accent);
  background: #fafffd;
}

.ktech-card-thumb-wrap {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
}

.ktech-glasses-icon-svg {
  width: 44px;
  height: 44px;
}

.ktech-card-content-wrap {
  flex: 1;
}

.ktech-card-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.ktech-card-title {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--ktech-navy) !important;
}

.ktech-badge-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--ktech-radius-pill);
}

.ktech-badge-purple {
  background: #f3e8ff;
  color: #6b21a8;
}

.ktech-badge-blue {
  background: #e0f2fe;
  color: #0369a1;
}

.ktech-badge-green {
  background: #dcfce7;
  color: #15803d;
}

.ktech-card-desc {
  margin: 0 !important;
  font-size: 13px !important;
  color: var(--ktech-muted) !important;
  line-height: 1.4;
}

.ktech-card-arrow {
  font-size: 20px;
  font-weight: bold;
  color: var(--ktech-muted-light);
  margin-left: 12px;
}

/* Step 2: Progressive / Bifocal Switch */
.ktech-sub-type-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.ktech-pill-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #ffffff;
  border: 1.5px solid var(--ktech-border);
  border-radius: var(--ktech-radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ktech-navy);
  cursor: pointer;
  transition: all 0.15s;
}

.ktech-pill-switch.ktech-pill-active {
  background: var(--ktech-navy);
  color: #ffffff;
  border-color: var(--ktech-navy);
}

.ktech-sub-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
}

.ktech-pill-switch.ktech-pill-active .ktech-sub-dot {
  background: #ffffff;
}

/* Category Filter Pills */
.ktech-filter-pills-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
  scrollbar-width: none;
}

.ktech-filter-pills-row::-webkit-scrollbar {
  display: none;
}

.ktech-category-pill {
  white-space: nowrap;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid var(--ktech-border);
  border-radius: var(--ktech-radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ktech-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.ktech-category-pill:hover {
  border-color: var(--ktech-navy);
  color: var(--ktech-navy);
}

.ktech-category-pill.ktech-cat-active {
  background: var(--ktech-navy);
  color: #ffffff;
  border-color: var(--ktech-navy);
}

/* Lens Package Cards */
.ktech-lens-cards-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ktech-lens-card {
  position: relative;
  display: flex;
  background: var(--ktech-bg-card);
  border: 1.5px solid var(--ktech-border);
  border-radius: var(--ktech-radius-card);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--ktech-shadow-sm);
}

.ktech-lens-card:hover {
  border-color: var(--ktech-navy-light);
  transform: translateY(-2px);
  box-shadow: var(--ktech-shadow-md);
}

.ktech-lens-card.ktech-selected {
  border-color: var(--ktech-accent);
}

/* Left Image Section */
.ktech-lens-visual-col {
  width: 140px;
  background: #fbfcfe;
  border-right: 1px solid var(--ktech-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8px;
  position: relative;
  flex-shrink: 0;
}

.ktech-ribbon-badge {
  position: absolute;
  top: 8px;
  left: 0;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  text-transform: uppercase;
}

.ktech-lens-art {
  width: 80px;
  height: 80px;
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ktech-lens-art svg {
  width: 100%;
  height: 100%;
}

.ktech-warranty-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--ktech-muted);
  background: #ffffff;
  border: 1px solid var(--ktech-border);
  padding: 3px 6px;
  border-radius: 6px;
  text-align: center;
  width: 100%;
}

/* Right Details Section */
.ktech-lens-detail-col {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ktech-lens-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.ktech-lens-title {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--ktech-navy) !important;
}

.ktech-select-circle-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ktech-navy);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
}

.ktech-lens-features-list {
  list-style: none !important;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
}

.ktech-lens-features-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
  margin-bottom: 4px;
}

.ktech-view-details-btn {
  background: none;
  border: none;
  color: var(--ktech-accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 12px;
  display: inline-block;
}

.ktech-lens-footer-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-top: 1px dashed var(--ktech-border);
  padding-top: 10px;
}

.ktech-coupon-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--ktech-navy);
}

.ktech-lens-price-box {
  text-align: right;
}

.ktech-price-label {
  font-size: 11px;
  color: var(--ktech-muted);
  display: block;
}

.ktech-lens-price-current {
  font-size: 16px;
  font-weight: 700;
  color: #1d4ed8;
}

.ktech-lens-price-old {
  font-size: 13px;
  color: var(--ktech-muted-light);
  text-decoration: line-through;
  margin-left: 4px;
}

/* Step 3: Add Power / Prescription Views */
.ktech-help-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f1f5f9;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ktech-navy);
}

.ktech-method-group {
  margin-bottom: 20px;
}

.ktech-group-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--ktech-navy) !important;
  margin: 0 0 10px 0 !important;
}

.ktech-method-card {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #ffffff;
  border: 1.5px solid var(--ktech-border);
  border-radius: var(--ktech-radius-card);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 10px;
  box-shadow: var(--ktech-shadow-sm);
}

.ktech-method-card:hover {
  border-color: var(--ktech-navy-light);
  box-shadow: var(--ktech-shadow-md);
}

.ktech-method-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ktech-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  flex-shrink: 0;
}

.ktech-method-info {
  flex: 1;
}

.ktech-method-title {
  margin: 0 0 2px 0 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--ktech-navy) !important;
}

.ktech-method-desc {
  margin: 0 !important;
  font-size: 13px !important;
  color: var(--ktech-muted) !important;
}

/* Manual Form */
.ktech-subview-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--ktech-navy) !important;
  margin: 0 0 16px 0 !important;
}

.ktech-rx-options-box {
  background: #ffffff;
  border: 1px solid var(--ktech-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ktech-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--ktech-navy);
}

.ktech-checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.ktech-custom-check {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  background: #ffffff;
}

.ktech-checkbox-label input:checked ~ .ktech-custom-check {
  background: var(--ktech-navy);
  border-color: var(--ktech-navy);
}

.ktech-checkbox-label input:checked ~ .ktech-custom-check::after {
  content: "✔";
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
}

/* Grid Table */
.ktech-rx-grid-card {
  background: #ffffff;
  border: 1px solid var(--ktech-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.ktech-rx-grid-header {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ktech-navy);
  margin-bottom: 12px;
  text-align: center;
}

.ktech-col-label {
  text-align: left;
}

.ktech-rx-grid-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.ktech-row-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ktech-navy);
}

.ktech-select,
.ktech-input,
.ktech-textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--ktech-font);
  font-size: 14px;
  color: var(--ktech-navy);
  background: #ffffff;
  border: 1.5px solid var(--ktech-border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ktech-select:focus,
.ktech-input:focus,
.ktech-textarea:focus {
  border-color: var(--ktech-accent);
  box-shadow: 0 0 0 3px rgba(0, 166, 118, 0.15);
}

/* Owner details */
.ktech-rx-owner-box {
  background: #ffffff;
  border: 1px solid var(--ktech-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.ktech-owner-heading {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--ktech-navy) !important;
  margin: 0 0 12px 0 !important;
}

.ktech-input-group {
  margin-bottom: 10px;
}

.ktech-support-call-row {
  text-align: center;
  font-size: 13px;
  color: var(--ktech-accent);
  font-weight: 600;
  margin: 16px 0;
}

.ktech-support-phone-link {
  color: var(--ktech-accent);
  text-decoration: underline;
}

/* Upload Dropzone */
.ktech-upload-dropzone {
  position: relative;
  overflow: hidden;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.ktech-real-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.ktech-upload-dropzone:hover,
.ktech-upload-dropzone.ktech-dragover {
  border-color: var(--ktech-accent);
  background: #ecfdf5;
}

.ktech-upload-cloud-icon {
  margin-bottom: 10px;
}

.ktech-upload-prompt {
  margin: 0 0 4px 0;
  font-size: 14px;
  color: var(--ktech-navy);
}

.ktech-upload-hint {
  margin: 0;
  font-size: 12px;
  color: var(--ktech-muted);
}

.ktech-upload-file-status {
  position: relative;
  z-index: 15;
  margin-top: 12px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--ktech-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ktech-filename {
  font-size: 13px;
  font-weight: 600;
  color: var(--ktech-navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ktech-remove-file-btn {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
}

.ktech-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}

.ktech-progress-bar-fill {
  width: 0;
  height: 100%;
  background: var(--ktech-accent);
  transition: width 0.2s ease;
}

/* Step 4: Summary & Pricing Review */
.ktech-summary-card {
  background: #ffffff;
  border: 1px solid var(--ktech-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.ktech-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}

.ktech-sum-label {
  color: var(--ktech-muted);
  font-weight: 500;
}

.ktech-sum-val {
  font-weight: 700;
  color: var(--ktech-navy);
  text-align: right;
}

.ktech-summary-note-wrap {
  margin-top: 14px;
}

.ktech-note-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ktech-navy);
  margin-bottom: 6px;
}

.ktech-price-breakdown-card {
  background: #ffffff;
  border: 1px solid var(--ktech-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.ktech-price-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--ktech-muted);
  margin-bottom: 8px;
}

.ktech-price-divider {
  height: 1px;
  background: var(--ktech-border);
  margin: 10px 0;
}

.ktech-price-total-line {
  font-size: 17px;
  color: var(--ktech-navy);
  margin-bottom: 0;
}

.ktech-total-amount {
  color: var(--ktech-accent);
  font-size: 20px;
}

/* Action Buttons - Fully visible and scrollable */
.ktech-action-btn-row {
  position: relative;
  width: 100%;
  margin: 28px 0 24px 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  z-index: 10;
}

.ktech-primary-btn {
  width: 100%;
  min-height: 50px;
  padding: 14px 20px;
  background: #6366f1; /* purple/navy accent similar to screenshot */
  background-color: var(--ktech-navy);
  color: #ffffff;
  font-family: var(--ktech-font);
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--ktech-radius-btn);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ktech-primary-btn:hover {
  background: var(--ktech-navy-light);
  transform: translateY(-1px);
}

.ktech-primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Details and Guidance Popup Modals */
.ktech-popup-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ktech-font);
}

.ktech-popup-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
}

.ktech-popup-box {
  position: relative;
  width: 90%;
  max-width: 460px;
  max-height: 80vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--ktech-shadow-lg);
}

.ktech-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ktech-border);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.ktech-popup-header h4 {
  margin: 0 !important;
  font-size: 16px !important;
  color: var(--ktech-navy) !important;
}

.ktech-popup-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: var(--ktech-muted);
  cursor: pointer;
}

.ktech-term-card {
  background: var(--ktech-bg-light);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.ktech-term-card h5 {
  margin: 0 0 4px 0 !important;
  font-size: 13px !important;
  color: var(--ktech-navy) !important;
}

.ktech-term-card p {
  margin: 0 !important;
  font-size: 12px !important;
  color: #475569 !important;
  line-height: 1.4;
}

.ktech-help-footer-box {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: #065f46;
}

/* Spinner */
.ktech-btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: ktechSpin 0.7s linear infinite;
  display: inline-block;
}

@keyframes ktechSpin {
  to { transform: rotate(360deg); }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .ktech-modal-overlay {
    align-items: flex-end;
  }

  .ktech-modal-container {
    max-width: 100%;
    height: 95vh;
    border-radius: 20px 20px 0 0;
  }

  .ktech-lens-card {
    flex-direction: column;
  }

  .ktech-lens-visual-col {
    width: 100%;
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--ktech-border);
    padding: 10px 14px;
  }

  .ktech-lens-art {
    margin: 0;
    width: 50px;
    height: 50px;
  }

  .ktech-warranty-tag {
    width: auto;
  }

  .ktech-rx-grid-header,
  .ktech-rx-grid-row {
    grid-template-columns: 60px 1fr 1fr;
    gap: 8px;
  }
}
