/* ================= RESET SIMPLE ================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1b1b1b;
  background-color: #f6f4f0;
  line-height: 1.6;
}

/* ================= UTILIDADES ================= */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background-color: #ffffff;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #cc6600;
}

.section-intro {
  max-width: 720px;
  margin-bottom: 2rem;
  color: #555;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.btn-primary {
  background-color: #8c4a2f;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #6f3721;
}

.btn-outline {
  border-color: #8c4a2f;
  color: #8c4a2f;
  background-color: transparent;
}

.btn-outline:hover {
  background-color: #f5ebe4;
}

/* ================= TOP BAR ================= */
.top-bar {
  background-color: #3d2b1f;
  /* Dark Coffee */
  color: #f6f4f0;
  padding: 0.4rem 0;
  font-size: 0.8rem;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem;
  /* Match container padding */
}

/* ================= HEADER ================= */
.main-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 240, 0.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e0d4c8;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  /* Compact vertical padding */
  /* Use full width to fit all items */
  max-width: 100%;
  width: 100%;
}

.logo {
  display: flex;
  flex-direction: column;
  /* Stack name and location */
  line-height: 1.1;
  /* Prevent logo from taking too much space if needed, or allow wrap */
  white-space: nowrap;
  margin-right: 1rem;
}

.brand-name {
  font-weight: 700;
  color: #3d2b1f;
  font-size: 1.1rem;
}

.brand-location {
  font-weight: 400;
  font-size: 0.75rem;
  color: #8c4a2f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.main-nav {
  display: flex;
  /* Reduced gap to fit items */
  gap: 0.1rem;
  /* Very tight gap */
  align-items: center;
}

.main-nav a {
  font-size: 0.8rem;
  /* Slightly reduced font */
  /* Slightly smaller text */
  text-decoration: none;
  color: #4b3b32;
  /* Fixed size reduced to fit all items comfortably */
  /* Reduced width to 110px to ensure fit on standard screens */
  width: 110px;
  height: 42px;
  /* Slightly reduced height */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
  white-space: nowrap;
}

/* Bean background using pseudo-element to allow independent rotation */
.main-nav a::before {
  content: "";
  position: absolute;
  /* Centering the pseudo-element relative to the parent */
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  /* Adjust margins to truly center the element if we change positioning context,
     but here top/left 50% + translate center is safer for scaling from center */
  transform: translate(-50%, -50%) scale(0.8) rotate(21deg);
  background-image: url('images/bean_hover.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* Bouncy effect */
  z-index: -1;
  pointer-events: none;
  /* Ensure clicks go through to the link */
}

.main-nav a:hover {
  color: #ffffff;
  /* White text on dark bean */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.main-nav a:hover::before {
  opacity: 1;
  /* Double size requested: increasing scale significantly. 
     Using 2.5 to ensure it's large enough to see details relative to the 45px height */
  transform: translate(-50%, -50%) scale(1.35) rotate(1deg);
}

.language-switcher {
  display: flex;
  gap: 0.25rem;
}

.language-switcher button {
  border: none;
  background-color: transparent;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.75rem;
  color: #4b3b32;
}

.language-switcher button.active,
.language-switcher button:hover {
  background-color: #8c4a2f;
  color: #ffffff;
}

/* ================= HERO ================= */
.hero {
  padding: 5rem 0 4rem;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 2.5rem;
}

.hero-text h1 {
  font-size: 2.4rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #2b1f17;
}

.hero-text p {
  color: #555;
  margin-bottom: 1.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-image {
  /* Removed grid to allow full image */
  display: block;
}

.hero-full-img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 15px 40px rgba(61, 43, 31, 0.15);
  object-fit: cover;
  max-height: 500px;
}

/* ================= CARDS EXPERIENCIA ================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: #ffffff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(22, 8, 3, 0.06);
}

.card h3 {
  margin-bottom: 0.75rem;
  color: #3d2b1f;
}

.card p {
  color: #555;
  font-size: 0.95rem;
}

/* ================= CÓMO LLEGAR ================= */
.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.map-wrapper {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(22, 8, 3, 0.06);
}

.map-wrapper iframe {
  width: 100%;
  height: 320px;
  border: 0;
}

.list {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
  color: #555;
}

.list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.list li::before {
  content: "•";
  color: #8c4a2f;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.location-details {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.route-info h3,
.distances-info h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #3d2b1f;
  border-bottom: 2px solid #e0d4c8;
  padding-bottom: 0.5rem;
  display: inline-block;
}

.distances-list {
  list-style: none;
  padding: 0;
}

.distances-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #e0d4c8;
  padding: 0.5rem 0;
  font-size: 0.95rem;
}

.distances-list li:last-child {
  border-bottom: none;
}

.distances-list .time {
  font-weight: 600;
  color: #8c4a2f;
}

.location-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ================= GALERÍA ================= */
.gallery-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  background-color: transparent;
  border: 1px solid #8c4a2f;
  color: #8c4a2f;
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: #8c4a2f;
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  padding: 1rem 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  aspect-ratio: 4/3;
  /* Uniform aspect ratio for neatness */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item.hidden {
  display: none;
  /* Hide filtered items */
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
  transform: scale(1.15);
}

.gallery-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(61, 43, 31, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-photo {
  background: linear-gradient(135deg, #f2e1d1, #f7f0e8);
  color: #3d2b1f;
}

.gallery-video {
  background: linear-gradient(135deg, #d9e7ff, #edf4ff);
  color: #1f3559;
}

/* ================= TIENDA ================= */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.product-card {
  background-color: #ffffff;
  border-radius: 1rem;
  overflow: hidden;
  border: none;
  box-shadow: 0 10px 30px rgba(61, 43, 31, 0.08);
  /* Suave sombra café */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(61, 43, 31, 0.12);
}

.product-image {
  background-color: #f0e4d8;
  /* Fondo suave por si la imagen tarda */
  height: 250px;
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: #8c4a2f;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.product-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #3d2b1f;
}

.product-desc {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  flex-grow: 1;
  /* Empuja el precio/form hacia abajo */
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #e0d4c8;
}

.price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #8c4a2f;
}

.weight {
  font-size: 0.85rem;
  color: #888;
  font-weight: 500;
}

/* Formulario */
.product-form {
  display: grid;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #3d2b1f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-form select {
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #d1c4b4;
  font-size: 0.9rem;
  background-color: #fff;
  cursor: pointer;
}

/* Cantidad Selector */
.qty-selector {
  display: flex;
  border: 1px solid #d1c4b4;
  border-radius: 0.5rem;
  overflow: hidden;
  max-width: 120px;
}

.qty-selector input {
  width: 100%;
  border: none;
  text-align: center;
  font-weight: 600;
  color: #3d2b1f;
  -moz-appearance: textfield;
  appearance: textfield;
}

.btn-qty {
  background: #f6f4f0;
  border: none;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  color: #3d2b1f;
  font-weight: bold;
  transition: background 0.2s;
}

.btn-qty:hover {
  background: #e0d4c8;
}

.btn-add-cart {
  margin-top: 0.5rem;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.payment-note {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
}

/* ================= BAR ================= */
.bar-photo {
  border-radius: 1rem;
  padding: 2rem;
  background: linear-gradient(135deg, #473b78, #fb8c8a);
  color: #ffffff;
  text-align: center;
  font-weight: 600;
}

/* ================= FORMULARIOS RESERVA / PETICIONES ================= */
.booking-form,
.custom-experience-form {
  margin-top: 1.5rem;
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(22, 8, 3, 0.06);
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.booking-form label,
.custom-experience-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: #3d2b1f;
}

.booking-form input,
.booking-form select,
.custom-experience-form input,
.custom-experience-form select,
.custom-experience-form textarea,
.booking-form textarea {
  margin-top: 0.25rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid #d1c4b4;
  font-size: 0.9rem;
}

textarea {
  resize: vertical;
}

/* ================= FOOTER ================= */
.main-footer {
  background-color: #1e130a;
  color: #f6f4f0;
  padding: 1.5rem 0;
  margin-top: 2rem;
}

.footer-content {
  text-align: center;
  font-size: 0.85rem;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {

  .hero-content,
  .two-columns {
    grid-template-columns: 1fr;
  }

  .main-nav {
    display: none;
    /* para simplificar: podrías implementar menú hamburguesa en JS */
  }

  .header-content {
    gap: 0.75rem;
  }
}

@media (max-width: 600px) {
  .hero {
    padding-top: 4rem;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .section {
    padding: 3rem 0;
  }
}