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

:root {
  --primary: #A0826D;
  --primary-dark: #8B7355;
  --primary-light: #C9A887;
  --secondary: #4A5F3A;
  --text: #ffffff;
  --text-light: #6D4C41;
  --border: #D7CCC8;
  --bg: #f9fafb;
  --bg-card: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: url('../images/fondo.png') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  z-index: -1;
}

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

/* Header */
header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cart-button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.cart-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.cart-button:active {
  transform: translateY(0);
}

.cart-count {
  background: white;
  color: var(--primary);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Products Grid */
.products-section {
  padding: 60px 0;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 60px;
  text-align: center;
  position: relative;
  text-transform: uppercase;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1)
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 5px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.product-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
  border: 1px solid transparent;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

/* Estados de productos */
.product-card.coming-soon {
  opacity: 0.75;
  position: relative;
}

.product-card.coming-soon::after {
  content: '🔜 PRÓXIMAMENTE';
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.product-card.out-of-stock {
  opacity: 0.85;
}

.product-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 48px;
  position: relative;
  overflow: hidden;
}

.product-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%);
  opacity: 0;
  transition: var(--transition);
}

.product-card:hover .product-image::before {
  opacity: 1;
}

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

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

.product-info {
  padding: 24px;
}

.product-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-description {
  color: var(--text-light);
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.product-price {
  font-size: 24px;
  color: var(--primary);
  font-weight: 800;
}

.add-to-cart-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.add-to-cart-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow);
}

.add-to-cart-btn:active {
  transform: scale(0.98);
}

.add-to-cart-btn:disabled {
  background: var(--border);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.stock-info {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 12px;
  font-weight: 500;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  right: -440px;
  top: 0;
  width: 440px;
  height: 100vh;
  background: var(--bg-card);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

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

.cart-header {
  padding: 28px;
  border-bottom: 2px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.cart-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #000000;
}

.close-cart {
  background: var(--bg);
  border: 1px solid var(--border);
  color: #000000;
  font-size: 24px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: var(--transition);
}

.close-cart:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: rotate(90deg);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 28px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
  color: #000000;
}

.cart-item-price {
  color: #2d5016;
  font-size: 16px;
  font-weight: 800;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.qty-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  color: #000000;
}

.qty-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.1);
}

.qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.cart-item-quantity span {
  font-size: 16px;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
  color: #000000;
}

.remove-item {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 20px;
  padding: 6px;
  transition: var(--transition);
  border-radius: 6px;
}

.remove-item:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  transform: scale(1.1);
}

.cart-footer {
  padding: 28px;
  border-top: 2px solid var(--border);
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
  color: #000000;
}

.checkout-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--secondary) 0%, #f59e0b 100%);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.checkout-btn:active {
  transform: translateY(0);
}

.checkout-btn:disabled {
  background: var(--border);
  cursor: not-allowed;
  transform: none;
}

.empty-cart {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-light);
  font-size: 15px;
}

.empty-cart p {
  margin-top: 16px;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 999;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Loading */
.loading {
  text-align: center;
  padding: 80px;
  font-size: 15px;
  color: var(--text-light);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

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

  .section-title {
    font-size: 32px;
    margin-bottom: 40px;
  }

  .product-image {
    height: 300px;
    padding: 1px;
    background: #ffffff;
  }

  .product-image img {
    object-fit: contain !important;
    max-height: 100%;
    max-width: 100%;
  }

  h1 {
    font-size: 20px;
  }

  .cart-button {
    padding: 10px 16px;
    font-size: 13px;
  }
}
/* Contact Footer */
.contact-footer {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(229, 231, 235, 0.5);
  padding: 40px 0;
  margin-top: 60px;
}

.contact-info {
  text-align: center;
}

.contact-info h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.contact-details {
  display: flex;
  gap: 30px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 12px 24px;
  background: rgba(160, 130, 109, 0.1);
  border-radius: 10px;
  transition: var(--transition);
}

.contact-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

@media (max-width: 768px) {
  .contact-details {
    flex-direction: column;
    gap: 15px;
  }

  .contact-link {
    width: 100%;
    justify-content: center;
  }
}