/* ═══════════════════════════════════════════════════════════
   CALESAN — COMPONENTS CSS
   Componentes reutilizables entre 2+ páginas.
   Incluir después de base.css en páginas que los usen.
   <link rel="stylesheet" href="/css/calesan.components.css">
═══════════════════════════════════════════════════════════ */

/* ── PAGE HERO (productos, contacto, empresa) ── */
.page-hero {
  background: var(--bg2);
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
}
.page-hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.page-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}
.page-tag::before { content: '—'; opacity: 0.5; }
.page-h1 {
  font-family: var(--f-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.08;
  margin-bottom: 8px;
}
.page-sub {
  font-size: 16px;
  color: var(--text2);
  max-width: 520px;
  line-height: 1.65;
}

/* ── SECTION HELPERS ── */
.section       { padding: 88px 0; }
.section-sm    { padding: 56px 0; }
.section-bg    { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-bg2   { background: var(--bg3); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.section-tag::before { content: '—'; opacity: 0.5; }
.section-title {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
}
.section-sub {
  font-size: 17px;
  color: var(--text2);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 48px;
}
.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

/* ── PRODUCT CARD (productos + landing) ── */
.product-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow var(--ease), border-color var(--ease), transform var(--ease);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}
.product-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border2);
  transform: translateY(-3px);
}
.product-img-area {
  width: 100%;
  height: 160px;
  background: var(--bg3);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-grow: 0;
}
.product-img-area::after {
  content: 'Ver producto →';
  position: absolute; inset: 0;
  background: rgba(192,40,26,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  opacity: 0;
  transition: opacity var(--ease);
}
.product-card:hover .product-img-area::after { opacity: 1; }
.product-info { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.product-cat,
.prod-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 5px;
}
.product-name,
.prod-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.product-desc,
.prod-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  flex: 1;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.product-stock,
.prod-stock {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
}
.product-stock::before,
.prod-stock::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
}
.product-add-btn,
.prod-add-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--red-light);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--r);
  border: 1px solid var(--red-mid);
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
  font-family: var(--f-body);
}
.product-add-btn:hover,
.prod-add-btn:hover { background: var(--red); color: #fff; }
.product-add-btn svg,
.prod-add-btn svg { width: 13px; height: 13px; }

/* ── PRODUCT TAGS ── */
.prod-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.prod-tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
}

.prod-tag-code {
  background: var(--bg2);
  border-color: var(--border2);
  color: var(--text2);
  font-weight: 700;
}

/* ── STATUS BADGES ── */
.stock-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--green-l);
  border: 1px solid #B8DFC4;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  white-space: nowrap;
}
.stock-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
}
.response-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--green-l);
  border: 1px solid #B8DFC4;
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  white-space: nowrap;
}
.response-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
}

/* ── FORMULARIOS (contacto, cotizar, landing) ── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text3);
}
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 15px;
  padding: 11px 14px;
  width: 100%;
  transition: border-color var(--ease), box-shadow var(--ease);
  outline: none;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,40,26,0.08);
}
input::placeholder, textarea::placeholder { color: var(--text3); }
select option { background: var(--bg2); }
textarea { resize: vertical; min-height: 90px; }

/* ── WEBPAY NOTE (cotizar, contacto, detalle) ── */
.webpay-note {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--red-light);
  border: 1px solid var(--red-mid);
  border-radius: var(--r);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text2);
  font-weight: 500;
}
.webpay-note svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── WHATSAPP LINK (contacto, cotizar) ── */
.wa-link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green-l);
  border: 1px solid #B8DFC4;
  border-radius: var(--r);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  cursor: pointer;
  transition: background var(--ease);
}
.wa-link:hover { background: #D4EDDE; }
.wa-link svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── TICKER (landing) ── */
.ticker-wrap { background: var(--text); padding: 12px 0; overflow: hidden; }
.ticker-track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.ticker-item::before { content: '◆'; font-size: 7px; color: var(--red); }

/* ── FAQ ACCORDION (landing, contacto) ── */
.faq-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--ease);
}
.faq-item.open { border-color: var(--red); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 24px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--f-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: color var(--ease);
}
.faq-q:hover { color: var(--red); }
.faq-icon-btn {
  width: 24px; height: 24px;
  border: 1.5px solid var(--border2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text3);
  transition: transform var(--ease), background var(--ease), border-color var(--ease), color var(--ease);
}
.faq-icon-btn svg { width: 10px; height: 10px; }
.faq-item.open .faq-icon-btn {
  transform: rotate(45deg);
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-item.open .faq-a { max-height: 200px; }
.faq-a-inner {
  padding: 0 24px 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text2);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ── CTA BAND (landing, empresa) ── */
.cta-band { background: var(--red); padding: 52px 0; }
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-band-text .cta-title {
  font-family: var(--f-display);
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}
.cta-band-text .cta-sub { font-size: 15px; color: rgba(255,255,255,0.82); margin-top: 4px; }
.btn-white {
  background: #fff;
  color: var(--red);
  font-family: var(--f-body);
  font-weight: 800;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform var(--ease), box-shadow var(--ease);
  white-space: nowrap;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.btn-white svg { width: 16px; height: 16px; }

/* ── TESTIMONIALS (landing) ── */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testimonial-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease);
}
.testimonial-card:hover { box-shadow: var(--shadow); }
.t-stars { display: flex; gap: 3px; margin-bottom: 14px; color: #D4A017; }
.t-stars svg { width: 15px; height: 15px; }
.t-text { font-size: 14px; line-height: 1.7; color: var(--text2); margin-bottom: 20px; font-style: italic; }
.t-author { display: flex; align-items: center; gap: 12px; }
.t-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--red-light);
  border: 2px solid var(--red-mid);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: var(--red);
  flex-shrink: 0;
}
.t-name { font-size: 14px; font-weight: 700; color: var(--text); }
.t-role { font-size: 12px; color: var(--text3); }

/* ── BRANDS ROW / PILL ── */
.brands-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.brand-pill {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 28px;
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text2);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--ease), color var(--ease), box-shadow var(--ease);
}
.brand-pill:hover { border-color: var(--red); color: var(--red); box-shadow: var(--shadow); }

/* ── CHECKOUT STEPS (cotizar) ── */
.checkout-steps { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 20px 0; }
.steps-inner { display: flex; align-items: center; gap: 0; max-width: 640px; margin: 0 auto; }
.step { display: flex; align-items: center; gap: 10px; flex: 1; }
.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.step.done   .step-num { background: var(--green); color: #fff; }
.step.active .step-num { background: var(--red);   color: #fff; }
.step.pending .step-num { background: var(--bg3); color: var(--text3); }
.step-label { font-size: 13px; font-weight: 600; }
.step.active .step-label  { color: var(--text); }
.step.pending .step-label { color: var(--text3); }
.step.done .step-label    { color: var(--green); }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 12px; border-radius: 1px; }

/* ── RESPONSIVE COMPONENTS ── */
@media (max-width: 768px) {
  .form-row        { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .cta-band-inner  { flex-direction: column; text-align: center; }
  .brands-row      { gap: 12px; }
  .section         { padding: 64px 0; }
}
