/* CafeterasAutomaticas.com — Theme: Barista v2.1 — Generated: 2026-08-24 — ID: CAF3-assetsarticle */
/* ==========================================================================
   Article CSS - HeyOferton.com
   Basado en el diseño original de los proyectos individuales
   Incluye: layout grid, sidebar ToC, modal móvil, sticky buy bar, widgets
   ========================================================================== */

/* Already loaded from public.css: root vars, header, footer, animations */

/* ============ READING PROGRESS BAR ============ */
#reading-progress {
  position: fixed; top: 0; left: 0; height: 4px;
  background: var(--gradient-accent); width: 0%; z-index: 1000;
  transition: width 0.1s ease-out;
}

/* ============ GEO: DIRECT-ANSWER SNIPPETS ============ */
.direct-answer {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(99, 102, 241, 0.06);
  border-left: 3px solid var(--accent-primary, #6366f1);
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 1.5rem 0;
  border-radius: 0 8px 8px 0;
  line-height: 1.6;
}

/* ============ LAYOUT ============ */
.layout-container {
  max-width: 1120px; margin: 1.5rem auto; padding: 0 1.25rem;
  display: grid; grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2.5rem; flex: 1; width: 100%;
}
.main-content, article { min-width: 0; width: 100%; max-width: 100%; }

@media (max-width: 1024px) {
  .layout-container { grid-template-columns: 1fr; gap: 1.5rem; margin: 1rem auto; padding: 0 1rem; max-width: 800px; }
  .sidebar-toc { display: none; }
}

/* ============ ARTICLE HEADER ============ */
.article-badge {
  display: inline-block; padding: 0.35rem 0.85rem;
  background-color: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); color: var(--accent-hover);
  font-size: 0.85rem; font-weight: 700; margin-bottom: 0.75rem;
}
.article-title {
  font-size: clamp(1.75rem, 5vw, 2.45rem); line-height: 1.28;
  font-weight: 800; letter-spacing: -0.02em; margin-bottom: 1rem;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem;
  color: var(--text-muted); font-size: 0.9rem; align-items: center;
  border-bottom: 1px solid var(--border-color); padding-bottom: 1.25rem; margin-bottom: 1.5rem;
}

/* ============ MOBILE JUMP BANNER ============ */
.mobile-jump-banner {
  display: none; background: var(--accent-primary); color: #fff;
  padding: 0.9rem 1.2rem; border-radius: var(--radius-md); margin-bottom: 1.75rem;
  align-items: center; justify-content: space-between; cursor: pointer;
  box-shadow: 0 4px 15px var(--accent-glow); font-weight: 700; font-size: 1rem;
}
@media (max-width: 1024px) { .mobile-jump-banner { display: flex; } }

/* Fix: layout-container needs top padding for fixed header */
.layout-container { padding-top: 5rem; }

/* ============ QUICK JUMP MODAL ============ */
.quick-jump-modal {
  display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(6px);
  z-index: 2000; align-items: flex-end; justify-content: center;
}
.quick-jump-modal.active { display: flex; }
.quick-jump-sheet {
  background: var(--bg-secondary); width: 100%; max-width: 550px; max-height: 85vh;
  border-radius: 24px 24px 0 0; padding: 1.5rem 1.25rem 2rem;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3); overflow-y: auto;
  display: flex; flex-direction: column;
}
.quick-jump-header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); margin-bottom: 1.25rem;
}
.quick-jump-header h3 { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); }
.quick-jump-close {
  background: var(--bg-card); border: 1px solid var(--border-hover);
  color: var(--text-primary); width: 40px; height: 40px;
  border-radius: 50%; font-size: 1.2rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.quick-jump-list { display: flex; flex-direction: column; gap: 0.75rem; }
.quick-jump-item {
  display: flex; align-items: center; gap: 0.85rem;
  background: var(--bg-card); border: 2px solid var(--border-color);
  border-radius: var(--radius-md); padding: 1rem 1.15rem;
  color: var(--text-primary); text-decoration: none;
  font-size: 1.05rem; font-weight: 700; min-height: 54px;
  transition: all 0.2s ease;
}
.quick-jump-item:hover, .quick-jump-item:active {
  background: var(--accent-primary); color: #fff; border-color: var(--accent-primary);
  transform: translateX(4px);
}
.quick-jump-item.item-buy {
  background: var(--amazon); color: #111827; border-color: var(--amazon);
}

/* ============ KEY TAKEAWAYS ============ */
.key-takeaways {
  background: var(--bg-card); border-left: 5px solid var(--accent-hover);
  padding: 1.35rem; border-radius: 0 var(--radius-md) var(--radius-md) 0; margin-bottom: 2rem;
}
.key-takeaways h3 { font-size: 1.15rem; margin-bottom: 0.75rem; color: var(--text-primary); }
.key-takeaways ul { padding-left: 1.2rem; }
.key-takeaways li { margin-bottom: 0.5rem; color: var(--text-secondary); font-size: 1rem; }

/* ============ ARTICLE BODY ============ */
.article-body h2 {
  font-size: clamp(1.4rem, 4.2vw, 1.8rem); margin: 2.5rem 0 1rem;
  font-weight: 800; color: var(--text-primary); line-height: 1.3;
}
.article-body h3 {
  font-size: clamp(1.18rem, 3.6vw, 1.35rem); margin: 1.8rem 0 0.8rem;
  font-weight: 700; color: var(--text-primary);
}
.article-body p { margin-bottom: 1.35rem; color: var(--text-secondary); font-size: 1.05rem; line-height: 1.8; }
.article-body ul { margin-bottom: 1.35rem; padding-left: 1.25rem; }
.article-body li { margin-bottom: 0.45rem; color: var(--text-secondary); }
.article-body strong { color: var(--text-primary); }
.article-body img { max-width: 100%; border-radius: var(--radius-sm); margin: 1rem 0; }

.direct-answer {
  background-color: var(--bg-card); border: 2px solid var(--border-hover);
  border-radius: var(--radius-md); padding: 1.25rem; margin: 1.4rem 0;
  box-shadow: var(--shadow-md); font-size: 1.02rem;
}

/* ============ CTA AMAZON ============ */
.cta-box-amazon {
  background: linear-gradient(135deg, rgba(255,153,0,0.12), rgba(99,102,241,0.08));
  border: 3px solid var(--amazon); border-radius: var(--radius-lg);
  padding: 2rem 1.5rem; margin: 2.75rem 0; text-align: center;
}
.cta-box-amazon h3 { font-size: clamp(1.25rem, 4vw, 1.55rem); font-weight: 800; color: var(--text-primary); margin-bottom: 0.5rem; }
.cta-price-tag { font-size: clamp(1.65rem, 5vw, 2.1rem); font-weight: 900; color: var(--amazon); margin: 0.75rem 0 1.25rem; }

.c-btn-prime {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  background-color: var(--amazon); color: #111827; font-weight: 800;
  padding: 1rem 1.8rem; border-radius: var(--radius-md); text-decoration: none;
  font-size: 1.08rem; transition: transform 0.2s, background-color 0.2s;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4); min-height: 52px; touch-action: manipulation;
}
@media (max-width: 640px) { .c-btn-prime { width: 100%; } }
.c-btn-prime:hover { transform: translateY(-2px); background-color: #fbbf24; color: #111827; }

/* Mid-article CTA */
.cta-box-mid {
  background: linear-gradient(135deg, rgba(255,153,0,0.08), rgba(99,102,241,0.06));
  border: 2px dashed var(--amazon); border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem; margin: 2rem 0; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between; gap: 1rem;
}

/* ============ STICKY BUY BAR (MOBILE) ============ */
.mobile-sticky-buy-bar {
  display: none; position: fixed; bottom: 0; left: 0; width: 100%;
  background: var(--bg-secondary); border-top: 2px solid var(--border-hover);
  padding: 0.75rem 1rem; z-index: 850;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  align-items: center; justify-content: space-between; gap: 0.75rem;
}
@media (max-width: 1024px) { .mobile-sticky-buy-bar { display: flex; } }
.mobile-bar-info { display: flex; flex-direction: column; }
.mobile-bar-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.mobile-bar-price { font-size: 1.25rem; font-weight: 900; color: var(--amazon); line-height: 1; }
.mobile-floating-buy-btn {
  background: var(--amazon); color: #111827; font-weight: 800;
  padding: 0.75rem 1.2rem; border-radius: var(--radius-sm); text-decoration: none;
  font-size: 0.95rem; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 46px;
}

/* ============ TABLES ============ */
.table-wrapper {
  display: block; width: 100%; max-width: 100%; overflow-x: auto;
  -webkit-overflow-scrolling: touch; margin: 1.75rem 0;
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
  background: var(--bg-card); box-shadow: var(--shadow-md);
}
table { width: 100%; min-width: 540px; border-collapse: collapse; text-align: left; font-size: 0.95rem; }
/* Fallback: si una tabla no tiene wrapper, forzar scroll */
.c-article-body > table, .c-article-body figure table {
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
th, td { padding: 0.95rem 1.15rem; border-bottom: 1px solid var(--border-color); }
th { background-color: var(--bg-card); font-weight: 700; color: var(--text-primary); white-space: nowrap; }
td { color: var(--text-secondary); }

/* ============ SIDEBAR ToC ============ */
.sidebar-toc { position: sticky; top: 5rem; align-self: start; }
.toc-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 1.25rem; box-shadow: var(--shadow-md);
}
.toc-title {
  font-size: 0.88rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.85rem;
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: 0.55rem; }
.toc-link {
  color: var(--text-secondary); text-decoration: none; font-size: 0.9rem;
  display: block; transition: color 0.2s; padding: 0.25rem 0;
}
.toc-link:hover, .toc-link.active { color: var(--accent-hover); font-weight: 700; }

/* ============ INTERACTIVE WIDGETS ============ */
.c-widget-box {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 1.75rem 1.5rem; margin: 2rem 0;
  box-shadow: var(--shadow-md); transition: box-shadow 0.3s, border-color 0.3s;
  width: 100%; max-width: 100%; overflow: hidden;
}
.c-widget-box:hover { border-color: var(--accent-hover); box-shadow: var(--shadow-lg); }

.c-widget-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 0.25rem 0.65rem; border-radius: 9999px;
  background: rgba(255,153,0,0.12); color: var(--amazon); margin-bottom: 0.65rem;
}
.c-widget-header h3 { font-size: clamp(1.15rem, 4vw, 1.4rem); font-weight: 700; color: var(--text-primary); margin: 0 0 0.4rem; line-height: 1.35; }
.c-widget-subtitle { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 1.4rem; }

.widget-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.widget-control { margin-bottom: 1.15rem; }
.widget-control label { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; flex-wrap: wrap; gap: 0.35rem; }
.widget-control-val { color: var(--amazon); font-weight: 700; font-size: 0.95rem; }

.widget-range-slider {
  width: 100%; height: 10px; border-radius: 5px; background: var(--border-color);
  outline: none; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: pan-y; display: block;
}
.widget-range-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--amazon); cursor: pointer; box-shadow: 0 2px 8px rgba(255,153,0,0.45); border: 2px solid #fff; transition: transform 0.15s; }
.widget-range-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.widget-range-slider::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--amazon); cursor: pointer; border: 2px solid #fff; }

.preset-buttons-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.5rem; margin-top: 0.5rem; }
@media (max-width: 500px) { .preset-buttons-group { grid-template-columns: repeat(2, 1fr); } }
.preset-btn {
  padding: 0.6rem 0.5rem; border-radius: var(--radius-sm); border: 1px solid var(--border-color);
  background: var(--bg-secondary); color: var(--text-primary); font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center;
  gap: 0.2rem; text-align: center; min-height: 48px; touch-action: manipulation;
}
.preset-btn span { font-weight: 700; }
.preset-btn small { font-size: 0.7rem; color: var(--text-muted); }
.preset-btn:hover { border-color: var(--amazon); background: rgba(255,153,0,0.12); }
.preset-btn.active { border-color: var(--amazon); background: var(--amazon); color: #fff; }
.preset-btn.active small { color: rgba(255,255,255,0.85); }

.calc-results-panel {
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); padding: 1.25rem 1rem; margin-top: 1.25rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem; text-align: center;
}
.calc-stat-card { display: flex; flex-direction: column; align-items: center; padding: 0.4rem; }
.calc-stat-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 0.25rem; }
.calc-stat-value { font-size: clamp(1.4rem, 4vw, 1.85rem); font-weight: 800; color: var(--text-primary); line-height: 1.15; }
.calc-stat-value.highlight-green { color: #10b981; }
.calc-stat-value.highlight-orange { color: var(--amazon); }

/* Material selector tabs */
.material-selector-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.5rem; margin-bottom: 1.5rem; }
@media (max-width: 600px) { .material-selector-tabs { grid-template-columns: repeat(2, 1fr); } }
.material-tab-btn {
  background: var(--bg-secondary); border: 2px solid var(--border-color);
  border-radius: var(--radius-sm); padding: 0.75rem 0.4rem; text-align: center;
  cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column;
  align-items: center; gap: 0.35rem; color: var(--text-primary); min-height: 52px; touch-action: manipulation;
}
.material-tab-btn:hover { border-color: var(--amazon); background: rgba(255,153,0,0.12); }
.material-tab-btn.active { border-color: var(--amazon); background: rgba(255,153,0,0.12); box-shadow: 0 4px 12px rgba(255,153,0,0.15); }
.material-tab-icon { font-size: 1.4rem; line-height: 1; }
.material-tab-title { font-size: 0.78rem; font-weight: 700; line-height: 1.2; }

.material-detail-card {
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); padding: 1.25rem 1rem; overflow: hidden;
}
.material-pro-tip { margin-top: 0.85rem; display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.82rem; color: var(--text-muted); line-height: 1.45; }
.material-pro-tip-icon { font-size: 1.1rem; flex-shrink: 0; }

/* Sealer simulator */
.sealer-sim-box { background: var(--bg-card); border: 1px dashed var(--border-color); border-radius: var(--radius-sm); padding: 1rem 0.85rem; margin-top: 1.15rem; overflow: hidden; }
.sealer-sim-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; flex-wrap: wrap; gap: 0.5rem; }
.sealer-sim-header span { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }
.sim-btn-play { padding: 0.5rem 0.95rem; border-radius: 6px; background: var(--amazon); color: #fff; font-size: 0.82rem; font-weight: 600; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; }
@media (max-width: 480px) { .sim-btn-play { width: 100%; justify-content: center; } }
.sim-btn-play:hover { transform: scale(1.02); }
.sealer-track-container { position: relative; height: 48px; background: var(--bg-secondary); border-radius: 6px; border: 1px solid var(--border-color); overflow: hidden; display: flex; align-items: center; }
.sealer-sealed-line { position: absolute; left: 0; height: 4px; background: #10b981; box-shadow: 0 0 8px #10b981; width: 0%; transition: width 0.05s linear; }
.sealer-device-head { position: absolute; left: 0%; top: 50%; transform: translateY(-50%) translateX(-50%); width: 32px; height: 32px; background: var(--amazon); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 10px rgba(255,153,0,0.6); display: flex; align-items: center; justify-content: center; transition: left 0.05s linear; z-index: 2; }
.sealer-device-head::after { content: '⚡'; font-size: 14px; }

/* ============ CALLOUTS ============ */
.callout {
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  border-left: 4px solid;
}
.callout p { margin-bottom: 0.5rem; }
.callout p:last-child { margin-bottom: 0; }
.callout h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 0.65rem; }
.callout-tip {
  background: rgba(16,185,129,0.08);
  border-color: #10b981;
}
.callout-tip h3 { color: #10b981; }
.callout-warning {
  background: rgba(245,158,11,0.08);
  border-color: #f59e0b;
}
.callout-warning h3 { color: #f59e0b; }
.callout-info {
  background: rgba(99,102,241,0.08);
  border-color: var(--accent-primary);
}
.callout-info h3 { color: var(--accent-hover); }

/* ============ PROS / CONS LISTS ============ */
.pros-list, .cons-list { list-style: none; padding-left: 0; }
.pros-list li {
  position: relative; padding-left: 1.75rem; margin-bottom: 0.6rem;
  color: var(--text-secondary); font-size: 1rem; line-height: 1.6;
}
.pros-list li::before {
  content: '✅'; position: absolute; left: 0; font-size: 0.9rem;
}
.cons-list li {
  position: relative; padding-left: 1.75rem; margin-bottom: 0.6rem;
  color: var(--text-secondary); font-size: 1rem; line-height: 1.6;
}
.cons-list li::before {
  content: '❌'; position: absolute; left: 0; font-size: 0.9rem;
}

/* ============ ARTICLE HEADER ============ */
.article-header { margin-bottom: 1.5rem; }
.article-hero-image {
  width: 100%; max-height: 400px; object-fit: cover;
  border-radius: var(--radius-md); margin: 1.5rem 0;
}

/* ============ ARTICLE BODY STYLES ============ */
.article-body h2 {
  font-size: clamp(1.4rem, 4.2vw, 1.8rem); margin: 2.5rem 0 1rem;
  font-weight: 800; color: var(--text-primary); line-height: 1.3;
  scroll-margin-top: 5rem;
}
.article-body h3 {
  font-size: clamp(1.18rem, 3.6vw, 1.35rem); margin: 1.8rem 0 0.8rem;
  font-weight: 700; color: var(--text-primary);
}
.article-body p { margin-bottom: 1.35rem; color: var(--text-secondary); font-size: 1.05rem; line-height: 1.8; }
.article-body ul, .article-body ol { margin-bottom: 1.35rem; padding-left: 1.25rem; }
.article-body li { margin-bottom: 0.45rem; color: var(--text-secondary); line-height: 1.7; }
.article-body strong { color: var(--text-primary); font-weight: 700; }
.article-body em { color: var(--text-secondary); font-style: italic; }
.article-body a { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--accent-primary); }
.article-body img { max-width: 100%; border-radius: var(--radius-sm); margin: 1rem 0; }
.article-body hr { border: none; border-top: 1px solid var(--border-color); margin: 2.5rem 0; }
.article-body code {
  background: var(--bg-card); padding: 0.15rem 0.4rem;
  border-radius: 4px; font-size: 0.9em; font-family: 'Courier New', monospace;
}
.article-body blockquote { border-left: 4px solid var(--accent-primary); padding: 1rem 1.5rem; margin: 1.5rem 0; }
.article-body blockquote p { margin-bottom: 0.5rem; }

/* ============ TABLE WRAPPER ============ */
.article-body .table-wrapper {
  display: block; width: 100%; max-width: 100%; overflow-x: auto;
  -webkit-overflow-scrolling: touch; margin: 1.75rem 0;
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
  background: var(--bg-card); box-shadow: var(--shadow-md);
}
.article-body table { width: 100%; min-width: 540px; border-collapse: collapse; text-align: left; font-size: 0.95rem; }
.article-body th, .article-body td { padding: 0.95rem 1.15rem; border-bottom: 1px solid var(--border-color); }
.article-body th { background-color: var(--bg-card); font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.article-body td { color: var(--text-secondary); }

/* ============ BREADCRUMB ============ */
.c-breadcrumb {
  max-width: 1120px; margin: 0 auto; padding: 5rem 1.25rem 0.5rem;
  font-size: 0.85rem; color: var(--text-muted);
}
.c-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.c-breadcrumb a:hover { color: var(--accent-hover); }

/* ============ RATING BARS WIDGET ============ */
.c-rating-bars {
  display: flex; flex-direction: column; gap: 0.85rem; margin: 1.25rem 0;
}
.c-rating-bar-row {
  display: grid; grid-template-columns: 180px 1fr 60px;
  align-items: center; gap: 0.85rem;
}
@media (max-width: 600px) {
  .c-rating-bar-row { grid-template-columns: 1fr 50px; gap: 0.5rem; }
  .c-rating-bar-label { grid-column: 1; font-size: 0.85rem; }
  .c-rating-bar-track { grid-column: 1; }
  .c-rating-bar-score { grid-column: 2; text-align: right; }
}
.c-rating-bar-label {
  font-size: 0.9rem; font-weight: 600; color: var(--text-primary);
}
.c-rating-bar-track {
  height: 10px; background: var(--bg-secondary);
  border-radius: 5px; overflow: hidden; border: 1px solid var(--border-color);
}
.c-rating-bar-fill {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.c-rating-bar-global {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}
.c-rating-bar-score {
  font-size: 0.9rem; font-weight: 700; color: var(--accent-hover);
  text-align: right;
}
.c-rating-total {
  padding-top: 0.75rem; border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
}
.c-rating-total .c-rating-bar-fill {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

/* ============ BODY PADDING ============ */
body { padding-bottom: 75px; }
@media (min-width: 1025px) { body { padding-bottom: 0; } }

/* ============ STICKY BUY BAR (solo móvil) ============ */
.c-sticky-buy-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  background: var(--bg-secondary, #12121a);
  border-top: 1px solid var(--border-color, rgba(255,255,255,0.08));
  box-shadow: 0 -4px 16px rgba(0,0,0,0.3);
  z-index: 900;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  /* Safe area iOS */
  padding-bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px));
}
.c-sticky-buy-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.c-sticky-buy-bar.visible {
  transform: translateY(0);
}
.c-sticky-buy-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.c-sticky-buy-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary, #1a1a2e);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.c-sticky-buy-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-primary, #6366f1);
}
.c-sticky-buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem 0.8rem;
  background: linear-gradient(135deg, #ff9900, #f5a623);
  color: #232f3e;
  font-weight: 800;
  font-size: 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255,153,0,0.3);
}
.c-sticky-buy-icon { font-size: 0.85rem; }
.c-sticky-buy-text { line-height: 1; }

/* Móvil pequeño: compactar aún más */
@media (max-width: 380px) {
  .c-sticky-buy-btn { padding: 0.45rem 0.6rem; font-size: 0.68rem; }
  .c-sticky-buy-icon { font-size: 0.75rem; }
  .c-sticky-buy-name { font-size: 0.72rem; }
  .c-sticky-buy-price { font-size: 0.95rem; }
  .c-sticky-buy-thumb { width: 34px; height: 34px; }
}

/* Solo visible en móvil/tablet */
@media (min-width: 1025px) {
  .c-sticky-buy-bar { display: none !important; }
}

/* Tema claro: fondos blancos sólidos para componentes tienda */
[data-theme="claro"] .c-gallery-main,
[data-theme="claro"] .c-gallery-slide img,
[data-theme="claro"] .c-gallery-thumb,
[data-theme="claro"] .c-related-card,
[data-theme="cafe"] .c-gallery-main,
[data-theme="cafe"] .c-gallery-slide img,
[data-theme="cafe"] .c-gallery-thumb,
[data-template="cafe"] .c-related-card {
  background: #fff;
}
[data-theme="claro"] .c-related-img {
  background: #f5f5f5;
}
[data-theme="claro"] .c-sticky-buy-bar {
  background: #fff;
}

/* ============ PRODUCT STORE LAYOUT ============ */
.c-product-store {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem 1rem;
}
.c-product-store-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 768px) {
  .c-product-store-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Gallery */
.c-product-gallery { position: relative; }
.c-gallery-main {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--bg-secondary, #12121a);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
}
.c-gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.c-gallery-slide.active {
  opacity: 1;
  z-index: 1;
}
.c-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  background: var(--bg-secondary, #12121a);
}

/* Buy slide */
.c-gallery-buy-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  background: linear-gradient(135deg, #232f3e, #37475a);
  color: #fff;
}
.c-buy-slide-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem;
  text-align: center;
}
.c-buy-slide-icon { font-size: 3rem; }
.c-buy-slide-label { font-size: 1.4rem; font-weight: 700; }
.c-buy-slide-price {
  font-size: 2rem; font-weight: 800;
  color: #ff9900;
}
.c-buy-slide-cta {
  margin-top: 0.5rem;
  padding: 0.6rem 1.5rem;
  background: #ff9900;
  color: #232f3e;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
}

/* Gallery arrows */
.c-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.c-gallery-arrow:hover { background: rgba(0,0,0,0.8); }
.c-gallery-prev { left: 0.5rem; }
.c-gallery-next { right: 0.5rem; }

/* Thumbnails */
.c-gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.c-gallery-thumb {
  width: 64px; height: 64px;
  border-radius: 8px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-secondary, #12121a);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}
.c-gallery-thumb.active {
  border-color: var(--accent-primary, #6366f1);
}
.c-gallery-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.c-thumb-buy-icon { font-size: 1.5rem; }

/* Product info */
.c-product-info {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.5rem 0;
}
.c-product-cat {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary, #6366f1);
  background: rgba(99,102,241,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  align-self: flex-start;
}
.c-product-title {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
  color: var(--text-primary, #1a1a2e);
}
.c-product-subtitle {
  font-size: 1rem;
  color: var(--text-secondary, #555);
  line-height: 1.5;
  margin: 0;
}
.c-product-price-rating {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border-color, #e0e0e0);
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}
.c-product-price-box {
  display: flex;
  flex-direction: column;
}
.c-price-label {
  font-size: 0.75rem;
  color: var(--text-muted, #999);
  text-transform: uppercase;
}
.c-price-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-primary, #6366f1);
}
.c-product-rating-box {
  display: flex;
  flex-direction: column;
}
.c-rating-stars {
  font-size: 1.1rem;
  color: #ff9900;
  letter-spacing: 2px;
}
.c-rating-value {
  font-size: 0.85rem;
  color: var(--text-muted, #999);
}
.c-product-buy-btn {
  display: block;
  text-align: center;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #ff9900, #f5a623);
  color: #232f3e;
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(255,153,0,0.3);
}
.c-product-buy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255,153,0,0.4);
}
.c-product-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.3rem;
}
.c-author-avatar-sm {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.c-author-avatar-ph {
  background: var(--accent-primary, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.c-author-txt {
  font-size: 0.8rem;
  color: var(--text-muted, #999);
}
.c-author-txt a {
  color: var(--text-secondary, #555);
  font-weight: 600;
  text-decoration: none;
}

/* Lightbox */
.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.gallery-lightbox.active {
  display: flex;
}
.c-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.9);
}
.c-lightbox-img {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  z-index: 1;
}
.c-lightbox-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 2;
}
.c-lightbox-close:hover { background: rgba(255,255,255,0.3); }
.c-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.c-lightbox-arrow:hover { background: rgba(255,255,255,0.3); }
.c-lightbox-prev { left: 1rem; }
.c-lightbox-next { right: 1rem; }

/* ============ RELATED / COMPLEMENTARY PRODUCTS ============ */
.c-related-section {
  max-width: 1500px;
  margin: 0 auto 1.5rem;
  padding: 0 1.25rem;
}
.c-related-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 0.2rem;
  color: var(--text-primary, #1a1a2e);
}
.c-related-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted, #999);
  margin: 0 0 0.8rem;
}
.c-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}
.c-related-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary, #12121a);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.c-related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.c-related-img {
  aspect-ratio: 3/2;
  background: var(--bg-secondary, #12121a);
  overflow: hidden;
}
.c-related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.related-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted, #71717a);
  background: var(--bg-secondary, #12121a);
}
.c-related-info {
  padding: 0.6rem 0.8rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}
.c-related-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-primary, #6366f1);
}
.c-related-name {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: var(--text-primary, #1a1a2e);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.c-related-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.3rem;
}
.c-related-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-primary, #6366f1);
}
.c-related-rating {
  font-size: 0.8rem;
  color: var(--text-muted, #999);
}

@media (max-width: 900px) {
  .c-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .c-related-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .c-related-name { font-size: 0.78rem; }
  .c-related-info { padding: 0.4rem 0.5rem 0.5rem; }
}