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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

header {
  background-color: #00943e;
  color: white;
  padding-top: 30px;
  padding-bottom: 0;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 2rem;
  margin-bottom: 15px;
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
  padding: 10px 20px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Categorías */
.categories {
  margin: 30px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.category-btn {
  background-color: white;
  border: 2px solid #00943e;
  color: #00943e;
  padding: 12px 25px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

/* Grid de productos */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.product-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.product-image {
  width: 100%;
  padding-top: 75%;
  background-color: #e0e0e0;
  position: relative;
  overflow: hidden;
}

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

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

.product-title {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #333;
  line-height: 1.3;
}

.product-description {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
  line-height: 1.5;
  flex-grow: 1;
}

.product-price {
  font-size: 1.3rem;
  color: #00943e;
  font-weight: bold;
  margin-top: auto;
}

/* Popup Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  margin: 50px auto;
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #333;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  background-color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.modal-body {
  display: flex;
  flex-direction: row;
}

.modal-image {
  flex: 1;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-image img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.modal-info {
  flex: 0 0 350px;
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.modal-title {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #333;
}

.modal-description {
  color: #666;
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.modal-price {
  font-size: 2rem;
  color: #00943e;
  font-weight: bold;
  margin-bottom: 30px;
}

.whatsapp-btn {
  background-color: #25d366;
  color: white;
  padding: 15px 25px;
  border: none;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.whatsapp-btn svg {
  width: 24px;
  height: 24px;
  fill: white;
}

/* WhatsApp Float Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
}

.whatsapp-float svg {
  width: 35px;
  height: 35px;
  fill: white;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-body {
    flex-direction: column;
  }

  .modal-info {
    flex: 1;
    width: 100%;
  }

  .modal-content {
    margin: 20px auto;
    width: 95%;
  }

  .modal-image img {
    max-height: 50vh;
  }

  header h1 {
    font-size: 1.8rem;
  }

  header p {
    font-size: 1rem;
    padding: 0 15px;
  }

  .container {
    padding: 15px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .product-image {
    padding-top: 100%;
  }

  .product-info {
    padding: 15px;
  }

  .product-title {
    font-size: 1rem;
  }

  .product-description {
    font-size: 0.85rem;
  }

  .product-price {
    font-size: 1.2rem;
  }

  .whatsapp-float {
    width: 55px;
    height: 55px;
    bottom: 25px;
    right: 25px;
  }

  .whatsapp-float svg {
    width: 32px;
    height: 32px;
  }

  .categories {
    gap: 10px;
    margin: 20px 0;
  }

  .category-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }

  header p {
    font-size: 0.9rem;
  }

  .container {
    padding: 10px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .product-card {
    max-width: 400px;
    margin: 0 auto;
    position: relative;
  }

  .categories {
    gap: 8px;
  }

  .category-btn {
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }

  .modal-title {
    font-size: 1.2rem;
  }

  .modal-price {
    font-size: 1.5rem;
  }

  .modal-info {
    padding: 20px;
  }
}

.new-badge-modern {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #047533;
  color: white;
  padding: 8px 16px;
  border-radius: 0 0 15px 15px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 3px 10px rgba(0, 148, 62, 0.3);
  z-index: 100;
  transform: rotate(-5deg);
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

.new-badge-modern-v {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #da0606;
  color: white;
  padding: 8px 16px;
  border-radius: 0 0 15px 15px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 3px 10px rgba(0, 148, 62, 0.3);
  z-index: 100;
  transform: rotate(-5deg);
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

.vendido {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #bf0603;
  color: white;
  padding: 8px 16px;
  border-radius: 0 0 15px 15px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 3px 10px rgba(0, 148, 62, 0.3);
  z-index: 100;
  transform: rotate(-5deg);
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}