@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ========================= */
/* CONFIGURACIÓN GENERAL */
/* ========================= */

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background-color: #111522;
}

/* Fondo alternativo si usas hero-background */
.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #111522;
    /* Por defecto: Celulares y Tablets (fondo8.png) */
    background-image: linear-gradient(rgba(17, 21, 34, 0.5), rgba(17, 21, 34, 0.5)), url("./img/fondo8.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Computadoras / pantallas grandes (min-width: 992px) */
@media (min-width: 992px) {
    .hero-background {
        /* Para computadora (fondo7.png) */
        background-image: linear-gradient(rgba(17, 21, 34, 0.45), rgba(17, 21, 34, 0.45)), url("./img/fondo7.png");
    }
}

/* ========================= */
/* NAVBAR */
/* ========================= */

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 40px;
    font-size: 1.3em;
    background: rgba(20, 25, 53, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateZ(0);
    will-change: transform, backdrop-filter;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nombreLogo {
    text-align: justify;
    color: white;
    font-size: 0.8em;
    padding-right: 10%;

}

.logo img {
    width: 70px;
    height: auto;
    display: block;
    border-radius: 40%;
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: 0.3s ease;
}

nav a:hover {
    color: #4fa3ff;
}

/* ========================= */
/* HERO (Index) */
/* ========================= */

.containerTexto {
    width: 100%;
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 120px 60px 60px 60px;

}

.hero-content {
    max-width: 1400px;
}


.hero-content h1 {
    color: #cfedff;
    font-size: 5em;
    margin: 0;
    text-align: justify;
}

.hero-content p {
    color: #cfedff;
    width: 100%;
    margin: 15px 0;
    font-size: 1.8em;
    text-align: justify;
    display: inline-block;

}

.btn {
    padding: 10px 25px;
    border-radius: 25px;
    border: 2px solid rgb(253, 253, 253);
    color: rgb(0, 0, 0);
    cursor: pointer;
    font-size: 28px;
    transition: 0.3s;
}

.btn:hover {
    background: rgb(255, 255, 255);
    color: #4fa3ff;
    border: 2px solid #4fa3ff;
}

/* ========================= */
/* PRODUCTOS */
/* ========================= */

.conteinerProdu {
    width: 100%;
    text-align: center;
    padding: 60px 20px;
}

.productos h2 {
    font-size: 35px;
    color: #eef1ff;
    margin-bottom: 30px;
}

.cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.card {
    background: rgb(255, 230, 230);
    padding: 15px;
    width: 350px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-8px);
}

.card img {
    width: 100%;
    border-radius: 10px;
}

.whatsButton {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.whatsButton img {
    width: 60px;
    height: auto;
    transition: transform 0.3s ease;
}

.whatsButton img:hover {
    transform: scale(1.1);
}


/* ========================= */
/* FOOTER */
/* ========================= */

.footer {
    background: #111522;
    color: white;
    padding: 40px 20px 20px;
    margin-top: 60px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    max-width: 1200px;
    margin: auto;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 10px;
    color: #4fa3ff;
}

.footer-section p {
    margin: 5px 0;
    color: #ddd;
}

.footer-section a {
    margin: 5px 0;
    color: #e1f0ff;
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-section a.whatsapp-link {
    transition: color 0.2s ease;
}

.footer-section a.whatsapp-link:hover {
    color: #25d366;
}


.social a {
    display: inline-block;
    margin-right: 15px;
    color: #e1f0ff;
    text-decoration: none;
}

.social a:hover {
    text-decoration: underline;
}

.footer-copy {
    text-align: center;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #333;
    color: #aaa;
    font-size: 14px;
}

/* ========================= */
/* NOSOTROS (ABOUT) */
/* ========================= */

.container-nosotros {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    color: #cfedff;
    padding-top: 120px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);

}

.about-header {
    text-align: center;
    margin-bottom: 50px;
}

.about-header h2 {
    font-size: 3rem;
    color: #cfedff;
    font-weight: 800;
    margin-bottom: 10px;
}

.about-header p {
    font-size: 1.5rem;
    color: #cfedff;
    font-weight: 800;
    text-align: justify;
    margin-bottom: 9px;
}

.about-text p {
    font-size: 1.3rem;
    color: #cfedff;
    font-weight: 800;
    text-align: justify;
    margin-bottom: 10px;
}

.about-text-image {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
    margin-bottom: 60px;
}

.about-text {
    flex: 1;
    min-width: 300px;
    line-height: 1.6;
}

.about-text h3 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #cfedff;
    font-weight: 800;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.about-values {
    text-align: center;
}

.about-values h3 {
    font-size: 3rem;
    color: #cfedff;
    font-weight: 800;
    margin-bottom: 30px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.value-card {
    background: rgba(20, 25, 53, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateZ(0);
    will-change: transform, backdrop-filter;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 15px;
    transition: transform 0.3s;
}

.value-card:hover {
    transform: translateY(-8px);
}

.value-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 2px solid #cfedff;
}

.value-card h4 {
    color: #cfedff;
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 700;
}

.value-card p {
    font-size: 0.95rem;
    color: #cfedff;
    line-height: 1.5;
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */

/* TABLET */
@media (max-width: 992px) {

    .hero-content h1 {
        font-size: 2.8em;
    }

    .hero-content p {
        width: 100%;
    }

    .containerTexto {
        padding: 120px 40px 40px 40px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

/* CELULAR */
@media (max-width: 600px) {

    .navbar {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-rows: auto auto !important;
        align-items: center !important;
        padding: 12px 20px !important;
        gap: 8px 15px !important;
        text-align: left;
    }

    .nombreLogo {
        grid-column: 1 !important;
        grid-row: 1 !important;
        padding-right: 0 !important;
        text-align: left !important;
        margin: 0 !important;
    }

    .nombreLogo h1 {
        font-size: 1.4rem !important;
        /* Título más compacto y elegante */
        margin: 0 !important;
        letter-spacing: 0.5px !important;
    }

    .logo {
        grid-column: 2 !important;
        grid-row: 1 !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
    }

    .logo img {
        width: 45px !important;
        height: 45px !important;
        object-fit: cover !important;
        /* Icono del logo más compacto */
        border-radius: 40% !important;
        /* Unified rounded look */
    }

    nav {
        grid-column: 1 / span 2 !important;
        grid-row: 2 !important;
        display: flex !important;
        flex-direction: row !important;
        /* Menú horizontal en móviles */
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
        width: 100% !important;
        margin-top: 5px !important;
        padding-top: 8px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    nav a {
        margin: 0 !important;
        font-size: 0.95rem !important;
    }

    .hero-content h1 {
        font-size: 2em;
    }

    .hero-content p {
        font-size: 1em;
    }

    .containerTexto {
        padding: 140px 20px 40px 20px !important;
        /* Suficiente espacio para el nuevo menú */
    }

    .container-nosotros {
        padding: 140px 20px 40px 20px !important;
    }

    .cards {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 90%;
    }

    .btn {
        font-size: 16px !important;
        padding: 8px 18px !important;
        border-radius: 20px !important;
    }

}

/* Estado inicial del contenido */
.transition-fade {
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

/* Estado cuando Swup está cambiando de página */
html.is-animating .transition-fade {
    opacity: 0;
    transform: translateY(10px);
    /* El contenido baja un poco mientras desaparece */
}

/* Asegurar que el fondo no se mueva durante la transición */
html.is-leaving .hero-background {
    opacity: 1;
    /* Mantiene el fondo visible siempre */
}

/* ========================= */
/* MODAL DE INICIO DE SESIÓN */
/* ========================= */

.nav-login-btn {
    background: transparent;
    border: 2px solid #4fa3ff;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.9em;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 20px;
    font-weight: bold;
}

.nav-login-btn:hover {
    background: #4fa3ff;
    color: #111522;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: rgba(20, 25, 53, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    color: white;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.account-page-wrapper {
    background: rgba(20, 25, 53, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    color: white;
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover,
.close-btn:focus {
    color: #fff;
    text-decoration: none;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    font-size: 24px;
    color: #eef1ff;
    font-family: monospace;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #ccc;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group select option {
    background: rgba(20, 25, 53, 0.95);
    color: white;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #4fa3ff;
}

.password-wrapper {
    position: relative;
    display: block;
}

.password-wrapper input {
    padding-right: 40px;
    /* Space for the icon */
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #ccc;
    user-select: none;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #4fa3ff;
}

.modal-btn {
    width: 100%;
    font-size: 20px;
    border-radius: 8px;
    margin-top: 10px;
}

.error-message {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
}

.modal-switch {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #ccc;
}

.modal-switch a {
    color: #4fa3ff;
    text-decoration: none;
    font-weight: bold;
}

.modal-switch a:hover {
    text-decoration: underline;
}

/* ========================= */
/* MENÚ DE PERFIL Y DROPDOWN */
/* ========================= */

.user-dropdown-container {
    position: relative;
    margin-left: 20px;
}

.user-greeting {
    color: #eef1ff;
    font-size: 0.9em;
    font-family: inherit;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    user-select: none;
}

.user-greeting:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dropdown-arrow {
    font-size: 0.8em;
    margin-left: 5px;
}

.user-dropdown-menu {
    position: absolute;
    top: 45px;
    left: 0;
    background: rgba(20, 25, 53, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    min-width: 150px;
    overflow: hidden;
    z-index: 2000;
}

.user-dropdown-menu a {
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    font-size: 0.85em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s;
    margin-left: 0 !important;
    /* overrides nav a */
}

.user-dropdown-menu a:last-child {
    border-bottom: none;
}

.user-dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #4fa3ff;
}

.logout-link {
    color: #ff6b6b !important;
}

.logout-link:hover {
    background: rgba(255, 107, 107, 0.1) !important;
    color: #ff6b6b !important;
}

/* Información en "Mi Cuenta" */
.account-info {
    text-align: left;
    margin-top: 15px;
}

.info-group {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.info-group label {
    display: block;
    color: #4fa3ff;
    font-size: 0.85em;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: bold;
}

.info-value {
    color: white;
    margin: 0;
    font-size: 1.1em;
    font-family: monospace;
}

.verification-badge {
    font-size: 0.7em;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.verification-badge.verified {
    background: rgba(79, 255, 123, 0.1);
    color: #4fff7b;
    border: 1px solid #4fff7b;
}

.verification-badge.not-verified {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
}

/* ========================= */
/* E-COMMERCE / TIENDA       */
/* ========================= */

.ecommerce-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(20, 25, 53, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateZ(0);
    will-change: transform, backdrop-filter;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-top: 40px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ecommerce-header {
    text-align: center;
    margin-bottom: 40px;
    color: #eef1ff;
}

.ecommerce-header h2 {
    font-size: 3rem;
    font-family: monospace;
    font-weight: 800;
    margin-bottom: 15px;
}

.ecommerce-header p {
    font-size: 1.3rem;
    font-family: sans-serif;
}

.store-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.store-card {
    width: 100%;
    max-width: 100%;
    /* Permitir que ocupe todo el ancho disponible y se acerque a los bordes */
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: row;
}

.store-card img {
    width: 350px;
    height: auto;
    object-fit: cover;
    border-bottom: none;
    border-right: 2px solid #e8f4f8;
}

.store-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.store-info h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-family: monospace;
    color: #111522;
}

.store-desc {
    font-size: 1.15rem;
    color: #555;
    margin-bottom: 15px;
    flex-grow: 1;
    /* Empuja el precio y botón hacia abajo */
}

.store-specs {
    font-size: 1rem;
    color: #666;
    margin-bottom: 15px;
    font-family: monospace;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    border-left: 3px solid #4fa3ff;
}

.store-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: #4fa3ff;
    margin-bottom: 15px;
}

.store-btn {
    width: 100%;
    background-color: transparent;
    color: #111522;
    border: 2px solid #111522;
    font-size: 1.1rem;
    display: block;
    /* en lugar de inline-block para ocupar todo el ancho si es necesario */
}

.store-btn:hover {
    background-color: #111522;
    color: #4fa3ff;
    border: 2px solid #111522;
}

/* RESPONSIVE Ajuste Tienda */
@media (max-width: 768px) {
    .ecommerce-container {
        padding: 20px;
        margin: 20px 10px;
    }

    .ecommerce-header h2 {
        font-size: 2.2rem;
    }

    .store-card {
        flex-direction: column;
    }

    .store-card img {
        width: 100%;
        height: 250px;
        border-right: none;
        border-bottom: 2px solid #e8f4f8;
    }
}

/* =========================================
   ESTILOS DE PÁGINAS INDEPENDIENTES
========================================= */
.cart-page-wrapper {
    background: rgba(20, 25, 53, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: white;
}

/* =========================================
   ESTILOS DE NOSOTROS (secondHtml.html)
========================================= */
.container-nosotros {
    padding: 120px 60px 60px 60px;
}

.about-section {
    max-width: 1400px;
    margin: 0 auto;
}

.about-header h2 {
    color: white;
    font-size: 5em;
    font-family: monospace;
    margin: 0;
    text-align: left;
}

.about-text h3,
.about-values h3 {
    color: white;
    font-size: 3em;
    font-family: monospace;
    margin: 0 0 20px 0;
}

.about-section p {
    color: #ffffff;
    width: 100%;
    margin: 15px 0;
    font-size: 1.8em;
    text-align: justify;
    font-family: sans-serif;
    display: inline-block;
}

.about-content {
    margin-top: 40px;
}

.about-text-image {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 60px;
}

.about-text {
    width: 100%;
}

.about-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.value-card {
    background: rgba(20, 25, 53, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.value-card img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    border-radius: 50%;
}

.value-number {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4fa3ff, #1d4ed8);
    color: white;
    font-size: 2.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 4px 15px rgba(79, 163, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.value-card h4 {
    color: #4fa3ff;
    font-size: 2em;
    margin: 0 0 10px 0;
}

.value-card p {
    font-size: 1.2em;
    text-align: center;
}

/* =========================================
   PÁGINA CATÁLOGO - DISEÑO DE TARJETAS FLIP 3D
========================================= */
.catalogo-container {
    max-width: 1300px;
    margin: 0 auto;
}

.cards-catalogo {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    padding: 20px 0;
}

/* Contenedor del flip 3D */
.card-flip-container {
    background-color: transparent;
    width: 380px;
    height: 490px;
    perspective: 1000px;
    /* Crea el efecto de profundidad 3D */
}

/* El elemento interno que realiza el giro físico */
.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    cursor: pointer;
}

/* Cuando se le añade la clase flipped por JS */
.card-flip-inner.flipped {
    transform: rotateY(180deg);
}

/* Lados Front y Back compartidos */
.card-flip-front,
.card-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* LADO FRENTE (Fiel al mockup del usuario) */
.card-flip-front {
    background: transparent;
    padding: 0;
}

/* Cuadro blanco con la imagen del compresor */
.product-image-box {
    background: #ffffff;
    border: 2px solid #dbe6eb;
    border-radius: 6px;
    width: 380px;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-flip-container:hover .product-image-box {
    border-color: #4fa3ff;
    box-shadow: 0 8px 25px rgba(79, 163, 255, 0.3);
    transform: translateY(-5px);
}

.product-image-box img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    display: block;
}

/* Título de producto en negrita abajo de la imagen */
.product-title {
    margin-top: 18px;
    margin-bottom: 12px;
    font-size: 1.55rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Botón píldora azul cielo para "LEER MÁS" */
.btn-leer-mas {
    background-color: #5bbde3;
    /* Color azul celeste exacto de la imagen */
    color: white !important;
    font-size: 1.05rem;
    font-weight: bold;
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    outline: none;
}

.btn-leer-mas:hover {
    background-color: #43aacd;
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* LADO REVERSO (Fondo elegante y especificaciones) */
.card-flip-back {
    background: rgba(17, 21, 38, 0.96);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(79, 163, 255, 0.4);
    color: white;
    transform: rotateY(180deg);
    /* Ya viene volteada */
    padding: 30px 24px;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.product-title-back {
    font-size: 1.55rem;
    color: #4fa3ff;
    margin: 0 0 15px 0;
    border-bottom: 2px solid rgba(79, 163, 255, 0.3);
    padding-bottom: 10px;
    width: 100%;
    text-transform: uppercase;
}

.product-specs {
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
    overflow-y: auto;
    width: 100%;
    margin-bottom: 15px;
    padding-right: 5px;
}

.product-specs p {
    margin-top: 0;
    margin-bottom: 15px;
    color: #e0e0e0;
    text-align: left;
    /* Cambiado de justify a left para evitar espacios gigantescos en pantallas angostas */
}

.product-specs ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-specs li {
    margin-bottom: 8px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.product-specs li strong {
    color: #4fa3ff;
}

.btn-leer-mas.back-btn {
    background-color: #e74c3c;
    /* Botón rojo elegante para volver */
}

.btn-leer-mas.back-btn:hover {
    background-color: #c0392b;
}

/* Scrollbar personalizado en el reverso */
.product-specs::-webkit-scrollbar {
    width: 6px;
}

.product-specs::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.product-specs::-webkit-scrollbar-thumb {
    background: rgba(79, 163, 255, 0.4);
    border-radius: 10px;
}

/* RESPONSIVIDAD PARA PANTALLAS PEQUEÑAS */
@media (max-width: 992px) {
    .cards-catalogo {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .card-flip-container {
        width: 92%;
        max-width: 350px;
        height: 465px;
        margin: 0 auto;
    }

    .product-image-box {
        width: 100%;
        height: 320px;
    }

    .product-title {
        font-size: 1.3rem;
        margin-top: 12px;
        margin-bottom: 10px;
    }

    .btn-leer-mas {
        font-size: 0.95rem;
        padding: 8px 25px;
    }

    /* Reverso optimizado para móviles (evita texto apretado) */
    .card-flip-back {
        padding: 20px 15px;
    }

    .product-title-back {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .product-specs {
        font-size: 0.88rem;
        line-height: 1.45;
    }
}

@media (max-width: 360px) {
    .card-flip-container {
        height: 425px;
    }

    .product-image-box {
        height: 280px;
    }
}

/* ==========================================================================
   ESTILOS DEL CATÁLOGO DINÁMICO PREMIUM (PRODUCTOS)
   ========================================================================== */

.catalogo-layout {
    display: flex;
    gap: 40px;
    max-width: 1300px;
    margin: 120px auto 60px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Sidebar de Categorías */
.catalogo-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: rgba(20, 25, 53, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(79, 163, 255, 0.25);
    border-radius: 18px;
    padding: 30px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    height: fit-content;
    align-self: flex-start;
}

.sidebar-title {
    color: #ffffff;
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 25px;
    font-weight: 700;
    border-bottom: 2px solid rgba(79, 163, 255, 0.4);
    padding-bottom: 12px;
    letter-spacing: 0.5px;
}

.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categoria-link {
    display: block;
    padding: 12px 16px;
    margin-bottom: 10px;
    color: #cfedff;
    text-decoration: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.categoria-link:hover,
.categoria-link.active {
    background: rgba(79, 163, 255, 0.15);
    color: #ffffff;
    border-left-color: #4fa3ff;
    padding-left: 20px;
    box-shadow: 0 4px 15px rgba(79, 163, 255, 0.1);
}

/* Área de contenido principal */
.catalogo-main {
    flex-grow: 1;
}

/* Barra de filtros de búsqueda y orden */
.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    gap: 20px;
    flex-wrap: wrap;
}

.search-box-container {
    position: relative;
    flex-grow: 1;
    max-width: 500px;
    min-width: 250px;
}

.search-box-container input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    border: 1px solid rgba(79, 163, 255, 0.35);
    border-radius: 25px;
    background: rgba(20, 25, 53, 0.65);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-box-container input:focus {
    border-color: #4fa3ff;
    box-shadow: 0 0 12px rgba(79, 163, 255, 0.4);
    background: rgba(20, 25, 53, 0.85);
}

.search-icon-svg {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: #4fa3ff;
    pointer-events: none;
}

.sort-box-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
    color: #cfedff;
    font-size: 0.95rem;
    white-space: nowrap;
}

.sort-select {
    padding: 12px 20px;
    border: 1px solid rgba(79, 163, 255, 0.35);
    border-radius: 25px;
    background: rgba(20, 25, 53, 0.65);
    color: white;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-select:focus {
    border-color: #4fa3ff;
    box-shadow: 0 0 10px rgba(79, 163, 255, 0.3);
}

.sort-select option {
    background: #111522;
    color: white;
}

/* Título de la categoría activa */
.category-view-title {
    font-size: 2.2rem;
    color: #eef1ff;
    margin-top: 0;
    margin-bottom: 25px;
    font-family: monospace;
    letter-spacing: 0.5px;
    font-weight: 800;
}

/* Grid de productos */
.product-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Tarjeta de producto premium */
.product-card-new {
    background: rgba(20, 25, 53, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(79, 163, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.product-card-new:hover {
    transform: translateY(-8px);
    border-color: rgba(79, 163, 255, 0.6);
    box-shadow: 0 12px 35px rgba(79, 163, 255, 0.25);
}

.product-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4fa3ff, #1e6acc);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card-new:hover::before {
    opacity: 1;
}

.product-img-wrap {
    width: 100%;
    height: 230px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.04);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-wrap img {
    width: 92%;
    height: 92%;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card-new:hover .product-img-wrap img {
    transform: scale(1.08);
}

.product-title-new {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.4;
    height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc-new {
    color: #b5c3e6;
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0 0 20px 0;
    flex-grow: 1;
    height: 4.8em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-whatsapp-cotizar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: #25d366;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp-cotizar:hover {
    background: #20ba5a;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
}

.btn-whatsapp-cotizar svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.no-products-message {
    color: #cfedff;
    text-align: center;
    grid-column: 1 / -1;
    padding: 40px;
    background: rgba(20, 25, 53, 0.45);
    border: 1px dashed rgba(79, 163, 255, 0.2);
    border-radius: 12px;
    font-size: 1.1rem;
}

/* Adaptabilidad móvil */
@media (max-width: 900px) {
    .catalogo-layout {
        flex-direction: column;
        margin-top: 140px;
    }

    .catalogo-sidebar {
        width: 100%;
        box-sizing: border-box;
    }

    .categories-list {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 12px;
        scroll-snap-type: x mandatory;
    }

    .categoria-link {
        margin-bottom: 0;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
}