/* Base Reset */
html {
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-dark-blue);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Typography Utils */
.text-primary { color: var(--color-dark-blue); }
.text-secondary { color: var(--text-muted); }
.font-black { font-weight: 900; }
.font-regular { font-weight: 400; }

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(65, 64, 102, 0.05);
  padding: 16px 0;
  transition: var(--transition-normal);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 28px;
  color: var(--color-dark-blue);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--color-light-blue);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-weight: 600;
  color: var(--color-dark-blue);
  transition: var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-gold);
  transition: var(--transition-fast);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--color-light-blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-cart {
  background: transparent;
  border: none;
  color: var(--color-dark-blue);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.btn-cart:hover {
  background: rgba(65, 64, 102, 0.05);
  color: var(--color-light-blue);
}

.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: var(--color-orange-brown);
  color: white;
  font-size: 12px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  height: 90px;
  width: auto;
  object-fit: contain;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--border-radius-pill);
  font-weight: 700;
  font-family: var(--font-primary);
  cursor: pointer;
  border: none;
  transition: var(--transition-normal);
  gap: 8px;
}

.btn-primary {
  background-color: var(--color-light-blue);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--color-dark-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-gold);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--color-orange-brown);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero {
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 80vh;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(143,199,238,0.2) 0%, rgba(250,250,250,0) 70%);
  border-radius: 50%;
  z-index: -1;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(226,195,106,0.15) 0%, rgba(250,250,250,0) 70%);
  border-radius: 50%;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-content h1 {
  font-size: 56px;
  margin-bottom: 24px;
  color: var(--color-dark-blue);
}

.hero-content h1 span {
  color: var(--color-light-blue);
}

.hero-content p {
  font-size: 20px;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 500px;
}

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

.hero-image {
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.hero-image img {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 4/3;
  width: 100%;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* Categories Banner */
.categories {
  padding: 40px 0;
  background: white;
  border-top: 1px solid rgba(0,0,0,0.05);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.categories-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition-normal);
}

.category-item:hover {
  transform: translateY(-5px);
}

.category-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.category-item:hover .category-icon {
  box-shadow: var(--shadow-md);
}

.category-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-dark-blue);
}

/* Category Images */
.icon-img-container {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
}

.category-img {
  width: 100%;
  height: 100%;
  object-fit: contain; 
}

/* Colors for specific categories */
.cat-antipulgas { background-color: var(--cat-antipulgas); }
.cat-belleza { background-color: var(--cat-belleza); }
.cat-gatos { background-color: var(--cat-gatos); }
.cat-hogar { background-color: var(--cat-hogar); }
.cat-pecuario { background-color: var(--cat-pecuario); }

/* Products Section */
.products-section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: 40px;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 18px;
}

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

.product-card {
  background: var(--bg-surface);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(65, 64, 102, 0.05);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(143, 199, 238, 0.3);
}

.product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 12px;
  border-radius: var(--border-radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: white;
  z-index: 2;
}

.product-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--border-radius-md);
  margin-bottom: 24px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

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

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

.product-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-dark-blue);
  line-height: 1.3;
}

.product-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.product-price {
  font-size: 24px;
  font-family: var(--font-heading);
  color: var(--color-orange-brown);
}

.btn-add {
  background: var(--color-dark-blue);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-add:hover {
  background: var(--color-light-blue);
  transform: scale(1.1);
}

/* Call to action (Mercado Libre) */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--color-dark-blue) 0%, #2A2A45 100%);
  color: white;
  text-align: center;
}

.cta-container {
  max-width: 800px;
  margin: 0 auto;
}

.cta-section h2 {
  color: white;
  font-size: 48px;
  margin-bottom: 24px;
}

.cta-section p {
  font-size: 20px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 40px;
}

.btn-meli {
  background: #FFE600; /* Mercado Libre Yellow */
  color: #2D3277;
  font-size: 18px;
  padding: 16px 40px;
}

.btn-meli:hover {
  background: #FFF059;
  transform: translateY(-3px);
  color: #2D3277;
  box-shadow: 0 10px 20px rgba(255, 230, 0, 0.3);
}

.btn-meli:hover {
  background: #FFF059;
  transform: translateY(-3px);
  color: #2D3277;
  box-shadow: 0 10px 20px rgba(255, 230, 0, 0.3);
}

/* B2B Section */
.b2b-section {
  padding: 100px 0;
  background-color: var(--bg-surface);
}

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

.b2b-content h2 {
  font-size: 40px;
  margin-bottom: 24px;
  color: var(--color-dark-blue);
}

.b2b-content p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.b2b-benefits {
  margin-bottom: 40px;
}

.b2b-benefits li {
  font-weight: 700;
  color: var(--color-dark-blue);
  margin-bottom: 12px;
  font-size: 16px;
}

/* Footer */
.footer {
  background: white;
  padding: 80px 0 40px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}

.footer-brand .logo {
  margin-bottom: 24px;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 300px;
  margin-bottom: 24px;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-dark-blue);
  transition: var(--transition-fast);
}

.social-link:hover {
  background: var(--color-light-blue);
  color: white;
  transform: translateY(-3px);
}

.footer-col h4 {
  font-size: 20px;
  margin-bottom: 24px;
  font-family: var(--font-primary);
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-light-blue);
}

.footer-bottom {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid rgba(0,0,0,0.05);
  color: var(--text-muted);
  font-size: 14px;
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: var(--transition-normal);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #20BA56;
}

/* Cart Sidebar & Overlay */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
}

.cart-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--bg-surface);
  z-index: 1001;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  padding: 24px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h3 {
  margin: 0;
  font-size: 24px;
}

.btn-close-cart {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.btn-close-cart:hover {
  color: var(--color-dark-blue);
}

.cart-items {
  flex-grow: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-cart-msg {
  text-align: center;
  color: var(--text-muted);
  margin-top: 40px;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.cart-item-img {
  width: 80px;
  height: 80px;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-dark-blue);
  margin-bottom: 4px;
}

.cart-item-price {
  color: var(--color-orange-brown);
  font-weight: bold;
}

.cart-item-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.03);
  border-radius: var(--border-radius-pill);
  padding: 2px 8px;
}

.qty-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  color: var(--color-dark-blue);
}

.qty-val {
  font-size: 14px;
  font-weight: 600;
}

.btn-remove-item {
  background: none;
  border: none;
  color: #ff4d4f;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.cart-footer {
  padding: 24px;
  border-top: 1px solid rgba(0,0,0,0.05);
  background: var(--bg-surface);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-dark-blue);
}

.btn-checkout {
  width: 100%;
  padding: 16px;
  font-size: 16px;
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero-grid,
  .b2b-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-content p,
  .b2b-content p {
    margin: 0 auto 40px;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .b2b-benefits li {
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* In a real app we'd add a hamburger menu */
  }
  
  .hero-content h1 {
    font-size: 40px;
  }
  
  .section-header h2 {
    font-size: 32px;
  }
  
  .categories-container {
    justify-content: center;
  }
}
