/*=============================================
Animacíón botón de compra
=============================================*/
button.pulseAnimation {

  animation: increaseSize 3s infinite;

}

/* FIX: Force navbar to be white and on top on product pages to prevent image overlap */
.wrap-menu-desktop {
  background-color: #ffffff !important;
  z-index: 1000 !important;
  /* Reduced to allow modals to appear above */
  top: 0 !important;
}

/*=============================================
Modal: Ensure it appears above navbar
=============================================*/
.modal-backdrop {
  z-index: 2147483646 !important;
  /* Between navbar and modal content */
}

.modal.fade {
  z-index: 2147483648 !important;
  /* Higher than navbar and backdrop */
}

.modal.fade .modal-dialog {
  z-index: 2147483649 !important;
  /* Ensures modal dialog is on top */
}

@keyframes increaseSize {
  0% {
    transform: scale(1);
  }

  10% {
    transform: scale(1.2);
  }

  20% {
    transform: scale(1);
  }

}

/*=============================================
Quitar controles de number
=============================================*/

input.showQuantity::-webkit-inner-spin-button,
input.showQuantity::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btnInc {
  cursor: pointer;
}

.input-group {
  flex-wrap: nowrap;
}

.vto-measurement-editor .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: 0;
  margin-right: 0;
}

.vto-measurement-editor .form-row > .col {
  flex: 1 1 0;
  min-width: 150px;
  padding-left: 0;
  padding-right: 0;
}

.vto-measurement-editor label {
  display: block;
  min-height: 32px;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .vto-measurement-editor .form-row > .col {
    flex-basis: 100%;
  }
}

.input-group .input-group-text {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-width: 40px;
  padding: 0;
}

.input-group .input-group-text i {
  line-height: 1;
  font-size: 16px;
}

input.showQuantity {
  height: 40px;
  text-align: center;
  padding: 0 8px;
  max-width: 64px;
  min-width: 64px;
}

.quantity-stack {
  justify-content: center;
}

.quantity-card {
  display: block;
  margin: 0 auto;
  max-width: 260px;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

.qty-label {
  font-size: 12px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #6c757d;
}

.qty-stepper {
  gap: 8px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f1f3f5;
  color: #343a40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .1s ease;
}

.qty-btn:hover {
  background: #e9ecef;
  transform: translateY(-1px);
}

.qty-input {
  width: 70px;
  height: 40px;
  text-align: center;
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

/* Header helper: allow wrapping on very small screens so buttons don't overflow */
@media (max-width: 420px) {
  .d-flex.align-items-center.flex-nowrap {
    flex-wrap: wrap;
  }

  .d-flex.align-items-center.flex-nowrap .me-3 {
    margin-bottom: 0.5rem;
  }
}

/*=============================================
Enlarged BlockMedia Images
=============================================*/

/* Make blockMedia container larger */
.blockMedia {
  max-width: 100%;
  position: relative;
  overflow: visible;
  display: flow-root;
}

/* Enlarge main product images */
.blockMedia .flexslider {
  max-width: 100%;
}

.blockMedia #slider .slides img {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
  /* Removed transition for instant response to mouse movement */
  /* transition: transform 0.3s ease; */
  cursor: crosshair;
  /* Changed cursor to indicate precision */
  transform-origin: center center;
  transition: transform 0.2s ease;
  /* Keep partial transition for smooth zoom in/out */
}

/* Container for zoom */
.blockMedia #slider .slides li {
  overflow: hidden;
  position: relative;
}

/* Discount badge on media */
.blockMedia .discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #dc3545;
  color: #fff;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
  z-index: 2;
}

/* Make carousel thumbnails larger */
.blockMedia #carousel .slides img {
  max-height: 120px;
  object-fit: cover;
  cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .blockMedia #slider .slides img {
    max-height: 400px;
  }

  .blockMedia #carousel .slides img {
    max-height: 80px;
  }
}

@media (max-width: 576px) {
  .blockMedia #slider .slides img {
    max-height: 300px;
  }
}

/*=============================================
Estilos para Variantes (Chips)
=============================================*/
.variant-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.variant-option {
  cursor: pointer;
  position: relative;
  margin: 0;
}

/* Hide the actual radio input */
.variant-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* The label styling */
.variant-label {
  display: inline-block;
  padding: 10px 25px;
  border: 1px solid #e0e0e0;
  border-radius: 50px;
  background: #fff;
  color: #555;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Hover state */
.variant-option:hover .variant-label {
  border-color: #b0b0b0;
  background-color: #f9f9f9;
  transform: translateY(-1px);
}

/* Checked state */
.variant-option input[type="radio"]:checked+.variant-label {
  border-color: #222;
  background-color: #222;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  font-weight: 600;
}

/*=============================================
Estilos para la Descripción del Producto
=============================================*/
.product-description {
  line-height: 1.8;
  color: #444;
  font-size: 1.05rem;
}

.product-description p {
  margin-bottom: 1.5rem;
}

.product-description img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 15px 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.product-description h2,
.product-description h3,
.product-description h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #222;
}

.product-title {
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.25;
  margin-bottom: 2rem;
  font-size: 1.8rem;
}

.product-title .text-warning {
  font-size: 1.2rem;
  margin: 0 .12rem;
}

.product-stars .text-warning {
  font-size: 1.1rem;
  margin: 0 .1rem;
}

.product-stars {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .12rem;
  width: 100%;
  margin-top: .25rem;
}

.product-divider {
  width: 60%;
  margin: .5rem auto 1rem auto;
  border-top: 1px solid #e9ecef;
}

.product-subtitle {
  color: #6c757d;
  font-size: .95rem;
  margin-bottom: .5rem;
}

.blockPrice {
  margin-top: -2rem;
}

.blockPrice h5 {
  margin-top: .5rem;
  margin-bottom: .5rem;
}

.blockPrice h3 {
  margin: .25rem 0;
}

.blockPrice h3 s {
  color: #6c757d;
  font-weight: 500;
}

.blockPrice h3 .text-success {
  font-size: 1.8rem;
  font-weight: 700;
}

.countdown {
  margin-top: 0.5rem;
  margin-bottom: 0rem;
  order: 3;
}

.countdown-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  width: fit-content;
  max-width: 100%;
  margin: .35rem auto .65rem;
  padding: .55rem .75rem;
  border: 1px solid #dbe3eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f3f6f9);
  box-shadow: 0 3px 10px rgba(20, 40, 60, .08);
  color: #17324d;
  font-variant-numeric: tabular-nums;
}

.countdown-unit {
  display: flex;
  min-width: 48px;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}

.countdown-unit span {
  font-size: 1.2rem;
  font-weight: 800;
}

.countdown-unit small {
  margin-top: .15rem;
  color: #6c757d;
  font-size: .65rem;
  text-transform: uppercase;
}

.countdown-separator {
  align-self: flex-start;
  padding-top: .08rem;
  color: #6c757d;
  font-weight: 700;
}

.price-summary .promo-title {
  font-weight: 600;
  margin: .5rem 0 .25rem 0;
}

.price-summary {
  display: inline-block;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid #e9ecef;
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
  max-width: 520px;
  width: 100%;
}

.price-summary .before-line {
  color: #6c757d;
  margin-bottom: .25rem;
  font-size: 1rem;
}

.price-summary .before-line .label {
  margin-right: .25rem;
  font-weight: 500;
}

.price-summary .after-line {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  margin-top: .35rem;
}

.price-summary .after-price {
  font-size: 2.2rem;
  font-weight: 800;
  font-weight: 800;
}

.price-summary .percent-badge {
  display: none;
}

.price-summary .save-pill {
  display: inline-block;
  border: 1px solid #333;
  border-radius: 999px;
  padding: 2px 10px;
  background: #f8f9fa;
  color: #333;
  font-size: .9rem;
  margin-left: .25rem;
}

.benefits-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin: .75rem 0 1rem 0;
  font-size: .95rem;
  color: #495057;
}

.frame-measurements {
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  padding: 16px;
  background: #fafbfc;
}

.frame-measurements-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: #343a40;
}

.frame-measurements-title i {
  color: #667eea;
  margin-right: 6px;
}

.frame-measurements-help,
.frame-measurements-empty,
.frame-measurement-compare p {
  margin: 0 0 12px;
  font-size: 12px;
  color: #6c757d;
}

.frame-measurements-grid,
.frame-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.frame-measurement-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 5px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #edf0f3;
}

.frame-measurement-item span {
  font-size: 11px;
  color: #6c757d;
}

.frame-measurement-item strong {
  font-size: 15px;
  color: #212529;
}

.frame-measurement-compare {
  margin-top: 14px;
  border-top: 1px solid #e4e7ec;
  padding-top: 12px;
}

.frame-measurement-compare summary {
  cursor: pointer;
  color: #495057;
  font-size: 13px;
  font-weight: 600;
}

.frame-compare-grid {
  grid-template-columns: repeat(3, 1fr);
}

.frame-compare-grid label {
  font-size: 11px;
  color: #6c757d;
}

.frame-compare-grid input {
  width: 100%;
  margin-top: 4px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  padding: 6px 8px;
}

.frame-compare-result {
  margin-top: 10px;
  color: #495057;
  font-size: 12px;
  font-weight: 600;
}

.benefit i {
  margin-right: .35rem;
  color: var(--template-color, #00a0ff);
}

.modal-close-btn {
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f5;
  color: #212529;
  border: 1px solid #dee2e6;
}

.modal-close-btn:hover {
  background: #e9ecef;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin: .25rem 0 1rem 0;
}

.meta-chip {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #e9ecef;
  border-radius: 999px;
  background: #f8f9fa;
  color: #495057;
  font-size: .9rem;
}

.blockStock p {
  margin: .5rem 0;
  color: #343a40;
}

.blockStock .progress {
  height: 8px;
  border-radius: 999px;
  background-color: #eee;
}

.blockStock .progress-bar {
  border-radius: 999px;
}

/* CTA button refinement */
button.pulseAnimation {
  background: linear-gradient(180deg, #333 0%, #1f1f1f 100%) !important;
  border: none !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .15) !important;
}

button.pulseAnimation:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18) !important;
}

/* Responsive spacing tweaks */
@media (max-width: 768px) {
  .price-summary .after-price {
    font-size: 1.9rem;
  }

  .product-divider {
    width: 70%;
  }

  .quantity-card {
    max-width: 240px;
  }

  .blockMedia {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    z-index: auto !important;
  }

  /* MOSTRAR SUBTOTAL EN MÓVIL - PRODUCT PAGE */
  .cart-subtotal-row {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    border-top: 1px solid #eee !important;
  }

  .cart-subtotal {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    background: #f8f9fa !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    color: #333 !important;
  }

  .cart-subtotal span {
    color: #2d7d46 !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-weight: bold !important;
  }
}

@media (max-width: 420px) {
  .price-summary {
    padding: 12px 14px;
  }

  .price-summary .after-price {
    font-size: 1.7rem;
  }
}

/*=============================================
CUSTOM MODAL STYLES (Lens Configuration)
=============================================*/
@media (min-width: 992px) {
  #modalLensConfig .modal-dialog {
    max-width: 90% !important;
    width: 1200px;
  }
}

#modalLensConfig .modal-content {
  border-radius: 15px !important;
  border: none !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
}

/* Mobile fullscreen modal tweaks */
@media (max-width: 576px) {
  #modalLensConfig .wizard-content {
    padding: 1rem !important;
  }

  #modalLensConfig .wizard-step table {
    font-size: 0.95rem;
  }
}

/* Step Buttons Design */
#modalLensConfig .wizard-step button.lens-type-btn {
  white-space: normal !important;
  word-wrap: break-word;
  height: auto !important;
  min-height: 220px;
  /* Taller easier to click */
  border-radius: 20px;
  border-width: 2px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#modalLensConfig .wizard-step button.lens-type-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  background-color: #f8f9fa;
  border-color: #333;
}

/* Navigation Buttons */
#modalLensConfig .wizard-step .btn-secondary,
#modalLensConfig .wizard-step .btn-dark {
  border-radius: 50px;
  padding: 10px 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

/* List Group Items */
#modalLensConfig .list-group-item {
  border-radius: 12px;
  margin-bottom: 10px;
  border: 1px solid #eee;
  transition: all 0.2s ease;
}

#modalLensConfig .list-group-item:hover {
  background-color: #f8f9fa;
  border-color: #d1d1d1;
  transform: translateX(5px);
  z-index: 1;
}

/* Selection Cards */
#modalLensConfig .card.cursor-pointer {
  border-radius: 15px;
  border: 1px solid #eee;
  transition: all 0.3s ease;
}

#modalLensConfig .card.cursor-pointer:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
  border-color: #000;
}

/* Prescription table improvements */
.vertical-middle th,
.vertical-middle td {
  vertical-align: middle;
}

#modalLensConfig .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#modalLensConfig .vertical-middle th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

#modalLensConfig .vertical-middle th,
#modalLensConfig .vertical-middle td {
  padding: 0.75rem;
}

#modalLensConfig .vertical-middle select {
  min-width: 110px;
  height: 40px;
  font-size: 14px;
}

@media (max-width: 576px) {
  #modalLensConfig .vertical-middle select {
    min-width: 130px;
    height: 42px;
    font-size: 16px;
  }
}

.presc-vertical .card {
  border-radius: 12px;
  border: 1px solid #eee;
}

.presc-vertical .form-group label {
  margin-bottom: 4px;
}

.presc-vertical .form-group select {
  height: 44px;
  font-size: 16px;
}

/*=============================================
Botón Probar Gafas (Virtual Try-On)
=============================================*/

.btn-probar-gafas {
  position: absolute;
  top: 20px;
  left: 20%;
  transform: translateX(-50%);
  z-index: 100;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  pointer-events: all;
  user-select: none;
  min-height: 44px;
}

.btn-probar-gafas:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-probar-gafas:active {
  transform: translateX(-50%) translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.btn-probar-gafas i {
  font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .btn-probar-gafas {
    bottom: 0;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    font-size: 12px;
    min-height: 40px;
    border-radius: 0;
    width: 100%;
  }

  .btn-probar-gafas i {
    font-size: 14px;
  }
}

/*=============================================
Contenedor VTO
=============================================*/

.vto-container {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 15px;
  overflow: hidden;
}

.vto-container .card {
  border-radius: 15px;
}

.vto-container .card-title {
  color: #333;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.vto-container .btn {
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.vto-container #vtoWrapper {
  border: 3px solid #667eea;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

#vtoMessage {
  backdrop-filter: blur(5px);
  background: rgba(0, 0, 0, 0.5);
}

/*=============================================
Modal VTO Overlay - Sobrepuesto
=============================================*/

.vto-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.vto-modal-overlay.active {
  display: flex;
}

.vto-modal-content {
  background: white;
  border-radius: 15px;
  padding: 30px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideUpModal 0.3s ease;
}

@keyframes slideUpModal {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.vto-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.vto-close-btn:hover {
  color: #000;
}

.vto-modal-title {
  text-align: center;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.vto-canvas-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.vto-canvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.vto-measurements {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
  color: #495057;
  font-size: 12px;
}

.vto-calibration {
  margin: 8px auto 0;
  max-width: 560px;
  text-align: center;
  color: #495057;
  font-size: 12px;
}

.vto-calibration[hidden] {
  display: none !important;
}

.vto-calibration label {
  display: block;
  margin-bottom: 4px;
}

.vto-calibration input {
  width: 85%;
  accent-color: #dc3545;
}

.vto-calibration small {
  display: block;
  margin: 4px auto 0;
  color: #868e96;
  max-width: 520px;
}

.vto-calibration-hint {
  color: #6c757d;
  font-size: 11px;
}

.vto-measurements strong {
  width: 100%;
  text-align: center;
  color: #212529;
}

.vto-measurements span {
  padding: 4px 8px;
  border-radius: 12px;
  background: #f1f3f5;
}

.vto-loading-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.vto-error-message {
  min-height: 20px;
  margin: 10px 0 0;
  color: #b02a37;
  text-align: center;
  font-size: 13px;
}

.vto-permission-help {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #f0c36d;
  border-radius: 8px;
  background: #fff8e5;
  color: #5f4800;
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}

.vto-permission-help ol {
  margin: 8px 0;
  padding-left: 20px;
}

.vto-permission-help p {
  margin: 0;
}

.vto-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.vto-buttons .btn {
  border-radius: 25px;
  padding: 8px 20px;
  font-weight: 600;
  transition: all 0.3s;
}

.vto-buttons .btn:hover {
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .frame-measurements-grid,
  .frame-compare-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vto-modal-content {
    padding: 20px;
  }

  @media (max-width: 420px) {
    .frame-measurements,
    .frame-measurement-compare {
      padding: 12px;
    }

    .frame-measurements-grid,
    .frame-compare-grid {
      gap: 5px;
    }
  }

  .vto-modal-title {
    font-size: 16px;
  }

  .vto-canvas-wrapper {
    aspect-ratio: 4 / 3;
  }
}

/*=============================================
Modal de Autorización de Cámara
=============================================*/

.vto-auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.vto-auth-overlay.active {
  display: flex;
}

.vto-auth-modal {
  background: white;
  border-radius: 15px;
  padding: 40px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
  animation: slideUpModal 0.3s ease;
  text-align: center;
}

.vto-auth-icon {
  font-size: 48px;
  color: #667eea;
  margin-bottom: 20px;
  display: block;
}

.vto-auth-title {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
}

.vto-auth-message {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 10px;
  border-left: 4px solid #667eea;
  text-align: left;
}

.vto-auth-note {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
  margin-bottom: 25px;
  font-style: italic;
  text-align: left;
  padding: 10px;
  background: #f0f0f0;
  border-radius: 8px;
}

.vto-auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 25px;
  text-align: left;
}

.vto-auth-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #667eea;
  flex-shrink: 0;
}

.vto-auth-checkbox label {
  font-size: 14px;
  color: #333;
  cursor: pointer;
  margin: 0;
}

.vto-auth-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.vto-auth-buttons .btn {
  border-radius: 25px;
  padding: 10px 25px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  border: none;
}

.vto-auth-accept {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.vto-auth-accept:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.vto-auth-accept:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.vto-auth-reject {
  background: #e0e0e0;
  color: #333;
}

.vto-auth-reject:hover {
  background: #d0d0d0;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .vto-auth-modal {
    padding: 25px;
  }

  .vto-auth-title {
    font-size: 18px;
  }

  .vto-auth-message {
    font-size: 14px;
  }

  .vto-auth-buttons {
    flex-direction: column;
  }

  .vto-auth-buttons .btn {
    width: 100%;
  }
}

/*=============================================
FIX: Modal Scroll Issue - Vision Sencilla
Ensures the wizard content can scroll properly when selecting lens options
=============================================*/

#modalLensConfig .modal-content {
  display: flex;
  flex-direction: column;
}

#modalLensConfig .modal-body {
  display: flex;
  flex-direction: row;
  flex: 1;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}

#modalLensConfig .modal-body .container-fluid {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
}

#modalLensConfig .modal-body .row {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex-direction: row;
}

#modalLensConfig .col-lg-4 {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 0 0 auto;
  min-height: 0;
}

#modalLensConfig .col-lg-8 {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0;
}

#modalLensConfig .wizard-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding: 1.5rem;
}

@media (max-width: 991px) {
  #modalLensConfig .col-lg-4 {
    display: none !important;
  }
}

/*=============================================
Subtotal en página de producto
=============================================*/
#subtotalAmount {
  color: #2d7d46 !important;
  font-weight: bold !important;
}
.product-story {
  clear: both;
  position: relative;
  margin: 1rem 0 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  overflow: hidden;
  border: 1px solid #e5eaf1;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff 0%, #f5f9ff 100%);
  box-shadow: 0 12px 32px rgba(24, 54, 90, .08);
}
.product-story::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  content: "";
  background: linear-gradient(180deg, #08a6df, #6860d9);
}
.product-story__heading { margin-bottom: 1rem; }
.product-story__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .45rem;
  color: #2f68a4;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.product-story__heading h2 {
  margin: 0;
  color: #172b45;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 750;
}
.product-story__heading p { margin: .35rem 0 0; color: #68778a; }
.product-story__content {
  color: #35445a;
  font-size: 1rem;
  line-height: 1.8;
  text-align: left;
  overflow-wrap: anywhere;
}
.product-story__content > :first-child { margin-top: 0; }
.product-story__content > :last-child { margin-bottom: 0; }
.product-story__content p { margin: 0 0 .85rem; }
.product-story__content ul,
.product-story__content ol { padding-left: 1.35rem; margin: .5rem 0 1rem; }
.product-story__content li { margin: .3rem 0; padding-left: .15rem; }
.product-story__content img { max-width: 100%; height: auto; border-radius: 12px; }
.product-story__content h2,
.product-story__content h3,
.product-story__content h4 { margin: 1.2rem 0 .55rem; color: #1e3552; font-weight: 700; }
@media (max-width: 575.98px) {
  .product-story { margin: .9rem 0 1.25rem; border-radius: 14px; }
  .product-story__content { font-size: .96rem; }
}
/* Soft neutral gallery backdrop and refined product color selector. */
.blockMedia {
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid #e7eaee;
  border-radius: 16px;
  background: linear-gradient(145deg, #f8f9fa 0%, #eef1f4 100%);
  box-shadow: 0 8px 22px rgba(35, 45, 55, .045);
}

.blockMedia #slider .slides img {
  border: 0;
  border-radius: 10px;
  background-color: transparent;
  box-shadow: none;
}

.variant-color-picker {
  width: 100%;
  margin: 1rem 0 1.5rem;
  padding: 1rem 1.125rem;
  border: 1px solid #e6e9ed;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(30, 40, 50, .055);
}

.variant-color-heading {
  display: flex;
  flex-direction: column;
  gap: .18rem;
  margin-bottom: .75rem;
}

.variant-color-eyebrow {
  color: #68727d;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .075em;
  line-height: 1.3;
  text-transform: uppercase;
}

.variant-color-current {
  margin: 0;
  color: #20262d;
  font-size: .98rem;
  font-weight: 650;
  line-height: 1.45;
}

#selectedVariantColor {
  color: inherit;
  font-weight: inherit;
}

.variant-color-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

.variant-color-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 42px;
  max-width: 100%;
  margin: 0;
  padding: .38rem .65rem;
  border: 1px solid #e2e6ea;
  border-radius: 10px;
  background: #fff;
  color: #39434d;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.variant-color-option:hover {
  transform: translateY(-1px);
  border-color: #b9c2cb;
  box-shadow: 0 3px 9px rgba(35, 45, 55, .07);
}

.variant-color-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.variant-color-swatch {
  display: block;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(30, 36, 42, .18);
  border-radius: 7px;
  box-sizing: border-box;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.variant-color-text {
  color: inherit;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.variant-color-check {
  display: none;
  flex: 0 0 auto;
  color: #536777;
  font-size: .72rem;
}

.variant-color-option.is-selected {
  border-color: #748594;
  background: #f7f9fa;
  box-shadow: 0 0 0 2px rgba(83, 103, 119, .12);
  color: #263541;
}

.variant-color-option.is-selected .variant-color-check {
  display: inline-flex;
}

.variant-color-option input:focus-visible ~ .variant-color-text {
  outline: 2px solid #394e60;
  outline-offset: 3px;
  border-radius: 2px;
}

@media (max-width: 575.98px) {
  .blockMedia {
    padding: 8px;
    border-radius: 12px;
  }

  .variant-color-picker {
    padding: .85rem;
    border-radius: 12px;
  }

  .variant-color-options {
    gap: .4rem;
  }

  .variant-color-option {
    min-height: 40px;
    padding: .34rem .52rem;
  }
}

/* Color samples and image-stage contrast. */
.blockMedia {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.blockMedia #slider .slides > li {
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 44%, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .82) 36%, rgba(244, 246, 246, .28) 75%),
    linear-gradient(145deg, #edf1f3 0%, #fafaf8 48%, #e9edec 100%);
}

.blockMedia #slider .slides img {
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}

.variant-color-picker {
  padding: .25rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.variant-color-heading {
  align-items: center;
  text-align: center;
}

.variant-color-options {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .7rem;
}

.variant-color-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.variant-color-option:hover {
  border-color: #aeb6bf;
  background: transparent;
  box-shadow: none;
}

.variant-color-swatch {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(30, 36, 42, .22);
  border-radius: 50%;
}

.variant-color-text,
.variant-color-check {
  display: none !important;
}

.variant-color-option.is-selected {
  border-color: #20262d;
  background: transparent;
  box-shadow: 0 0 0 1px #20262d;
}

.variant-color-option:focus-within .variant-color-swatch {
  outline: 2px solid #394e60;
  outline-offset: 3px;
}

@media (max-width: 575.98px) {
  .blockMedia {
    padding: 0 !important;
    border-radius: 0 !important;
  }
}
/* Product gallery and swatches: keep the frame quiet and the mount prominent. */
.blockMedia #slider.flexslider {
  overflow: hidden;
  border: 0 !important;
  border-radius: 14px;
  background: transparent !important;
  box-shadow: none !important;
}

.blockMedia #slider .slides > li {
  isolation: isolate;
  overflow: hidden;
  border-radius: 14px;
  background: radial-gradient(ellipse 92% 100% at 50% 44%, #fff 0%, #fff 64%, #fcfdfe 80%, #f6f8fa 92%, #f1f4f7 100%);
}

.blockMedia #slider .slides img {
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  mix-blend-mode: multiply;
}

@media (min-width: 768px) {
  .blockMedia #slider .slides > li {
    max-height: 430px;
  }

  .blockMedia #slider .slides img {
    width: 100%;
    height: 430px;
    max-height: 430px;
    object-fit: contain;
    cursor: default;
    transform: none !important;
  }
}

.variant-color-picker {
  width: 100%;
  clear: both;
  position: relative;
  z-index: 1;
  margin: 1.25rem auto 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.variant-color-heading {
  display: none;
}

.variant-color-options {
  justify-content: center;
  align-items: center;
  gap: .9rem;
}

.variant-color-option {
  position: relative;
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 5px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.variant-color-option:hover {
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: scale(1.06);
}

.variant-color-swatch {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(31, 41, 55, .28);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32);
}

.variant-color-option.is-selected {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.variant-color-option.is-selected .variant-color-swatch {
  outline: 2px solid #303943;
  outline-offset: 3px;
}

.variant-color-text,
.variant-color-check {
  display: none !important;
}

.variant-color-option::after {
  position: absolute;
  z-index: 5;
  bottom: calc(100% + 7px);
  left: 50%;
  padding: .35rem .6rem;
  border-radius: 5px;
  background: #20262d;
  color: #fff;
  content: attr(data-color-name);
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  pointer-events: none;
}

.variant-color-option:hover::after,
.variant-color-option:focus-within::after {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

@media (max-width: 575.98px) {
  .variant-color-picker {
    margin: 1rem auto .75rem;
  }
}

.blockMedia #slider.flexslider,
.blockMedia #slider .slides,
.blockMedia #slider .slides > li {
  background: radial-gradient(ellipse 92% 100% at 50% 44%, #fff 0%, #fff 64%, #fcfdfe 80%, #f6f8fa 92%, #f1f4f7 100%) !important;
}
