@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;
  flex-wrap: wrap;
}

.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: #ffcc00;
}

/* 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; /* Reducir padding vertical */
  z-index: 1000;
}

.navbar.active {
  display: flex;
}

.navbar ul {
  list-style: none;
  margin-top: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0; /* Eliminar el espacio entre elementos */
  padding: 0;
}

.navbar > ul > li > a {
  color: #5a8d23;
  font-weight: bold;
  text-decoration: none;
  font-size: 16px;
  display: block;
  padding: 2px 0; /* Reducir padding vertical */
  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; /* Reducir padding vertical */
  display: block;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .menu {
    position: fixed;
    top: 0;
    left: 0;
    flex-direction: row;
    justify-content: space-between;
  }

  .menu-toggle {
    display: flex;
  }

  .navbar {
    width: 100%;
    left: 0;
  }

  .navbar ul > li > a {
    font-size: 18px;
  }

  .navbar li ul li a {
    font-size: 16px;
  }

  .logo {
    position: relative;
    right: 28px;
  }
}
.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;
}

.hero {
  padding: 40px 5%;
  margin-top: 150px;
  background-color: #f4f4f4;
  position: relative; /* Necesario para posicionar la línea correctamente */
}

/* Contenido de la hero */
.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  position: relative; /* Asegura que la línea esté dentro de este contenedor */
}

/* Texto */
.text-content {
  flex: 1;
  padding-right: 30px;
  position: relative;
}

/* Barras verticales (verde y gris) */
.bars {
  display: flex;
  position: absolute;
  left: 0;
  height: 80px;
  width: 15px;
}

.bars::before {
  content: "";
  width: 8px;
  height: 100%;
  background-color: #5a8d23; /* Barra verde */
}

.bars::after {
  content: "";
  width: 8px;
  height: 100%;
  background-color: #666; /* Barra gris */
}

/* Estilo para el texto */
.text-content h2 {
  font-size: 28px;
  margin-bottom: 10px;
  color: #333;
  margin-left: 25px; /* Espacio para las barras */
}

.text-content h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #555;
  margin-left: 25px; /* Espacio para las barras */
}

.text-content p {
  font-size: 16px;
  line-height: 1.6;
  color: #666;
  margin-left: 25px; /* Espacio para las barras */
}

/* Contenido de imagen */
.image-content {
  flex: 0 0 40%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-content img {
  max-width: 100%;
  height: auto;
}

.btn-contacto {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 30px;
  background-color: #5a8d23; /* Barra verde */
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 25px;
  transition: background 0.3s ease;
}

.btn-contacto:hover {
  background-color: #359419;
}

/* Línea negra inferior (debajo del fondo gris) */
.hero-line {
    width: 100%;
    height: 2px;
    background-color: black;
    position: absolute;
    bottom: 0;
  left: 0; /* Asegura que la línea comience desde el borde izquierdo */
}

.banner-container {
    display: flex;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

/* Individual Banner Section */
.banner-section {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    padding: 20px;
    color: white;
    text-align: left;
}

/* Background Images */
.arduino-section {
    background-image: url("img/Tipos-de-canalizaciones-electricas-1.webp");
    background-color: rgba(0, 0, 0, 0.7); /* Blue overlay */
    background-blend-mode: overlay;
}

.soldering-section {
    background-image: url("img/images\ \(2\).jpeg");
    background-color: rgba(23, 58, 23, 0.7); /* Green overlay */
    background-blend-mode: overlay;
}

/* Content inside Banner */
.banner-content {
    max-width: 500px;
}

.banner-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.arduino-section h2 {
    color: #00b7eb; /* Light blue for Arduino */
}

.soldering-section h2 {
    color: #32cd32; /* Light green for Soldering */
}

.banner-content p {
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Button Styling */
.discover-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.arduino-section .discover-btn {
    background-color: #00b7eb;
    color: white;
}

.arduino-section .discover-btn:hover {
    background-color: #009acd;
}

.soldering-section .discover-btn {
    background-color: #32cd32;
    color: white;
}

.soldering-section .discover-btn:hover {
    background-color: #28a428;
}

/* Contenedor rectangular */
.carousel-box {
  max-width: 1250px;
  margin: auto;
  background-color: #dadada;
  border-radius: 20px;
  padding: 30px 30px 30px 30px;
}

/* Swiper general */
.swiper {
  width: 100%;
  padding-bottom: 10px;
  overflow: hidden;
  position: relative;
  z-index: 1; /* Asegura que el swiper esté por encima de otros elementos */
  padding: 20px 20px;
}

/* Contenedor de slides */
.swiper-wrapper {
  display: flex;
  align-items: center;
}

/* Estilo individual del slide */
.swiper-slide {
  width: 150px;
  height: 500px;
  background-color: #ffffff;
  box-shadow: 0 0 20px rgba(67, 160, 5, 0.1);
  padding: 50px;
  text-align: center;
  flex-shrink: 0;
  border-radius: 12px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.swiper-slide:hover {
  transform: scale(1.02);
  z-index: 999; /* 👈 Esto ayuda a que se muestre encima */
}
/* Contenido dentro de cada tarjeta */
.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: space-between;
}

/* Iconos superiores */
.icons {
  left: 20px;
  right: 20px;
  display: flex;
  align-items: flex-start;
}

.icons img {
  width: 70px;
  margin-top: -20px;
}

/* Imagen del producto arriba */
.product-img {
  text-align: center;
  margin-bottom: 10px;
}

.product-img img {
  margin-top: 5px;
  width: 110px;
  height: 100px;
  height: auto;
}

/* Texto debajo */
.product-txt {
  text-align: center;
}

.product-txt span {
  display: block;
  font-size: 25px;
  color: #ffb900;
  font-weight: bold;
  margin-bottom: 10px;
}

.product-txt h3 {
  font-size: 20px;
  color: #000;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.product-txt p {
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  margin-bottom: 20px;
  word-wrap: break-word;
}

/* Botón comprar */
.btn-1 {
  display: inline-block;
  padding: 13px 40px;
  border: 1px solid #5a8d23;
  border-radius: 25px;
  color: #000000;
  text-decoration: none;
  margin-top: 10px;
}

.btn-1:hover {
  background-color: #5a8d23;
  color: #fff;
  transition: all 0.3s ease;
}

/* Navegación Swiper */
.swiper-navigation {
  display: flex;
  justify-content: center;
  gap: 100px;
  margin-top: 100px;
}

.swiper-button-prev,
.swiper-button-next {
  font-size: 10px;
  width: 5px;
  height: 5px;
  position: static !important;
  color: #76a934;
  font-size: 20px;
  cursor: pointer;
}

.productos {
  margin-bottom: 50px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .banner-container {
        flex-direction: column;
        height: auto;
    }

  .banner-section {
    flex: none;
    width: 100%;
    height: 300px;
  }
}

.categorias-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.categorias-titulo {
  color: #5a8d23;
  font-size: 28px;
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.categorias-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.categoria-card {
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 25px 15px;
  text-align: center;
  text-decoration: none;
}

.categoria-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(92, 219, 7, 0.1);
}

.categoria-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin-bottom: 15px;
}

.categoria-title {
  color: #186818;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
}

/* 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;
}

.cerrar-btn {
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.carrito-contenido {
  padding: 10px 0;
}

.imagen-carrito-vacio img {
  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;
}

.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;
}

@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) {
  .hero-content {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .text-content {
    flex: 1 1 60%;
    padding-right: 0;
  }

  .image-content {
    flex: 1 1 30%;
  }
}

@media screen and (max-width: 1200px) {
  .categorias-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 992px) {
  .categorias-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .categorias-titulo {
    font-size: 24px;
  }
}

@media screen and (max-width: 576px) {
  .categorias-grid {
    grid-template-columns: 1fr;
  }

  .categorias-titulo {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .categoria-card {
    padding: 20px 10px;
  }

  .categoria-img {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 1024px) {
  .swiper-slide {
    height: 460px;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    }
  }

/* Para móviles pequeños */
@media (max-width: 480px) {
  .swiper {
    padding: 10px;
  }

  .swiper-slide {
    width: 200px;
    padding: 15px;
  }

  .product-txt span {
    font-size: 18px;
  }

  .product-txt h3 {
    font-size: 14px;
  }

  .product-txt p {
    font-size: 11px;
  }

  .btn-1 {
    padding: 10px 25px;
    font-size: 13px;
  }

  .swiper-navigation {
    gap: 70px;
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  .carrito-panel {
    width: 100%;
    right: -100%; /* Oculto por defecto */
    transition: right 0.3s ease;
  }
}


