:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #38bdf8;
  --accent: #0ea5e9;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Notification Bar */
.top-bar {
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.82rem;
  padding: 0.5rem 1rem;
  text-align: center;
  border-bottom: 1px solid #1e293b;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.top-bar span {
  color: #38bdf8;
  font-weight: 600;
}

.top-bar a {
  color: #cbd5e1;
  text-decoration: underline;
  margin-left: 0.5rem;
}

/* Main Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.brand-icon {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}

.brand-info h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
}

.brand-info span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--primary);
  font-weight: 700;
  display: block;
}

/* Buscador Central Estilo Tiendanube */
.nav-search-bar {
  flex: 1;
  max-width: 480px;
  position: relative;
  display: flex;
  align-items: center;
}

.nav-search-input {
  width: 100%;
  padding: 0.6rem 2.5rem 0.6rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  font-size: 0.9rem;
  outline: none;
  background: #f8fafc;
  transition: all 0.2s;
}

.nav-search-input:focus {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.nav-search-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-nav-account {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: #334155;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.btn-nav-account:hover {
  background: #e2e8f0;
  color: var(--primary-dark);
}

.btn-whatsapp-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #25d366;
  color: white;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.btn-whatsapp-nav:hover {
  background: #20ba59;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.cart-btn {
  background: #0f172a;
  border: none;
  color: white;
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  position: relative;
  font-size: 0.85rem;
}

.cart-btn:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.cart-badge {
  background: var(--primary-light);
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

/* Category Navigation Sub-bar */
.category-subnav {
  background: white;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
}

.category-subnav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.cat-pill-btn {
  background: none;
  border: 1px solid transparent;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
}

.cat-pill-btn:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.cat-pill-btn.active {
  background: #e0f2fe;
  color: var(--primary-dark);
  border-color: #bae6fd;
}

/* Hero Banner */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  padding: 2.75rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-pill {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero h2 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero h2 span {
  color: #38bdf8;
}

.hero p {
  color: #94a3b8;
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* 4 Beneficios Destacados (Banners Informativos) */
.benefits-section {
  max-width: 1240px;
  margin: -1.5rem auto 2rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.benefit-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.benefit-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.benefit-icon {
  font-size: 1.85rem;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #f0f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.benefit-text h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.benefit-text p {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.3;
}

/* Product Catalog Grid */
.catalog-container {
  max-width: 1240px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.product-card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 85%;
  background: #f8fafc;
  overflow: hidden;
}

.product-card-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card-img-wrap img {
  transform: scale(1.05);
}

.product-badge-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  z-index: 2;
  text-transform: uppercase;
}

.product-badge-pill.outstock {
  background: #dc2626;
}

.product-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.product-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.product-price-box {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.product-price-transfer {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.product-transfer-desc {
  font-size: 0.78rem;
  color: #16a34a;
  font-weight: 700;
  margin-top: 0.1rem;
}

.product-installments {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.product-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-add-cart {
  flex: 1;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: background 0.2s;
}

.btn-add-cart:hover {
  background: var(--primary-dark);
}

.btn-quick-view {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: #334155;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-quick-view:hover {
  background: #e2e8f0;
}

.btn-outstock-wa {
  width: 100%;
  background: #f59e0b;
  color: #0f172a;
  border: none;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: background 0.2s;
}

.btn-outstock-wa:hover {
  background: #d97706;
  color: white;
}

/* Floating WhatsApp Button */
.whatsapp-float-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.whatsapp-float-btn {
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  position: relative;
  transition: transform 0.2s;
  animation: pulse 2s infinite;
}

.whatsapp-float-btn:hover {
  transform: scale(1.08);
}

.whatsapp-float-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: #22c55e;
  border: 2px solid white;
  border-radius: 50%;
}

.whatsapp-float-tooltip {
  background: white;
  color: #0f172a;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  white-space: nowrap;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Modal Detalle de Producto */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content-card {
  background: white;
  border-radius: var(--radius);
  max-width: 750px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Offcanvas Drawer Carrito */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 80;
  display: none;
}

.cart-overlay.active {
  display: block;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: white;
  z-index: 90;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

.cart-drawer.active {
  right: 0;
}

.cart-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.cart-item img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.cart-item-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 0.2rem;
}

.cart-qty-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.btn-qty {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  cursor: pointer;
  font-weight: bold;
}

.cart-item-delete {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1rem;
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
}

.cart-total-row span {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.cart-total-row strong {
  font-size: 1.6rem;
  color: #0f172a;
  font-weight: 800;
}

.btn-checkout {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.9rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-checkout:hover {
  background: var(--primary-dark);
}

/* Footer Institucional Estilo Company Dental */
footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3.5rem 1.5rem 1.5rem;
  margin-top: auto;
  border-top: 1px solid #1e293b;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col p, .footer-col a {
  color: #94a3b8;
  font-size: 0.88rem;
  text-decoration: none;
  line-height: 1.6;
  display: block;
  margin-bottom: 0.4rem;
}

.footer-col a:hover {
  color: #38bdf8;
}

.footer-badges-wrap {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.footer-badge-pill {
  background: #1e293b;
  color: #e2e8f0;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  border: 1px solid #334155;
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  text-align: center;
  font-size: 0.8rem;
}

/* Responsiveness */
@media (max-width: 900px) {
  .nav-search-bar {
    order: 3;
    max-width: 100%;
    width: 100%;
    margin-top: 0.5rem;
  }
  .nav-container {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .hero h2 {
    font-size: 1.75rem;
  }
  .products-grid {
    grid-template-columns: 1fr;
  }
  .cart-drawer {
    max-width: 100%;
  }
  .whatsapp-float-widget {
    bottom: 15px;
    right: 15px;
  }
}
