:root {
    --negro: #131921;
    --negro-claro: #232f3e;
    --naranja: #febd69;
    --naranja-fuerte: #ff9900;
    --blanco: #ffffff;
    --gris: #f5f5f5;
    --gris-oscuro: #ccc;
    --texto: #0f1111;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: var(--gris);
    color: var(--texto);
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header principal */
.header {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--negro);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Primera fila del header */
.header-top {
    background-color: var(--negro);
    padding: 10px 0;
}

.header-top .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--naranja);
    font-size: 24px;
    font-weight: bold;
    margin-right: 20px;
}

.logo i {
    margin-right: 5px;
}

.logo span {
    color: var(--blanco);
}

.search-container {
    flex: 1;
    max-width: 700px;
    margin: 0 20px;
    display: flex;
}

.search-categories {
    background-color: #f3f3f3;
    border: none;
    padding: 10px 15px;
    border-radius: 5px 0 0 5px;
    border-right: 1px solid #ddd;
    font-size: 14px;
    cursor: pointer;
    color: #555;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-button {
    background-color: var(--naranja);
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    color: var(--negro);
    font-size: 16px;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: var(--naranja-fuerte);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--blanco);
    font-size: 12px;
    transition: color 0.3s;
}

.action-link:hover {
    color: var(--naranja);
}

.action-link i {
    font-size: 20px;
    margin-bottom: 3px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--naranja);
    color: var(--negro);
    font-size: 12px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-container {
    position: relative;
}

/* Segunda fila del header - Categorías */
.header-bottom {
    background-color: var(--negro-claro);
    padding: 8px 0;
}

.categories-container {
    display: flex;
    align-items: center;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--blanco);
    font-size: 14px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-toggle i {
    margin-right: 5px;
    font-size: 18px;
}

.categories-nav {
    display: flex;
    list-style: none;
    margin-left: 20px;
    gap: 20px;
}

.category-link {
    color: var(--blanco);
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.category-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Modal para búsqueda en móvil */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.search-modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--blanco);
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    padding: 20px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 20px;
    color: var(--negro);
}

.modal-search-container {
    display: flex;
    margin-bottom: 15px;
}

.modal-search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--gris-oscuro);
    border-radius: 5px 0 0 5px;
    font-size: 16px;
}

.modal-search-button {
    background-color: var(--naranja);
    border: none;
    padding: 0 25px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    color: var(--negro);
    font-size: 16px;
}

.modal-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.modal-category {
    background-color: var(--gris);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.modal-category:hover {
    background-color: var(--naranja);
}



/* Icono de búsqueda para móvil */
.mobile-search-icon {
    display: none;
    background: none;
    border: none;
    color: var(--blanco);
    font-size: 20px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
    .categories-nav {
        gap: 10px;
        margin-left: 15px;
    }

    .category-link {
        padding: 5px 8px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {

    .search-container {
        display: none;
    }

    .mobile-search-icon {
        display: block;
    }

    .user-actions {
        gap: 15px;
    }

    .action-link span {
        display: none;
    }

    .action-link i {
        margin-bottom: 0;
        font-size: 22px;
    }

    .categories-nav {
        display: none;
    }

    .logo span {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 120px;
    }

    .logo {
        font-size: 20px;
    }

    .user-actions {
        gap: 10px;
    }

    .action-link i {
        font-size: 20px;
    }
}

/* Contenido de ejemplo */
.demo-content {
    padding: 30px;
    background-color: var(--blanco);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.demo-title {
    color: var(--negro);
    margin-bottom: 15px;
    font-size: 24px;
}

.demo-text {
    line-height: 1.6;
    margin-bottom: 20px;
    color: #555;
}

/* --- HERO --- */


.hero {
    width: 100%;
    height: 260px; /* más compacto */
    background: url("https://picsum.photos/id/1/1200/400") center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0; /* quita espacios innecesarios */
    margin-top: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.55), rgba(0,0,0,0.1));
    border-radius: 0;
}

.hero-content {
    position: relative;
    margin-left: 40px;
    max-width: 480px;
    color: #fff;
}

.hero-content h1 {
    font-size: 30px;
    margin: 0 0 8px 0;
}

.hero-content p {
    font-size: 16px;
    margin-bottom: 12px;
}

/* Beneficios estilo Amazon */
.hero-beneficios {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    font-size: 14px;
    margin-bottom: 15px;
}

.btn-hero {
    background: #F4A953;
    padding: 10px 22px;
    border-radius: 4px;
    color: #000;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
}
.btn-hero:hover {
    background: #e3943d;
}
/* --- TITULOS DE SECCIÓN --- */
.section-title {
    font-size: 24px;
    margin: 20px 0 20px;
    padding-left: 15px;
    font-weight: bold;
}

/* --- CATEGORÍAS --- */
.categorias-section {
    width: 100%;
}

.categorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    padding: 0 15px;
}

.categoria-card {
    text-align: center;
    background: #fff;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 0 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform .2s ease;
}

.categoria-card img {
    width: 100%;
    border-radius: 6px;
}

.categoria-card:hover {
    transform: translateY(-4px);
}

/* --- PRODUCTOS --- */
.productos-section {
    width: 100%;
    padding-bottom: 40px;
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 0 15px;
}

.producto-card {
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 0 6px rgba(0,0,0,0.1);
    text-align: center;
}

.producto-card img {
    width: 100%;
    border-radius: 6px;
}

.precios {
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.precio-oferta {
    font-size: 20px;
    font-weight: bold;
    color: #e67e22;
}

.precio-regular {
    font-size: 15px;
    color: #888;
    text-decoration: line-through;
}

.descuento {
    font-size: 14px;
    background: #e63946;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.btn-add {
    background: #F4A953;
    border: none;
    padding: 10px;
    width: 100%;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.btn-add:hover {
    background: #e3943d;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero {
        height: 200px;
    }
    .hero-content {
        margin-left: 15px;
        max-width: 100%;
    }
    .hero-content h1 {
        font-size: 22px;
    }
    .hero-beneficios {
        font-size: 12px;
    }
}

.ec-carousel-container {
    padding: 20px;
    max: 100%;
    margin: auto 10px auto 10px;
}

.ec-carousel-title {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
}

.ec-carousel-wrapper {
    position: relative;
}

.ec-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 10px;

    /* Ocultar scroll sin romper funcionalidad */
    scrollbar-width: none;      /* Firefox */
    -ms-overflow-style: none;   /* IE/Edge antiguo */
}

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

.ec-item-card {
    min-width: 220px;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.ec-item-card:hover {
    transform: translateY(-3px);
}

.ec-item-card img {
    width: 100%;
    border-radius: 8px;
}

.ec-item-name {
    font-size: 15px;
    margin: 5px;
    overflow: hidden;
}

.ec-price-box {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ec-price-now {
    font-size: 18px;
    font-weight: bold;
    color: #e63946;
}

.ec-price-old {
    font-size: 14px;
    text-decoration: line-through;
    color: #777;
}

.ec-badge-off {
    background: #ffb703;
    color: #000;
    padding: 3px 5px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 5px;
}

/* Flechas */
.ec-carousel-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background: white;
    border: 0;
    font-size: 30px;
    padding: 5px 12px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0px 2px 10px rgba(0,0,0,0.2);
    z-index: 10;
}

.ec-prev {
    left: -15px;
}
.ec-next {
    right: -15px;
}

/* Responsive */
@media (max-width: 900px) {
    .ec-item-card {
        min-width: 180px;
    }
}

@media (max-width: 600px) {
    .ec-item-card {
        min-width: 70%;
    }
}

/* FOOTER COMPLETO */
.footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 40px 20px 20px;
    margin-top: 40px;
}

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

/* LOGO + DESCRIPCIÓN */
.footer-logo {
    color: #fff;
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: bold;
}

.footer-brand p {
    line-height: 1.5;
    margin-bottom: 15px;
}

/* REDES SOCIALES */
.footer-redes a {
    display: inline-block;
    color: #fff;
    background: #333;
    width: 32px;
    height: 32px;
    margin-right: 8px;
    border-radius: 5px;
    text-align: center;
    line-height: 32px;
    font-size: 15px;
    transition: 0.2s;
}

.footer-redes a:hover {
    background: #e67e22;
}

/* COLUMNAS */
.footer-col h3 {
    color: #fff;
    margin-bottom: 12px;
    font-size: 18px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
    transition: 0.2s;
}

.footer-col ul li a:hover {
    color: #e67e22;
}

/* PARTE INFERIOR */
.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #333;
    color: #999;
    font-size: 14px;
}
/* BOTÓN VER MÁS */
.btn-ver-mas {
    margin: 20px auto;
    background: #333;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    color: #FFF;
}
.btn-ver-mas:hover {
    background: #e3943d;
}

.text-center{
    text-align: center;
}


/* MENÚ LATERAL */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    display: none;
}

.menu-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 380px;
    height: 100vh;
    background: white;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 30px rgba(0,0,0,0.3);
    overflow: hidden;
}

.menu-sidebar.active {
    transform: translateX(0);
}

/* HEADER DEL MENÚ */
.menu-header {
    background: linear-gradient(135deg, #232f3e 0%, #37475a 100%);
    padding: 25px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.menu-title {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
}

.close-menu-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-menu-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* CONTENIDO DEL MENÚ */
.menu-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* NIVELES DEL MENÚ */
.menu-level {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.menu-level.active {
    display: flex;
}

.menu-level:not(.active) {
    display: none;
}

/* CONTENIDO DEL NIVEL */
.level-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.section-title-nav {
    padding: 20px 25px 15px;
    font-size: 18px;
    font-weight: 700;
    color: #111;
    border-bottom: 1px solid #e7e7e7;
    background: #fafafa;
    flex-shrink: 0;
}

/* LISTA DE ITEMS */
.menu-list {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 350px);
    padding-bottom: 20px;
}

.menu-list::-webkit-scrollbar {
    width: 6px;
}

.menu-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.menu-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

/* ITEMS DEL MENÚ */
.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f1f1f1;
    min-height: 56px;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background-color: #f8f8f8;
}

.item-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.item-icon {
    color: #666;
    font-size: 16px;
    min-width: 24px;
    text-align: center;
}

.item-text a{
    color: #111;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.item-badge {
    background: #cc0c39;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
}

.item-arrow {
    color: #888;
    font-size: 12px;
    margin-left: 10px;
}

.menu-item:hover .item-arrow {
    color: #111;
}

/* BOTÓN ATRÁS */
/* HEADER CON BOTÓN ATRÁS Y TÍTULO EN LÍNEA */
.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e7e7e7;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.2s;
}

.section-header:hover {
    background: #e9ecef;
}

.back-button-inline {
    background: transparent;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.back-button-inline:hover {
    background: rgba(0,0,0,0.05);
    color: #111;
}

.section-title-inline {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 0;
    flex: 1;
}

.back-button:hover {
    background: #e9ecef;
}

.back-button i {
    color: #666;
}

.back-button span {
    color: #111;
    font-size: 14px;
    font-weight: 500;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .menu-sidebar {
        width: 100%;
        max-width: 320px;
    }

    .main-container {
        max-width: 320px;
    }

    .header h1 {
        font-size: 24px;
    }

    .open-menu-btn {
        font-size: 16px;
        padding: 12px 25px;
    }
}

@media (max-width: 480px) {
    .menu-sidebar {
        max-width: 100%;
    }

    .menu-header {
        padding: 20px;
    }

    .menu-item {
        padding: 12px 20px;
    }
}

/* ANIMACIONES */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}





