
/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    width: 100%;

    min-height: 100vh;

    font-family: Arial, sans-serif;

    background-color: #f8f9fa;

    color: #333;

    overflow-x: hidden;
}


/* =========================================================
   HEADER
   ========================================================= */

body > header {
    width: 100%;

    padding: 25px 15px;

    background-color: #0049a8;

    color: white;

    text-align: center;
}

.category-title {
    margin: 0;

    font-size: clamp(
        1.6rem,
        5vw,
        2.2rem
    );

    font-weight: bold;
}


/* =========================================================
   BOTÓN VOLVER
   ========================================================= */

.volver-container {
    width: 100%;

    padding: 15px 20px;

    text-align: left;
}

.btn-volver {
    display: inline-block;

    padding: 11px 20px;

    background-color: #d88526;

    color: white;

    text-decoration: none;

    border-radius: 25px;

    font-size: 16px;

    font-weight: bold;

    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.2);

    transition:
        background-color 0.3s ease,
        transform 0.2s ease,
        box-shadow 0.3s ease;
}

.btn-volver:hover {
    background-color: #0059b3;

    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.25);

    transform: translateY(-2px);
}

.btn-volver:active {
    background-color: #003f7d;

    transform: translateY(1px);
}


/* =========================================================
   PRODUCTOS
   ========================================================= */

.product-list {
    width: 100%;

    padding: 10px 20px 30px;
}

.products {
    width: min(1200px, 100%);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
    margin: 20px auto;
    align-items: stretch;
}


/* =========================================================
   TARJETA DE PRODUCTO
   ========================================================= */

.product-item {
    width: 100%;

    min-width: 0;

    padding: 15px;

    background-color: white;

    border: 3px solid #ddd;

    border-radius: 10px;

    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.1);

    overflow: hidden;

    text-align: center;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.product-item:hover {
    transform: translateY(-4px);

    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.15);
}


/* =========================================================
   IMÁGENES
   ========================================================= */

.product-item img {
    display: block;

    width: 100%;

    height: auto;

    max-height: 150px;

    object-fit: contain;

    margin: 0 auto 10px;

    border-radius: 5px;
}


/* =========================================================
   TÍTULO
   ========================================================= */

.product-item h3 {
    margin: 10px 0 5px;

    color: #0049a8;

    font-size: clamp(
        1rem,
        2vw,
        1.2rem
    );
}

.product-item p {
    margin: 0 0 10px;

    color: #555;

    font-size: 0.9rem;
}


/* =========================================================
   FOOTER
   ========================================================= */

body > footer {
    width: 100%;

    margin-top: 20px;

    padding: 14px 15px;

    background-color: #0059b3;

    color: white;

    text-align: center;

    font-size: 0.9rem;
}

body > footer p {
    margin: 0;
}


/* TABLETS */
@media (max-width: 900px) {
    .products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

/* CELULARES */
@media (max-width: 550px) {
    .product-list {
        padding: 10px 12px 25px;
    }

    .products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .product-item {
        padding: 10px;
    }

    .product-item img {
        max-height: 150px;
    }

    .product-item h3 {
        font-size: 0.95rem;
    }

    .product-item h4 {
        font-size: 0.85rem;
    }
}

/* CELULARES MUY PEQUEÑOS */
@media (max-width: 350px) {
    .products {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   GALERÍA DE IMÁGENES DEL PRODUCTO
======================================== */

.product-gallery {
    width: 100%;
    margin-bottom: 15px;
}

.product-item img.product-main-image {
    display: block;
    width: 100%;
    height: 220px;
    max-height: none;
    object-fit: contain;
    margin: 0 auto 10px;
    border-radius: 5px;
}

/* MINIATURAS */

.product-thumbnails {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 10px 0 15px;
}

.product-item .product-thumbnails img {
    display: block;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    max-height: none;
    object-fit: contain;
    margin: 0;
    padding: 3px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-item .product-thumbnails img:hover {
    border-color: #d88526;
    transform: scale(1.05);
}

/* MINIATURA SELECCIONADA */

.product-item .product-thumbnails img.active {
    border: 2px solid #d88526;
}


/* ========================================
   DESCRIPCIÓN DEL PRODUCTO
======================================== */

.product-item .product-description {
    color: #555;
    font-size: 0.9rem;
    line-height: 1;
    text-align: left;
    overflow-wrap: anywhere;
    margin: 8px 0 18px;
}

.product-tagline {
    color: #333;
    font-size: 1rem;
    font-weight: bold;
    margin: 0 0 10px;
}

/* ========================================
   CARACTERÍSTICAS Y PACKING
======================================== */

.product-details,
.product-section {
    padding-top: 12px;
    margin-top: 14px;
    border-top: 1px solid #ddd;
    text-align: left;
}

.product-item .product-details h4,
.product-item .product-section h4 {
    color: #333;
    font-size: 0.95rem;
    margin: 0 0 10px;
}

.product-item .product-details p,
.product-item .product-section p {
    color: #555;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 7px 0;
}

/* ========================================
   ADAPTACIÓN PARA CELULARES
======================================== */

@media (max-width: 550px) {

    .product-item .product-description {
        font-size: 0.82rem;
    }

    .product-tagline {
        font-size: 0.9rem;
    }

    .product-item .product-details p,
    .product-item .product-section p {
        font-size: 0.8rem;
    }

}
