/* Ficha de producto — alineado con index-store */

:root {
  --store-surface: #f4f6f8;
  --store-card: #ffffff;
  --store-border: rgba(15, 23, 42, 0.08);
  --store-text: #1e293b;
  --store-muted: #64748b;
  --store-accent: #0f766e;
  --store-accent-hover: #0d9488;
  --store-radius: 12px;
  --store-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --store-header-offset: 5.25rem;
}

@media (max-width: 991px) {
  :root {
    --store-header-offset: 4.75rem;
  }
}

body.store-detalle {
  background: var(--store-surface);
}

.store-detail-wrap {
  padding-bottom: 3rem;
}

/* Barra superior tipo breadcrumb + título */
.store-detail-top {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f766e 100%);
  color: #f8fafc;
  padding-top: calc(1.25rem + var(--store-header-offset));
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.store-detail-top::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.25);
  pointer-events: none;
}

.store-detail-top .container {
  position: relative;
  z-index: 1;
}

.store-detail-breadcrumb {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-size: 0.85rem;
  opacity: 0.9;
}

.store-detail-breadcrumb a {
  color: #a5f3fc;
  text-decoration: none;
}

.store-detail-breadcrumb a:hover {
  text-decoration: underline;
}

.store-detail-breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  opacity: 0.6;
}

/* Especificidad alta: el tema asigna color oscuro a h1 y puede empatar con .store-detail-top h1 */
body.store-detalle header.store-detail-top h1 {
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  font-weight: 750;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 18px rgba(2, 6, 23, 0.65);
  color: #ffffff;
}

.store-detail-breadcrumb li[aria-current="page"] {
  color: #f1f5f9;
}

/* Galería */
.store-detail-gallery-col {
  margin-bottom: 2rem;
}

@media (min-width: 992px) {
  .store-detail-gallery-col {
    position: sticky;
    top: calc(var(--store-header-offset) + 0.75rem);
    align-self: flex-start;
  }
}

.store-detail-gallery-card {
  background: var(--store-card);
  border-radius: var(--store-radius);
  border: 1px solid var(--store-border);
  box-shadow: var(--store-shadow);
  padding: 1rem;
}

.store-detail-gallery-card .xzoom-container {
  margin: 0;
}

.store-detail-gallery-card #xzoom-magnific {
  border-radius: 8px;
  max-height: 420px;
  width: 100%;
  object-fit: contain;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.store-detail-gallery-card .xzoom-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  justify-content: center;
}

.store-detail-gallery-card .xzoom-thumbs a {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.15s ease;
}

.store-detail-gallery-card .xzoom-thumbs a:hover,
.store-detail-gallery-card .xzoom-thumbs a.xactive {
  border-color: var(--store-accent);
}

.store-detail-gallery-card .xzoom-gallery5 {
  width: 72px !important;
  height: 72px !important;
  object-fit: cover;
  border-radius: 6px;
}

/* Panel derecho */
.store-detail-panel {
  background: var(--store-card);
  border-radius: var(--store-radius);
  border: 1px solid var(--store-border);
  box-shadow: var(--store-shadow);
  padding: 1.5rem 1.75rem;
}

.store-detail-panel__short {
  font-size: 1rem;
  color: var(--store-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.store-detail-price {
  margin-bottom: 1.25rem;
}

.store-detail-price__old {
  font-size: 1rem;
  color: var(--store-muted);
  text-decoration: line-through;
  margin-right: 0.5rem;
}

.store-detail-price__current {
  font-size: 1.65rem;
  font-weight: 700;
  color: #b91c1c;
  letter-spacing: -0.02em;
}

.store-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.store-detail-actions .store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.store-detail-actions .store-btn--primary {
  background: var(--store-accent);
  color: #fff;
}

.store-detail-actions .store-btn--primary:hover {
  background: var(--store-accent-hover);
  color: #fff;
}

.store-detail-actions .store-btn--outline {
  background: #1e293b;
  color: #fff;
}

.store-detail-actions .store-btn--outline:hover {
  background: #334155;
  color: #fff;
}

.store-detail-actions .store-btn--whatsapp {
  background: #25d366;
  color: #fff;
}

.store-detail-actions .store-btn--whatsapp:hover {
  background: #1ebe57;
  color: #fff;
}

/* Bloques de contenido largo */
.store-detail-content {
  background: var(--store-card);
  border-radius: var(--store-radius);
  border: 1px solid var(--store-border);
  box-shadow: var(--store-shadow);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.store-detail-content h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--store-text);
  margin: 0 0 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid rgba(15, 118, 110, 0.25);
}

.store-detail-content .store-detail-prose {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--store-text);
}

.store-detail-content .store-detail-prose img {
  max-width: 100%;
  height: auto;
}

.store-detail-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  margin-top: 0.5rem;
}

.store-detail-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Productos relacionados */
.store-related {
  margin-top: 2rem;
}

.store-related h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--store-text);
}

.store-related-card {
  background: var(--store-card);
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius);
  box-shadow: var(--store-shadow);
  overflow: hidden;
  height: 100%;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.store-related-card:hover {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

.store-related-card a {
  text-decoration: none;
  color: inherit;
}

.store-related-card__img-wrap {
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  display: block;
}

.store-related-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.store-related-card__body {
  padding: 0.85rem 1rem 1rem;
}

.store-related-card__title {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  color: var(--store-text);
}

.store-related-card__price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #b91c1c;
  margin-top: 0.35rem;
}
