/* ===========================
   ARTIKA
   Hielo y Helados Artesanales
=========================== */

:root {
    --azul: #4FC3F7;
    --azul-oscuro: #0288D1;
    --azul-claro: #E1F5FE;
    --blanco: #FFFFFF;
    --texto: #0D47A1;
    --gris: #F5F5F5;
    --sombra: 0 8px 20px rgba(0, 0, 0, .12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--azul-claro);
    color: var(--texto);
}

/* ==========================
   HEADER
========================== */

header {
    background: linear-gradient(135deg, var(--azul), var(--azul-oscuro));
    color: white;
    box-shadow: var(--sombra);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 140px;
}

.topbar {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 2.3rem;
    margin-bottom: 5px;
}

.subtitulo {
    font-weight: bold;
    font-size: 1rem;
}

.eslogan {
    font-style: italic;
    font-size: .95rem;
    opacity: .9;
    margin-top: 5px;
}

/* ==========================
   BUSCADOR
========================== */

.buscador {
    flex: 1;
    display: flex;
    justify-content: center;
}

.buscador input {
    width: 100%;
    max-width: 450px;
    padding: 14px 20px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    outline: none;
}

/* ==========================
   CARRITO
========================== */

.carrito {
    background: white;
    color: var(--azul-oscuro);
    padding: 12px 18px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--sombra);
    transition: .3s;
}

.carrito:hover {
    transform: scale(1.05);
}

/* ==========================
   MENÚ
========================== */

nav {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 15px;
    background: rgba(255, 255, 255, .15);
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: .3s;
}

nav a:hover {
    color: #dff8ff;
}

/* ==========================
   BANNER
========================== */

.banner {
    max-width: 1200px;
    margin: 40px auto;
    padding: 80px 30px;
    border-radius: 25px;
    background: linear-gradient(135deg, #74d9ff, #d9f8ff);
    box-shadow: var(--sombra);
    text-align: center;
}

.banner h2 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.banner-subtitulo {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.banner h3 {
    font-size: 1.2rem;
    font-style: italic;
    font-weight: normal;
    line-height: 1.7;
}

/* ==========================
   SECCIONES
========================== */

section {
    max-width: 1200px;
    margin: 35px auto;
    padding: 20px;
}

/* ==========================
   PRODUCTOS
========================== */

#productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

/* ==========================
   TARJETA PRODUCTO
========================== */

.producto-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: .3s;
}

.producto-card:hover {
    transform: translateY(-8px);
}

.producto-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.producto-info {
    padding: 18px;
}

.producto-info h3 {
    margin-bottom: 10px;
}

.producto-info p {
    margin-bottom: 15px;
}

.producto-info button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--azul-oscuro);
    color: white;
    font-size: 15px;
    cursor: pointer;
    transition: .3s;
}

.producto-info button:hover {
    background: var(--azul);
}

/* ==========================
   CARRITO
========================== */

#carrito {
    background: white;
    border-radius: 20px;
    box-shadow: var(--sombra);
}

#carrito h2 {
    margin-bottom: 20px;
}

#carrito-items {
    margin-bottom: 20px;
}

#carrito-total {
    color: var(--azul-oscuro);
    font-weight: bold;
}

#btn-pedido {
    margin-top: 20px;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: #25D366;
    color: white;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: .3s;
}

#btn-pedido:hover {
    background: #1ebc59;
}

/* ==========================
   FOOTER
========================== */

footer {
    background: var(--azul-oscuro);
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 50px;
}

/* ==========================
   RESPONSIVE
========================== */

@media (max-width: 768px) {

    .topbar {
        flex-direction: column;
        text-align: center;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .banner {
        padding: 50px 20px;
    }

    .banner h2 {
        font-size: 2rem;
    }

    .banner h3 {
        font-size: 1rem;
    }

    nav {
        flex-wrap: wrap;
        gap: 20px;
    }

    .buscador {
        width: 100%;
    }

    .buscador input {
        max-width: 100%;
    }
}

/* =====================================
   LAYOUT PRINCIPAL
===================================== */

.contenido-principal{

    max-width:1400px;

    margin:40px auto;

    padding:0 20px;

    display:grid;

    grid-template-columns:1fr 360px;

    gap:35px;

    align-items:start;

}

.contenido-productos{

    min-width:0;

}

/* =====================================
   CARRITO LATERAL
===================================== */

#carrito{

    position: sticky;

    top: calc(140px + 20px);

    background:#fff;

    border-radius:20px;

    padding:25px;

    box-shadow:0 8px 25px rgba(0,0,0,.12);

}

#carrito h2{

    margin-bottom:20px;

}

#carrito-total{

    font-size:22px;

    font-weight:bold;

    color:#0288D1;

}

#btn-pedido{

    margin-top:20px;

}

/* =====================================
   RESPONSIVE
===================================== */

@media(max-width:900px){

    .contenido-principal{

        grid-template-columns:1fr;

    }

    #carrito{

        position:static;

        width:100%;

    }

}