/* ============================================================================
 *  DETALLE.CSS — estilos propios de la página de producto (detalle.html).
 *  Se apoya en las variables y utilidades de styles.css (misma paleta, mismos
 *  botones, mismo header/footer/sticky-cta).
 * ============================================================================ */

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 0.92rem;
  margin-bottom: 22px; transition: color .2s ease, transform .2s ease;
}
.back-link:hover { color: var(--acento); transform: translateX(-3px); }

.detail-hero {
  position: relative; overflow: hidden;
  padding: 128px 0 44px;
  background:
    radial-gradient(60% 55% at 88% 8%, rgba(196,87,46,.07) 0%, transparent 70%),
    radial-gradient(50% 45% at 6% 90%, rgba(122,139,111,.09) 0%, transparent 70%),
    linear-gradient(180deg, #FDFBF7 0%, #F7EEE0 100%);
}
.detail-title { font-size: clamp(1.7rem, 4.6vw, 2.6rem); margin-bottom: 12px; }
.detail-hero-row { display: flex; align-items: flex-start; gap: 24px; margin-top: 28px; flex-wrap: wrap; }
.detail-cover-wrap { flex-shrink: 0; position: relative; }
.detail-cover-wrap::after {
  content: ''; position: absolute; bottom: -14px; left: 8%; width: 84%; height: 18px;
  background: rgba(45,42,38,.28); filter: blur(14px); border-radius: 50%;
}
.detail-cover {
  position: relative; width: 118px; border-radius: 8px; box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,.06); transform: rotate(-2deg);
  transition: transform .35s var(--ease);
}
.detail-cover-wrap:hover .detail-cover { transform: rotate(0deg) scale(1.03); }
.detail-hero-meta { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.detail-hero-meta .price-block { margin-bottom: 0; }
.detail-hero-meta .trust-row { margin-top: 2px; }

/* Sub-nav de anclas dentro de la ficha (Ficha técnica / Índice / Comparativa) */
.detail-subnav {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 36px;
}
.detail-subnav a {
  background: #fff; border: 1.5px solid var(--rule); border-radius: 999px;
  padding: 9px 18px; font-size: 0.86rem; font-weight: 700; color: var(--ink-soft);
  text-decoration: none; transition: all .25s var(--ease); box-shadow: var(--shadow-sm);
}
.detail-subnav a:hover { border-color: var(--acento); color: var(--acento); transform: translateY(-2px); }

/* ---------- FICHA TÉCNICA ---------- */
.spec-grid { display: grid; grid-template-columns: 1fr; gap: 2px; background: var(--rule); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); }
.spec-item {
  background: #fff; padding: 16px 20px; display: flex; align-items: flex-start; gap: 12px;
  transition: background .25s ease, transform .25s ease;
}
.spec-item:hover { background: var(--cream); transform: translateY(-1px); }
.spec-icon {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--cream), var(--cream-2));
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.spec-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.spec-label { font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: var(--sage); }
.spec-valor { font-size: 0.98rem; font-weight: 600; color: var(--ink); line-height: 1.4; }

/* ---------- BUSCADOR DEL ÍNDICE ---------- */
.index-search { margin-bottom: 28px; }
#index-search-input {
  width: 100%; max-width: 480px; font-family: var(--sans); font-size: 1rem;
  padding: 14px 20px; border-radius: 999px; border: 1.5px solid var(--rule);
  background: #fff; color: var(--ink); transition: border-color .2s ease, box-shadow .2s ease;
}
#index-search-input:focus { outline: none; border-color: var(--acento); box-shadow: 0 0 0 4px rgba(196,87,46,.12); }
#index-search-input::placeholder { color: var(--ink-soft); }

/* ---------- ACORDEÓN DEL ÍNDICE ---------- */
.index-accordion { display: flex; flex-direction: column; gap: 10px; }
.index-loading, .index-empty { color: var(--ink-soft); font-style: italic; padding: 20px 0; }
.index-chapter {
  background: #fff; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden;
  transition: box-shadow .3s ease, border-color .3s ease;
}
.index-chapter.open { border-color: rgba(196,87,46,.35); box-shadow: var(--shadow-sm); }
.index-chapter-head {
  width: 100%; display: flex; align-items: center; gap: 14px;
  background: none; border: none; cursor: pointer; padding: 17px 20px;
  font-family: var(--sans); text-align: left;
}
.index-chapter-ico {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--cream), var(--cream-2));
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.index-chapter-name { font-weight: 700; font-size: 1rem; flex: 1; }
.index-chapter-count { font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.index-chapter.open .faq-icon { transform: rotate(45deg); background: var(--acento); color: #fff; }
.index-chapter-body { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.index-recipe-list {
  list-style: none; padding: 0 20px 18px; display: grid; grid-template-columns: 1fr; gap: 8px 20px;
}
.index-recipe-list li {
  font-size: 0.92rem; color: var(--ink-soft); padding-left: 16px; position: relative; line-height: 1.4;
}
.index-recipe-list li::before {
  content: '·'; position: absolute; left: 0; top: 0; color: var(--acento); font-weight: 800;
}

/* ---------- SUBTÍTULOS DE COMPARATIVA ---------- */
.compare-subtitle { font-size: 1.2rem; margin-bottom: 16px; }

@media (min-width: 640px) {
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .index-recipe-list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .spec-grid { grid-template-columns: repeat(3, 1fr); }
  .index-recipe-list { grid-template-columns: repeat(3, 1fr); }
}
