/* 
  Styles.css - El Gran Remate (GARDOSGRAN S.A.)
  Identidad Oficial: Amarillo Sol (#F9DB1A), Rojo Remate (#ED2424) y Azul Marino (#0A2346)
  Limpio, Vibrante, Sin marcos parásitos, 100% Retail Popular con Fotografía 4:5
*/

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

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

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

/* Top Bar Azul Marino Institucional */
.top-bar {
  background-color: #0A2346;
  color: #FFFFFF;
  font-size: 13px;
  padding: 9px 0;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}

.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: 12px;
}

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

.top-pill {
  background: #ED2424;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 11px;
  padding: 3px 8px;
  letter-spacing: 0.5px;
}

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

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

.top-contacts a:hover {
  color: #F9DB1A;
}

/* Header Amarillo Oficial */
.main-header {
  background-color: #F9DB1A;
  border-bottom: 4px solid #ED2424;
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.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: 56px;
  width: auto;
  display: block;
  object-fit: contain;
}

.branch-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

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

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

.cart-trigger-btn {
  background-color: #ED2424;
  color: #FFFFFF;
  border: none;
  padding: 10px 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(237, 36, 36, 0.35);
  transition: transform 0.15s, background-color 0.15s;
}

.cart-trigger-btn:hover {
  transform: translateY(-2px);
  background-color: #D91A1A;
}

.cart-badge {
  background: #F9DB1A;
  color: #0A2346;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}

/* Category Navigation con Barra Azul Oficial */
.category-nav {
  background-color: #0A2346;
  border-bottom: 2px solid #ED2424;
  padding: 10px 0;
}

.nav-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

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

.nav-btn {
  background: transparent;
  color: #94A3B8;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #FFFFFF;
}

.nav-btn.active {
  background: #F9DB1A;
  color: #0A2346;
  border-color: #F9DB1A;
}

/* Hero Section Azul Marino Potente con Amarillo Sol */
.hero-banner {
  background: linear-gradient(135deg, #0A2346 0%, #113A70 100%);
  color: #FFFFFF;
  padding: 48px 0;
  border-bottom: 4px solid #F9DB1A;
}

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

.hero-tag-badge {
  display: inline-block;
  background: #ED2424;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  margin-bottom: 12px;
}

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

.hero-text h1 .highlight-yellow {
  color: #F9DB1A;
}

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

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

.btn-primary {
  background: #ED2424;
  color: #FFFFFF;
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  display: inline-block;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(237, 36, 36, 0.4);
  transition: transform 0.15s;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #FFFFFF;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 13px 22px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #FFFFFF;
  color: #0A2346;
}

.promo-card {
  background: rgba(10, 35, 70, 0.85);
  border: 2px solid #F9DB1A;
  color: #FFFFFF;
  padding: 32px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.promo-pill {
  background: #F9DB1A;
  color: #0A2346;
  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: 34px;
  color: #FFFFFF;
  line-height: 1.1;
  margin-bottom: 10px;
}

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

.promo-card .btn-whatsapp-sm {
  background: #25D366;
  color: #FFFFFF;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

/* Catálogo Principal con Fotografía 4:5 */
.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: 26px;
  font-weight: 800;
  color: #0A2346;
  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: 320px;
  max-width: 100%;
  background: #FFFFFF;
  outline: none;
}

.search-box input:focus {
  border-color: #ED2424;
}

/* Product Grid 4 Columnas con Aspect Ratio 4:5 */
.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;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(10, 35, 70, 0.09);
}

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

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

.badge-promo {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ED2424;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 900;
  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: 800;
  color: #115C8D;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

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

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

.price-current {
  font-size: 20px;
  font-weight: 900;
  color: #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: #0A2346;
  padding: 2px 7px;
  font-weight: 700;
}

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

.btn-add-cart:hover {
  background: #ED2424;
}

/* B2B Section */
.b2b-section {
  background: #FFFFFF;
  border-top: 2px solid #E2E8F0;
  border-bottom: 2px 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: #ED2424;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 10px;
}

.b2b-info h2 {
  font-size: 32px;
  font-weight: 800;
  color: #0A2346;
  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: #0A2346;
}

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

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

.b2b-form-box h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0A2346;
  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: #ED2424;
}

.full-width {
  width: 100%;
}

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

.branches-section h2 {
  font-size: 28px;
  font-weight: 800;
  color: #0A2346;
  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;
  border-top: 3px solid #ED2424;
}

.branch-tag {
  font-size: 11px;
  font-weight: 800;
  color: #ED2424;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.branch-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0A2346;
  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: #0A2346;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.branch-link:hover {
  color: #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(10, 35, 70, 0.65);
}

.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.2);
}

.drawer-header {
  padding: 20px;
  background: #0A2346;
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #ED2424;
}

.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: #0A2346;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 13px;
  color: #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: #0A2346;
  margin-bottom: 8px;
}

.summary-line strong {
  font-size: 20px;
  color: #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 Azul Marino */
.main-footer {
  background-color: #07162C;
  color: #94A3B8;
  padding: 48px 0 24px;
  border-top: 4px solid #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: #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: 40px;
  }
  .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%;
  }
}
