/* ===================================================================
   📁 css/style.css - Estilos Completos de la Web
   =================================================================== */

/* Variables CSS */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* ===================================================================
   NAVBAR CUSTOMIZADO
   =================================================================== */

.navbar-custom {
    background: var(--gradient-bg);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.navbar-custom .navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: white !important;
    transition: transform 0.3s ease;
}

.navbar-custom .navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.navbar-custom .nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.cart-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.75rem;
    min-width: 18px;
    text-align: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ===================================================================
   HERO SLIDER
   =================================================================== */

.hero-slider {
    position: relative;
    height: 70vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider-item.active {
    opacity: 1;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    max-width: 600px;
    padding: 2rem;
}

.slider-content h1 {
    animation: fadeInUp 1s ease-out;
}

.slider-content p {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.slider-content button {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.slider-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.slider-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: white;
    transform: scale(1.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================================================
   PRICING CARDS
   =================================================================== */

.pricing-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.pricing-card.recommended {
    border: 2px solid var(--warning-color);
    transform: scale(1.05);
}

.pricing-header {
    background: var(--gradient-bg);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    position: relative;
}

.pricing-header h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.price-tag {
    font-size: 2.5rem;
    font-weight: bold;
}

.price-tag small {
    font-size: 1rem;
    opacity: 0.8;
}

.pricing-header .badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* ===================================================================
   PRODUCT CARDS
   =================================================================== */

.product-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card .card-img-top {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

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

.product-stock {
    color: var(--success-color);
    font-weight: 500;
}

.product-stock.low {
    color: var(--warning-color);
}

.product-stock.out {
    color: var(--danger-color);
}

/* ===================================================================
   BLOG CARDS
   =================================================================== */

.blog-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.blog-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* ===================================================================
   CART STYLES
   =================================================================== */

.cart-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.cart-item:hover {
    background-color: var(--light-color);
}

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

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 0.25rem;
}

/* ===================================================================
   ADMIN PANEL
   =================================================================== */

.admin-sidebar {
    background: var(--dark-color);
    min-height: 100vh;
    padding: 1rem 0;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-color);
}

.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.activity-item i {
    width: 20px;
    text-align: center;
}

/* ===================================================================
   MODALS
   =================================================================== */

.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: var(--gradient-bg);
    color: white;
    border-bottom: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.password-strength {
    margin-top: 0.5rem;
}

.progress {
    border-radius: var(--border-radius);
}

.invalid-feedback {
    display: block;
}

/* ===================================================================
   BUTTONS
   =================================================================== */

.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: var(--gradient-bg);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* ===================================================================
   FOOTER
   =================================================================== */

.site-footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.site-footer h5 {
    color: white;
    margin-bottom: 1rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: white;
}

.bg-white-50 {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* ===================================================================
   ANIMATIONS Y UTILITIES
   =================================================================== */

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

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

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.text-gradient {
    background: var(--gradient-bg);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

@media (max-width: 768px) {
    .hero-slider {
        height: 50vh;
    }
    
    .slider-content h1 {
        font-size: 2rem;
    }
    
    .pricing-card.recommended {
        transform: none;
        margin-top: 1rem;
    }
    
    .admin-sidebar {
        min-height: auto;
    }
    
    .cart-item-image {
        width: 60px;
        height: 60px;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .modal-lg {
        max-width: 95%;
    }
    
    .slider-content {
        padding: 1rem;
    }
    
    .price-tag {
        font-size: 2rem;
    }
}

/* ===================================================================
   DARK MODE (OPCIONAL)
   =================================================================== */

/*@media (prefers-color-scheme: dark) {
    .card {
        background-color: #2d3748;
        color: white;
        border-color: #4a5568;
    }
    
    .form-control {
        background-color: #2d3748;
        border-color: #4a5568;
        color: white;
    }
    
    .form-control:focus {
        background-color: #2d3748;
        border-color: var(--primary-color);
        color: white;
    }
*/

  /* Forzar fondos blancos en pricing cards */
.pricing-card,
.pricing-card .card-body,
.pricing-features,
.product-card,
.blog-card {
    background-color: white !important;
    color: #333 !important;
}

/* Específicamente para dark mode */
@media (prefers-color-scheme: dark) {
    .pricing-card,
    .pricing-card .card-body,
    .pricing-features,
    .product-card,
    .blog-card {
        background-color: white !important;
        color: #333 !important;
    }
}



/* ===================================================================
   PRINT STYLES
   =================================================================== */

@media print {
    .navbar,
    .footer,
    .btn,
    .modal {
        display: none !important;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
}


/* ===================================================================
   ESTILOS ESPECÍFICOS PARA PANEL ADMIN
   =================================================================== */

/* Reset para páginas admin */
body.admin-page {
    background: #f5f5f5 !important;
    color: #333 !important;
}

/* Contenedor principal admin con fondo claro */
.admin-container {
    background: #f5f5f5 !important;
    color: #333 !important;
    min-height: 100vh;
}

/* Sidebar con tema corporativo */
.admin-sidebar {
    background: #2c3e50 !important;
    color: white !important;
}

.admin-sidebar a {
    color: #ecf0f1 !important;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: #34495e !important;
    color: white !important;
}

/* Main content area */
.admin-main {
    background: #f5f5f5 !important;
    color: #333 !important;
}

/* Todas las tarjetas en blanco */
.stat-card,
.filter-section,
.table-container,
.modal-content {
    background: white !important;
    color: #333 !important;
}

/* Textos en las tarjetas */
.stat-card h3,
.info-group label {
    color: #666 !important;
}

.stat-card .number {
    color: #333 !important;
}

/* Tabla con fondo blanco */
#ordersTable,
#usersTable,
#productsTable {
    background: white !important;
    color: #333 !important;
}

#ordersTable th,
#usersTable th,
#productsTable th {
    background: #f8f9fa !important;
    color: #333 !important;
}

#ordersTable td,
#usersTable td,
#productsTable td {
    background: white !important;
    color: #333 !important;
}

/* DataTables overrides */
.dataTables_wrapper {
    color: #333 !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: #333 !important;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background: white !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #333 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #007bff !important;
    color: white !important;
    border: 1px solid #007bff !important;
}

/* Inputs y selects en admin */
.admin-container input,
.admin-container select,
.admin-container textarea {
    background: white !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
}

.admin-container input:focus,
.admin-container select:focus,
.admin-container textarea:focus {
    background: white !important;
    border-color: #4CAF50 !important;
}

/* Modales con fondo blanco */
.order-details-modal,
.user-modal,
.order-history-modal {
    background: rgba(0,0,0,0.5) !important;
}

.modal-content {
    background: white !important;
    color: #333 !important;
}

/* Enlaces en el admin */
.admin-main a {
    color: #007bff !important;
}

.admin-main a:hover {
    color: #0056b3 !important;
}

