/* Variables de color */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
}

/* Estilos del contenedor del fondo */
.bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

/* Estilos del fondo animado */
html {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.bg-animation {
    animation: slide 3s ease-in-out infinite alternate;
    background-image: linear-gradient(-60deg, #05fa57 50%, #0197fc 50%);
    bottom: 0;
    left: -50%;
    opacity: 0.9;
    position: fixed;
    right: -50%;
    top: 0;
    z-index: 0;
}

.bg-animation2 {
    animation-direction: alternate-reverse;
    animation-duration: 4s;
}

.bg-animation3 {
    animation-duration: 5s;
}

@keyframes slide {
    0% {
        transform: translateX(-25%);
    }
    100% {
        transform: translateX(25%);
    }
}

@keyframes slide {
    0% {
        transform: translateX(-25%);
    }
    100% {
        transform: translateX(25%);
    }
}

/* Estilos generales */
.main-content {
    background-color: rgba(255, 255, 255, 0.85);
    min-height: 100vh;
    position: relative;
    z-index: 1;
    padding-bottom: 2rem;
    backdrop-filter: blur(5px);
}

/* Títulos de sección */
section h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--dark-color);
    text-transform: uppercase;
    margin-bottom: 2.5rem !important;
    position: relative;
    padding-bottom: 1rem;
}

section h2:after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

section h2.text-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Ajustes para elementos sobre el fondo animado */
.card {
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.featured-products {
    background: transparent !important;
}

section {
    position: relative;
    z-index: 2;
}

.carousel-container {
    background: transparent;
    position: relative;
    z-index: 2;
}

.top-bar {
    background: rgba(52, 152, 219, 0.9) !important;
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 3;
}

/* Estilos del carrusel principal */
.carousel-container {
    width: 100%;
    overflow: hidden;
}

#mainCarousel {
    width: 100%;
    height: 600px; /* Carrusel principal más alto */
    margin: 0 auto;
}

#mainCarousel .carousel-inner {
    height: 100%;
}

#mainCarousel .carousel-item {
    height: 100%;
}

#mainCarousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#mainCarousel .carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    margin: 0 auto;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Header y Navegación */
.header-top {
    position: relative;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-top .navbar-brand {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.header-top .navbar-brand:hover {
    color: var(--primary-color) !important;
}

.header-top .input-group-lg .form-control {
    border-radius: 25px 0 0 25px;
    border: 2px solid var(--primary-color);
    padding: 12px 20px;
}

.header-top .input-group-lg .btn {
    border-radius: 0 25px 25px 0;
    border: 2px solid var(--primary-color);
    padding: 12px 20px;
}

.navbar-custom {
    background-color: var(--dark-color);
    padding: 1.5rem 0;
    width: 100%;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
}

.navbar-dark .navbar-nav .nav-link {
    color: white;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    overflow: hidden;
    min-width: 200px;
}

.dropdown-item {
    padding: 12px 20px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background-color: var(--primary-color);
    color: white;
}

.dropdown-item.text-danger:hover {
    background-color: var(--danger-color);
    color: white;
}

.dropdown-divider {
    margin: 8px 0;
    border-top: 1px solid #e9ecef;
}

.badge {
    font-size: 0.7rem;
    padding: 4px 6px;
}

/* Dropdown de usuario específico */
#userDropdown {
    border-radius: 25px;
    padding: 8px 16px;
    font-weight: 500;
}

.header-top .dropdown-toggle::after {
    margin-left: 8px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* Tarjetas de productos */
.product-card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    height: 400px;
    object-fit: cover;
}

.product-price {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* Badges y etiquetas */
.badge-sale {
    background-color: var(--danger-color);
    color: white;
    padding: 0.5em 1em;
}

.badge-new {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.5em 1em;
}

/* Carousel personalizado */
.owl-carousel {
    width: 100%;
    padding: 0 40px;
}

.owl-carousel .item {
    margin: 0 10px;
    height: 400px; /* Altura fija para los items del carrusel */
}

.owl-carousel .product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.owl-carousel .product-card img {
    height: 500px;
    object-fit: cover;
    object-position: center;
}

.owl-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--dark-color) !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.owl-nav button:hover {
    opacity: 1;
}

/* Contenedores principales */
.container-fluid {
    width: 100%;
    padding: 0;
    margin: 0;
}

section {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 4rem 0;
}

.owl-prev {
    left: -30px;
}

.owl-next {
    right: -30px;
}

/* Newsletter section */
.newsletter-section {
    background-color: var(--light-color);
    padding: 4rem 0;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 4rem 0 2rem;
    width: 100%;
    margin: 0;
    position: relative;
}

.footer a {
    color: white;
    text-decoration: none;
}

.footer a:hover {
    color: var(--primary-color);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    right: -100%;
    bottom: 0;
    background-color: var(--dark-color);
    z-index: -1;
}

/* Botones personalizados */
.btn-custom-primary {
    background-color: var(--primary-color);
    border: none;
    color: white;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-custom-primary:hover {
    background-color: darken(var(--primary-color), 10%);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .product-card img {
        height: 300px;
    }

    section h2 {
        font-size: 2rem;
        margin-bottom: 2rem !important;
    }

    section h2:after {
        width: 80px;
        height: 3px;
    }

    /* Header responsivo */
    .header-top .col-md-3,
    .header-top .col-md-6 {
        margin-bottom: 1rem;
    }

    .header-top .navbar-brand {
        justify-content: center;
        margin-bottom: 1rem;
    }

    .header-top .navbar-brand span {
        font-size: 1.5rem;
    }

    .header-top .input-group-lg .form-control,
    .header-top .input-group-lg .btn {
        border-radius: 5px;
        padding: 10px 15px;
    }

    .header-top .text-end {
        text-align: center !important;
    }

    .header-top .btn {
        margin: 5px;
        width: auto;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    section h2 {
        font-size: 2.2rem;
    }

    .header-top .navbar-brand span {
        font-size: 1.6rem;
    }
}
