@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&family=Playfair+Display:ital,wght@0,600..900;1,600..900&display=swap');

:root {
  --primary-color: #e63946;
  --primary-hover: #d62828;
  --secondary-color: #ffb703;
  --secondary-hover: #fb8500;
  --success-color: #25d366;
  --bg-color: #fdf8f5;
  --text-color: #2b2d42;
  --white: #ffffff;
  --gray-light: #f1f1f1;
  --gray-border: #e0e0e0;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Lora', Georgia, serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, .logo-text {
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: -0.2px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 1rem;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.logo-img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--gray-border);
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Barra de búsqueda */
.search-container {
  display: flex;
  align-items: center;
  position: relative;
  flex: 1;
  max-width: 400px;
  min-width: 200px;
}

.search-container input {
  width: 100%;
  padding: 0.6rem 2.8rem 0.6rem 1rem;
  border: 1.5px solid var(--gray-border);
  border-radius: 25px;
  outline: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background-color: #f9f9f9;
}

.search-container input:focus {
  border-color: var(--primary-color);
  background-color: var(--white);
  box-shadow: 0 0 8px rgba(230, 57, 70, 0.15);
}

.search-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 1rem;
}

/* Navegación */
.nav-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-btn, .cart-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.2s ease;
  color: var(--text-color);
}

.nav-btn:hover {
  background-color: var(--gray-light);
}

.cart-btn {
  background-color: var(--secondary-color);
  color: #000;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cart-btn:hover {
  background-color: var(--secondary-hover);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3.5rem 1rem;
  background: linear-gradient(135deg, #ffe5ec 0%, #fff3bf 100%);
}

.hero h1 {
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.1rem;
  color: #555;
}

/* Catálogo */
main {
  flex: 1;
}

.catalog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.catalog-container h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.product-info {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  color: var(--primary-color);
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.product-info .price {
  font-weight: bold;
  margin: 0.5rem 0;
  color: #2a9d8f;
  font-size: 1.1rem;
}

.btn-primary {
  width: 100%;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 0.7rem;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  margin-top: auto;
  transition: background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-whatsapp {
  background-color: var(--success-color);
}

.btn-whatsapp:hover {
  background-color: #1eb954;
}

/* Modales */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: var(--white);
  padding: 2rem;
  border-radius: 14px;
  width: 100%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.close-icon {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #888;
  cursor: pointer;
}

.close-icon:hover {
  color: var(--primary-color);
}

.modal-content h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.modal-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
}

/* Elementos del Carrito */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-border);
}

.cart-item-img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cart-item-name {
  font-size: 0.95rem;
  font-weight: bold;
}

.cart-item-price {
  font-size: 0.85rem;
  color: #2a9d8f;
  margin-top: 2px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.btn-qty {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--gray-border);
  background: var(--white);
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-qty:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
}

.qty-number {
  font-weight: bold;
  font-size: 0.9rem;
}

.btn-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary-color);
  font-size: 1rem;
  padding: 4px;
}

.cart-summary {
  margin: 1rem 0;
  padding-top: 0.5rem;
}

.total {
  font-size: 1.2rem;
  text-align: right;
}

/* Formulario */
.form-group {
  margin-bottom: 0.8rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  font-size: 0.95rem;
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Footer */
.footer {
  background-color: var(--white);
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--gray-border);
  margin-top: auto;
  font-size: 0.9rem;
  color: #666;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--text-color);
  color: var(--white);
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 2000;
  transition: opacity 0.3s ease;
}

.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
  .header {
    flex-direction: column;
    padding: 0.8rem;
  }

  .search-container {
    width: 100%;
    max-width: 100%;
  }

  .nav-buttons {
    width: 100%;
    justify-content: space-between;
  }
}
