/* ==========================================================================
   TIENDA (tienda.html) y PRODUCTO (producto.html)
   Archivo propio: usa solo variables reales de styles.css con respaldo.
   Reutiliza el aspecto del blog (css/blog.css).
   ========================================================================== */

.store-page { padding-top: 8px; padding-bottom: 72px; }

/* ---------- Cabecera + buscador (mismo estilo que el blog) ---------- */
.store-page .blog-hero { margin-bottom: 22px; }

/* ---------- Pestañas Productos / Packs ---------- */
.store-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 22px;
  background: #fff;
  border: 1px solid var(--ink-100, #e8edf5);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(13, 43, 94, 0.06);
}
.store-tab {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 42px;
  padding: 8px 22px;
  font: inherit; font-size: 0.93rem; font-weight: 700;
  color: var(--ink-700, #33415c);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.store-tab:hover { background: var(--blue-50, #f4f8ff); }
.store-tab[aria-selected="true"] { background: var(--blue-700, #1a4894); color: #fff; }
.store-tab:focus-visible { outline: 3px solid rgba(51, 102, 204, 0.35); outline-offset: 2px; }
.store-tab-count {
  min-width: 22px; height: 22px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  background: var(--blue-100, #e8f0ff); color: var(--blue-700, #1a4894);
}
.store-tab[aria-selected="true"] .store-tab-count { background: rgba(255, 255, 255, 0.22); color: #fff; }
.store-panel[hidden] { display: none; }

/* ---------- Tarjetas de producto / pack ---------- */
.store-grid,
.store-featured-grid { display: grid; gap: 24px; }
.store-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.store-featured-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); margin-bottom: 34px; }

.store-card {
  display: flex; flex-direction: column;
  overflow: hidden;
  color: inherit; text-decoration: none;
  background: #fff;
  border: 1px solid var(--ink-100, #e8edf5);
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(13, 43, 94, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.store-card:hover,
.store-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--blue-200, #aaccff);
  box-shadow: 0 16px 32px rgba(13, 43, 94, 0.14);
  outline: none;
}
.store-card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--blue-50, #f4f8ff); }
.store-card-image { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.store-card:hover .store-card-image { transform: scale(1.04); }
.store-card-image-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--blue-100, #e8f0ff), var(--yellow-100, #fff6dd));
}
.store-card-flag {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700;
  color: #4a3200; background: var(--yellow-500, #ffc72c);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.store-card-flag.is-warn { background: #fde68a; }
.store-card-content { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 16px; }
.store-card-header { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.store-card-cat {
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.74rem; font-weight: 700;
  color: var(--blue-700, #1a4894); background: var(--blue-100, #e8f0ff);
}
.store-card-cat.is-pack { color: #4a3200; background: var(--yellow-100, #fff6dd); }
.store-card-title {
  margin: 0 0 6px;
  font-family: var(--font-display, inherit);
  font-size: 1.05rem; font-weight: 700; line-height: 1.3;
  color: var(--ink-900, #0f172a);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.store-card-desc {
  margin: 0 0 14px;
  font-size: 0.88rem; line-height: 1.5; color: var(--ink-600, #475569);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.store-card-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--ink-100, #e8edf5);
  font-size: 0.8rem; color: var(--ink-500, #64748b);
}
.store-card-price {
  font-family: var(--font-display, inherit);
  font-size: 1.2rem; font-weight: 700; color: var(--blue-800, #123a7a);
}
.store-featured-grid .store-card-media { aspect-ratio: 16 / 9; }
.store-featured-grid .store-card-title { font-size: 1.2rem; }

/* ---------- Invitación a la membresía ---------- */
.store-cta-section { margin-top: 48px; }
.store-cta {
  padding: 34px 28px; text-align: center; color: #fff;
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 199, 44, 0.25), transparent 45%),
    linear-gradient(135deg, var(--blue-900, #0d2b5e), var(--blue-700, #1a4894));
  box-shadow: 0 14px 34px rgba(13, 43, 94, 0.22);
}
.store-cta h2 { margin: 0 0 8px; color: #fff; font-family: var(--font-display, inherit); font-size: 1.5rem; }
.store-cta p { margin: 0 auto 18px; max-width: 52ch; color: rgba(255, 255, 255, 0.85); }
.store-cta .btn { display: inline-flex; }

@media (max-width: 640px) {
  .store-tabs { display: flex; width: 100%; }
  .store-tab { flex: 1; justify-content: center; padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .store-card, .store-card-image { transition: none; }
}

/* ==========================================================================
   PÁGINA DE UN PRODUCTO  (body.page-product)
   ========================================================================== */
.page-product .product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-top: 10px;
}
.page-product .product-gallery { position: sticky; top: 90px; }
.page-product .product-main-image {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--blue-50, #f4f8ff);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(13, 43, 94, 0.14);
}
.page-product .product-main-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-product .product-image-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; font-size: 5rem;
  background: linear-gradient(135deg, var(--blue-100, #e8f0ff), var(--yellow-100, #fff6dd));
}
.page-product .product-thumbnails { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.page-product .product-thumbnail {
  width: 72px; height: 72px; object-fit: cover; cursor: pointer;
  border: 2px solid transparent; border-radius: 12px; opacity: 0.75;
  transition: opacity 0.15s, border-color 0.15s;
}
.page-product .product-thumbnail:hover { opacity: 1; }
.page-product .product-thumbnail.active { opacity: 1; border-color: var(--blue-700, #1a4894); }

.page-product .product-info { min-width: 0; }
.page-product .product-category {
  display: inline-block; margin-bottom: 12px; padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--blue-700, #1a4894); background: var(--blue-100, #e8f0ff);
}
.page-product .product-info h1 {
  margin: 0 0 12px;
  font-family: var(--font-display, inherit);
  font-size: clamp(1.7rem, 3.6vw, 2.3rem); line-height: 1.15;
  color: var(--ink-900, #0f172a);
}
.page-product .product-price {
  margin-bottom: 14px;
  font-family: var(--font-display, inherit);
  font-size: 2rem; font-weight: 700; color: var(--blue-800, #123a7a);
}
.page-product .product-short-desc { margin-bottom: 18px; font-size: 1.02rem; line-height: 1.65; color: var(--ink-700, #33415c); }
.page-product .product-stock-info { margin-bottom: 16px; }
.page-product .product-actions {
  margin: 20px 0;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--ink-100, #e8edf5);
  border-radius: 18px;
  box-shadow: 0 2px 10px rgba(13, 43, 94, 0.06);
}
.page-product .product-actions .btn { display: flex; justify-content: center; width: 100%; }
.page-product .product-actions p { margin: 12px 0 0; text-align: center; font-size: 0.84rem; color: var(--ink-500, #64748b); }
.page-product .product-actions .btn + .btn,
.page-product .product-actions p + .btn { margin-top: 10px; }
.page-product .product-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.page-product .tag {
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--ink-700, #33415c); background: var(--ink-100, #e8edf5);
}
.page-product .alert { padding: 12px 16px; border-radius: 12px; font-size: 0.92rem; }
.page-product .alert-success { background: #e8f8ef; color: #14663a; }
.page-product .alert-info { background: var(--blue-50, #f4f8ff); color: var(--blue-800, #123a7a); }
.page-product .alert-warning { background: var(--yellow-100, #fff6dd); color: #7a5300; }

.page-product .product-description {
  max-width: 820px; margin-top: 44px; padding: 26px 30px;
  background: #fff;
  border: 1px solid var(--ink-100, #e8edf5);
  border-radius: 18px;
  font-size: 1.04rem; line-height: 1.75; color: var(--ink-800, #1e293b);
}
.page-product .product-description h2 { margin: 0 0 14px; font-family: var(--font-display, inherit); font-size: 1.4rem; color: var(--ink-900, #0f172a); }
.page-product .product-description ul { list-style: disc; padding-left: 1.5em; }
.page-product .product-description ol { list-style: decimal; padding-left: 1.5em; }
.page-product .product-description img { max-width: 100%; height: auto; border-radius: 12px; }
.page-product .product-description a { color: var(--blue-600, #2158b8); text-decoration: underline; }
.page-product #included-articles-section h2,
.page-product #related-products-section h2 { margin: 44px 0 16px; font-family: var(--font-display, inherit); font-size: 1.3rem; color: var(--ink-900, #0f172a); }
.page-product .empty-state { text-align: center; padding: 48px 20px; }
.page-product .empty-state .empty-icon { font-size: 2.6rem; }
.page-product .skeleton-image-large,
.page-product .skeleton-title,
.page-product .skeleton-text {
  border-radius: 14px;
  background: linear-gradient(90deg, #eef2f8 25%, #f7f9fc 50%, #eef2f8 75%);
  background-size: 200% 100%;
  animation: blog-shimmer 1.4s ease-in-out infinite;
}
.page-product .skeleton-image-large { height: 320px; margin-bottom: 18px; }
.page-product .skeleton-title { height: 36px; width: 60%; margin-bottom: 12px; }
.page-product .skeleton-text { height: 14px; margin-bottom: 10px; }

@media (max-width: 860px) {
  .page-product .product-layout { grid-template-columns: 1fr; gap: 24px; }
  .page-product .product-gallery { position: static; }
}
