@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
}

body {
  font-family: "Segoe UI", sans-serif;
  background-color: #fff;
}

/* Top bar */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background-color: #5a8d23;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 20px;
}

/* Menú superior */
.top-menu {
  display: flex;
  gap: 20px;
  list-style: none;
}

.top-menu li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  transition: color 0.3s;
}

.top-menu li a:hover {
  color: #777777;
}

/* Teléfono en línea */
.phone-bar {
  display: flex;
  align-items: center;
  background-color: #1d6433;
  color: white;
  text-align: center;
  padding: 5px 10px;
  font-size: 14px;
}

.phone-bar i {
  margin-right: 5px;
}

.phone-bar .phone-text {
  margin-right: 5px;
}

/* Menú principal */
.menu {
  position: fixed;
  top: 40px;
  left: 0;
  width: 100%;
  height: 90px;
  background-color: #fff;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Botón de menú hamburguesa */
.menu-toggle {
  font-size: 24px;
  cursor: pointer;
  background: none;
  border: none;
  color: rgb(76, 155, 31);
  display: none;
  width: 50px;
  height: 50px;
  justify-content: center;
  align-items: center;
  margin: 0 15px;
  z-index: 1001;
}

/* Logo */
.logo img {
  height: 60px;
}

/* Iconos del header (ej. carrito) */
.iconos-header {
  position: relative;
}

.carrito-btn {
  text-decoration: none;
  color: #333;
  font-size: 24px;
  position: relative;
}

.cart-count {
  background: #5a8d23;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  position: absolute;
  top: -5px;
  right: -10px;
}

/* Menú desplegable */
.navbar {
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;
  background-color: #f5f5f5;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  padding: 10px 20px;
  z-index: 1000;
}

.navbar.active {
  display: flex;
}

.navbar ul {
  list-style: none;
  margin-top: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.navbar > ul > li > a {
  color: #5a8d23;
  font-weight: bold;
  text-decoration: none;
  font-size: 16px;
  display: block;
  padding: 2px 0;
  text-align: center;
}

/* Submenús */
.navbar li ul {
  display: none;
  margin-left: 15px;
}

.navbar li:hover > ul {
  display: block;
}

.navbar li ul li a {
  color: #5a1515;
  font-weight: normal;
  text-decoration: none;
  font-size: 14px;
  padding: 1px 0;
  display: block;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .top-bar {
    display: none;
  }

  .menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    width: 100%;
    background-color: white;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 999;
  }

  .menu > .menu-toggle > .logo > .carrito-btn {
    justify-items: space-between;
    display: flex;
    align-items: center;
    flex-direction: row;
  }

  .menu-toggle {
    display: flex;
    justify-content: center;
    color: #5a8d23;
  }

  .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    margin-right: 59px;
  }


  .logo img {
    height: 60px;
    width: auto;
  }

  .iconos-header {
    display: flex;
  }

  .carrito-btn {
    right: 30px;
    font-size: 24px;
    color: #333;
    position: relative;
  }

  .cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background: #5a8d23;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
  }

  .navbar {
    width: 100%;
    top: 70px;
    left: 0;
  }

  .navbar ul > li > a {
    font-size: 18px;
  }

  .navbar li ul li a {
    font-size: 16px;
  }
}

/* Float WhatsApp Button */
.float-wa {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 100;
  transition: all 0.3s ease;
}

.float-wa:hover {
  background-color: #128c7e;
}

/* Cart Panel Styles */
.carrito-panel {
  display: none;
  position: fixed;
  top: 50px;
  right: -400px;
  width: 420px;
  height: 100%;
  background-color: #ffffff;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  padding: 20px;
  z-index: 1001;
  overflow-y: auto;
  transition: right 0.3s ease;
}

.carrito-panel.active {
  display: block;
  right: 0;
}

.carrito-panel:hover,
.carrito-btn:hover + .carrito-panel {
  right: 0;
}

.carrito-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.carrito-header h3 {
  font-size: 20px;
  color: #333;
}

.btn-contacto {
  background-color: #5a8d23;
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
}

.btn-contacto:hover {
  background-color: #4a7a1d;
}


.cerrar-btn {
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.carrito-contenido {
  padding: 10px 0;
}

.imagen-carrito-vacio img {
    text-align: center;
  max-width: 100px;
  margin: 0 auto;
}

.carrito-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.carrito-item img {
  width: 50px;
  height: 50px;
  margin-right: 10px;
}

.carrito-item h4 {
  font-size: 14px;
  color: #333;
  margin: 0;
  margin-right: 20px;
}

.carrito-item button {
  background-color: #e74c3c;
  color: #fff;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  margin-left: auto;
}

.carrito-item button:hover {
  background-color: #c0392b;
}

.carrito-acciones {
  margin-top: 20px;
  text-align: center;
}

.carrito-acciones button {
  background-color: #5a8d23;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  margin: 0 5px;
  font-family: "Roboto Condensed", sans-serif;
}

.carrito-acciones .vaciar-btn {
  background-color: #e74c3c;
}

.carrito-acciones .vaciar-btn:hover {
  background-color: #c0392b;
}

.carrito-acciones .pedido-btn:hover {
  background-color: #4a7a1d;
}

/* Estilos para breadcrumb y título */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  margin-top: 150px;
}

.breadcrumb {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.breadcrumb a {
  color: #666;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: #666;
}

.page-title {
  font-size: 28px;
  font-weight: bold;
  color: #4a7a1d;
  margin-bottom: 20px;
}

/* Estilos adaptados para el contenedor de productos */
.products {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 columnas por defecto */
  grid-template-rows: auto auto; /* 2 filas */
  gap: 45px;
  padding: 20px;
  background-color: #f5f5f5;
  max-width: 1400px; /* Limita el ancho total */
  margin: 0 auto; /* Centra el contenedor */
}

.product-container {
  width: 100%; /* Ocupa el espacio asignado por la grilla */
  height: 370px;
  border: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background-color: white;
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
  padding: 10px;
  box-sizing: border-box;
  border-color: #4e4e4e;
  border-radius: 5px 30px 5px 20px;

}

.product-container:hover {
    transform: scale(1.2);
    height: auto;
}

.product-container>h5 {
    font-size: 13px;
    color: #366808;
    text-align: center;
    margin: 5px 0;
    margin-bottom: 5px;
}

.product-container>p {
    margin-top: 2px;
    font-size: 12px;
    color: #333;
    text-align: center;
    margin-top: 10px;
}

.product-image {
  max-width: 180px;
  max-height: 180px;
  object-fit: contain;
  transition: opacity 0.5s ease;
}

.product-container:hover .product-image.initial {
  opacity: 0;
}

.product-image.secondary {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 350px;
  max-height: 350px;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.product-container:hover .product-image.secondary {
  opacity: 1;
}

.order-button {
  padding: 8px 16px;
  background-color: #5a8d23;
  border-radius: 30px ;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  width: 100%;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

.order-button:hover {
  background-color: #4a7a1d;
}

.footer {
  background-color: #76a934;
  padding: 40px 20px;
  color: #000000;
  text-align: center;
}

.footer-title {
  color: #ffffff;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-content {
  display: flex;
  justify-content: space-around;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.footer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 15px;
  margin-bottom: 20px;
  flex: 1;
  min-width: 250px;
}

.footer-box i {
  font-size: 36px;
  margin-bottom: 15px;
  color: #030303;
}

.footer-box p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-top: 30px;
}

.footer-social i {
  font-size: 24px;
  color: #030303;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.footer-social i:hover {
  transform: translateY(-5px);
  color: #f4f4f4;
}

/* Estilos responsive para productos */
@media (max-width: 950px) {
  .products {
    grid-template-columns: repeat(3, 1fr); /* 3 columnas */
    gap: 15px;
    padding: 15px;
  }

  .product-container {
    height: 340px;
    padding: 8px;
  }

  .product-image {
    max-width: 140px;
    max-height: 140px;
  }

  .product-image.secondary {
    max-width: 200px;
    max-height: 200px;
  }

  .product-container h4 {
    font-size: 14px;
    margin-top: 50px;
  }

  .order-button {
    padding: 6px 12px;
    font-size: 14px;
  }

  .product-container:hover {
    transform: scale(1.1);
  }
}

@media (max-width: 480px) {
  .products {
    grid-template-columns: repeat(2, 1fr); /* 2 columnas */
    gap: 10px;
    padding: 10px;
  }

  .product-container {
    height: 180px;
    padding: 6px;
  }

  .product-image {
    max-width: 120px;
    max-height: 120px;
  }

  .product-image.secondary {
    max-width: 120px;
    max-height: 120px;
  }

  .order-button {
    padding: 5px 10px;
    font-size: 12px;
  }

  .product-container:hover {
    transform: scale(1.05);
  }
}

@media (max-width: 768px) {
  .container {
    margin-top: 110px;
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }

  .navbar .top-menu-responsive {
    margin-top: 0px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
  }

  .top-menu-responsive li a {
    color: white;
    font-weight: bold;
    text-decoration: none;
    padding: 8px;
    display: block;
    border-radius: 4px;
    text-align: center;
    /* Center text */
    background-color: transparent;
    /* Remove green background */
    transition: background-color 0.3s, text-decoration 0.3s;
  }

  .top-menu-responsive li a:hover {
    /* Light green hover */
    text-decoration: underline;
    
    /* Underline on hover */
  }
}

@media (max-width: 768px) {
  .carrito-panel {
    width: 100%;
    right: -100%; /* Oculto por defecto */
    transition: right 0.3s ease;
  }
}

@media screen and (max-width: 992px) {
  .footer-title {
    font-size: 26px;
  }

  .footer-content {
    gap: 10px;
  }

  .footer-box {
    padding: 0 10px;
  }
}

@media screen and (max-width: 768px) {
  .footer {
    padding: 30px 15px;
  }

  .footer-title {
    font-size: 24px;
    margin-bottom: 25px;
  }

  .footer-box {
    min-width: 200px;
  }

  .footer-box i {
    font-size: 32px;
  }

  .footer-box p {
    font-size: 14px;
  }
}

@media screen and (max-width: 576px) {
  .footer {
    padding: 25px 15px;
  }

  .footer-title {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .footer-content {
    flex-direction: column;
    gap: 25px;
  }

  .footer-box {
    width: 100%;
    margin-bottom: 0;
  }

  .footer-social {
    margin-top: 25px;
    gap: 20px;
  }

  .footer-social i {
    font-size: 22px;
  }
}
