/* ========================================
   LAYOUT DE LA HOMEPAGE CON SIDEBAR
   ======================================== */

/* Contenedor Principal */
.main-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 0px;
}

/* Layout Grid */
.homepage-layout {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 30px;
    align-items: stretch;
    margin: 0;
    padding: 0;
}

/* Contenido Principal */
.main-content {
    background: white;
    padding: 0px;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* ========================================
   SIDEBAR MENU - ESTILOS COMPLETOS
   ======================================== */

/* Sidebar Navigation Container */
.sidebar-navigation {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0;
    width: 100%;
    max-width: 280px;
}

.sidebar-content {
    padding: 20px 10px;
}

/* Category Menu */
.category-menu {
    width: 100%;
}

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-item {
    margin: 0;
    border-bottom: 1px solid #f8f9fa;
}

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

/* Menu Link */
.menu-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: #212529;
    transition: all 0.3s ease;
    position: relative;
}

.menu-link:hover {
    background: #f8f9fa;
    color: #7b3ff2;
    transform: translateX(5px);
}

/* Menu Icon */
.menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 18px;
    color: white;
    transition: all 0.3s ease;
}

.menu-link:hover .menu-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Menu Text */
.menu-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #212529;
    transition: color 0.3s ease;
}

.menu-link:hover .menu-text {
    color: #7b3ff2;
}

/* Menu Arrow */
.menu-arrow {
    color: #6c757d;
    font-size: 12px;
    transition: all 0.3s ease;
}

.menu-link:hover .menu-arrow {
    color: #7b3ff2;
    transform: translateX(3px);
}

/* Active State */
.menu-item.active .menu-link {
    background: #e3f2fd;
    color: #7b3ff2;
    border-left: 4px solid #7b3ff2;
}

.menu-item.active .menu-text {
    color: #7b3ff2;
    font-weight: 600;
}

.menu-item.active .menu-arrow {
    color: #7b3ff2;
}

/* Clicked Effect */
.menu-item.clicked .menu-link {
    transform: translateX(8px);
    background: #f0f8ff;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
}

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

@media (max-width: 1200px) {
    .homepage-layout {
        grid-template-columns: 220px 1fr 220px;
        gap: 20px;
        align-items: stretch;
    }
    
    .sidebar-navigation {
        max-width: 220px;
    }
    
    .banner-inicio {
        max-width: 220px;
    }
    
    .menu-link {
        padding: 12px 15px;
    }
    
    .menu-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
        margin-right: 12px;
    }
    
    .menu-text {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 0 15px;
    }
    
    .homepage-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        align-items: start;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .sidebar-navigation {
        display: none;
    }
    
    .banner-inicio {
        max-width: 100%;
        margin-top: 20px;
    }
    
    
    .main-content {
        padding: 0px;
        min-height: 300px;
        display: flex;
        flex-direction: column;
    }
    
    .homepage-slider-wrapper {
        min-height: 300px;
        flex: 1;
    }
    
    .homepage-slider {
        min-height: 300px;
    }
    
    .slider-container {
        min-height: 300px;
    }
    
    .menu-link {
        padding: 10px 15px;
    }
    
    .menu-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
        margin-right: 10px;
    }
    
    .menu-text {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 0 10px;
    }
    
    .homepage-layout {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sidebar-navigation {
        display: none;
    }
    
    .banner-inicio {
        max-width: 100%;
        margin-top: 15px;
    }
    
    .main-content {
        padding: 0px;
        min-height: 250px;
        display: flex;
        flex-direction: column;
    }
    
    .homepage-slider-wrapper {
        min-height: 250px;
        flex: 1;
    }
    
    .homepage-slider {
        min-height: 250px;
    }
    
    .slider-container {
        min-height: 175px;
    }
}

/* ========================================
   ANIMACIONES ADICIONALES
   ======================================== */

/* Animación de entrada para el menú */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.menu-item {
    animation: slideInLeft 0.3s ease-out;
    animation-fill-mode: both;
}

.menu-item:nth-child(1) { animation-delay: 0.05s; }
.menu-item:nth-child(2) { animation-delay: 0.1s; }
.menu-item:nth-child(3) { animation-delay: 0.15s; }
.menu-item:nth-child(4) { animation-delay: 0.2s; }
.menu-item:nth-child(5) { animation-delay: 0.25s; }
.menu-item:nth-child(6) { animation-delay: 0.3s; }
.menu-item:nth-child(7) { animation-delay: 0.35s; }

/* Ripple effect al hacer click */
.menu-link {
    position: relative;
    overflow: hidden;
}

.menu-link::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(123, 63, 242, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.menu-link:active::after {
    width: 300px;
    height: 300px;
}

/* Scrollbar personalizado para el menú en móvil */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #7b3ff2;
    border-radius: 10px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #5a2c7a;
}
/* ========================================
   BANNER DERECHO
   ======================================== */

.banner-inicio {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    max-width: 350px;
}

.banner-wrapper h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #212529;
}

.banner-wrapper > p {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 20px 0;
}

/* Banners Promocionales */
.promo-banner {
    display: block;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.promo-banner:last-child {
    margin-bottom: 0;
}

.promo-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.promo-banner img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

/* Fallback para imágenes que no cargan */
.promo-banner img[src*="placeholder"] {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
    text-align: center;
}

.promo-banner:hover img {
    transform: scale(1.05);
}

/* Overlay del banner */
.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.banner-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.banner-discount {
    background: #7b3ff2;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* ========================================
   RESPONSIVE PARA BANNER
   ======================================== */

@media (max-width: 1200px) {
    .banner-inicio {
        max-width: 300px;
        padding: 15px;
    }
    
    .promo-banner img {
        height: 150px;
    }
}

@media (max-width: 768px) {
    .banner-inicio {
        max-width: 100%;
        margin-top: 20px;
    }
    
    .banner-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .banner-wrapper h3,
    .banner-wrapper > p {
        grid-column: 1 / -1;
    }
    
    .promo-banner {
        margin-bottom: 0;
    }
    
    .promo-banner img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .banner-wrapper {
        grid-template-columns: 1fr;
    }
    
    .promo-banner img {
        height: 200px;
    }
}

/* ========================================
   SLIDER DE HOMEPAGE - ESTILOS COMPLETOS
   ======================================== */

.homepage-slider-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.homepage-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 0;
    box-shadow: none;
    flex: 1;
    margin: 0;
    padding: 0;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Slides */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

.slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #f8f9fa;
}

/* Overlay del slider */
.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.6), rgba(0,0,0,0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slide:hover .slider-overlay {
    opacity: 1;
}

.slider-content {
    text-align: center;
    color: white;
    padding: 20px;
    max-width: 80%;
}

.slider-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.slider-description {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.slider-btn {
    background: #7b3ff2;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.slider-btn:hover {
    background: #5a2c7a;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(123, 63, 242, 0.4);
}

/* Controles de navegación */
.slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-control:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.slider-control.prev {
    left: 15px;
}

.slider-control.next {
    right: 15px;
}

@media (min-width: 768px) {
    .slider-control {
        width: 30px;
        height: 30px;
        font-size: 15px;
    }
    
    .slider-control.prev {
        left: 20px;
    }
    
    .slider-control.next {
        right: 20px;
    }
}

/* Indicadores */
.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* Responsive para overlay y slider */
@media (max-width: 768px) {
    .slider-title {
        font-size: 1.5rem;
    }
    
    .slider-description {
        font-size: 1rem;
    }
    
    .slider-btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    /* Asegurar que el slider sea visible en móviles */
    .slide {
        min-height: 175px;
    }
    
    .slide img {
        max-height: 150px !important;
        object-fit: cover;
    }
}

@media (max-width: 480px) {
    .slider-title {
        font-size: 1.2rem;
    }
    
    .slider-description {
        font-size: 0.9rem;
    }
    
    .slider-btn {
        padding: 8px 20px;
        font-size: 0.8rem;
    }
    
    /* Asegurar que el slider sea visible en móviles pequeños */
    .slide {
        min-height: 175px;
    }
    
    .slide img {
        max-height: 175px !important;
        object-fit: cover;
    }
}