/* Custom CSS para Arfagi Cosmetics */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background: linear-gradient(135deg, #ffc0cb 0%, #ffb6c1 25%, #dda0dd 50%, #b0c4de 75%, #87ceeb 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding-top: 76px; /* Altura del navbar fijo */
}

/* Navbar */
.navbar {
    z-index: 1030;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar-brand {
    font-size: 1.4rem;
    color: var(--primary-color) !important;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar-brand:hover {
    opacity: 0.8;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 0.75rem !important;
    transition: all 0.3s ease;
    color: #333;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.navbar .dropdown-item {
    padding: 0.6rem 1.2rem;
    transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
    background-color: #f8f9fa;
    padding-left: 1.5rem;
}

@media (max-width: 991px) {
    .navbar-nav .nav-link::after {
        display: none;
    }
    
    .navbar-collapse {
        background: white;
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
}

/* Cards */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.product-card {
    position: relative;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 3px 10px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 6px 20px rgba(0, 0, 0, 0.35);
    transform: translateY(-8px);
}

.product-card img {
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.category-card {
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.2);
}

.category-card:hover {
    background-color: var(--primary-color);
    color: white !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-6px);
}

.category-card:hover .category-icon i,
.category-card:hover h6,
.category-card:hover small {
    color: white !important;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Hero Section */
/* Hero Carousel */
.hero-carousel-section {
    margin-top: -76px; /* Compensar el padding-top del body */
    position: relative;
}

.hero-carousel-section .carousel {
    width: 100%;
}

.hero-carousel-section .carousel-item {
    height: 650px;
    background-color: #f8f9fa; /* Fondo gris claro para las áreas vacías */
}

.hero-carousel-section .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Mostrar la imagen completa sin recortar */
    object-position: center;
}

.hero-carousel-section .carousel-caption {
    bottom: 50px;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(5px);
    padding: 30px !important;
    border-radius: 15px !important;
    max-width: 800px;
    margin: 0 auto;
}

.hero-carousel-section .carousel-caption h2 {
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-carousel-section .carousel-control-prev,
.hero-carousel-section .carousel-control-next {
    width: 5%;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.hero-carousel-section .carousel-control-prev:hover,
.hero-carousel-section .carousel-control-next:hover {
    opacity: 1;
}

.hero-carousel-section .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

/* Animación fade para el carrusel */
.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

/* Hero Section (legacy - por si se usa en otro lugar) */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
}

/* Product Detail */
.product-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.product-image-container img {
    transition: transform 0.5s ease;
}

.product-image-container:hover img {
    transform: scale(1.1);
}

/* Cart */
.cart-item {
    transition: background-color 0.3s ease;
}

.cart-item:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Badge */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
}

/* Footer */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

.social-links a {
    transition: transform 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    transform: translateY(-3px);
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-radius: 8px;
    margin: 0 2px;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: var(--primary-color);
}

/* Alert */
.alert {
    border-radius: 10px;
    border: none;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    /* Hero Carousel Mobile */
    .hero-carousel-section .carousel-item {
        height: 450px;
    }
    
    .hero-carousel-section .carousel-caption {
        bottom: 20px;
        padding: 15px !important;
    }
    
    .hero-carousel-section .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .hero-carousel-section .carousel-caption p {
        font-size: 0.9rem;
    }
    
    .hero-carousel-section .carousel-caption .btn {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }
}

/* Z-index fix */
.z-index-1 {
    z-index: 1;
}

/* Input group addon color fix */
.input-group-text {
    background-color: #e9ecef;
    border-color: #ced4da;
}

/* Sticky elements */
.sticky-top {
    position: sticky;
    top: 80px;
    z-index: 1020;
}

/* Card hover effects */
.card {
    border-radius: 12px;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
}

/* Product detail tabs */
.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

/* Feature icons */
.feature-icon i {
    transition: transform 0.3s ease;
}

.feature-icon:hover i {
    transform: scale(1.1);
}

/* Table responsive */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

/* Admin panel */
.admin-sidebar {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: calc(100vh - 56px);
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

/* Stats cards */
.stats-card {
    border-left: 4px solid;
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateX(5px);
}

/* Image upload preview */
.image-preview {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 10px;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

footer h5, 
footer h6 {
    color: #ffffff !important;
    font-weight: 600;
    letter-spacing: 0.5px;
}

footer p,
footer small,
footer li,
footer a {
    color: #e0e6ed !important;
}

footer a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

footer .text-muted {
    color: #b8c5d6 !important;
}

footer .social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

footer ul li {
    margin-bottom: 8px;
}

footer ul li a {
    transition: all 0.3s ease;
    display: inline-block;
}

footer ul li a:hover {
    padding-left: 5px;
}

footer .list-unstyled li::before {
    content: "›";
    margin-right: 8px;
    font-weight: bold;
    color: var(--primary-color);
}

footer i.text-primary {
    color: #667eea !important;
}

footer .input-group input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

footer .input-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

footer .input-group input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

footer .border-top {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Contact info in footer */
footer .contact-info {
    color: #ffffff !important;
}

footer .contact-info li {
    padding: 5px 0;
}

footer .contact-info a {
    color: #e0e6ed !important;
    font-weight: 500;
}

footer .contact-info a:hover {
    color: #ffffff !important;
}

/* Product Detail Page */
.thumbnail {
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    object-fit: cover;
}

.thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumbnail.active {
    opacity: 1;
    border: 2px solid #E91E63;
}

#mainProductImage {
    transition: opacity 0.3s ease;
}

.product-detail-brand {
    text-transform: uppercase;
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.product-detail-title {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.product-detail-price {
    color: #E91E63;
    font-size: 2rem;
    font-weight: 700;
}

.btn-presentation {
    border: 2px solid #dee2e6;
    background: white;
    color: #333;
    transition: all 0.3s ease;
}

.btn-presentation:hover {
    border-color: #E91E63;
    background: #fff5f8;
}

.btn-presentation.active,
input[name="presentation"]:checked + .btn-presentation {
    border-color: #E91E63;
    background: #E91E63;
    color: white;
}

.quantity-selector {
    width: 150px;
}

.quantity-selector .btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-selector input {
    text-align: center;
    font-weight: 600;
}

.add-to-cart-btn {
    background: #E91E63;
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    background: #d81b60;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.4);
}

.social-share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.social-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-share-btn.whatsapp {
    background: #25D366;
}

.social-share-btn.facebook {
    background: #E91E63;
}

.social-share-btn.twitter {
    background: #E91E63;
}

.social-share-btn.email {
    background: #E91E63;
}

.nav-tabs .nav-link {
    color: #666;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    padding: 15px 25px;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: #E91E63;
    color: #E91E63;
}

.nav-tabs .nav-link.active {
    border-bottom-color: #E91E63;
    color: #E91E63;
    background: transparent;
}

.product-specs-table {
    margin-top: 20px;
}

.product-specs-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

/* Heart icon for favorites */
.heart-icon {
    color: #E91E63;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.heart-icon:hover {
    transform: scale(1.2);
}

.heart-icon.active {
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.25); }
}

/* Botón de favorito mejorado */
.favorite-btn {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.favorite-btn:hover {
    transform: scale(1.15);
}

.favorite-btn i {
    transition: color 0.3s ease;
}

.favorite-btn:not(.active) i {
    color: #6c757d !important;
}

.favorite-btn.active i {
    color: #dc3545 !important;
}

.favorite-btn:hover:not(.active) i {
    color: #495057 !important;
}

.favorite-btn:active {
    transform: scale(0.95);
}

.favorite-btn.active:hover {
    animation: heartPulse 0.6s ease infinite;
}

@keyframes heartPulse {
    0%, 100% { transform: scale(1.15); }
    50% { transform: scale(1.25); }
}

/* Animación para contador de favoritos */
.pulse-animation {
    animation: badgePulse 0.6s ease;
}

@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Badge de contador */
#favorite-count, #cart-count {
    transition: all 0.3s ease;
}