/* Cart Sidebar Styles */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    z-index: 9999;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-cart:hover {
    color: #333;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    position: relative;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #333;
}

.cart-item-info .price {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: #8b5cf6;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.qty-btn:hover {
    background: #e9ecef;
}

.quantity {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
}

.remove-item {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item:hover {
    color: #dc3545;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

.btn-block {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    background: #8b5cf6;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-block:hover {
    background: #7c3aed;
}

/* Wishlist Modal Styles */
.product-modal .modal-header {
    padding: 30px 40px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.product-modal .modal-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    color: #333;
    font-weight: 600;
}

.product-modal .modal-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.product-modal .modal-body {
    padding: 30px 40px 40px;
    background: white;
}

.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.wishlist-item {
    display: flex;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.wishlist-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #8b5cf6;
}

.wishlist-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.wishlist-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wishlist-item:hover .wishlist-image img {
    transform: scale(1.05);
}

.wishlist-info {
    padding: 20px 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wishlist-info h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.3;
}

.wishlist-info .price {
    margin: 0 0 18px 0;
    font-size: 20px;
    font-weight: 700;
    color: #8b5cf6;
}

.wishlist-actions {
    margin-top: auto;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: #8b5cf6;
    color: white;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-1px);
}

/* Empty Wishlist State */
.wishlist-empty {
    text-align: center;
    padding: 60px 40px;
    color: #64748b;
}

.wishlist-empty i {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 20px;
    display: block;
}

.wishlist-empty h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    color: #334155;
}

.wishlist-empty p {
    margin: 0 0 30px 0;
    font-size: 16px;
    line-height: 1.5;
}

.wishlist-empty .btn {
    margin-top: 10px;
}

/* Password Requirements Styles */
.password-requirements {
    margin-top: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.password-requirements small {
    color: #6c757d;
    font-weight: 500;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

.password-requirements li {
    margin: 2px 0;
    font-size: 12px;
    color: #6c757d;
    transition: color 0.2s ease;
}

.password-requirements li.valid {
    color: #28a745;
    font-weight: 500;
}

.password-requirements li.invalid {
    color: #dc3545;
}

.register-benefit {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
}

.register-benefit i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.register-benefit p {
    margin: 0;
    line-height: 1.4;
}

.register-benefit small {
    opacity: 0.9;
    font-size: 11px;
}

/* Auth Modal Improvements */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal .modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.auth-container {
    padding: 30px;
}

.auth-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
}

.auth-tab {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.auth-tab.active {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h3 {
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #495057;
    line-height: 1.4;
}

.checkbox input[type="checkbox"] {
    width: auto !important;
    margin: 0;
    flex-shrink: 0;
}

/* Password match message */
.password-match-message {
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.password-match-message.success {
    color: #28a745;
}

.password-match-message.error {
    color: #dc3545;
}

/* Input validation states */
.form-group input.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1) !important;
}

.form-group input.success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1) !important;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 16px 20px;
    min-width: 300px;
    max-width: 500px;
    z-index: 11000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-content i {
    font-size: 20px;
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-success i {
    color: #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-error i {
    color: #dc3545;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast-info i {
    color: #17a2b8;
}

/* Shake animation for form errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.6s ease;
}

/* User Dropdown Styles */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 300px;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 16px;
    height: 16px;
    background: white;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0,0,0,0.05);
}

.dropdown-header {
    padding: 20px;
    background: linear-gradient(135deg, #f8f6ff, #f0ebff);
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: #8b5cf6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.user-info {
    flex: 1;
}

.user-fullname {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.user-email {
    font-size: 13px;
    color: #666;
}

.user-badge {
    display: inline-block;
    background: #ffd700;
    color: #333;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.dropdown-content {
    padding: 10px 0;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.dropdown-content a:hover {
    background: #f8f9fa;
    color: #8b5cf6;
}

.dropdown-content a i {
    width: 20px;
    text-align: center;
    color: #666;
}

.dropdown-content a:hover i {
    color: #8b5cf6;
}

.dropdown-content a .badge {
    position: absolute;
    right: 20px;
    background: #8b5cf6;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.dropdown-discount {
    margin: 10px 20px;
    padding: 12px;
    background: #fff3cd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #856404;
}

.dropdown-discount i {
    color: #ffc107;
}

.dropdown-content hr {
    margin: 10px 0;
    border: none;
    border-top: 1px solid #eee;
}

.logout-link {
    color: #dc3545 !important;
}

.logout-link:hover {
    background: #fff5f5 !important;
}

/* VIP User Styles */
.vip-user {
    color: #ffd700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Reminder Modal Styles */
.reminder-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.reminder-modal.active {
    opacity: 1;
    visibility: visible;
}

.reminder-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.reminder-header {
    margin-bottom: 20px;
}

.reminder-header i {
    font-size: 48px;
    color: #8b5cf6;
    margin-bottom: 15px;
    display: block;
}

.reminder-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.discount-reminder {
    background: #f8f6ff;
    border: 2px dashed #8b5cf6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.discount-reminder .code {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #8b5cf6;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.discount-reminder .discount-info {
    color: #666;
    font-size: 16px;
}

.reminder-text {
    color: #666;
    margin: 20px 0;
    line-height: 1.5;
}

/* Header adjustments for logged in state */
.header-link.logged-in {
    position: relative;
}

.header-link.logged-in .user-name {
    font-weight: 500;
    margin-left: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100vw;
        right: -100vw;
    }
    
    .product-modal .modal-header {
        padding: 25px 20px 15px;
    }
    
    .product-modal .modal-body {
        padding: 20px;
    }
    
    .wishlist-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 15px;
    }
    
    .wishlist-item {
        flex-direction: column;
    }
    
    .wishlist-image {
        width: 100%;
        height: 180px;
    }
    
    .wishlist-info {
        padding: 20px;
    }
    
    .wishlist-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-sm {
        text-align: center;
        justify-content: center;
    }
    
    .auth-container {
        padding: 20px;
    }
    
    .auth-modal .modal-content {
        width: 95%;
        margin: 20px;
    }
}

/* ============================================
   ESTILOS PERSONALIZADOS PARA WISHLIST
   ============================================ */

/* Título "Mis Favoritos" con color específico */
.wishlist-modal .modal-header h2,
#wishlistModal .modal-header h2 {
    color: #7046B9 !important;
    font-family: 'League Spartan', sans-serif !important;
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin-bottom: 1rem !important;
}

/* Botón "Agregar al Carrito" con degradado personalizado */
.add-to-cart-from-wishlist {
    background: linear-gradient(135deg, #DAC2F5, #F4C2C2) !important;
    color: white !important;
    border: none !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(218, 194, 245, 0.4) !important;
    font-size: 0.9rem !important;
}

.add-to-cart-from-wishlist:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(218, 194, 245, 0.6) !important;
    filter: brightness(1.05) !important;
}

/* Responsive para móvil y tablet */
@media (max-width: 768px) {
    .add-to-cart-from-wishlist {
        padding: 12px 20px !important;
        font-size: 1rem !important;
        width: 100% !important;
        margin-bottom: 8px !important;
    }
    
    .wishlist-modal .modal-header h2,
    #wishlistModal .modal-header h2 {
        font-size: 1.5rem !important;
    }
}