/* =========================================================
   GALERÍA DE PRODUCTO – METAL LINE
   ========================================================= */

/* Layout base para que el footer se quede abajo si hay poco contenido */
html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

/* Contenido principal (ajusta si tu main tiene otra clase/etiqueta) */
main {
  flex: 1;
}

/* Contenedor global de la página de producto (opcional, pero recomendado)
   Usa esta clase en tu HTML: <div class="product-page-container"> */
.product-page-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* Contenedor principal de la galería */
.product-gallery {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  max-width: 1200px;
  width: 100%;
  margin: 40px auto 24px;
  padding: 0 16px;
  box-sizing: border-box;
}

/* Tipografía solo para este módulo y el modal */
.product-gallery,
.product-gallery *,
#pedidoModal,
#pedidoModal * {
  font-family: "Rubik", sans-serif;
}

/* IMAGEN PRINCIPAL */
.main-image {
  position: relative;
  flex: 0 1 55%;
  max-width: 640px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;

  border-radius: 12px;
  background-color: #f5f5f5;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.zoom-container {
  width: 100%;
  height: 100%;
}

.main-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

/* Zoom base */
.zoomable {
  transform: scale(1);
  transform-origin: 0 0;
}

/* Flechas (se muestran solo en móvil) */
.main-image .nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background-color: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 2;
}

.main-image .nav-arrow.prev {
  left: 8px;
}
.main-image .nav-arrow.next {
  right: 8px;
}

/* MINIATURAS – DESKTOP (columna) */
.thumbnail-gallery {
  flex: 0 0 90px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thumbnail-gallery .thumbnail {
  width: 80px;
  height: 70px;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid #ddd;
  box-sizing: border-box;
  background-color: #f7f7f7;
  transition: transform 0.25s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Hover */
.thumbnail-gallery .thumbnail:hover {
  transform: translateY(-2px);
  border-color: #999;
}

/* Miniatura seleccionada */
.thumbnail-gallery .thumbnail.active-thumb {
  transform: translateY(-2px);
  border-color: #fec52e;
  box-shadow: 0 0 0 2px rgba(254, 197, 46, 0.45);
  background-color: #ffffff;
}

/* INFORMACIÓN DEL PRODUCTO (derecha) */
.product-info {
  flex: 1;
  margin-left: 8px;
}

.product-info h1 {
  font-size: 22px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}

/* Pill de STOCK verde */
.product-info .description {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
}

/* Selector cantidad */
.quantity-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  gap: 8px;
}

.quantity-selector button {
  background-color: #1f2933;
  border: 1px solid #111827;
  padding: 8px 18px;
  font-size: 18px;
  cursor: pointer;
  color: #fff;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.quantity-selector button:hover {
  background-color: #111827;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.quantity-selector button:active {
  background-color: #4b5563;
}

.quantity-selector input {
  width: 60px;
  text-align: center;
  font-size: 18px;
  border: 1px solid #fec52e;
  padding: 6px;
  border-radius: 4px;
}

/* Botón principal */
.product-info button {
  padding: 12px 20px;
  background-color: #333;
  color: #fec52e;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  border-radius: 6px;
  width: 100%;
  margin-top: 20px;
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.product-info button:hover {
  background-color: #fec52e;
  color: #060707;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

/* =========================================================
   MODAL DE PEDIDO
   ========================================================= */

#pedidoModal {
  display: none;
  background-color: rgba(0, 0, 0, 0.7);
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2500;
  padding: 40px 16px;
  box-sizing: border-box;
}

#pedidoModal .modal-content {
  background-color: #ffffff;
  padding: 20px;
  margin: auto;
  width: 100%;
  max-width: 700px;
  border-radius: 12px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  max-height: 90vh;
  overflow-y: auto;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 22px;
  color: #333;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  background-color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-logo {
  width: 120px;
  height: auto;
  margin-bottom: 16px;
}

.modal-banner {
  background-color: #fec52e;
  padding: 10px;
  width: 100%;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 16px;
}

.modal-banner h4 {
  margin: 0;
  color: #fafafa;
  font-size: 15px;
}

.modal-product-img {
  border: 2px solid #333;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 15px;
  width: 70%;
  max-width: 250px;
  height: auto;
}

#pedidoModal h3 {
  color: #fec52e;
  font-size: 20px;
  margin-bottom: 10px;
}

#pedidoModal h4 {
  color: #171717;
  font-size: 18px;
  margin-bottom: 10px;
}

#pedidoModal p {
  font-size: 16px;
  color: #333;
  margin: 5px 0 10px;
}

#pedidoModal input[type="text"] {
  padding: 8px;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 15px;
  border-radius: 5px;
  font-size: 16px;
  border: 1px solid #ddd;
  box-sizing: border-box;
}

#pedidoModal button {
  padding: 10px 20px;
  background-color: #333;
  color: #f9f6ee;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  border-radius: 5px;
  width: 100%;
  margin-top: 20px;
  transition: background-color 0.3s, color 0.3s;
}

#pedidoModal button:hover {
  background-color: #fec52e;
  color: #060707;
}

/* =========================================================
   LIGHTBOX – IMAGEN AMPLIADA
   ========================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 16px;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   SECCIÓN DEL PRODUCTO – FONDO Y ESPACIO INFERIOR
   ========================================================= */

.section_product-header2-2 {
  background-color: #ffffff;
  padding: 40px 16px 80px; /* top / lados / bottom */
  box-sizing: border-box;
}

/* =========================================================
   ACORDEÓN ENVÍO – #ml-shipping-accordion
   ========================================================= */

#ml-shipping-accordion .ml-accordion-wrapper {
  border-top: 1px solid #e0e0e0;
}

#ml-shipping-accordion .ml-accordion-item {
  border-bottom: 1px solid #e0e0e0;
}

#ml-shipping-accordion .ml-accordion-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 0;
}

#ml-shipping-accordion .ml-accordion-icon-left {
  display: flex;
  align-items: center;
  justify-content: center;
}

#ml-shipping-accordion .ml-accordion-title {
  font-weight: 600;
  font-size: 14px;
  flex: 1;
}

#ml-shipping-accordion .ml-accordion-icon-right {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

#ml-shipping-accordion .ml-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

#ml-shipping-accordion .ml-accordion-body p {
  margin: 0 0 12px 41px;
  font-size: 13px;
  line-height: 1.5;
}

#ml-shipping-accordion .ml-accordion-item.is-open .ml-accordion-icon-right {
  transform: rotate(180deg);
}

/* =========================================================
   TABS PRODUCTO – #ml-product-tabs
   ========================================================= */

#ml-product-tabs.ml-tabs {
  margin-top: 10px;
  font-family: inherit;
}

#ml-product-tabs .ml-tabs-header {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid #dddddd;
  margin-bottom: 14px;
}

#ml-product-tabs .ml-tab-button {
  position: relative;
  padding: 8px 0;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #555555;
}

#ml-product-tabs .ml-tab-button.is-active {
  color: #111111;
}

#ml-product-tabs .ml-tab-button.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background-color: #111111;
}

#ml-product-tabs .ml-tabs-content {
  width: 100%;
}

#ml-product-tabs .ml-tab-panel {
  display: none;
}

#ml-product-tabs .ml-tab-panel.is-active {
  display: block;
}

#ml-product-tabs .ml-card {
  background-color: #f5f5f5;
  border-radius: 10px;
  padding: 18px 20px;
  box-sizing: border-box;
  width: 100%;
  margin-bottom: 40px;
}

/* Bloque general de descripción */
.product-header2_product-description {
  padding-bottom: 24px;
  margin-bottom: 32px;
}

body .product-header2_product-description {
  margin-bottom: 40px !important;
}

body #ml-product-tabs {
  margin-bottom: 40px !important; /* más separación del footer */
}

/* Aspectos técnicos – una sola columna */
.product-header2_product-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-header2_product-info .colum-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-radius: 8px;
  padding: 8px 14px;
}

.product-header2_product-info .heading-3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #222222;
}

.product-header2_product-info .div-block-12 {
  display: flex;
  gap: 4px;
  font-size: 13px;
  color: #333333;
}

.product-header2_product-info .number {
  font-size: 13px;
}

/* Descripción */
#ml-product-tabs .ml-desc-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #222222;
}

#ml-product-tabs .ml-desc-body p {
  margin: 0 0 8px 0;
  font-size: 13px;
  line-height: 1.6;
  color: #444444;
}

#ml-product-tabs .ml-desc-body p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   RESPONSIVE – TABLET / MÓVIL
   ========================================================= */

@media (max-width: 992px) {
  .product-gallery {
    gap: 16px;
    margin-top: 24px;
  }

  .main-image {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .product-info {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .product-header2_content-top-2 {
    display: block;
  }

  .product-gallery {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    max-width: 100%;
    width: 100%;
    margin: 16px auto 24px;
    padding: 0 12px;
    box-sizing: border-box;
  }

  .main-image {
    flex: 0 0 auto;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    height: auto;
  }

  .main-image img {
    width: 100%;
    height: auto;
  }

  /* Flechas visibles solo en móvil */
  .main-image .nav-arrow {
    display: flex;
  }

  /* Miniaturas abajo, con scroll horizontal interno */
  .thumbnail-gallery {
    flex-direction: row;
    width: 100%;
    max-width: 420px;
    margin: 12px auto 0;
    padding: 0.7rem 12px;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    box-sizing: border-box;
  }

  .thumbnail-gallery .thumbnail {
    margin-bottom: 0;
    flex: 0 0 70px;
    scroll-snap-align: center;
  }

  .thumbnail-gallery::-webkit-scrollbar {
    height: 4px;
  }

  .thumbnail-gallery::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 999px;
  }

  .product-info {
    width: 100%;
    max-width: 420px;
    margin: 20px auto 0;
    text-align: left;
  }

  .quantity-selector {
    justify-content: flex-start;
  }

  .product-info button {
    width: 100%;
  }

  #pedidoModal .modal-content {
    width: 100%;
  }

  /* Que tabs + acordeón queden debajo, a lo ancho */
  .product-header2_content-bottom {
    display: block !important;
    width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
  }

  .product-header2_product-description,
  .product-header2_product-details-2 {
    width: 100% !important;
    margin-top: 16px;
  }
}

@media (max-width: 600px) {
  #ml-product-tabs .ml-card {
    padding: 14px 14px;
    margin-bottom: 32px;
  }

  .product-header2_product-info .colum-details {
    padding: 8px 10px;
  }

  #ml-product-tabs .ml-tabs-header {
    gap: 16px;
  }

  #ml-product-tabs .ml-tab-button {
    font-size: 13px;
  }
}

/* =========================================================
   FOOTER – SEPARACIÓN Y RESPONSIVE
   ========================================================= */

/* Separación normal (desktop / pantallas grandes) */
footer {
  margin-top: 60px;               /* separa bien del contenido */
  padding: 115px 16px 24px;        /* top / lados / bottom */
  box-sizing: border-box;
}

/* Ajuste especial para tablets y celulares */
@media (max-width: 768px) {
  footer {
    margin-top: 68px;             /* buen aire sin exagerar */
    padding-top: 30px;            /* antes era 162px, muy grande */
  }
}

/* =========================================================
   FIX: Tabs / Aspectos técnicos centrados y alineados (móvil + desktop)
   ========================================================= */

/* 1) El wrapper principal: que use el mismo ancho que la galería */
.section_product-header2-2,
.product-header2_content-bottom,
.product-header2_product-description,
.product-header2_product-details-2,
#ml-product-tabs {
  width: 100% !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

/* 2) Evitar doble padding (causa el “corrimiento”) */
.section_product-header2-2 {
  padding-left: 16px !important;
  padding-right: 16px !important;
}

.product-header2_content-bottom {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 3) En móvil: casi al borde, simétrico */
@media (max-width: 768px){
  .section_product-header2-2{
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  /* elimina padding extra del wrapper interno */
  .product-header2_content-bottom{
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* el card donde están los datos: ocupa el ancho completo */
  #ml-product-tabs .ml-card{
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
