/* =============================== 
   RESET + BASE
================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: radial-gradient(circle at top, #ffffff, #f4f6f8);
    color: #333;
    line-height: 1.6;
}

/* ===============================
   HEADER / HERO (LOGO COMO FONDO)
================================ */

.hero {
    width: 100%;
    min-height: 180px;

    background-image: url("/public/img/logo-datajhin.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

    border-bottom: 3px solid #F57C00;
}


/* Header superior */
.hero-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;

    display: flex;
    justify-content: flex-end;
    align-items: center;
}

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

.header-icons {
    display: flex;
    gap: 18px;
}

/* Contenedor del icono */
.icono {
    width: 44px;
    height: 44px;
    border: 2px solid #ff8c1a; /* naranja marca */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
}

/* Imagen del icono */
.icono img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    transition: all 0.25s ease;
    filter: brightness(1.2);
}

/* Hover */
.icono:hover {
    background: #ff8c1a;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 0 14px rgba(255, 140, 26, 0.6);
}

/* Icono en hover */
.icono:hover img {
    filter: brightness(0) invert(1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: 160px;
    }

    .hero-top {
        flex-direction: column;
        justify-content: center;
        gap: 18px;
        padding-top: 90px; /* 👈 ESTO baja los iconos */
    }

    .header-icons {
        margin-top: 10px; /* 👈 aire extra opcional */
    }
}



/* ===============================
   SECCIÓN CATEGORÍAS
================================ */
.categorias {
    padding: 70px 24px;
    text-align: center;
}

.categorias h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #F57C00;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background-color: #fff;
    border: 1px solid #F57C00;
    border-radius: 14px;
    padding: 26px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}

.card h3 {
    margin-bottom: 12px;
}

/* ===============================
   PRODUCTOS DESTACADOS
================================ */
.destacados {
    padding: 70px 24px;
    text-align: center;
}

.destacados h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #F57C00;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.producto {
    background-color: #fff;
    border-radius: 14px;
    padding: 26px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.producto:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.16);
}

.producto img {
    max-width: 100%;
    height: auto;
    margin-bottom: 16px;
}

.producto h3 {
    margin-bottom: 8px;
}

.producto p {
    font-weight: bold;
    margin-bottom: 16px;
}

/* Botón */
.producto button {
    padding: 10px 20px;
    background-color: #F57C00;
    color: #fff;
    border: none;
    border-radius: 999px; /* MÁS MODERNO */
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.producto button:hover {
    background-color: #e65100;
}

/* ===============================
   CONTACTO
================================ */
.contacto {
    padding: 70px 24px;
    text-align: center;
}

.contacto h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #F57C00;
}

.contacto p {
    margin-bottom: 30px;
}

.contacto form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    background-color: #fff;
    padding: 34px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.contacto label {
    display: block;
    margin-top: 14px;
    font-weight: bold;
}

.contacto input,
.contacto textarea {
    width: 100%;
    padding: 11px;
    margin-top: 6px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.contacto button {
    margin-top: 22px;
    padding: 12px 24px;
    background-color: #F57C00;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contacto button:hover {
    background-color: #e65100;
}

/* ===============================
   FOOTER
================================ */
.nav-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}

.nav-footer a {
    color: #F57C00;
    text-decoration: none;
    font-weight: bold;
    margin: 0 10px;
}

.nav-footer a:hover {
    color: #e65100;
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
    .hero-top {
        flex-direction: column;
        gap: 14px;
    }

    .hero-content h1 {
        font-size: 1.7rem;
    }

    .logo img {
        height: 38px;
    }
}
/* =========================
   MENÚ USUARIO (ENGRANAJE)
========================= */

.user-gear button {
    cursor: pointer;
    padding: 0;
    background: transparent;
    border: none;
}

/* MUY IMPORTANTE */
.user-gear .icono {
    appearance: none;
    width: 44px;
    height: 44px;
    border: 2px solid #ff8c1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
    cursor: pointer;
}
/* CONTENEDOR DEL MENÚ */
.user-menu {
    position: absolute;
    top: 48px;
    right: 0;
    width: 220px;

    background: #1f1f1f;
    border: 1px solid #ff9800;
    border-radius: 8px;

    box-shadow: 0 10px 30px rgba(0,0,0,.4);
    z-index: 1000;
}

/* OCULTO */
.user-menu.hidden {
    display: none;
}

/* LISTA */
.user-menu ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

/* ITEMS */
.user-menu li a {
    display: block;
    padding: 10px 16px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: background .2s;
}

.user-menu li a:hover {
    background: rgba(255, 152, 0, 0.15);
}

/* DIVISOR */
.user-menu .divider {
    height: 1px;
    background: rgba(255,255,255,.15);
    margin: 6px 0;
}

/* LOGOUT */
.user-menu .logout {
    color: #ff5252;
}
#gearBtn:hover img {
    transform: rotate(90deg);
}
/* =========================
   CARRITO = MISMO EFECTO QUE ENGRANAJE
========================= */

.cart-icon {
    all: unset;
    width: 44px;
    height: 44px;
    border: 2px solid #ff8c1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.cart-icon img {
    width: 22px;
    height: 22px;
    transition: filter 0.25s ease;
    filter: brightness(1.2);
}

/* Hover EXACTO al engranaje */
.cart-icon:hover img {
    filter: brightness(0) invert(1);
}
/* ==================================================
   CARRUSEL DE CATEGORÍAS (TIENDA)
================================================== */

.categoria-carousel {
    padding: 40px 30px;
    background: #f5f5f5;
}

/* Contenedor general */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Pista del carrusel */
.carousel-track {
    display: flex;
    gap: 28px;                  /* 👈 MÁS ESPACIO */
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 0;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

/* Card categoría */
.carousel-item {
    min-width: 220px;           /* 👈 MÁS GRANDE */
    max-width: 220px;
    background: #ffffff;
    border-radius: 16px;        /* 👈 MÁS SUAVE */
    padding: 18px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.carousel-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

/* Imagen categoría */
.carousel-item img {
    width: 100%;
    height: 150px;              /* 👈 MÁS PROTAGONISMO */
    object-fit: contain;
    margin-bottom: 14px;
}

/* Nombre categoría */
.carousel-item span {
    display: block;
    font-size: 16px;            /* 👈 MÁS LEGIBLE */
    font-weight: 600;
}

/* Botones de navegación */
.carousel-btn {
    background: #ffffff;
    border: none;
    font-size: 30px;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 5;
}

.carousel-btn:hover {
    background: #eeeeee;
}

/* Responsive: mobile */
@media (max-width: 768px) {
    .carousel-btn {
        display: none;
    }

    .carousel-item {
        min-width: 180px;
        max-width: 180px;
    }

    .carousel-item img {
        height: 120px;
    }
}
/* ===============================
   CTA "VER TODOS"
=============================== */

.ver-todos {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 16px;
    border-radius: 999px;

    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;

    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.35);
    transition: all 0.25s ease;
}

.ver-todos span {
    transition: transform 0.25s ease;
}
/* ===============================
   HEADER CATEGORÍA (TÍTULO + CTA)
=============================== */

.categoria-header {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 👈 clave */
    gap: 5px;                   /* 👈 espacio controlado */
    margin-bottom: 6px;
    padding-left: 40px; 
}
/* ===============================
   FAVORITOS (CORAZÓN) – AISLADO
================================ */

.carousel-item {
    position: relative; /* base para el corazón */
}

/* Botón corazón */
.btn-favorito {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 34px;
    height: 34px;

    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);

    font-size: 18px;
    color: #ff5252;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 10;
}

/* Activo */
.btn-favorito.activo {
    color: #fff;
    background: #ff5252;
}
/* =====================================
   NOMBRE Y PRECIO PRODUCTO (TIENDA / HOME)
===================================== */

.producto-nombre {
    display: block;
    font-size: 15px;
    font-weight: 500;
    margin: 6px 0;
    color: #333;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.producto-precio {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #F57C00;
    text-align: center;
    margin-top: 4px;
}
/* ===============================
   MINI MENÚ + BUSCADOR
================================ */
.mini-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 2px solid #F57C00;
    padding: 12px 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.mini-menu .menu-links {
    list-style: none;
    display: flex;
    gap: 22px;
    margin: 0;
    padding: 0;
}

.mini-menu .menu-links li a {
    color: #F57C00;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.25s ease;
}

.mini-menu .menu-links li a:hover {
    color: #e65100;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-form input {
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 999px 0 0 999px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.25s ease;
}

.search-form input:focus {
    border-color: #F57C00;
}

.search-form button {
    padding: 8px 14px;
    border: none;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
    border-radius: 0 999px 999px 0;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.25s ease;
}

.search-form button:hover {
    background: #e65100;
}

/* Responsive */
@media (max-width: 768px) {
    .mini-menu {
        flex-direction: column;
        gap: 12px;
    }

    .mini-menu .menu-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
    }

    .search-form {
        width: 100%;
        justify-content: center;
    }

    .search-form input {
        flex: 1;
    }
}