/* === Gistesy (TTF) === */
@font-face {
    font-family: "Gistesy";
    src: url("../fonts/Gistesy.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ===========================
   RESET & BASE
   =========================== */
html,
body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

body {
    background-color: #fffdf7;
    color: #000000;
}

img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    /* útil para imágenes de tarjetas o carousel */
}

.title {
    font-size: 130px;
    margin-bottom: 15px;
    color: #152a6a;
    font-family: "Gistesy", "Segoe Script", "Brush Script MT", cursive;
    font-weight: 400;
}

.redes {
    margin: 20px;
    font-size: 20px;
    justify-content: space-between;
    color: #FFD700;
}

/* Tema oscuro */
body.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

p, ul {
    font-family: 'Work Sans',sans-serif;
}



/* ===========================
   NAVBAR
   =========================== */
.navbar {
    background-color: #f8f9fa;
    color: #152a6a !important;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
}

.navbar .navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 38px;
    font-weight: bold;
    font-family: "Gistesy", "Segoe Script", "Brush Script MT", cursive;
    font-weight: 400;
}

body.light .navbar {
    background-color: #f8f9fa !important;
    color: #000000;
}

body.dark .navbar {
    background-color: #ffffff !important;
    color: #fff;
}

body.dark .navbar .nav-link {
    color: #fff !important;
}

.navbar,
.navbar .nav-link,
.navbar a {
    color: #152a6a !important;
}
.navbar .dropdown {
    font-family: 'Space Grotesk', sans-serif;
}
.navbar .dropbtn {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 17px;
}


/* Flechas dropdown */
.navbar .dropdown>.dropbtn::after {
    content: "";
    display: inline-block;
    margin-left: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    padding: 4px;
    transform: rotate(45deg);
}

.navbar .dropdown>.dropbtn:hover::after {
    border-color: #fff;
}

/* ===========================
   BOTÓN CAMBIO DE TEMA
   =========================== */
#toggleTheme {
    background-color: #ffffff;
    color: #000000;
}

/* ===========================
   LAYOUT GENERAL
   =========================== */
main {
    flex: 1;
}

.wrap {
    max-width: 600px;
    margin: 120px auto 40px;
    padding: 0 15px;
    text-align: center;
}

/* ===========================
   CATÁLOGO
   =========================== */
#catalogo {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    width: 100%;
}



#catalogo .producto {
    flex: 0 0 66%;
    max-width: 66%;
}

@media (min-width: 768px) {
    #catalogo .producto {
        flex: 0 0 48%;
        max-width: 48%;
    }
}

@media (min-width: 1200px) {
    #catalogo .producto {
        flex: 0 0 23%;
        max-width: 23%;
    }
}

#catalogo .card {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 86, 179, 0.6);
    transition: transform 0.2s ease-in-out, border 0.3s, color 0.3s, box-shadow 0.3s;
    cursor: pointer;
    font-family: 'Work Sans', sans-serif;
}

#catalogo .card:hover {
    transform: scale(1.05);
    border: 2px solid #152a6a;
    box-shadow: 0 0 15px rgba(0, 86, 179, 0.6);
}

#catalogo .card:hover .card-title,
#catalogo .card:hover .card-text {
    color: #0056b3;
}

.card-promo {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #FFD700;
    color: #000000;
    padding: 7px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.card-body:has(.card-promo) .precio {
    
    font-size: 1.3rem;
    color: #e9bb2e;
    font-weight: bold;
}
/* ===========================
   ESTILO PRECIO
   =========================== */
.precio {
    font-size: 1.25rem;
    /* más grande que el texto normal */
    font-weight: bold;
    /* negrita */
    color: #152a6a;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    /* leve sombra */
    margin-top: 10px;
    display: block;
    /* por si está dentro de un párrafo */
    text-align: center;
    /* lo centra dentro de la card */
}
/* ===========================
   BARRA DE BÚSQUEDA
   =========================== */
.search {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    padding: 8px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.3s, box-shadow 0.3s;
}

body.dark .search {
    background: #2b2b2b;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.search__icon svg {
    width: 20px;
    height: 20px;
    color: #555;
}

body.dark .search__icon svg {
    color: #ddd;
}

.search__input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 12px;
    font-size: 16px;
    background: transparent;
}

body.dark .search__input {
    color: #000000 !important;
    background-color: #2b2b2b !important;
}

.search__input::placeholder {
    color: #999;
}

body.dark .search__input::placeholder {
    color: #666 !important;
}

.search__btn {
    background: #0056b3;
    border: none;
    color: #fff;
    border-radius: 60%;
    padding: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.search__btn:hover {
    background: #000000;
}

.search__btn svg {
    width: 18px;
    height: 18px;
}

/* ===========================
   FILTROS DE CATEGORÍA
   =========================== */
.filtro {
    margin: 0 5px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #152a6a;
    background-color: transparent;
    color: #152a6a;
    cursor: pointer;
    transition: all 0.3s;
}

.filtro:hover {
    background-color: #152a6a;
    color: #fff;
}

.filtro.active {
    background-color: #152a6a;
    color: #fff;
}

/* ===========================
   FILTROS MODO OSCURO
   =========================== */
body.dark-mode .filtro {
    background-color: transparent;
    /* igual que en modo claro */
    color: #ffffff;
    /* letras blancas */
    border: 1px solid #152a6a;
    /* igual que en modo claro */
}

body.dark-mode .filtro:hover {
    background-color: #152a6a;
    color: #fff;
}

body.dark-mode .filtro.active {
    background-color: #152a6a;
    color: #fff;
    border: 1px solid #0056b3;
}

/* ===========================
   DROPDOWN + SUBMENÚ
   =========================== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: #152a6a;
    color: #fff;
    padding: 10px 16px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Dropdown content modo dark */
body.dark-mode .dropdown-content,
body.dark-mode .submenu-content {
    background-color: #000000;
}

body.dark-mode .dropdown-content .filtro,
body.dark-mode .submenu-content a {
    color: #ffffff;
    background: transparent;
}

body.dark-mode .dropdown-content .filtro:hover,
body.dark-mode .submenu-content a:hover {
    background-color: #152a6a;
    color: #fff;
}

/* Flechas siempre visibles en modo dark y azul */
body.dark-mode .navbar .dropdown>.dropbtn::after {
    border-color: #ffffff;
    /* blanca */
}

body.dark-mode .submenu>.filtro::after {
    border-color: #ffffff;
    /* blanca */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 180px;
    border-radius: 8px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    margin-top: 5px;
    flex-direction: column;
}

.dropdown-content .filtro {
    width: 100%;
    border: none;
    background: transparent;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    color: #152a6a;
    transition: background 0.3s;
}

.dropdown-content .filtro:hover {
    background-color: #152a6a;
    color: #fff;
}

.dropdown.show .dropdown-content {
    display: flex;
}

.submenu {
    position: relative;
}

.submenu>a {
    display: block;
    padding: 10px;
    color: #152a6a;
    text-decoration: none;
}

.submenu-content {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background-color: #f9f9f9;
    min-width: 160px;
    border-radius: 8px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    flex-direction: column;
}

.submenu:hover .submenu-content {
    display: flex;
}

.submenu-content a {
    padding: 10px;
    text-decoration: none;
    color: #152a6a;
    transition: background 0.3s;
}

.submenu-content a:hover {
    background-color: #152a6a;
    color: #fff;
}

/* Flechas submenu */
.submenu>.filtro::after {
    content: "";
    display: inline-block;
    margin-left: 8px;
    border: solid #152a6a;
    border-width: 0 2px 2px 0;
    padding: 4px;
    transform: rotate(-45deg);
    transition: border-color 0.3s;
}

.submenu>.filtro:hover::after {
    border-color: #fff;
}

/* ===========================
   FOOTER
   =========================== */
footer {
    background-color: #152a6a;
    padding: 20px;
    text-align: center;
    width: 100%;
    color: #fff;
}

/* ===========================
   ACCESIBILIDAD
   =========================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ===========================
   LAYOUT RESPONSIVE MEDIDAS
   =========================== */
@media (min-width: 320px) {

    header,
    main,
    footer {
        padding: 20px;
        text-align: center;
    }
}

@media (min-width: 600px) {

    header,
    main,
    footer {
        padding: 20px;
        text-align: center;
    }
}

@media (min-width: 1024px) {

    header,
    main,
    footer {
        justify-content: space-between;
        padding: 40px;
    }
}

/* ===========================
   SECCIÓN CONTACTO
   =========================== */
.section-contacto {
    max-width: 1000px;
    /* aumenta el ancho máximo */
    min-height: 600px;
    /* asegura que tenga altura suficiente */
    margin: 80px auto 60px;
    /* centrado y separación del navbar */
    padding: 40px 50px;
    /* más espacio interno */
    background: #f8f9fa;
    border-radius: 12px;
    /* ligeramente más redondeada */
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    
    /* mejor distribución del contenido */
}

.section-contacto p {
    font-size: 20px;
    /* opcional, para mejorar la lectura */
}

.section-contacto .title {
    font-size: 80px;
    margin-bottom: 15px;
    color: #152a6a;
    font-family: "Gistesy", "Segoe Script", "Brush Script MT", cursive;
    font-weight: 400;
}

/* Lista de info */
.info-contacto {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    text-align: center;
    font-size: 18px;
}

.info-contacto li {
    margin: 12px 0;
    color: #000000;
}

/* Botones de redes sociales */
.btn-redes {
    display: inline-block;
    margin: 12px;
    padding: 12px 25px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    font-size: 18px;
}

.btn-redes.whatsapp {
    background-color: #25d366;
    color: white;
}

.btn-redes.instagram {
    background: linear-gradient(45deg, #feda75, #d62976, #962fbf, #4f5bd5);
    color: white;
}

.btn-redes:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Aviso legal */
.aviso {
    background: #fff3cd;
    color: #856404;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 30px;
}

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* ===========================
   FIXES PARA MODO DARK
   =========================== */

/* El título principal (index) queda blanco */
body.dark-mode .title {
    color: #ffffff;
}

/* En la sección contacto, los párrafos siguen negros */
body.dark-mode .section-contacto p {
    color: #000000;
}

/* En la sección contacto, el título también sigue negro */
body.dark-mode .section-contacto .title {
    color: #000000;
}

.carousel {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide img {
    width: 100%;
    display: block;
    border-radius: 15px;
}

/* Botones */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 30px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.3s;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev {
    left: 15px;
}

.next {
    right: 15px;
}

/* Dots */
.carousel-dots {
    text-align: center;
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.carousel-dots button {
    border: none;
    background: #bbb;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dots button.active {
    background: #152a6a}

    #catalogo .producto {
    flex: 0 0 calc(66% - 20px); /* restar gap */
    max-width: calc(66% - 20px);
}
@media (min-width: 768px) {
    #catalogo .producto { flex: 0 0 calc(48% - 20px); max-width: calc(48% - 20px); }
}
@media (min-width: 1200px) {
    #catalogo .producto { flex: 0 0 calc(23% - 20px); max-width: calc(23% - 20px); }
}

/* ===========================
   PREVENIR OVERFLOW EN IMÁGENES
   =========================== */
.card-img-top,
.carousel-item img,
img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    /* asegura que la imagen llene el contenedor sin deformarse */
}

/* Ajuste específico para carruseles dentro de cards */
.carousel-item {
    max-height: 300px;
    /* Ajusta la altura según necesites */
    overflow: hidden;
    /* Oculta exceso */
}

/* Evitar overflow horizontal de la fila de productos */
#catalogo {
    overflow-x: hidden;
}