@import './variables.css';

/* ─── Page Wrapper ─── */
.product-page {
  padding-top: 2rem;
  padding-bottom: 5rem;
  background: var(--white);
}

/* Breadcrumb */
#breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2rem;
  font-size: var(--text-sm);
  color: var(--gray-500);
}
#breadcrumb a {
  color: var(--gray-600);
  font-weight: 500;
  transition: color 0.15s ease;
}
#breadcrumb a:hover {
  color: var(--primary);
}
#breadcrumb span {
  color: var(--gray-900);
  font-weight: 700;
}

/* ─── Product Main Grid ─── */
.product-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3.5rem;
  align-items: start;
  margin-bottom: 4rem;
}

/* ─── Gallery Column ─── */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.product-main-img-wrapper {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.product-main-img-wrapper:hover {
  border-color: var(--yellow);
  box-shadow: var(--shadow-lg);
}

.product-main-img {
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #ffffff 40%, #f8fafc 100%);
}

.product-main-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2.5rem;
  transition: transform 0.4s ease;
}

.product-main-img-wrapper:hover img {
  transform: scale(1.03);
}

.gallery-zoom-badge {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(8, 24, 40, 0.75);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
}

.product-thumbnails {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.product-thumb {
  width: 75px;
  height: 75px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--gray-200);
  cursor: pointer;
  overflow: hidden;
  background: #ffffff;
  transition: all 0.2s ease;
}

.product-thumb.active {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(181, 205, 44, 0.2);
}

.product-thumb:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.4rem;
}

/* ─── Tarjeta de Confianza y Garantía (Debajo de la foto) ─── */
.product-trust-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
}

.product-trust-card:hover {
  border-color: var(--yellow);
  box-shadow: var(--shadow-md);
}

.trust-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--primary);
  font-weight: 800;
  font-size: var(--text-base);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1.5px solid var(--gray-200);
}

.trust-header svg {
  color: var(--yellow);
  flex-shrink: 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #ffffff;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
}

.trust-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.trust-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.trust-text strong {
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--gray-900);
}

.trust-text span {
  font-size: 0.75rem;
  color: var(--gray-600);
  line-height: 1.35;
}

/* ─── Product Info Column ─── */
.product-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.product-meta-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Category Tag */
.product-category-tag {
  display: inline-flex;
  align-items: center;
  background: var(--yellow);
  color: var(--gray-900);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: none;
  letter-spacing: normal;
  box-shadow: var(--shadow-sm);
}

/* Stock Badge */
.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #DCFCE7;
  color: #15803D;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid #BBF7D0;
}

.stock-dot {
  width: 7px;
  height: 7px;
  background: #16A34A;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

/* Product Name */
.product-name {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
}

/* ─── Price Container ─── */
.product-price-large {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
}

.product-price-large:hover {
  border-color: var(--yellow);
  box-shadow: var(--shadow-md);
}

.price-main-large {
  font-size: 2.35rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.03em;
}

.price-main-large .cur {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--primary);
  margin-right: 0.25rem;
}

.price-original-large {
  font-size: var(--text-base);
  color: var(--gray-400);
  text-decoration: line-through;
  font-weight: 500;
}

.price-discount-badge {
  background: var(--yellow);
  color: var(--gray-900);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.price-request-large {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 800;
}

/* ─── Quick Highlights Chips ─── */
.product-quick-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.highlight-chip {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition: border-color 0.2s ease;
}

.highlight-chip:hover {
  border-color: var(--yellow);
  background: #ffffff;
}

.highlight-chip .hl-label {
  font-size: 0.7rem;
  color: var(--gray-500);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.highlight-chip .hl-value {
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

/* Description Box */
.product-description-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}

.product-description-box h4 {
  font-size: var(--text-sm);
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 0.5rem 0;
}

.product-description {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: 1.65;
  margin: 0;
}

/* ─── WhatsApp CTA Box ─── */
.whatsapp-cta-box {
  background: #ffffff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
}

.whatsapp-cta-box:hover {
  border-color: var(--yellow);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.wa-cta-header {
  margin-bottom: 1.25rem;
}

.wa-badge-pulse {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  background: rgba(0, 57, 108, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.wa-cta-header h3 {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 0.35rem 0;
  line-height: 1.3;
}

.wa-cta-header p {
  font-size: var(--text-xs);
  color: var(--gray-600);
  margin: 0;
  line-height: 1.5;
}

/* Botón WhatsApp — Azul Institucional Nexolar (#00396C) según AGENTS.md */
.btn-whatsapp-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: var(--text-base);
  padding: 0.95rem 1.75rem;
  border-radius: var(--radius-full);
  border: none;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-whatsapp-primary:hover {
  background: var(--primary-dark);
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-whatsapp-primary svg {
  color: #25D366; /* WhatsApp icon accent */
  flex-shrink: 0;
}

/* ─── Extended Info Tabs (Ancho Completo) ─── */
.product-extended-section {
  border-top: 1.5px solid var(--gray-200);
  padding-top: 3rem;
  margin-top: 2rem;
  margin-bottom: 4rem;
}

.product-tabs-header {
  display: flex;
  gap: 0.75rem;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-500);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--yellow);
  font-weight: 800;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Specs Card */
.product-specs-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.specs-card-header {
  background: var(--primary-dark);
  color: #ffffff;
  padding: 1.25rem 1.5rem;
}

.specs-card-header h4 {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 800;
  color: #ffffff;
}

.specs-subtitle {
  font-size: var(--text-xs);
  color: var(--gray-300);
  display: block;
  margin-top: 0.25rem;
}

.specs-list {
  display: flex;
  flex-direction: column;
}

.spec-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: var(--text-sm);
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
}

.spec-row:nth-child(even) {
  background: #F8FAFC;
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  color: var(--gray-600);
  min-width: 180px;
  flex-shrink: 0;
  font-weight: 600;
}

.spec-value {
  color: var(--gray-900);
  font-weight: 800;
}

/* Extended Text & Cards */
.extended-text-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.extended-text-card h3 {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 0.85rem 0;
}

.extended-text-card p {
  font-size: var(--text-base);
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.adv-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: border-color 0.2s ease;
}

.adv-card:hover {
  border-color: var(--yellow);
}

.adv-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.adv-card h4 {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--gray-900);
  margin: 0 0 0.35rem 0;
}

.adv-card p {
  font-size: var(--text-xs);
  color: var(--gray-600);
  margin: 0;
  line-height: 1.5;
}

.compatibility-box {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.compat-item {
  background: #F8FAFC;
  border-left: 4px solid var(--yellow);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-size: var(--text-sm);
  color: var(--gray-700);
}

.compat-item strong {
  color: var(--gray-900);
}

/* ─── Related Products Section ─── */
.related-section {
  border-top: 1.5px solid var(--gray-200);
  padding-top: 3rem;
}

.related-header {
  margin-bottom: 2rem;
}

.related-header .section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--primary);
  margin-top: 0.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* ─── Responsive Media Queries ─── */
@media (max-width: 992px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .product-name {
    font-size: var(--text-2xl);
  }
  .price-main-large {
    font-size: 2rem;
  }
  .spec-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .spec-label {
    min-width: auto;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .product-tabs-header {
    gap: 0.25rem;
  }
  .tab-btn {
    padding: 0.75rem 1rem;
    font-size: var(--text-xs);
  }
}
