/* Estilos generales del cuerpo y contenedor */
body {
 font-family: 'Roboto', sans-serif;
            margin: 0;
            background-color: #f8f9fa;
            color: #343a40;
            line-height: 1.6;
}

        .container {
            max-width: 1200px;
            margin: 20px auto;
            padding: 0 15px;
}

/* Estilos del encabezado */
        .app-header {
            background-color: #ffffff;
            padding: 15px 0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            border-bottom: 3px solid #007bff;
            display: flex;
            flex-direction: column;
            align-items: center;
}

        .header-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            max-width: 1200px;
            padding: 0 15px;
            margin-bottom: 10px;
}

        .app-logo img {
            height: 50px;
}

        .app-search-bar {
            display: flex;
            flex-grow: 1;
            margin: 0 30px;
            position: relative;
            max-width: 600px;
}

        .app-search-bar input {
            width: 100%;
            padding: 12px 20px;
            border: 1px solid #ced4da;
            border-radius: 25px;
            font-size: 16px;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
            outline: none;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

        .app-search-bar input:focus {
            border-color: #007bff;
            box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

        .search-button {
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 25px;
            padding: 10px 18px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s ease;
            margin-left: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
}

        .search-button:hover {
            background-color: #0056b3;
}

        .search-button::before {
            content: "\1F50D";
            margin-right: 5px;
            font-size: 1.1em;
}

        .app-category-nav {
            display: flex;
            justify-content: center;
            width: 100%;
            max-width: 1200px;
            padding: 0 15px;
            margin-top: 10px;
            border-top: 1px solid #e9ecef;
            padding-top: 10px;
}

        .app-category-nav a {
            color: #343a40;
            text-decoration: none;
            margin: 0 18px;
            font-size: 15px;
            font-weight: 500;
            padding: 5px 0;
            position: relative;
            transition: color 0.3s ease;
}

        .app-category-nav a::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: -3px;
            width: 0;
            height: 2px;
            background-color: #007bff;
            transition: width 0.3s ease;
}

        .app-category-nav a:hover {
            color: #007bff;
}

        .app-category-nav a:hover::after {
            width: 100%;
}

/* Sección Hero */
        .hero {
            text-align: center;
            padding: 30px 20px;
            background-color: #ffffff;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            margin-bottom: 35px;
}

        .hero h1 {
            color: #343a40;
            margin-bottom: 15px;
            font-size: 3em;
            letter-spacing: -0.5px;
}

        .hero p {
            color: #6c757d;
            font-size: 1.3em;
            max-width: 800px;
            margin: 0 auto;
}

        .call-to-action-button {
            display: block;
            width: fit-content;
            margin: 30px auto 40px;
            padding: 18px 35px;
            background-color: #28a745;
            color: white;
            border: none;
            border-radius: 30px;
            font-size: 1.3em;
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.2s ease;
            text-align: center;
            text-decoration: none;
            box-shadow: 0 4px 8px rgba(0,123,255,0.2);
}

        .call-to-action-button {
            display: block;
            width: fit-content;
            margin: 30px auto 40px;
            padding: 18px 35px;
            background-color: #28a745;
            color: white;
            border: none;
            border-radius: 30px;
            font-size: 1.3em;
            cursor: pointer;
            transition: background-color 0.3s ease, transform 0.2s ease;
            text-align: center;
            text-decoration: none;
            box-shadow: 0 4px 8px rgba(0,123,255,0.2);
}

        .call-to-action-button:hover {
            background-color: #218838;
            transform: translateY(-3px);
            box-shadow: 0 6px 12px rgba(0,123,255,0.3);
}

/* Sección de Marcas */
        .brands-section {
            background-color: #ffffff;
            padding: 20px 20px 40px;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            margin-bottom: 30px;
            text-align: center;
}

        .brands-section h2 {
            color: #343a40;
            margin-bottom: 30px;
            font-size: 2.2em;
}

        .brands-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
            gap: 25px;
            justify-items: center;
            align-items: center;
}

        .brand-logo {
            padding: 15px;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            background-color: #fdfdfd;
}

        .brand-logo:hover {
            transform: translateY(-5px);
            box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

        .brand-logo img {
            max-width: 110px;
            height: auto;
            display: block;
            margin: 0 auto;
}

.brand-logo img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Secciones de Categorías */
        .category {
            background-color: #ffffff;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            margin-bottom: 35px;
}

.category h3 {
    color: #343a40;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2em;
    text-align: center;
}

        .product-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
            gap: 20px;
            justify-content: center;
}

.product-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* MODIFICACIÓN CLAVE: Cambiamos 'height' por 'min-height' y 'max-height' */
    min-height: 350px; /* Altura mínima para asegurar que no sean demasiado pequeñas */
    max-height: 420px; /* Altura máxima para que no crezcan demasiado */
    position: relative;
    padding-bottom: 20px; /* Espacio para el botón */
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

        .product-card img {
            height: 125px;
            width: 100%;
            object-fit: contain;
            padding: 10px;
            border-bottom: 1px solid #e9ecef;
            background-color: #fdfdfd;
}

.product-info {
    padding: 0 15px 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    width: 100%;
}

.product-info h4 {
    font-size: 1.1em;
    margin: 0 0 5px;
    color: #333;
    min-height: 40px; /* Asegura una altura consistente para los títulos */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limita el título a dos líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

        .product-info p:not(.product-price):not(.product-original-price):not(.product-stock) {
            display: none;
}

        .product-price {
            font-size: 24px !important;
            color: #828282;
            font-weight: 700;
margin-top: 5px;
            margin-bottom: 5px;
}

        .product-original-price {
            font-size: 14px;
            color: #dc3545;
            text-decoration: line-through;
            margin-bottom: 5px;
}

        .product-stock {
            font-size: 0.9em;
            color: #6c757d;
            margin-top: 5px; 
}

.add-to-cart-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
            width: calc(100% - 40px);
            margin: 0 auto 15px;
            box-shadow: 0 2px 5px rgba(0,123,255,0.2);
}

.add-to-cart-btn:hover {
    background-color: #0056b3;
}

/* Utilidad de Sección Oculta */
.hidden-section {
    display: none !important;
}

        .no-results-message {
            display: none; /* ESENCIAL: Asegura que esté oculta por defecto por CSS */
            text-align: center;
            padding: 60px 20px;
            background-color: #ffffff;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            margin-bottom: 35px;
}

        .no-results-message p {
            font-size: 1.4em;
            color: #dc3545;
            font-weight: bold;
}

/* Botón Volver */
.back-button {
    display: block;
    width: fit-content;
    margin: 30px auto;
    padding: 12px 30px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #5a6268;
}

.back-button.hidden {
    display: none;
}

/* Estilos del Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

        .modal-content {
            background-color: #ffffff;
            padding: 25px;
            border: none;
            width: 70%;
            max-width: 700px;
            border-radius: 12px;
            box-shadow: 0 8px 20px rgba(0,0,0,0.25);
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            animation: fadeIn 0.3s ease-out;
            max-height: 85vh;
            overflow-y: auto;
}

        .close-button {
            color: #6c757d;
            position: absolute;
            top: 10px;
            right: 20px;
            font-size: 35px;
            font-weight: normal;
            cursor: pointer;
            transition: color 0.3s ease;
}

        .close-button:hover,
        .close-button:focus {
            color: #343a40;
            text-decoration: none;
}

        .modal-body {
            text-align: center;
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
}

        .modal-body img {
            max-width: 60%;
            max-height: 175px;
            height: auto;
            display: block;
            margin: 0 auto 20px;
            object-fit: contain;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            padding: 8px;
            background-color: #fdfdfd;
}

        .modal-body h2 {
            color: #343a40;
            font-size: 2em;
            margin-bottom: 15px;
}
        .modal-body p {
            color: #555;
            font-size: 1em;
            margin-bottom: 12px;
            text-align: center;
            max-width: 600px;
            line-height: 1.6;
            display: -webkit-box;
            -webkit-line-clamp: 4;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
}

        .modal-price {
            font-size: 1.95em !important;
            color: #007bff;
            font-weight: bold;
            margin-top: 20px;
            margin-bottom: 8px;
}

        .modal-original-price {
            font-size: 1.1em;
            color: #dc3545;
            text-decoration: line-through;
            margin-bottom: 15px;
}

        .add-to-cart-button {
            background-color: #28a745;
            color: white;
            padding: 12px 25px;
            border: none;
            border-radius: 30px;
            cursor: pointer;
            font-size: 1.1em;
            transition: background-color 0.3s ease, transform 0.2s ease;
            margin-top: 20px;
            box-shadow: 0 3px 8px rgba(40,167,69,0.3);
}

        .add-to-cart-button:hover {
            background-color: #218838;
            transform: translateY(-2px);
}

/* Estilo para centrar el contenedor del botón de ofertas */
.offers-button-container {
    text-align: center;
    margin: 20px 0; /* Agrega un poco de margen arriba y abajo para un mejor espaciado */
}

/* Secciones de Información */
#info-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    padding: 20px 0;
}

.info-card {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: center;
}

        .info-card h3 {
            color: #343a40;
            margin-bottom: 18px;
            font-size: 1.8em;
}

.info-card p {
    color: #555;
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 10px;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px;
}

.info-card li {
    margin-bottom: 5px;
    color: #666;
}

.contact-link {
    display: inline-block;
    margin: 5px;
}

.whatsapp-link {
    color: #25D366;
}

.instagram-link {
    color: #C13584;
}

.contact-link img {
    vertical-align: middle;
    margin-right: 5px;
}

/* Estilos del Pie de Página */
footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
    margin-top: 40px;
    font-size: 0.9em;
border-top: 3px solid #007bff;
}

/* Animaciones */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Diseño Responsivo */
@media (max-width: 992px) {
    .app-category-nav {
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
    }

    .app-category-nav a {
        flex: 0 0 auto;
        margin: 5px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 18px;
    }

    .info-card {
        padding: 20px;
    }

    #info-sections {
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: center;
    }

    .app-search-bar {
        width: 100%;
        margin: 10px 0;
        flex-wrap: wrap;
    }

    .app-search-bar input {
        flex-grow: 1;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .search-button {
        margin-top: 10px;
        width: 100%;
    }

    .app-category-nav {
        flex-wrap: wrap;
        justify-content: center;
        margin: 15px 0 0;
    }

    .app-category-nav a {
        margin: 5px 10px;
        font-size: 14px;
    }

    .hero h1 {
        font-size: 2.2em;
    }

    .hero p {
        font-size: 1.1em;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }
    .product-card {
        height: 320px;
    }

    .product-card img {
        height: 130px;
        padding: 5px;
        object-fit: contain;
    }

    .product-info h4 {
        font-size: 15px;
        min-height: 35px;
    }

    .product-price {
        font-size: 20px !important;
    }

    .product-info p {
        min-height: 18px;
    }

    .modal-content {
        width: 90%;
        padding: 20px;
        max-height: 90vh;
    }

    .modal-body img {
        max-width: 70%;
        max-height: 150px;
        margin-bottom: 15px;
    }

    .modal-body h2 {
        font-size: 1.8em;
        margin-bottom: 12px;
    }

    .modal-body p {
        font-size: 0.9em;
        margin-bottom: 10px;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
    }

    .modal-price {
        font-size: 1.6em !important;
        margin-top: 15px;
    }

    .add-to-cart-button {
        padding: 10px 20px;
        font-size: 1em;
        margin-top: 15px;
    }

    #info-sections {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .app-logo img {
        height: 45px;
    }

    .app-search-bar input {
        font-size: 14px;
        padding: 10px 15px;
    }

    .search-button {
        font-size: 14px;
        padding: 8px 15px;
    }

    .hero h1 {
        font-size: 1.7em;
    }

    .hero p {
        font-size: 0.95em;
    }

    .call-to-action-button {
        padding: 15px 25px;
        font-size: 1.1em;
    }

    .brands-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 15px;
    }

    .brand-logo img {
        max-width: 90px;
    }

    .category h3 {
        font-size: 1.7em;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .product-card {
        height: 300px;
    }

    .product-card img {
        height: 150px;
        object-fit: contain;
    }

    .product-info {
        padding: 10px;
    }

    .product-info h4 {
        font-size: 14px;
        min-height: 30px;
    }

    .product-info p {
        font-size: 0.8em;
        min-height: 15px;
    }

    .product-price {
        font-size: 18px !important;
    }

    .add-to-cart-btn {
        padding: 10px 15px;
        font-size: 6px;
    }

    .modal-content {
        padding: 15px;
    }

    .modal-body img {
        max-height: 120px;
        margin-bottom: 10px;
    }

    .modal-body h2 {
        font-size: 1.6em;
        margin-bottom: 10px;
    }

    .modal-body p {
        font-size: 0.85em;
        margin-bottom: 8px;
        -webkit-line-clamp: 6;
    }

    .modal-price {
        font-size: 1.4em !important;
        margin-top: 10px;
    }

    .add-to-cart-button {
        padding: 10px 20px;
        font-size: 0.95em;
        margin-top: 10px;
    }

    .social-icons img {
        height: 30px;
        margin: 0 10px;
    }
}