/* Tienda de Repuestos AR - Modern & Sober Stylesheet */
:root {
  --primary: #1e40af;         /* Azul automotor */
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #0f172a;       /* Slate grafito oscuro */
  --accent: #f59e0b;          /* Ambar atención */
  --price-color: #047857;     /* Verde esmeralda para precios */
  --bg-body: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --text-muted: #64748b;
  --text-dark: #0f172a;
}

body {
  background-color: var(--bg-body);
  color: var(--text-dark);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* Announcement Top Bar */
.top-bar {
  background-color: #090d16;
  color: #cbd5e1;
  font-size: 0.825rem;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top-bar a {
  color: #94a3b8;
  text-decoration: none;
}
.top-bar a:hover {
  color: #ffffff;
}

/* Main Navbar */
.navbar-custom {
  background-color: #0f172a !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.15);
  padding: 12px 0;
}
.navbar-custom .navbar-brand {
  font-weight: 800;
  letter-spacing: -0.5px;
  font-size: 1.35rem;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-custom .brand-badge {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}
.navbar-custom .nav-link {
  color: #e2e8f0 !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 14px !important;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.navbar-custom .nav-link:hover {
  color: #38bdf8 !important;
  background-color: rgba(255, 255, 255, 0.05);
}
.navbar-custom .nav-link.active {
  color: #ffffff !important;
  background-color: rgba(37, 99, 235, 0.25);
}

/* Cart Button in Navbar */
.cart-nav-btn {
  position: relative;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 14px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cart-nav-btn:hover {
  background-color: #2563eb;
  border-color: #2563eb;
}
.cart-nav-badge {
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 2px 6px;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #090d16 0%, #0f172a 60%, #1e293b 100%);
  color: #ffffff;
  padding: 55px 0 45px 0;
  position: relative;
  overflow: hidden;
}
.hero-section::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 50%);
  pointer-events: none;
}
.hero-title {
  font-weight: 800;
  font-size: 2.6rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.hero-subtitle {
  color: #94a3b8;
  font-size: 1.15rem;
}

/* Vehicle Finder Card (Buscador por Vehículo) */
.vehicle-finder-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.15);
  border: 1px solid #e2e8f0;
  padding: 22px;
  position: relative;
  z-index: 2;
}
.finder-step-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 4px;
  display: block;
}

/* Trust / Feature Strip */
.trust-strip {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 22px 0;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
}
.trust-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.trust-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
  color: #0f172a;
}
.trust-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0;
}

/* Category Grid Cards */
.cat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  text-decoration: none;
  color: #0f172a;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.cat-card:hover {
  transform: translateY(-5px);
  border-color: #3b82f6;
  box-shadow: 0 12px 24px -6px rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
}
.cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #2563eb;
  margin-bottom: 10px;
  transition: background 0.2s;
}
.cat-card:hover .cat-icon {
  background: #dbeafe;
}
.cat-name {
  font-weight: 700;
  font-size: 0.92rem;
  margin: 0;
}

/* Product Card */
.card-repuesto {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card-repuesto:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -4px rgba(15, 23, 42, 0.1);
  border-color: #cbd5e1;
}
.repuesto-img-wrapper {
  position: relative;
  background: #f8fafc;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #f1f5f9;
}
.repuesto-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.card-repuesto:hover .repuesto-img {
  transform: scale(1.04);
}
.repuesto-badge-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  backdrop-filter: blur(4px);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}
.repuesto-badge-sku {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #475569;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.repuesto-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.repuesto-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7rem;
}
.repuesto-title a {
  color: inherit;
  text-decoration: none;
}
.repuesto-title a:hover {
  color: #2563eb;
}
.repuesto-compat {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 12px;
}
.repuesto-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--price-color);
  letter-spacing: -0.5px;
}
.price-symbol {
  font-size: 0.9rem;
  font-weight: 600;
  vertical-align: top;
  margin-right: 2px;
}
.installments-text {
  font-size: 0.75rem;
  color: #2563eb;
  font-weight: 600;
  display: block;
}

/* Brand Grid */
.brand-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s ease;
}
.brand-pill:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
  transform: translateY(-2px);
}

/* Product Detail Page */
.detail-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.06);
  padding: 30px;
}
.detail-img-box {
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.detail-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
.spec-table th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  width: 35%;
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  background-color: #25d366;
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  z-index: 1000;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.6);
}

/* Footer */
.footer-main {
  background-color: #090d16;
  color: #94a3b8;
  padding: 48px 0 24px 0;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 8px;
}
.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: #38bdf8;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 20px;
  margin-top: 36px;
  font-size: 0.8rem;
  color: #64748b;
}

/* Admin Dashboard Specific */
.admin-sidebar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.admin-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}
.admin-metric-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
}
.admin-metric-card.card-blue::before { background-color: #2563eb; }
.admin-metric-card.card-green::before { background-color: #059669; }
.admin-metric-card.card-amber::before { background-color: #d97706; }
.admin-metric-card.card-purple::before { background-color: #7c3aed; }

.finance-rate-card {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}
.finance-rate-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
}
.finance-rate-meta {
  font-size: 0.8rem;
  color: #64748b;
}

/* Quantity selector controls */
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.qty-btn {
  background: #f1f5f9;
  border: none;
  padding: 6px 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s;
}
.qty-btn:hover {
  background: #e2e8f0;
}
.qty-input {
  width: 48px;
  text-align: center;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.qty-input:focus {
  outline: none;
}
