:root {
    --verde: #30503F;
    --blanco: #ffffff;
}

/* RESET */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--blanco);
    color: var(--verde);

    background-image: url("https://iili.io/qQtyYq7.md.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* CINTILLO */
.top-bar {
    background: var(--verde);
    color: white;
    overflow: hidden;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.scroll-text {
    display: inline-block;
    padding: 10px;
    animation: scroll 15s linear infinite;
}

@keyframes scroll {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

/* HEADER */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    position: sticky;
    top: 40px;
    z-index: 1000;
    background: white; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.logo-container img {
    height: 90px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .logo-container img {
        height: 70px;
    }
}


/* MENÚ HAMBURGUESA */
.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

/* MENÚ NORMAL */
.menu a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--verde);
    font-weight: bold;
    transition: 0.3s;
}

.menu a:hover {
    color: #1f3a2d;
}

.menu a:hover {
    text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 768px) {

    .menu-toggle {
        display: block;
    }

    .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 90px;
        right: 20px;
        background: var(--verde);
        padding: 15px;
        border-radius: 8px;
    }

    .menu a {
        color: white;
        margin: 10px 0;
    }

    .menu.active {
        display: flex;
    }
}

/* CARRUSEL*/
.carousel {
    position: relative;
    max-width: 900px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.slides {
    display: flex;
    transition: transform 0.5s ease;
}

.slides img {
    min-width: 100%;
    height: 350px;
    object-fit: contain;
}

/* BOTONES */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.prev { left: 10px; }
.next { right: 10px; }

/* CONTENIDO */
.container {
    padding: 40px;
    text-align: center;
}

/* FOOTER */
footer {
    background: var(--verde);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

footer a {
    color: white;
    text-decoration: underline;
}

.grid-categorias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.categoria-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.categoria-card:hover {
    transform: scale(1.03);
}

.categoria-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
}

.categoria-card h3 {
    padding: 15px;
}

/*CATEGORIAS Y PRODUCTOS */
#productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.producto-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
	box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.producto-card:hover {
    transform: scale(1.03);
}

.producto-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
}

.producto-card h3 {
    padding: 10px;
    font-size: 16px;
}

.producto-card p {
    padding: 0 10px 10px;
    font-weight: bold;
}

/*PRODUCTOS INDIVIDUALES*/
.producto-detalle {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px;
}

.producto-detalle img {
    width: 30%;
    border-radius: 10px;
}

.producto-info h1 {
    margin-bottom: 10px;
}

.producto-info p {
    margin-bottom: 10px;
}

.precio {
    font-size: 22px;
    font-weight: bold;
    color: #30503F;
}

.boton {
    background: #30503F;
    color: white;
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

/*GALERÍA PRODUCTOS INDIVIDUALES*/
.galeria {
    display: flex;
    gap: 10px;
    justify-content: flex-start; /* 👈 clave */
    flex-wrap: wrap;
    max-width: 400px; /* 👈 evita que se estire demasiado */
    margin: 0 auto;
}

#imagen-principal {
    width: 100%;
    max-width: 400px; /* puedes ajustar */
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 0 auto 15px auto;
}

.miniatura {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.3s;
}

#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.9);
    display: none;

    justify-content: center;
    align-items: center;

    z-index: 9999;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.miniatura:hover {
    opacity: 1;
    transform: scale(1.05);
}

.galeria {
    display: flex;
    gap: 10px;
    margin-top: 10px;

    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    max-width: 500px;   /* 👈 evita que se abra demasiado */
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    #imagen-principal {
        max-width: 300px;
    }
}

@media (min-width: 1024px) {
    .galeria {
        justify-content: center;
        max-width: 500px;
    }
}

/*CARRITO*/
.item-carrito {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    background: white;
    padding: 10px;
    border-radius: 8px;
}

.item-carrito img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.item-carrito h3 {
    margin: 0;
}

#contador-carrito {
    background: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    margin-left: 5px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    margin: 15px 0;
}

.bc-link {
    text-decoration: none;
    color: #007bff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bc-link:hover {
    text-decoration: underline;
}

.bc-icon {
    font-size: 16px;
}

.bc-sep {
    color: #999;
    margin: 0 4px;
}

.bc-current {
    color: #333;
    font-weight: 600;
}

@media (max-width: 600px) {

    .breadcrumb {
        font-size: 13px;
    }

    /* Oculta "Inicio" texto pero deja ícono */
    .bc-text {
        display: none;
    }

    /* Oculta "Productos" en móvil */
    .breadcrumb a:nth-child(3),
    .breadcrumb .bc-sep:nth-child(2) {
        display: none;
    }

}

/*BUSCADOR*/
.buscador {
    flex: 1;
    display: flex;
    justify-content: center;
}

.buscador input {
    width: 60%;
    max-width: 400px;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #ccc;
    outline: none;
}

/*ZOOM IMAGENES*/
#zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.zoom-contenido {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.zoom-contenido img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.cerrar-zoom {
    position: absolute;
    top: -15px;
    right: -15px;
    background: white;
    color: black;
    border-radius: 50%;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
}

/*BREADCRUMB*/
#breadcrumb {
    margin: 15px 0;
    font-size: 14px;
}

#breadcrumb a {
    text-decoration: none;
    color: #2c7a7b;
}

.acciones-carrito {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.boton.whatsapp {
    background-color: #25D366;
}

.boton-cotizar {
    width: auto;
    padding: 12px 25px;
    font-size: 14px;
    border-radius: 8px;
    display: inline-block;
    margin: 10px 5px;
}

.whatsapp-float {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
}

.whatsapp-float img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
    animation: latido 2s infinite;
}

.whatsapp-float img:hover {
    transform: scale(1.1);
}

@keyframes latido {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.banner-container {
    position: relative;
    width: 100%;
    max-width: 600px; /* 👈 límite del tamaño */
    margin: 0 auto; /* 👈 lo centra */
    overflow: hidden;
    margin-bottom: 20px;
}

.banner-slider {
    display: flex;
    transition: transform 0.5s ease;
}

.banner-slide {
    min-width: 100%;
}

.banner-slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* Flechas */
.banner-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 5px;
}

.banner-btn.prev {
    left: 10px;
}

.banner-btn.next {
    right: 10px;
}

.banner-btn:hover {
    background: rgba(0,0,0,0.7);
}