* {
    box-sizing: border-box;
}


body {

    margin: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f5f7fa;

    color: #20242a;
}


body.modal-abierto {
    overflow: hidden;
}


/* ==========================================
   HEADER
========================================== */

header {

    height: 72px;

    background: #111827;

    color: white;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding:
        0 6%;

    position: sticky;

    top: 0;

    z-index: 100;
}


.logo {

    font-size: 22px;
    
    font-weight: 500;
}

.logo a {
    color: inherit;
    text-decoration: none;
    font-style: italic;
    font-size: 30px;
}


nav {

    display: flex;

    align-items: center;

    gap: 8px;
}


nav a {

    color: #d1d5db;

    text-decoration: none;

    padding:
        10px 15px;

    border-radius: 8px;

    transition: .2s;
}


nav a:hover,
nav a.activo {

    color: white;

    background: #1f2937;
}


#contador-carrito {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 21px;

    height: 21px;

    padding: 0 5px;

    margin-left: 4px;

    border-radius: 50px;

    background: #ef4444;

    color: white;

    font-size: 12px;

    font-weight: bold;
}


/* ==========================================
   GENERAL
========================================== */

.contenedor {

    width: 90%;

    max-width: 1200px;

    margin: auto;
}


.pagina-encabezado {

    padding:
        45px 0 25px;
}


.etiqueta-seccion {

    font-size: 12px;

    letter-spacing: 2px;

    color: #6b7280;

    font-weight: bold;
}


.titulo-pagina {

    margin:
        7px 0 0;

    font-size: 34px;
}


/* ==========================================
   BOTONES
========================================== */

.boton-principal {

    display: inline-block;

    border: none;

    text-decoration: none;

    background: #111827;

    color: white;

    padding:
        13px 22px;

    border-radius: 9px;

    font-weight: bold;

    cursor: pointer;

    transition: .2s;
}


.boton-principal:hover {

    background: #000;

    transform: translateY(-1px);
}


.boton-secundario {

    display: inline-block;

    padding:
        11px 18px;

    border-radius: 8px;

    border: 1px solid #d1d5db;

    text-decoration: none;

    color: #20242a;

    background: white;

    font-weight: bold;
}


.boton-grande {

    padding:
        15px 28px;

    font-size: 16px;
}


/* ==========================================
   HERO
========================================== */

.hero {

    min-height: 500px;

    background:
        linear-gradient(
            120deg,
            #111827,
            #374151
        );

    color: white;

    display: flex;

    align-items: center;

    padding:
        70px 8%;
}


.hero-contenido {

    max-width: 650px;
}


.hero-etiqueta {

    font-size: 12px;

    letter-spacing: 3px;

    opacity: .7;
}


.hero h1 {

    font-size: 52px;

    line-height: 1.08;

    margin:
        15px 0;
}


.hero p {

    font-size: 18px;

    line-height: 1.6;

    color: #d1d5db;

    margin-bottom: 30px;
}


.hero .boton-principal {

    background: white;

    color: #111827;
}


/* ==========================================
   BENEFICIOS
========================================== */

.beneficios {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;

    padding:
        45px 0;
}


.beneficio {

    background: white;

    padding: 25px;

    border-radius: 12px;

    display: flex;

    gap: 18px;

    border: 1px solid #e5e7eb;
}


.beneficio > span {

    font-size: 30px;
}


.beneficio h3 {

    margin:
        0 0 5px;
}


.beneficio p {

    margin: 0;

    color: #6b7280;
}


/* ==========================================
   PROMOCIÓN
========================================== */

.promocion {

    width: 90%;

    max-width: 1200px;

    margin:
        0 auto 45px;

    padding: 55px;

    border-radius: 16px;

    background: #e5e7eb;
}


.promocion span {

    font-size: 12px;

    letter-spacing: 2px;

    color: #6b7280;
}


.promocion h2 {

    font-size: 32px;

    max-width: 600px;

    margin:
        10px 0 25px;
}


/* ==========================================
   VISITAS
========================================== */

.visitas {

    text-align: center;

    padding:
        45px;

    background: white;

    border-top: 1px solid #e5e7eb;
}


.visitas span {

    display: block;

    font-size: 11px;

    letter-spacing: 2px;

    color: #6b7280;
}


.visitas strong {

    display: block;

    font-size: 42px;

    margin:
        8px 0;
}


.visitas p {

    color: #6b7280;
}


/* ==========================================
   BUSCADOR
========================================== */

.buscador {

    margin-bottom: 30px;
}


.buscador input {

    width: 100%;

    padding:
        15px 18px;

    border: 1px solid #d1d5db;

    border-radius: 10px;

    font-size: 16px;

    outline: none;
}


.buscador input:focus {

    border-color: #111827;
}


/* ==========================================
   PRODUCTOS
========================================== */

.productos-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 22px;

    padding-bottom: 60px;
}


.producto-card {

    background: white;

    border-radius: 14px;

    overflow: hidden;

    border: 1px solid #e5e7eb;

    transition: .25s;
}


.producto-card:hover {

    transform:
        translateY(-4px);

    box-shadow:
        0 12px 30px
        rgba(0,0,0,.08);
}


.producto-imagen {

    height: 220px;

    background: #f3f4f6;

    overflow: hidden;
}


.producto-imagen img {

    width: 100%;

    height: 100%;

    object-fit: cover;
}


.producto-card-info {

    padding: 18px;
}


.categoria {

    display: inline-block;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 1px;

    color: #6b7280;

    margin-bottom: 7px;
}


.producto-card h3 {

    margin:
        0 0 8px;

    font-size: 18px;
}


.producto-card p {

    color: #6b7280;

    font-size: 14px;

    line-height: 1.5;

    min-height: 42px;
}


.producto-card-bottom {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin:
        18px 0;
}


.producto-card-bottom strong {

    font-size: 19px;
}


.stock {

    font-size: 12px;

    color: #16803c;
}


.agotado {

    font-size: 12px;

    color: #dc2626;
}


.boton-producto {

    display: block;

    text-align: center;

    padding: 11px;

    border-radius: 8px;

    background: #111827;

    color: white;

    text-decoration: none;

    font-weight: bold;
}


/* ==========================================
   DETALLE PRODUCTO
========================================== */

.detalle-producto {

    min-height: 600px;

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 60px;

    align-items: center;
}


.detalle-imagen {

    height: 500px;

    background: white;

    border-radius: 16px;

    overflow: hidden;
}


.detalle-imagen img {

    width: 100%;

    height: 100%;

    object-fit: cover;
}


.detalle-info h1 {

    font-size: 42px;

    margin:
        5px 0 20px;
}


.detalle-descripcion {

    color: #6b7280;

    font-size: 17px;

    line-height: 1.7;
}


.detalle-precio {

    font-size: 34px;

    font-weight: bold;

    margin:
        25px 0 10px;
}


.detalle-stock {

    margin-bottom: 25px;

    color: #16803c;

    font-weight: bold;
}


/* ==========================================
   CARRITO
========================================== */

.carrito {

    padding-bottom: 20px;
}


.carrito-item {

    display: grid;

    grid-template-columns:
        80px 1fr auto auto auto;

    align-items: center;

    gap: 20px;

    background: white;

    padding: 15px;

    margin-bottom: 12px;

    border-radius: 12px;

    border: 1px solid #e5e7eb;
}


.carrito-producto-imagen {

    width: 80px;

    height: 80px;

    border-radius: 9px;

    overflow: hidden;

    background: #f3f4f6;
}


.carrito-producto-imagen img {

    width: 100%;

    height: 100%;

    object-fit: cover;
}


.carrito-info h3 {

    margin:
        0 0 5px;
}


.carrito-info p {

    margin: 0;

    color: #6b7280;

    font-size: 14px;
}


.cantidad-control {

    display: flex;

    align-items: center;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    overflow: hidden;
}


.cantidad-control button {

    width: 34px;

    height: 34px;

    border: none;

    background: white;

    cursor: pointer;

    font-size: 18px;
}


.cantidad-control button:hover {

    background: #f3f4f6;
}


.cantidad-control span {

    min-width: 35px;

    text-align: center;

    font-weight: bold;
}


.carrito-subtotal {

    font-weight: bold;

    min-width: 110px;

    text-align: right;
}


.boton-eliminar {

    border: none;

    background: #fee2e2;

    color: #dc2626;

    width: 38px;

    height: 38px;

    border-radius: 8px;

    cursor: pointer;
}


.resumen-carrito-box {

    background: white;

    border: 1px solid #e5e7eb;

    border-radius: 14px;

    padding: 25px;

    margin:
        10px 0 60px;

    max-width: 600px;

    margin-left: auto;
}


.resumen-dato,
.resumen-total {

    display: flex;

    justify-content: space-between;

    padding:
        8px 0;
}


.resumen-total {

    border-top: 1px solid #e5e7eb;

    margin-top: 10px;

    padding-top: 20px;

    font-size: 23px;
}


.resumen-acciones {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-top: 22px;

    gap: 15px;
}


.boton-vaciar {

    border: none;

    background: none;

    color: #dc2626;

    cursor: pointer;

    font-weight: bold;
}


.boton-realizar {

    font-size: 15px;
}


/* ==========================================
   CARRITO VACÍO
========================================== */

.carrito-vacio {

    text-align: center;

    background: white;

    border-radius: 16px;

    padding: 80px 20px;

    margin-bottom: 50px;
}


.carrito-vacio-icono {

    font-size: 55px;

    margin-bottom: 15px;
}


.carrito-vacio h2 {

    margin-bottom: 8px;
}


.carrito-vacio p {

    color: #6b7280;

    margin-bottom: 30px;
}


/* ==========================================
   MODAL
========================================== */

.modal-overlay {

    position: fixed;

    inset: 0;

    background:
        rgba(15, 23, 42, .72);

    backdrop-filter:
        blur(5px);

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 20px 20px 20px 20px;

    z-index: 9999;

    opacity: 0;

    visibility: hidden;

    transition:
        opacity .25s,
        visibility .25s;
}


.modal-overlay.mostrar {

    opacity: 1;

    visibility: visible;
}


.modal-pedido {

    width: 100%;

    max-width: 850px;

    max-height: 92vh;

    overflow-y: auto;

    background: white;

    border-radius: 18px 18px 18px 18px;

    box-shadow:
        0 25px 70px
        rgba(0,0,0,.30);

    transform:
        translateY(20px)
        scale(.97);

    transition: .25s;
}


.modal-overlay.mostrar
.modal-pedido {

    transform:
        translateY(0)
        scale(1);
}


/* HEADER MODAL */

.modal-header {

    display: flex;

    justify-content: space-between;

    padding:
        28px 30px 22px;

    border-bottom:
        1px solid #e5e7eb;
    
}


.modal-etiqueta {

    font-size: 10px;

    letter-spacing: 2px;

    font-weight: bold;

    color: #6b7280;
}


.modal-header h2 {

    margin:
        7px 0 5px;

    font-size: 27px;
}


.modal-header p {

    margin: 0;

    color: #6b7280;
}


.cerrar-modal {

    width: 38px;

    height: 38px;

    border: none;

    border-radius: 50%;

    background: #f3f4f6;

    font-size: 25px;

    cursor: pointer;

    flex-shrink: 0;
}


.cerrar-modal:hover {

    background: #e5e7eb;
}


/* BODY */

.modal-body {

    padding: 28px 30px;
}


.checkout-seccion {

    border:
        1px solid #e5e7eb;

    border-radius: 12px;

    padding: 22px;

    margin-bottom: 18px;
}


.checkout-titulo {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 20px;
}


.checkout-numero {

    width: 32px;

    height: 32px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #111827;

    color: white;

    font-weight: bold;
}


.checkout-titulo h3 {

    margin: 0 0 3px;
}


.checkout-titulo p {

    margin: 0;

    color: #6b7280;

    font-size: 13px;
}


/* FORM */

.form-grid {

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 17px;
}


.campo-completo {

    grid-column:
        1 / -1;
}


.campo label {

    display: block;

    margin-bottom: 7px;

    font-size: 13px;

    font-weight: bold;
}


.campo input,
.campo textarea {

    width: 100%;

    border:
        1px solid #d1d5db;

    border-radius: 8px;

    padding: 12px;

    font-family: inherit;

    font-size: 14px;

    outline: none;

    transition: .2s;
}


.campo input:focus,
.campo textarea:focus {

    border-color: #111827;

    box-shadow:
        0 0 0 3px
        rgba(17,24,39,.07);
}


.campo textarea {

    resize: vertical;
}


/* PRODUCTOS MODAL */

.producto-modal {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding:
        13px 0;

    border-bottom:
        1px solid #f0f0f0;
    
}


.producto-modal-info {

    display: flex;

    flex-direction: column;

    gap: 4px;

   
}


.producto-modal-info span {

    color: #6b7280;

    font-size: 13px;
}


/* TOTAL MODAL */

.checkout-total {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-top: 20px;

    padding-top: 20px;

    border-top:
        2px solid #e5e7eb;

        
}


.checkout-total span {

    font-weight: bold;
}


.checkout-total strong {

    font-size: 27px;
}


/* FOOTER MODAL */

.modal-footer {

    display: flex;

    justify-content: flex-end;

    gap: 12px;

    padding:
        20px 30px;

    border-top:
        1px solid #e5e7eb;

    background: #fafafa;

    border-radius:
        18px 18px 18px 18px;
}


.boton-modal-secundario {

    border:
        1px solid #d1d5db;

    background: white;

    color: #374151;

    padding:
        12px 20px;

    border-radius: 8px;

    cursor: pointer;

    font-weight: bold;
}


.boton-modal-confirmar {

    border: none;

    background: #111827;

    color: white;

    padding:
        12px 22px;

    border-radius: 8px;

    cursor: pointer;

    font-weight: bold;
}


.boton-modal-confirmar:hover {

    background: #000;
}


.boton-modal-confirmar span {

    margin-left: 8px;
}


/* ==========================================
   MENSAJES
========================================== */

.mensaje {

    background: white;

    padding: 50px;

    text-align: center;

    border-radius: 12px;

    margin: 30px 0;
}


/* ==========================================
   FOOTER
========================================== */

footer {

    text-align: center;

    padding:
        30px;

    background: #111827;

    color: #9ca3af;

    margin-top: 40px;
}


/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 900px) {

    .productos-grid {

        grid-template-columns:
            repeat(3, 1fr);
    }


    .detalle-producto {

        grid-template-columns: 1fr;

        padding:
            40px 0;
    }


    .detalle-imagen {

        height: 400px;
    }


    .beneficios {

        grid-template-columns: 1fr;
    }

}


@media (max-width: 700px) {

    header {

        height: auto;

        min-height: 70px;

        flex-direction: column;

        gap: 10px;

        padding:
            15px;
    }


    nav {

        width: 100%;

        justify-content: center;

        flex-wrap: wrap;
    }


    .hero {

        min-height: 430px;

        padding:
            50px 7%;
    }


    .hero h1 {

        font-size: 38px;
    }


    .productos-grid {

        grid-template-columns:
            repeat(2, 1fr);
    }


    .carrito-item {

        grid-template-columns:
            60px 1fr auto;

        gap: 12px;
    }


    .carrito-producto-imagen {

        width: 60px;

        height: 60px;
    }


    .cantidad-control {

        grid-column: 2;
    }


    .carrito-subtotal {

        grid-column: 3;

        grid-row: 2;
    }


    .boton-eliminar {

        grid-column: 3;

        grid-row: 1;
    }


    .resumen-carrito-box {

        margin-left: 0;
    }


    .modal-pedido {

        max-height: 95vh;

        border-radius: 14px;
    }


    
    .modal-body {

        padding-left: 20px;

        padding-right: 20px;
    }


    .modal-footer {

        padding:
            15px 20px;

        flex-direction: column;
    }


    .modal-footer button {

        width: 100%;
    }


    .form-grid {

        grid-template-columns: 1fr;
    }


    .campo-completo {

        grid-column: auto;
    }


    .checkout-seccion {

        padding: 16px;
    }

}


@media (max-width: 480px) {

    .productos-grid {

        grid-template-columns: 1fr;
    }


    .titulo-pagina {

        font-size: 28px;
    }


    .resumen-acciones {

        flex-direction: column;

        align-items: stretch;
    }


    .boton-realizar {

        width: 100%;

        text-align: center;
    }


    .hero h1 {

        font-size: 32px;
    }

}
/* ==========================================================
   CONFIRMACIÓN DE PEDIDO
   ========================================================== */

#confirmacion-pedido {
    position: fixed;
    inset: 0;
    z-index: 9999999;
}

.confirmacion-pedido-fondo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.confirmacion-pedido-caja {
    width: 100%;
    max-width: 430px;
    background: white;
    border-radius: 22px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: aparecerPedido .25s ease;
}

.confirmacion-pedido-icono {
    width: 75px;
    height: 75px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: #e8f8ee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
}

.confirmacion-pedido-caja h2 {
    margin: 0 0 10px;
    font-size: 27px;
    color: #222;
}

.confirmacion-pedido-caja p {
    margin: 0 0 22px;
    color: #666;
    line-height: 1.5;
}

.confirmacion-pedido-numero {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 14px;
    background: #f4f6f8;
}

.confirmacion-pedido-numero span {
    display: block;
    font-size: 13px;
    color: #777;
    margin-bottom: 5px;
}

.confirmacion-pedido-numero strong {
    display: block;
    font-size: 21px;
    color: #222;
    letter-spacing: .5px;
}

.confirmacion-pedido-total {
    margin-bottom: 22px;
    font-size: 17px;
    color: #444;
}

.confirmacion-pedido-total strong {
    color: #111;
}

.boton-whatsapp-pedido {
    display: block;
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #25D366;
    color: white !important;
    text-decoration: none !important;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(37, 211, 102, .30);
    transition: .2s;
}

.boton-whatsapp-pedido:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, .40);
}

.boton-cerrar-confirmacion {
    width: 100%;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    background: #eeeeee;
    color: #333;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.boton-cerrar-confirmacion:hover {
    background: #dddddd;
}

.confirmacion-pedido-caja small {
    display: block;
    margin-top: 18px;
    color: #888;
    font-size: 12px;
    line-height: 1.5;
}

@keyframes aparecerPedido {

    from {
        opacity: 0;
        transform: scale(.92) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

}
/* ==========================================
   LOGO TICO SHOP
========================================== */

.logo {
    height: 60px;
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.logo img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* En celulares */
@media (max-width: 700px) {

    .logo {
        height: 58px;
    }

    .logo img {
        width: 46px;
        height: 46px;
    }
}
/* AJUSTE DE IMÁGENES DE PRODUCTOS */

.producto-imagen {
    height: auto !important;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    overflow: hidden;
}

.producto-imagen img {
    width: 100%;
    height: auto !important;
    max-height: 360px;
    object-fit: contain !important;
    display: block;
}
/* ==========================================
   IMÁGENES DE DETALLE SIN RECORTE
========================================== */

.detalle-imagen {
    height: auto !important;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detalle-imagen img {
    width: 100%;
    height: auto !important;
    max-height: 650px;
    object-fit: contain !important;
    display: block;
}
/* Separación superior del detalle del producto */
.detalle-producto {
    margin-top: 40px;
}
