/* product.css */

/* ── CONTENEDOR FLEX PRINCIPAL ── */
.custom-product-view {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  column-gap: 50px;
  box-sizing: border-box;
  margin-top: 20px;
}

/* ── A partir de <768px apila en vertical (tablet) ── */
@media (max-width: 768px) {
  .custom-product-view {
    flex-direction: column;
    flex-wrap: wrap;
  }
}

/* ── COLUMNAS IZQUIERDA & DERECHA ── */
.left-column,
.right-column {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}

.right-column {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ── IMAGEN ── */
.image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── BLOQUE PRINCIPAL ── */
.product-main-info {
  background-color: #fff;
  border-radius: 12px;
  padding: 36px 32px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  flex: 1 0 auto;
}

/* ── CONTENEDOR DEL TÍTULO ── */
.product-title-container {
  position: relative;
  margin-bottom: 20px;
}
.product-title-container::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  height: 4px;
  width: 80px;
  background: linear-gradient(90deg, #e53935, #ffebee);
  border-radius: 4px;
}

/* ── TÍTULO ── */
.product-title {
  font-size: 28px;
  font-weight: 700;
  color: #575757;
  line-height: 1.2;
  text-transform: capitalize;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── DESCRIPCIÓN CORTA ── */
.short-desc {
  font-style: italic;
  color: #666;
  line-height: 1.6;
  margin-bottom: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 9;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── PRECIO Y UNIDAD ── */
.price-final-with-unit {
  display: inline-flex;
  align-items: baseline;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid rgba(229,57,53,0.3);
  border-radius: 8px;
  margin-bottom: 44px;
}
.price-final-with-unit .price,
.price-final-with-unit .price-final_price {
  color: #e53935;
  font-weight: 800;
  font-size: 28px;
}
.price-final-with-unit .price-unit-inline {
  font-size: 13px;
  text-transform: uppercase;
  margin-left: 6px;
  color: #999;
}

/* ── SELECTOR DE CANTIDAD ── */
.quantity-selector {
  display: flex;
  align-items: center;
  margin-bottom: 44px;
}
.quantity-label {
  font-weight: 600;
  color: #575757;
  margin-right: 12px;
}

/* ── BOTONES + / – ── */
.qty-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 36px;
  border: none;
  background-color: #ececec;
  color: #575757;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  outline: none;
}
.qty-btn:hover,
.qty-btn:focus {
  background-color: #E00D2E;
  color: #fff;
}

/* ── INPUT DE CANTIDAD ── */
.qty-input {
  flex: 0 0 auto;
  width: 7ch;
  max-width: 7ch;
  height: 36px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 14px;
  padding: 0;
  margin: 0 4px;
  box-sizing: border-box;
}

/* ── STOCK STATUS ── */
.stock-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 44px;
}
.stock-status.in-stock .status-indicator { background-color: #27ae60; }
.stock-status.in-stock .status-text     { color: #27ae60; }
.stock-status.out-of-stock .status-indicator { background-color: #E00D2E; }
.stock-status.out-of-stock .status-text     { color: #E00D2E; }
.status-indicator {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  animation: pulse 1.2s infinite alternate;
}
.status-text {
  font-size: 14px;
  font-weight: 600;
}
@keyframes pulse {
  0% { transform: scale(0.85); }
  100% { transform: scale(1.1); }
}

/* ── BOTÓN AÑADIR ── */
button.action.primary.tocart.custom-add-to-cart {
  position: relative;
  width: 100%;
  padding: 18px;
  font-size: 16px;
  font-weight: 600;
  background-color: #E00D2E !important;
  color: #fff;
  border: none;
  border-radius: 999px;
  transition: background-color 0.3s ease;
}
button.action.primary.tocart.custom-add-to-cart:hover {
  background-color: #C90B29 !important;
}
.custom-add-to-cart::before {
  content: '\e611';
  font-family: 'luma-icons';
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
  font-size: 20px;
  font-weight: normal;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
}

/* ── ESPACIO DEBAJO DEL SLIDER DE IMÁGENES ── */
.custom-product-view .left-column .image-wrapper {
  margin-bottom: 40px !important;
}

/* Oculta completamente el contenedor con todo su margen */
.page-main.page-main-details {
  display: none !important;
}

/* ── FULL-WIDTH ICONOS (sólo para referenciar) ── */
.custom-icons-fullwidth {
  margin: 10px auto 80px !important;
}

/* ── TABLET (≤1024px) ── */
@media (max-width: 1024px) {
  .custom-product-view {
    flex-direction: column;
    gap: 30px 0;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  .left-column,
  .left-column .image-wrapper {
    flex: 0 0 100%;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center;
    margin: 0 auto 20px;
  }
  .left-column .image-wrapper img {
    width: 100% !important;
    height: auto !important;
  }
  .right-column {
    order: 2;
    flex: 0 0 100%;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 80px;
  }
  .product-main-info {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
}

/* ── MÓVIL HORIZONTAL (≤768px) ── */
@media (max-width: 768px) {
  /* fuerza página a 100% y sin padding lateral */
  .page-main,
  .columns,
  .column.main {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    margin: 0 auto !important;
  }

  .custom-product-view {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    padding: 20px !important;      /* del segundo archivo */
    box-sizing: border-box;
    margin: 0 auto 20px !important;
    gap: 20px !important;
  }
  .left-column,
  .right-column {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  .left-column {
    order: 1 !important;
    margin-bottom: 20px !important;
  }
  .right-column {
    order: 2 !important;
    margin-top: 16px !important;
    background-color: #fafafa;
  }
  .right-column .product-main-info {
    padding: 24px 16px;
    box-shadow: none;
    border: 1px solid rgba(0,0,0,0.05);
  }
  .custom-icons-fullwidth {
    width: 100% !important;
    padding: 20px !important;      /* del segundo archivo */
    box-sizing: border-box;
    margin: 0 auto 30px !important;
  }
}

/* ── MÓVIL VERTICAL (≤576px) ── */
@media only screen and (max-width: 576px) {
  /* fuerza página a 100% y sin padding lateral */
  .page-main,
  .columns,
  .column.main {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    margin: 0 auto !important;
  }

  .custom-product-view {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    padding: 20px !important;      /* del segundo archivo */
    box-sizing: border-box;
    margin: 0 auto 40px !important;
    gap: 20px !important;
  }
  .left-column,
  .right-column {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  .left-column { order: 1 !important; }
  .right-column {
    order: 2 !important;
    margin-top: 16px !important;
    background-color: #fafafa;
  }
  .right-column .product-main-info {
    padding: 24px 16px;
    box-shadow: none;
    border: 1px solid rgba(0,0,0,0.05);
  }
  .custom-icons-fullwidth {
    width: 100% !important;
    padding: 20px !important;      /* del segundo archivo */
    box-sizing: border-box;
    margin: 0 auto 20px !important;
  }
}
