/* css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header y Navegación */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c5aa0;
    text-decoration: none;
}

.nav-search input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 300px;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: #f0f0f0;
}

.cart-link {
    position: relative;
}

.cart-count {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8rem;
}

/* Botones */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
}

.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-primary:hover {
    background: #1e3d6f;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Grid de Diapositivas */
.slides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.slide-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.slide-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.slide-image {
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.slide-info {
    padding: 1.5rem;
}

.slide-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.slide-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.slide-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: #999;
}

.slide-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.slide-actions {
    display: flex;
    gap: 0.5rem;
}

.slide-actions .btn {
    flex: 1;
    font-size: 0.9rem;
}

/* Filtros */
.filters-container {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: bold;
    color: #555;
}

.filter-group select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

/* Carrito */
.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    align-items: center;
}

.item-image {
    width: 100px;
    height: 80px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image img {
    max-width: 100%;
    max-height: 100%;
}

.item-details h3 {
    margin-bottom: 0.5rem;
}

.item-category {
    color: #666;
    font-size: 0.9rem;
}

.item-price {
    font-weight: bold;
    color: #2c5aa0;
    font-size: 1.1rem;
}

.cart-summary {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: fit-content;
}

.cart-summary h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
}

.summary-line.total {
    border-top: 2px solid #eee;
    font-weight: bold;
    font-size: 1.2rem;
    color: #2c5aa0;
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.empty-cart h2 {
    margin-bottom: 1rem;
    color: #666;
}

/* Formularios de Autenticación */
.auth-form {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.auth-form h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.2);
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-search input {
        width: 100%;
    }
    
    .slides-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cart-container {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .container {
        padding: 0 10px;
    }
}
/* Menú de usuario */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 4px;
    z-index: 1000;
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #333;
}

.user-dropdown a:hover {
    background: #f8f9fa;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a.logout-link {
    color: #dc3545;
}

.user-dropdown a.logout-link:hover {
    background: #dc3545;
    color: white;
}

.user-menu:hover .user-dropdown {
    display: block;
}

/* Diálogo de confirmación */
.confirmation-dialog {
    max-width: 500px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.confirmation-dialog h1 {
    margin-bottom: 1rem;
    color: #333;
}

.confirmation-dialog p {
    margin-bottom: 2rem;
    color: #666;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirmation-actions .btn {
    min-width: 120px;
}
/* Estilos para el perfil */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.user-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.role-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.role-admin {
    background: #d4edda;
    color: #155724;
}

.role-user {
    background: #e2e3e5;
    color: #383d41;
}

.member-since {
    color: #666;
    font-size: 0.9rem;
}

.profile-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.profile-sidebar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.profile-nav {
    display: flex;
    flex-direction: column;
}

.profile-nav .nav-item {
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #333;
    border-left: 4px solid transparent;
    transition: all 0.3s;
}

.profile-nav .nav-item:hover,
.profile-nav .nav-item.active {
    background: #f8f9fa;
    border-left-color: #2c5aa0;
    color: #2c5aa0;
}

.profile-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.profile-form {
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Estadísticas en perfil */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Listas de descargas y compras */
.downloads-list,
.purchases-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-item,
.purchase-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2c5aa0;
}

.download-info h4,
.purchase-header h4 {
    margin-bottom: 0.5rem;
    color: #333;
}

.purchase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem;
}

.purchase-date {
    color: #666;
    font-size: 0.9rem;
}

.purchase-details {
    width: 100%;
}

.purchase-details p {
    margin-bottom: 0.25rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.empty-state p {
    margin-bottom: 1rem;
}

/* Formularios de rol */
.role-form {
    display: inline-block;
}

.role-form select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Botones deshabilitados */
.btn-disabled {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

.text-muted {
    color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .user-badge {
        align-items: flex-start;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .download-item,
    .purchase-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .purchase-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
/* Estilos para los modales */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.7);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: #e9ecef;
    color: #495057;
}

.modal-body {
    padding: 2rem;
}

/* Animaciones */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Botones de peligro */
.btn-warning {
    background: #ffc107;
    color: #212529;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.btn-warning:hover:not(:disabled) {
    background: #e0a800;
}

.btn-warning:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-info {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.btn-info:hover {
    background: #138496;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr !important;
    }
}