/* ============================================================
   RepuestosMax — global.css · Layout, secciones, botones, inputs
   ============================================================ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-5); }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section--alt { background: var(--bg-alt); }
.text-red { color: var(--red); }

.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-5); flex-wrap: wrap; margin-bottom: var(--sp-7); }
.section__head--center { justify-content: center; text-align: center; }
.section__tag { display: inline-block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--red); margin-bottom: var(--sp-3); }
.section__title { font-size: clamp(1.6rem, 3.4vw, 2.6rem); color: var(--text-strong); }

/* Botones */
.btn {
  --btn-bg: var(--navy); --btn-color: var(--white);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; font-size: 0.98rem; font-weight: 600; border-radius: var(--radius-sm);
  background: var(--btn-bg); color: var(--btn-color);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  white-space: nowrap; position: relative;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--red { --btn-bg: var(--red); box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28); }
.btn--red:hover { --btn-bg: var(--red-dark); }
.btn--navy { --btn-bg: var(--navy); }
.btn--navy:hover { --btn-bg: var(--navy-light); }
.btn--dark { --btn-bg: var(--gray-dark); }
.btn--dark:hover { --btn-bg: var(--gray-800); }
.btn--light { --btn-bg: var(--white); --btn-color: var(--navy); }
.btn--light:hover { --btn-bg: var(--gray-100); }
.btn--ghost { --btn-bg: transparent; --btn-color: var(--navy); border: 1.5px solid var(--border); }
.btn--ghost:hover { --btn-bg: var(--gray-100); }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }
.btn--full { width: 100%; }
.btn--sm { padding: 9px 16px; font-size: 0.85rem; }

/* Icon buttons */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: var(--radius-full); color: var(--gray-dark); transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease); position: relative; }
.icon-btn:hover { background: var(--gray-100); }
.icon-btn__count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.68rem; font-weight: 700; line-height: 1; color: var(--white); background: var(--red); border-radius: var(--radius-full); transform: scale(0); transition: transform 0.25s var(--ease); }
.icon-btn__count.is-visible { transform: scale(1); }

/* Inputs */
.input, .select { width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--white); color: var(--text); transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease); }
.input:focus, .select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.12); }
.select { cursor: pointer; }
.select:disabled { background: var(--gray-100); color: var(--gray-400); cursor: not-allowed; }
.input.is-invalid { border-color: var(--red); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 16px; font-size: 0.88rem; font-weight: 500; border-radius: var(--radius-full); background: var(--white); border: 1.5px solid var(--border); color: var(--gray-600); transition: all 0.2s var(--ease); }
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip.is-active { background: var(--navy); color: var(--white); border-color: var(--navy); }

.toolbar { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.toolbar .select { width: auto; }

/* Reveal */
[data-animate] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-animate].is-visible { opacity: 1; transform: none; }

/* Back to top */
.back-to-top { position: fixed; bottom: 24px; right: 24px; z-index: 900; width: 48px; height: 48px; border-radius: var(--radius-full); display: inline-flex; align-items: center; justify-content: center; background: var(--navy); color: var(--white); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity var(--transition), visibility var(--transition), transform var(--transition), background 0.2s var(--ease); }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--red); }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); z-index: var(--z-toast); background: var(--gray-900); color: var(--white); padding: 14px 22px; border-radius: var(--radius-full); font-weight: 500; font-size: 0.92rem; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); display: flex; align-items: center; gap: 10px; max-width: 90vw; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast[hidden] { display: none; }
.toast__accent { color: #FCA5A5; font-weight: 700; }
