/* ===============================================
    Estilos para Atributos de Producto
    - Marca, materiales, colores, medidas
    - Mínimo por caja
    - Botón de descarga PDF
------------------------*/

.product-attributes-section {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 10px;
  border-left: 4px solid #004ECC;
}

/* Item de atributo */
.product-attribute-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e8e8e8;
}

.product-attribute-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Label del atributo */
.attribute-label {
  min-width: 140px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
  font-size: 15px;
}

.attribute-label i {
  color: #004ECC;
  font-size: 16px;
}

.attribute-value {
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* ========== MARCA ========== */
.brand-badge {
  display: inline-block;
  background: linear-gradient(135deg, #004ECC 0%, #0066FF 100%);
  color: white;
  padding: 8px 20px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  box-shadow: 0 3px 10px rgba(0, 78, 204, 0.3);
  transition: all 0.3s ease;
}

.brand-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 78, 204, 0.4);
}

/* ========== MATERIALES ========== */
.material-tag {
  display: inline-block;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.material-tag.primary {
  background: #004ECC;
  color: white;
  border: 2px solid #004ECC;
}

.material-tag.secondary {
  background: white;
  color: #004ECC;
  border: 2px solid #004ECC;
}

.material-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* ========== SELECTOR DE COLORES ========== */
.color-selector {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.color-option {
  cursor: pointer;
  position: relative;
}

.color-option input[type="radio"] {
  display: none;
}

.color-circle {
  display: block;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-circle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.color-option input[type="radio"]:checked+.color-circle {
  border-color: #004ECC;
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 78, 204, 0.4);
}

.color-option input[type="radio"]:checked+.color-circle::before {
  transform: translate(-50%, -50%) scale(1);
}

.color-circle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Tooltip para colores */
.color-circle::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: #333;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.color-option:hover .color-circle::after {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

/* ========== SELECTOR DE MEDIDAS ========== */
.size-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.size-option {
  cursor: pointer;
}

.size-option input[type="radio"] {
  display: none;
}

.size-button {
  display: inline-block;
  padding: 10px 20px;
  border: 2px solid #d0d0d0;
  border-radius: 25px;
  background: white;
  color: #666;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: 70px;
  text-align: center;
}

.size-option input[type="radio"]:checked+.size-button {
  background: #004ECC;
  color: white;
  border-color: #004ECC;
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(0, 78, 204, 0.3);
}

.size-button:hover {
  border-color: #004ECC;
  color: #004ECC;
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.size-option input[type="radio"]:checked+.size-button:hover {
  color: white;
}

/* ========== MÍNIMO POR CAJA ========== */
.min-box-badge {
  display: inline-flex;
  align-items: center;
  background: #fff3cd;
  color: #856404;
  padding: 8px 16px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  border: 2px solid #ffc107;
  gap: 8px;
}

.min-box-badge::before {
  content: '📦';
  font-size: 18px;
}

/* ========== CONTENEDOR DE BOTONES DE ACCIÓN ========== */
.product-action-buttons {
  text-align: center;
  width: 100%;
}

/* ========== BOTÓN DESCARGA PDF ========== */
.btn-download-pdf {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  padding: 14px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
  border: none;
  cursor: pointer;
  flex: 1;
  justify-content: center;
  min-width: 200px;
}

/* Variante del botón en la parte superior */
.btn-download-pdf-top {
  flex: 0 0 auto;
  min-width: auto;
  padding: 10px 20px;
  font-size: 14px;
  white-space: nowrap;
}

.btn-download-pdf-top i {
  font-size: 16px;
}

.btn-download-pdf i {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.btn-download-pdf:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
  text-decoration: none;
  color: white;
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

.btn-download-pdf:hover i {
  transform: scale(1.2) rotate(-5deg);
}

.btn-download-pdf:active {
  transform: translateY(-1px);
}

/* ========== BOTÓN COMPRAR ========== */
.btn-add-to-cart {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #FFB41D 0%, #ecaf34 100%);
  color: white;
  padding: 14px 25px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 78, 204, 0.3);
  border: none;
  cursor: pointer;
  flex: 1;
  justify-content: center;
  min-width: 200px;
}

.btn-add-to-cart i {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.btn-add-to-cart:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 78, 204, 0.4);
  text-decoration: none;
  color: white;
  background: linear-gradient(135deg, #0066FF 0%, #0080FF 100%);
}

.btn-add-to-cart:hover i {
  transform: scale(1.2);
  animation: cartBounce 0.5s ease;
}

.btn-add-to-cart:active {
  transform: translateY(-1px);
}

@keyframes cartBounce {

  0%,
  100% {
    transform: scale(1.2);
  }

  50% {
    transform: scale(1.4);
  }
}

/* Efecto de pulso en el botón PDF */
@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
  }

  50% {
    box-shadow: 0 4px 25px rgba(220, 53, 69, 0.5);
  }
}

.btn-download-pdf i {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.btn-download-pdf:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
  text-decoration: none;
  color: white;
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

.btn-download-pdf:hover i {
  transform: scale(1.2) rotate(-5deg);
}

.btn-download-pdf:active {
  transform: translateY(-1px);
}

/* Efecto de pulso en el botón PDF */
@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
  }

  50% {
    box-shadow: 0 4px 25px rgba(220, 53, 69, 0.5);
  }
}

.btn-download-pdf:hover {
  animation: pulse 2s infinite;
}

.product-look-preview-plus {
  border-radius: 25px;
  overflow: hidden;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991px) {
  .product-attributes-section {
    padding: 20px;
  }

  .product-attribute-item {
    flex-direction: column;
    gap: 10px;
  }

  .attribute-label {
    min-width: auto;
  }

  .product-action-buttons {
    flex-direction: column;
  }

  .btn-download-pdf,
  .btn-add-to-cart {
    min-width: auto;
  }

  /* Botón superior en responsive */
  .btn-download-pdf-top {
    padding: 8px 15px;
    font-size: 13px;
  }

  .btn-download-pdf-top span {
    display: none;
  }

  .btn-download-pdf-top i {
    margin-right: 0;
    font-size: 18px;
  }

  .btn-download-pdf-top::after {
    content: ' PDF';
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .color-circle {
    width: 40px;
    height: 40px;
  }

  .size-button {
    padding: 8px 15px;
    min-width: 60px;
    font-size: 13px;
  }

  .btn-download-pdf,
  .btn-add-to-cart {
    padding: 12px 20px;
    font-size: 14px;
    min-width: auto;
  }

  .brand-badge {
    padding: 6px 15px;
    font-size: 13px;
  }

  .material-tag {
    padding: 5px 12px;
    font-size: 12px;
  }

  .product-action-buttons {
    flex-direction: column;
  }

  .content-area-sec-title h5 {
    font-size: 18px;
  }
}

/* ========== BOTÓN WEB SHARE API NATIVO ========== */
.native-share-btn {
  height: 48px;
  background: linear-gradient(135deg, #004ECC 0%, #0066FF 100%);
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 78, 204, 0.3);
  font-size: 20px;
  padding: 10px 25px;
}

.native-share-btn:hover,
.native-share-btn:active {
  background: linear-gradient(135deg, #0066FF 0%, #004ECC 100%);
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(0, 78, 204, 0.4);
}

.native-share-btn i {
  font-size: 22px;
  line-height: 1;
}

/* Animación de pulso para llamar la atención */
@keyframes shareButtonPulse {
  0% {
    box-shadow: 0 4px 12px rgba(0, 78, 204, 0.3);
  }

  50% {
    box-shadow: 0 4px 20px rgba(0, 78, 204, 0.5);
  }

  100% {
    box-shadow: 0 4px 12px rgba(0, 78, 204, 0.3);
  }
}

.native-share-btn {
  animation: shareButtonPulse 2s ease-in-out infinite;
}

/* ========== ANIMACIONES ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.product-attribute-item {
  animation: fadeInUp 0.5s ease-out;
}

.product-attribute-item:nth-child(1) {
  animation-delay: 0.1s;
}

.product-attribute-item:nth-child(2) {
  animation-delay: 0.2s;
}

.product-attribute-item:nth-child(3) {
  animation-delay: 0.3s;
}

.product-attribute-item:nth-child(4) {
  animation-delay: 0.4s;
}

.product-attribute-item:nth-child(5) {
  animation-delay: 0.5s;
}

.product-attribute-item:nth-child(6) {
  animation-delay: 0.6s;
}

/* ========== REORDENAMIENTO RESPONSIVE ========== */
/* En mobile: título y compartir primero, luego galería, luego características */
@media (max-width: 991px) {
  .summary.entry-summary {
    padding-left: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 20px;
  }

  /* Espaciado especial para la galería en mobile cuando viene después del header */
  .order-2.order-lg-1 {
    margin-top: 0;
    margin-bottom: 30px;
  }

  /* Ajustar margen superior del título en mobile */
  .product_title.entry-title {
    margin-top: 0;
  }

  /* Espaciado de la descripción en mobile */
  .product-details__short-description {
    margin-bottom: 20px;
  }

  /* Las características aparecen después de la galería en mobile */
  .order-3 .product-attributes-section {
    margin-top: 0 !important;
  }
}

/* Asegurar que en desktop el orden sea correcto */
@media (min-width: 992px) {
  .summary.entry-summary {
    padding-left: 50px;
  }
}

/* ========== FIX EASYZOOM EN RESPONSIVE ========== */
/* Desactivar zoom en mobile para evitar activación con scroll */
@media (max-width: 991px) {
  .easyzoom {
    pointer-events: auto !important;
  }

  .easyzoom a {
    cursor: default !important;
    pointer-events: none !important;
  }

  .easyzoom img {
    pointer-events: none !important;
  }

  /* Ocultar el overlay de zoom en mobile */
  .easyzoom-flyout {
    display: none !important;
  }

  /* Prevenir que se active el zoom */
  .easyzoom.is-ready,
  .easyzoom.is-loading {
    pointer-events: none !important;
  }

  /* Asegurar que las imágenes sean estáticas en mobile */
  .product-look-preview-plus img {
    pointer-events: none !important;
    touch-action: pan-y !important;
  }
}

/* En desktop permitir el zoom normal */
@media (min-width: 992px) {
  .easyzoom {
    pointer-events: auto !important;
  }

  .easyzoom a {
    cursor: zoom-in !important;
    pointer-events: auto !important;
  }
}