/* ==============================================
   RESET Y ESTILOS GENERALES
   ============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #ffffff;
    color: #000000;
    line-height: 1.4;
}

/* ==============================================
   CABECERA
   ============================================== */


.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 20px;
    background-color: #ffffff;
    flex-wrap: nowrap;
    border-bottom: 2px solid #009bb3;
    gap: 20px;
}

.header .logo img {
    height: 80px;
    width: auto;
    object-fit: contain;
}

/* --- Buscador centrado pero con espacio a la derecha --- */
.search-form {
    display: flex;
    flex: 1;
    max-width: 600px;
    margin-left: 40px; /* se desplaza para dejar hueco */
}

.search-form input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    font-size: 16px;
    border: 2px solid #009bb3;
    border-radius: 8px 0 0 8px;
    outline: none;
}

.search-form button {
    padding: 8px 16px;
    background-color: #009bb3;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-form button:hover {
    background-color: #007a8c;
}

/* --- Iconos de login y carrito (cabecera) --- */
.header-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon {
    width: 25px;
    height: 25px;
    cursor: pointer;
    transition: transform .2s ease;
}

.header-icon:hover {
    transform: scale(1.15);
}

/* ==============================================
   CONTENEDOR PRINCIPAL
   ============================================== */
.container {
    display: flex;
    padding: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

/* ==============================================
   PANEL IZQUIERDO
   ============================================== */
.left-panel {
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main-button {
    display: block;
    width: 200px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: none;
    padding: 0;
    transition: transform .2s ease, box-shadow .2s ease;
}

.main-button:hover {
    transform: scale(1.03);
    box-shadow: 0 0 10px #00E5FF55;
}

.main-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
}

/* ==============================================
   PANEL DERECHO: GRID / CARDS
   ============================================== */
.carousel {
    flex: 1;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    width: 100%;
}

.card {
    background-color: white;
    border-radius: 12px;
    border: 1px solid #ddd;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s;
}

.card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card img {
    width: 100px;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
}

.product-desc {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;

    line-height: 1.2em;
    height: calc(1.2em * 6);
    overflow: hidden;
}

.price-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
    color: #1ca900;
    margin-bottom: 10px;
}

.iva {
    font-size: 14px;
    font-weight: bold;
    color: #1ca900;
    margin-bottom: 10px;
}

.buy-button {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background-color: #ff7b00;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    width: 100%;
    text-align: center;
}

.buy-button:hover {
    background-color: #009bb3;
    transform: scale(1.03);
}

/* ==============================================
   MODAL
   ============================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modal-content {
    max-width: 90%;
    max-height: 80%;
    border-radius: 12px;
}

.modal-title {
    color: #fff;
    margin-top: 10px;
    font-size: 18px;
    text-align: center;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }

    .left-panel {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .main-button {
        flex: 1 1 48%;
    }
}

@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .search-form {
        width: 100%;
        margin-left: 0;
    }

    .header-icons {
        margin-left: auto;
    }

    .header .logo img {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .header .logo img {
        height: 50px;
    }

    .card img {
        height: 120px;
    }
}
.header-icons img {
    width: 25px !important;
    height: 25px !important;
    object-fit: contain;
    display: block;
}