/* ── MODAL PRODUCTO ── */
.o2-product-overlay{
  position:fixed;inset:0;z-index:300;
  background:rgba(30,21,18,.6);
  display:flex;align-items:center;justify-content:center;
  padding:1rem;opacity:0;pointer-events:none;
  transition:opacity .18s ease-out;
}
.o2-product-overlay.open{opacity:1;pointer-events:all}
.o2-product-modal{
  background:var(--cream);
  border-radius:var(--r);
  box-shadow:0 24px 80px rgba(30,21,18,.25);
  width:100%;max-width:960px;
  max-height:90vh;overflow-y:auto;
  transform:scale(.95) translateY(20px);
  transition:transform .3s cubic-bezier(.4,0,.2,1);
}
.o2-product-overlay.open .o2-product-modal{transform:scale(1) translateY(0)}
.o2-product-modal-close{
  position:sticky;top:0;z-index:10;
  display:flex;justify-content:flex-end;
  padding:.75rem .75rem 0;background:var(--cream);
}
.close-btn{
  width:36px;height:36px;border-radius:50%;border:none;
  background:var(--cream-d);color:var(--brown-m);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;font-size:1.1rem;transition:var(--transition);
}
.close-btn:hover{background:var(--terra);color:var(--white)}
.o2-product-modal-body{
  display:grid;
  grid-template-columns:1.15fr 0.85fr;
  gap:2.5rem;
  padding:1.5rem 2.5rem 2.5rem;
  align-items:start;
}
@media(max-width:768px){
  .o2-product-modal-body{grid-template-columns:1fr;padding:1rem 1.25rem 1.5rem;gap:1.5rem;align-items:stretch;}
}
.o2-product-modal-gallery{
  display:flex;
  flex-direction:column;
  width:100%;
}
@media(min-width:769px){
  .o2-product-modal-gallery{
    position:sticky;
    top:1.5rem;
  }
}
.main-img-wrap{
  border-radius:var(--r);
  overflow:hidden;
  background:var(--white);
  aspect-ratio:4/3;
  width:100%;
  box-shadow:0 4px 20px rgba(30,21,18,0.05);
  margin-bottom:1rem;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--cream-d);
  position:relative;
}
.main-img{
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  display:block;
  object-fit:contain;
  padding:1rem;
  mix-blend-multiply:multiply;
  opacity:0.95;
}
.thumb-row{display:flex;gap:.5rem;flex-wrap:wrap}
.thumb{
  width:56px;
  height:56px;
  border-radius:var(--r-sm);
  object-fit:cover;
  cursor:pointer;
  border:1px solid var(--cream-d);
  transition:var(--transition);
  background:var(--white);
  padding:2px;
}
.thumb.active,.thumb:hover{border-color:var(--terra);box-shadow:0 2px 8px rgba(196,112,74,0.15);}
.o2-product-modal-info{display:flex;flex-direction:column;}
.o2-product-modal-name{
  font-family:'Cormorant Garamond',serif;
  font-size:2.2rem;
  font-weight:700;
  line-height:1.15;
  color:var(--brown-d);
  margin-bottom:0.5rem;
}
.o2-product-modal-desc{
  font-family:'DM Sans',sans-serif;
  font-size:0.9rem;
  line-height:1.6;
  color:var(--brown-m);
  margin-bottom:1.5rem;
}

/* Responsive móvil para modal de producto */
@media(max-width:768px){
  .o2-product-overlay{
    padding:0.5rem !important;
  }
  .o2-product-modal{
    width:calc(100% - 1rem) !important;
    margin:0.5rem auto !important;
    max-height:95vh !important;
    border-radius:12px !important;
    box-sizing:border-box !important;
    overflow-x:hidden !important;
  }
  .o2-product-modal-body{
    padding:0.75rem !important;
    gap:1.25rem !important;
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    overflow-x:hidden !important;
  }
  .o2-product-modal * {
    box-sizing:border-box !important;
    max-width:100% !important;
  }
  .o2-product-modal-name{
    font-size:1.6rem !important;
    word-break:break-word !important;
    padding:0 !important;
    margin-bottom:0.5rem !important;
  }
  .o2-product-modal-desc {
    font-size:0.85rem !important;
    margin-bottom:1.25rem !important;
  }
  .main-img-wrap{
    margin-bottom:0.75rem !important;
    width:100% !important;
    max-width:100% !important;
    aspect-ratio:4/3 !important;
  }
  .thumb-row{
    justify-content:flex-start !important;
  }
  .thumb{
    width:48px !important;
    height:48px !important;
  }
  /* Forzar que las tablas queden confinadas al 100% de ancho con table-layout: fixed para evitar desbordes */
  .o2-product-modal .pricing-table-wrap {
    overflow-x:visible !important;
    width:100% !important;
    max-width:100% !important;
    display:block !important;
    box-sizing:border-box !important;
  }
  .o2-product-modal .pricing-table {
    display:table !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    table-layout:fixed !important; /* Fuerza a las celdas a permanecer dentro del límite horizontal */
    border-collapse:collapse !important;
    box-sizing:border-box !important;
  }
  .o2-product-modal .pricing-table thead {
    display:table-header-group !important;
  }
  .o2-product-modal .pricing-table tbody {
    display:table-row-group !important;
  }
  .o2-product-modal .pricing-table tr {
    display:table-row !important;
  }
  .o2-product-modal .pricing-table th,
  .o2-product-modal .pricing-table td {
    display:table-cell !important;
    padding:0.5rem 0.5rem !important; /* Padding compacto para dispositivos móviles */
    font-size:0.8rem !important;
    white-space:normal !important; /* Permitir la envoltura normal de palabras */
    word-break:break-word !important;
    word-wrap:break-word !important;
    box-sizing:border-box !important;
    vertical-align:middle !important;
  }
  /* Definir anchos fijos de columna responsivos para evitar rupturas de letras */
  .o2-product-modal .pricing-table th:first-child,
  .o2-product-modal .pricing-table td:first-child {
    width:65% !important; /* Columna de descripción/cantidad amplia */
    text-align:left !important;
  }
  .o2-product-modal .pricing-table th:last-child,
  .o2-product-modal .pricing-table td:last-child {
    width:35% !important; /* Columna de precio ajustada */
    text-align:right !important;
    font-weight:700 !important;
    color:var(--terra) !important;
  }
  /* Ajustar inputs y áreas de carga */
  .o2-product-modal .upload-zone {
    padding:1rem 0.5rem !important;
  }
  .o2-product-modal .imprint-options-box {
    display:flex !important;
    flex-direction:column !important;
    gap:0.5rem !important;
  }
}

/* Upload Section */
.upload-section {
  background:var(--cream-l);
  border:1px solid var(--cream-d);
  border-radius:var(--r-sm);
  padding:1.25rem;
  margin-bottom:1.5rem;
}
.upload-title {
  font-family:'Cormorant Garamond',serif;
  font-size:1.2rem;
  font-weight:700;
  color:var(--brown-d);
  margin-bottom:0.75rem;
}
.upload-zone {
  border:2px dashed var(--cream-d);
  border-radius:var(--r-sm);
  padding:1.5rem 1rem;
  text-align:center;
  cursor:pointer;
  transition:var(--transition);
  background:var(--white);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0.4rem;
}
.upload-zone:hover {
  border-color:var(--terra);
  background:rgba(196,112,74,0.02);
}
.upload-icon {
  font-size:1.75rem;
  color:var(--terra);
}
.upload-text {
  font-size:0.82rem;
  color:var(--brown-m);
  font-weight:500;
}
.upload-subtext {
  font-size:0.7rem;
  color:var(--brown-l);
}

/* Product Specifications Accordion */
.product-accordion {
  margin-top:0.5rem;
  border-top:1px solid var(--cream-d);
}
.accordion-item {
  border-bottom:1px solid var(--cream-d);
}
.accordion-trigger {
  width:100%;
  padding:.875rem 0;
  background:none;
  border:none;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-family:'Cormorant Garamond',serif;
  font-size:1.15rem;
  font-weight:700;
  color:var(--brown-d);
  cursor:pointer;
  text-align:left;
}
.accordion-trigger .chevron {
  font-size:0.75rem;
  transition:transform 0.2s ease;
  color:var(--terra);
}
.accordion-trigger.active .chevron {
  transform:rotate(180deg);
}
.accordion-content {
  max-height:0;
  overflow:hidden;
  transition:max-height 0.25s ease-out;
}
.specs-table {
  padding:0 0 1rem 0;
  display:flex;
  flex-direction:column;
  gap:0.45rem;
  font-size:0.8rem;
}
.spec-row {
  display:grid;
  grid-template-columns:140px 1fr;
  line-height:1.4;
  border-bottom:1px solid rgba(30,21,18,0.03);
  padding:0.25rem 0;
}
.spec-row:last-child {
  border-bottom:none;
}
.spec-lbl {
  color:var(--brown-l);
  font-weight:600;
}
.spec-val {
  color:var(--brown-m);
}

/* Colors */
.colors-label{font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:var(--brown-l);margin-bottom:.5rem}
.color-dots{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:1.5rem}
.color-dot{
  width:32px;
  height:32px;
  border-radius:50%;
  cursor:pointer;
  border:2.5px solid transparent;
  transition:var(--transition);
  box-shadow:0 2px 6px rgba(30,21,18,.12);
  position:relative;
}
.color-dot.active{border-color:var(--terra);transform:scale(1.1)}

/* Pricing table */
.pricing-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.5rem}
.pricing-title{font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:var(--brown-l);}
.imprint-options-wrap {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}
.imprint-options-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--brown-l);
  margin-bottom: .75rem;
}
.imprint-options-box {
  border: 1px solid var(--cream-d);
  border-radius: 24px;
  padding: 0.75rem;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.imprint-option-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  border-radius: 99px;
  border: 1px solid transparent;
  text-align: left;
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  color: var(--brown-d);
}
.imprint-option-btn .radio-indicator {
  width: 18px;
  height: 18px;
  border: 2px solid var(--cream-d);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
  transition: var(--transition);
  background: var(--cream);
}
.imprint-option-btn:hover:not(.active) {
  background: #d87d62 !important;
  border-color: #d87d62 !important;
  color: #fff !important;
}
.imprint-option-btn.active {
  background: #fff !important; /* Mantener blanco el seleccionado */
  border-color: var(--terra) !important;
  box-shadow: none;
  font-weight: 700;
}
.imprint-option-btn.active .radio-indicator {
  border-color: var(--terra);
  background: var(--cream);
}
.imprint-option-btn.active .radio-indicator::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--terra);
}
.pricing-table-wrap {
  border: 1px solid var(--cream-d);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 1rem;
  background: var(--white);
}
.pricing-table-wrap:last-child {
  margin-bottom: 0;
}
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.pricing-table th {
  background: var(--cream-d);
  color: var(--brown-d);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.6rem 1rem;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
}
.pricing-table th:last-child {
  text-align: right;
}
.pricing-table td {
  padding: 0.65rem 1rem;
  color: var(--brown-m);
  border-bottom: 1px solid rgba(30,21,18,0.06);
  font-family: 'DM Sans', sans-serif;
  text-align: left;
}
.pricing-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--brown-d);
}
.pricing-table tr:last-child td {
  border-bottom: none;
}

.pricing-scroll-hint {
  display: none;
}

/* Specs detail values layout */
.specs-details {
  padding: 0.5rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.detail-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.detail-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--brown-d);
  font-family: 'DM Sans', sans-serif;
}
.detail-value {
  font-size: 0.85rem;
  color: var(--brown-m);
  line-height: 1.45;
  font-family: 'DM Sans', sans-serif;
}

/* Setup Cost Box */
.setup-cost-card {
  background:rgba(196,112,74,0.05);
  border:1px dashed var(--terra);
  border-radius:var(--r-sm);
  padding:0.85rem 1rem;
  margin-bottom:1.25rem;
  display:flex;
  gap:0.75rem;
  align-items:flex-start;
  font-size:0.8rem;
}
.setup-card-icon {
  font-size:1.25rem;
  color:var(--terra);
  line-height:1;
  margin-top:0.1rem;
}
.setup-card-title {
  font-weight:600;
  color:var(--brown-d);
  display:block;
}
.setup-card-desc {
  color:var(--brown-m);
  margin-top:0.2rem;
  display:block;
  font-size:0.75rem;
}

/* Qty stepper card */
.qty-card {
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:var(--cream-l);
  border:1px solid var(--cream-d);
  border-radius:var(--r-sm);
  padding:1rem 1.25rem;
  margin-bottom:1.5rem;
  gap:1rem;
}
@media(max-width:480px){
  .qty-card{flex-direction:column;align-items:stretch;gap:0.75rem;}
  .qty-summary-right{text-align:left !important;}
}
.qty-controls {
  display:flex;
  align-items:center;
  gap:0.75rem;
}
.qty-label{font-size:.8rem;font-weight:600;color:var(--brown-m);text-transform:uppercase;letter-spacing:.5px;}
.qty-stepper {
  display:flex;
  align-items:center;
  border:1.5px solid var(--cream-d);
  border-radius:99px;
  overflow:hidden;
  background:var(--white);
}
.stepper-btn {
  width:32px;
  height:32px;
  border:none;
  background:none;
  font-size:1.1rem;
  font-weight:500;
  color:var(--brown-m);
  cursor:pointer;
  transition:var(--transition);
  display:flex;
  align-items:center;
  justify-content:center;
}
.stepper-btn:hover {
  background:rgba(30,21,18,0.05);
  color:var(--terra);
}
.qty-input-field {
  width:50px;
  border:none;
  text-align:center;
  font-size:0.95rem;
  font-weight:600;
  color:var(--brown-d);
  background:transparent;
  outline:none;
  padding:0;
  margin:0;
}
.qty-input-field::-webkit-inner-spin-button,
.qty-input-field::-webkit-outer-spin-button {
  -webkit-appearance:none;
  margin:0;
}
.qty-summary-right {
  text-align:right;
  font-size:0.8rem;
  color:var(--brown-l);
}
.qty-summary-right strong {
  color:var(--terra);
  font-size:1.05rem;
  font-weight:600;
}

/* Customizer Action Buttons */
.cart-action-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.o2-btn-primary, .o2-btn-secondary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  height: 48px;
  border: none;
  box-sizing: border-box;
}
.o2-btn-primary {
  background: var(--terra);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(196,112,74,0.25);
}
.o2-btn-primary .btn-arrow-circle {
  width: 34px;
  height: 34px;
  background: var(--white);
  color: var(--terra);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.o2-btn-primary:hover {
  background: #a95b38;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(196,112,74,0.35);
}
.o2-btn-primary:hover .btn-arrow-circle {
  transform: translateX(3px);
}
.o2-btn-secondary {
  background: var(--white);
  color: var(--terra);
  border: 1.5px solid var(--terra);
}
.o2-btn-secondary .btn-arrow-circle {
  width: 34px;
  height: 34px;
  background: var(--terra);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: var(--transition);
  flex-shrink: 0;
}
.o2-btn-secondary:hover {
  background: var(--cream-l);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(196,112,74,0.15);
}
.o2-btn-secondary:hover .btn-arrow-circle {
  transform: translateX(3px);
}

