/* 
  Styles.css - El Gran Remate (GARDOSGRAN S.A.)
  Diseño: Limpio, Moderno, Alto Contraste, Optimizado para Retail Popular y Responsivo
*/

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body, 'Inter', -apple-system, sans-serif);
  background-color: #FAFAFA;
  color: #0F172A;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Top Announcement Bar */
.top-bar {
  background-color: #0A192F;
  color: #E2E8F0;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.top-bar-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-announcement {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.top-pill {
  background: var(--color-brand-red, #ED2424);
  color: #FFF;
  font-weight: 800;
  font-size: 11px;
  padding: 2px 8px;
  letter-spacing: 0.5px;
}

.top-contacts {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-contacts a {
  color: #F8FAFC;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.top-contacts a:hover {
  color: var(--color-brand-yellow, #F9DB1A);
}

/* Header Limpio */
.main-header {
  background-color: #FFFFFF;
  border-bottom: 2px solid #E2E8F0;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo .logo-img {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}

.branch-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F1F5F9;
  padding: 8px 14px;
  border: 1px solid #CBD5E1;
}

.branch-selector label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.branch-selector select {
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  outline: none;
  cursor: pointer;
}

.cart-trigger-btn {
  background-color: var(--color-brand-red, #ED2424);
  color: #FFFFFF;
  border: none;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cart-trigger-btn:hover {
  opacity: 0.92;
}

.cart-badge {
  background: var(--color-brand-yellow, #F9DB1A);
  color: #0F172A;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 900;
  min-width: 20px;
  text-align: center;
}

/* Category Navigation */
.category-nav {
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
}

.nav-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px;
  scrollbar-width: none;
}

.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  color: #0F172A;
  background: #F8FAFC;
}

.nav-btn.active {
  background: #0A192F;
  color: #FFFFFF;
  border-color: #0A192F;
}

/* Hero Section Limpia con Fondo Blanco y Acentos */
.hero-banner {
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  padding: 48px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.hero-tag-badge {
  display: inline-block;
  background: rgba(237, 36, 36, 0.08);
  color: var(--color-brand-red, #ED2424);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  margin-bottom: 14px;
  border-left: 3px solid var(--color-brand-red, #ED2424);
}

.hero-text h1 {
  font-family: var(--font-heading, 'Bebas Neue', sans-serif);
  font-size: 52px;
  line-height: 1.05;
  color: #0A192F;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.hero-text h1 .highlight-red {
  color: var(--color-brand-red, #ED2424);
}

.hero-subtitle {
  font-size: 16px;
  color: #475569;
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--color-brand-red, #ED2424);
  color: #FFFFFF;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-secondary {
  background: transparent;
  color: #0F172A;
  border: 1px solid #CBD5E1;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #F1F5F9;
}

.promo-card {
  background: #0A192F;
  color: #FFFFFF;
  padding: 32px;
  position: relative;
  border-top: 4px solid var(--color-brand-yellow, #F9DB1A);
}

.promo-pill {
  background: var(--color-brand-yellow, #F9DB1A);
  color: #0A192F;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 12px;
}

.promo-title {
  font-family: var(--font-heading, 'Bebas Neue', sans-serif);
  font-size: 32px;
  color: #FFFFFF;
  line-height: 1.1;
  margin-bottom: 10px;
}

.promo-desc {
  font-size: 14px;
  color: #94A3B8;
  line-height: 1.5;
  margin-bottom: 20px;
}

.promo-card .btn-whatsapp-sm {
  background: #25D366;
  color: #FFFFFF;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Main Catalog */
.main-catalog {
  padding: 48px 16px;
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 28px;
  gap: 20px;
  flex-wrap: wrap;
}

.catalog-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: #0A192F;
  margin-bottom: 4px;
}

.catalog-header p {
  font-size: 14px;
  color: #64748B;
}

.search-box input {
  padding: 10px 16px;
  font-size: 14px;
  border: 1px solid #CBD5E1;
  width: 300px;
  max-width: 100%;
  background: #FFFFFF;
  outline: none;
}

.search-box input:focus {
  border-color: var(--color-brand-red, #ED2424);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.product-thumb-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #F1F5F9;
  overflow: hidden;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge-promo {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-brand-red, #ED2424);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  letter-spacing: 0.5px;
}

.product-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-cat {
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.product-name {
  font-size: 15px;
  font-weight: 700;
  color: #0A192F;
  margin-bottom: 10px;
  line-height: 1.35;
  min-height: 40px;
}

.product-pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.price-current {
  font-size: 20px;
  font-weight: 900;
  color: var(--color-brand-red, #ED2424);
}

.price-old {
  font-size: 13px;
  color: #94A3B8;
  text-decoration: line-through;
}

.product-sizes {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
}

.size-label {
  font-size: 11px;
  color: #64748B;
  font-weight: 600;
  margin-right: 4px;
}

.size-pill {
  font-size: 11px;
  background: #F1F5F9;
  color: #334155;
  padding: 2px 6px;
  font-weight: 600;
}

.btn-add-cart {
  margin-top: auto;
  background: #0A192F;
  color: #FFFFFF;
  border: none;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-add-cart:hover {
  background: var(--color-brand-red, #ED2424);
}

/* B2B Section */
.b2b-section {
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
  padding: 56px 0;
}

.b2b-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

.b2b-meta {
  font-size: 12px;
  font-weight: 800;
  color: var(--color-brand-red, #ED2424);
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 10px;
}

.b2b-info h2 {
  font-size: 32px;
  font-weight: 800;
  color: #0A192F;
  margin-bottom: 16px;
  line-height: 1.2;
}

.b2b-info p {
  font-size: 15px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 20px;
}

.b2b-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.b2b-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
}

.b2b-features svg {
  color: #10B981;
  flex-shrink: 0;
}

.b2b-form-box {
  background: #F8FAFC;
  padding: 32px;
  border: 1px solid #E2E8F0;
}

.b2b-form-box h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0A192F;
  margin-bottom: 16px;
}

.b2b-form-box form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.b2b-form-box input,
.b2b-form-box textarea {
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  outline: none;
}

.b2b-form-box input:focus,
.b2b-form-box textarea:focus {
  border-color: var(--color-brand-red, #ED2424);
}

.full-width {
  width: 100%;
}

/* Sucursales */
.branches-section {
  padding: 56px 0;
  background: #FAFAFA;
}

.branches-section h2 {
  font-size: 28px;
  font-weight: 800;
  color: #0A192F;
  text-align: center;
  margin-bottom: 6px;
}

.section-desc {
  font-size: 14px;
  color: #64748B;
  text-align: center;
  margin-bottom: 36px;
}

.branches-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.branch-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.branch-tag {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-brand-red, #ED2424);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.branch-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0A192F;
  margin-bottom: 8px;
}

.branch-card p {
  font-size: 13px;
  color: #64748B;
  line-height: 1.4;
  margin-bottom: 12px;
}

.branch-card .city {
  font-size: 12px;
  color: #94A3B8;
  font-weight: 600;
  margin-bottom: 16px;
  display: block;
}

.branch-link {
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
  color: #0A192F;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.branch-link:hover {
  color: var(--color-brand-red, #ED2424);
}

/* Cart Drawer */
.cart-drawer.hidden,
.b2b-section.hidden,
.main-catalog.hidden {
  display: none;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
}

.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
}

.drawer-content {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0,0,0,0.15);
}

.drawer-header {
  padding: 20px;
  background: #0A192F;
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.close-btn {
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.drawer-body {
  padding: 20px;
  flex-grow: 1;
  overflow-y: auto;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #64748B;
  font-size: 14px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #F1F5F9;
}

.cart-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #0A192F;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 13px;
  color: var(--color-brand-red, #ED2424);
  font-weight: 700;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  cursor: pointer;
}

.qty-num {
  font-size: 13px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

.drawer-footer {
  padding: 20px;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  color: #0A192F;
  margin-bottom: 8px;
}

.summary-line strong {
  font-size: 20px;
  color: var(--color-brand-red, #ED2424);
}

.summary-note {
  font-size: 12px;
  color: #64748B;
  line-height: 1.4;
  margin-bottom: 16px;
}

.btn-whatsapp {
  background-color: #25D366;
  color: #FFFFFF;
  border: none;
  padding: 14px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
  display: block;
  text-align: center;
}

.btn-whatsapp:hover {
  opacity: 0.92;
}

/* Footer Sobrio con Fondo Limpio */
.main-footer {
  background-color: #0A192F;
  color: #94A3B8;
  padding: 48px 0 24px;
  border-top: 3px solid var(--color-brand-red, #ED2424);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.footer-brand .footer-logo {
  height: 64px;
  width: auto;
  margin-bottom: 10px;
  object-fit: contain;
}

.footer-brand p {
  font-size: 13px;
  color: #94A3B8;
  letter-spacing: 0.5px;
}

.footer-faith p {
  font-size: 13px;
  color: #CBD5E1;
}

.footer-faith strong {
  color: var(--color-brand-yellow, #F9DB1A);
}

.footer-copy p {
  font-size: 12px;
  color: #64748B;
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
  width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .branches-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero-text h1 {
    font-size: 38px;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .b2b-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .branches-grid {
    grid-template-columns: 1fr;
  }
  .top-bar-content {
    justify-content: center;
    text-align: center;
  }
  .header-container {
    flex-direction: column;
    align-items: stretch;
  }
  .brand-logo {
    justify-content: center;
  }
  .cart-trigger-btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  .search-box input {
    width: 100%;
  }
}
