/* ============================================================
   estilos.css — Variables, reset y estilos base
   TechStore 2025
   ============================================================ */

:root {
  --orange: #FF6A00;
  --orange-light: #FF8C35;
  --orange-pale: #FFF0E6;
  --orange-dark: #CC5200;
  --white: #FFFFFF;
  --gray-50: #F8F8F8;
  --gray-100: #F0F0F0;
  --gray-200: #E0E0E0;
  --gray-400: #9E9E9E;
  --gray-700: #444444;
  --black: #1A1A1A;
  --green: #2E7D32;
  --green-light: #E8F5E9;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 24px rgba(255,106,0,0.18);
  --transition: all .2s ease;
}

/* RESET */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--black);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }
ul, ol { list-style: none; }

/* TRANSICIÓN DE PÁGINA */
body {
  animation: fadeIn .25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Links de transición — agrega fade-out al salir */
a[href]:not([href^="#"]):not([href^="mailto"]):not([href^="tel"]):not([href^="http"]):not([href^="https"]) {
  transition: opacity .15s ease;
}

/* UTILIDADES GENERALES */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.divider {
  height: 1px;
  background: var(--gray-200);
}

.text-orange { color: var(--orange); }
.text-gray   { color: var(--gray-400); }
.text-green  { color: var(--green); }
.text-black  { color: var(--black); }

.font-display { font-family: var(--font-display); }

.hidden  { display: none !important; }
.visible { display: block !important; }

/* BADGES */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-new  { background: #E8F5E9; color: #2E7D32; }
.badge-sale { background: #FFF3E0; color: var(--orange-dark); }
.badge-hot  { background: #FFEBEE; color: #C62828; }

/* BOTONES BASE */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--orange);
  color: white;
}
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); }

.btn-outline {
  background: white;
  color: var(--orange);
  border: 1.5px solid var(--orange);
}
.btn-outline:hover { background: var(--orange-pale); }

.btn-dark {
  background: var(--black);
  color: white;
}
.btn-dark:hover { background: var(--gray-700); }

.btn-lg {
  padding: 14px 32px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* FORMULARIOS BASE */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  color: var(--black);
  transition: border-color .2s;
  background: white;
}
.form-input:focus { border-color: var(--orange); }
.form-input.error { border-color: #E53935; }

.form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  color: var(--black);
  background: white;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239E9E9E' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color .2s;
}
.form-select:focus { border-color: var(--orange); }

.form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  color: var(--black);
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
  transition: border-color .2s;
}
.form-textarea:focus { border-color: var(--orange); }

/* BREADCRUMB */
.breadcrumb {
  max-width: 1200px;
  margin: 18px auto 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-400);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--gray-400); transition: color .2s; }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb .sep { font-size: 10px; }
.breadcrumb .current { color: var(--black); font-weight: 500; }

/* SECTION HEADER */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--black);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 26px;
  background: var(--orange);
  border-radius: 2px;
  display: inline-block;
}
.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: gap .2s;
}
.section-link:hover { gap: 8px; }

/* PAGINACIÓN */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.page-btn {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  background: white;
  font-size: 14px;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
}
.page-btn:hover, .page-btn.active {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-pale);
}
.page-btn.active { font-weight: 700; }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* WHATSAPP FLOTANTE */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  width: 54px;
  height: 54px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 26px;
  box-shadow: 0 4px 20px rgba(37,211,102,0.5);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.wa-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(37,211,102,0.65);
}

/* TOAST NOTIFICACIÓN */
.toast {
  position: fixed;
  bottom: 100px;
  right: 28px;
  z-index: 300;
  background: var(--black);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transform: translateY(20px);
  opacity: 0;
  transition: all .3s ease;
  pointer-events: none;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast i { color: var(--orange); }

/* Variables adicionales */
:root {
  --green: #2E7D32;
  --green-light: #E8F5E9;
  --shadow-hover: 0 6px 24px rgba(255,106,0,0.18);
}

/* body flex para 404 */
body.flex-page { min-height: 100vh; display: flex; flex-direction: column; }

#autocomplete-dropdown {
  z-index: 99999 !important;
}
