
/* Public Theme CSS - Modern Professional Design System */

/* ===== ROOT VARIABLES ===== */
:root {
    /* Primary Color Palette - Elegant Navy & Teal */
    --primary-dark: #0f172a;
    --primary-navy: #1e293b;
    --primary-blue: #0ea5e9;
    --primary-teal: #14b8a6;
    --primary-cyan: #06b6d4;

    /* Secondary Colors - Sophisticated Accents */
    --accent-coral: #f97316;
    --accent-amber: #f59e0b;
    --accent-emerald: #10b981;
    --accent-purple: #8b5cf6;

    /* Neutral Palette */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #14b8a6 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --gradient-sunset: linear-gradient(135deg, #f97316 0%, #f59e0b 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.3);

    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== PAGE HEADER STYLES ===== */
.page-header {
    padding: 1.5rem 0;
    background-color: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.page-header h1 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
}

.page-header .text-muted {
    color: var(--gray-600) !important;
    font-size: 0.9rem;
}

/* ===== HERO SECTION STYLES ===== */
.hero-section {
    position: relative;
    overflow: hidden;
    background: var(--gradient-primary);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.2) 0%, rgba(14, 165, 233, 0.1) 100%);
    z-index: 1;
}

.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -100px;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 20%;
}

/* ===== WHY CHOOSE US SECTION ===== */
.why-choose-section {
    padding: 80px 0;
    background: var(--gray-50);
    position: relative;
}

.why-choose-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-teal), transparent);
}

.benefit-card {
    transition: var(--transition-base);
    border-radius: 20px;
    border: 1px solid var(--gray-200);
    background: white;
    overflow: hidden;
    position: relative;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-base);
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl) !important;
    border-color: var(--primary-blue);
}

.benefit-card:hover::before {
    transform: scaleX(1);
}

.benefit-card .card-body {
    padding: 2.5rem;
}

.benefit-card .display-4 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== STATS SECTION ===== */
.stats-section {
    padding: 80px 0;
    background: var(--gradient-dark);
    color: white;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(20, 184, 166, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.stats-section .container {
    position: relative;
    z-index: 1;
}

.stats-section .display-4 {
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stats-section .lead {
    color: var(--gray-300);
    font-size: 1.1rem;
    font-weight: 500;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    padding: 80px 0;
    background: white;
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

.contact-info h5 {
    color: var(--gray-800);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.contact-info .text-muted {
    color: var(--gray-600) !important;
    line-height: 1.8;
}

.contact-info .d-flex {
    padding: 1rem;
    border-radius: 12px;
    transition: var(--transition-base);
}

.contact-info .d-flex:hover {
    background: var(--gray-50);
    transform: translateX(5px);
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 100px 0;
    background: var(--gradient-dark);
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite 2s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.cta-section .btn-light {
    background: white;
    border: none;
    color: var(--primary-navy);
    font-weight: 700;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 12px;
    transition: var(--transition-base);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.cta-section .btn-light:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* ===== NAVBAR STYLES ===== */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    color: #495057;
}

.navbar-brand img {
    max-height: 40px;
    margin-right: 10px;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-item .nav-link {
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item .nav-link:hover,
.nav-item .nav-link.active {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.nav-item .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: #007bff;
    border-radius: 1px;
}

.cart-icon-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #495057;
    font-size: 1.2rem;
    position: relative;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.cart-icon-link:hover {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.cart-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.cart-count-badge.hidden {
    display: none;
}

/* ===== FOOTER STYLES ===== */
footer {
    background: #343a40 !important;
}

footer .text-light-emphasis {
    color: #cccccc !important;
}

footer .border-warning {
    border-color: #ffc107 !important;
}

.social-icon {
    width: 50px;
    height: 50px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #dee2e6;
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
    color: white;
    border-color: white;
}

.hover-primary {
    transition: all 0.3s ease;
}

.hover-primary:hover {
    color: #ffc107 !important;
    transform: translateX(5px);
}

.btn-outline-warning {
    border: 2px solid #ffc107;
    color: #ffc107;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-warning:hover {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.whatsapp-section {
    transition: all 0.3s ease;
}

.whatsapp-section:hover {
    transform: translateY(-1px);
}

/* ===== PRODUCT GRID STYLES ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-card-img {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card-img img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffc107;
    color: #000;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-card-body {
    padding: 1.5rem;
}

.product-name {
    margin-bottom: 1rem;
}

.product-name a {
    text-decoration: none;
    color: #495057;
    font-weight: 600;
    transition: color 0.3s ease;
}

.product-name a:hover {
    color: #007bff;
}

.product-price-wrapper {
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #28a745;
}

.product-price-sale {
    font-size: 1rem;
    color: #6c757d;
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.btn-add-to-cart {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-add-to-cart:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

/* Botón de filtros para móvil */
.filter-toggle-btn {
    display: none;
    width: 45px;
    height: 45px;
    padding: 0;
    background-color: var(--primary-dark);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition-fast);
    margin-left: 0.5rem;
    align-items: center;
    justify-content: center;
}

.filter-toggle-btn:hover {
    background-color: var(--primary-blue);
}

.filter-toggle-btn i {
    margin: 0;
}

.search-filter-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: nowrap;
}

.search-filter-wrapper .form-control {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.search-filter-wrapper .search-btn {
    width: 45px;
    height: 45px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-filter-wrapper .filter-toggle-btn {
    flex-shrink: 0;
}

/* Botón cerrar filtros en móvil */
.filter-close-btn {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-dark);
    z-index: 10000;
}

.filter-close-btn:hover {
    color: var(--primary-blue);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .hero-section {
        min-height: 60vh;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .stats-section .display-4 {
        font-size: 2.5rem;
    }

    /* Mostrar botón de filtros en móvil */
    .filter-toggle-btn {
        display: inline-block;
    }

    /* Mostrar botón de cerrar en móvil */
    .filter-close-btn {
        display: block;
    }

    /* Ocultar filtros por defecto en móvil */
    .filters-sidebar {
        display: none !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        background-color: white;
        padding: 3rem 1.5rem;
        overflow-y: auto;
        margin: 0;
    }

    /* Mostrar filtros cuando estén activos */
    .filters-sidebar.show {
        display: block !important;
    }

    /* Ajustar el wrapper de búsqueda y filtros */
    .search-filter-wrapper {
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
    }

    .search-filter-wrapper .search-box {
        flex: 1;
    }

    .filter-toggle-btn {
        display: flex;
        width: 45px;
        height: 45px;
        margin-left: 0.5rem;
        margin-top: 0;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.border-0 {
    border: 0 !important;
}

.rounded-circle {
    border-radius: 50% !important;
}

.position-relative {
    position: relative !important;
}

.position-absolute {
    position: absolute !important;
}

.top-0 {
    top: 0 !important;
}

.start-100 {
    left: 100% !important;
}

.translate-middle {
    transform: translate(-50%, -50%) !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

.text-white {
    color: white !important;
}

.text-primary {
    color: #007bff !important;
}

.text-success {
    color: #28a745 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-muted {
    color: #6c757d !important;
}

.bg-white {
    background-color: white !important;
}

.bg-dark {
    background-color: #343a40 !important;
}

.border-secondary {
    border-color: #6c757d !important;
}

.border-top {
    border-top: 1px solid !important;
}

/* ===== BOOTSTRAP-LIKE SPACING ===== */
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.p-0 { padding: 0 !important; }
.p-4 { padding: 1.5rem !important; }
.px-0 { padding-left: 0 !important; padding-right: 0 !important; }

/* ===== BOOTSTRAP-LIKE TYPOGRAPHY ===== */
.display-3 { 
    font-size: 4rem; 
    font-weight: 300; 
    line-height: 1.2; 
}

.display-4 { 
    font-size: 3rem; 
    font-weight: 300; 
    line-height: 1.2; 
}

.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }

.lead {
    font-size: 1.25rem;
    font-weight: 300;
}

.lh-lg {
    line-height: 1.8 !important;
}

/* ===== BOOTSTRAP-LIKE FLEX UTILITIES ===== */
.d-flex { display: flex !important; }
.d-block { display: block !important; }
.d-none { display: none !important; }
.d-inline-flex { display: inline-flex !important; }

.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-md-start { justify-content: flex-start !important; }

.gap-3 { gap: 1rem !important; }

.w-100 { width: 100% !important; }

/* ===== BOOTSTRAP-LIKE TEXT UTILITIES ===== */
.text-center { text-align: center !important; }
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }
.text-decoration-none { text-decoration: none !important; }

.list-unstyled {
    list-style: none;
    padding-left: 0;
}

/* ===== BOOTSTRAP-LIKE BORDER UTILITIES ===== */
.rounded-pill {
    border-radius: 50rem !important;
}

.border-bottom {
    border-bottom: 1px solid !important;
}

.pb-2 {
    padding-bottom: 0.5rem !important;
}

/* ===== CUSTOM UTILITIES ===== */
.overflow-hidden {
    overflow: hidden !important;
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}

.h-100 {
    height: 100% !important;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== QUANTITY CONTROLS ===== */
.quantity-controls {
    margin-bottom: 0.5rem;
}

.quantity-controls .input-group {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    max-width: 150px;
    margin: 0 auto;
}

.quantity-controls .input-group .form-control {
    flex: 1 1 auto !important;
    min-width: 60px !important;
    max-width: 70px !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    padding: 0.5rem 0.25rem !important;
    border-left: none !important;
    border-right: none !important;
}

.quantity-controls .input-group .btn {
    flex-shrink: 0 !important;
    min-width: 38px !important;
    padding: 0.5rem 0.25rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 !important;
}

.quantity-controls .input-group .btn:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.quantity-controls .input-group .btn:last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.quantity-controls .input-group .btn i {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    footer,
    .btn,
    .social-links {
        display: none !important;
    }
}