/* Wishlist Styles */

/* Wishlist Grid */
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Smartphone Cards - EXACT copy from smartphones.css */
.smartphone-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.smartphone-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.card-image-container {
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
}

.price-alert-bell {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.price-alert-bell:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.price-alert-bell i {
    color: #28a745;
    font-size: 14px;
    transition: color 0.3s ease;
}

.price-alert-bell:hover i {
    color: #28a745;
}

.price-alert-bell.active {
    background: #28a745;
}

.price-alert-bell.active i {
    color: white;
}

.card-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-content {
    padding: 1.5rem;
}

.brand-badge {
    background: #6c757d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-specs {
    margin-bottom: 1rem;
}

.product-specs span {
    font-size: 0.85rem;
    color: #666;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}

.product-price {
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #28a745;
}

.retailer-info {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    align-items: center;
    min-height: 40px;
    margin-top: auto;
}

.btn-compare {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.8rem;
    flex: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-compare:hover {
    background: #218838;
}

.btn-wishlist {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.8rem;
    flex: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-wishlist:hover {
    background: #c82333;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.8rem;
    flex: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-remove:hover {
    background: #c82333;
}

/* Wishlist Button States */
.btn-wishlist.in-wishlist {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-wishlist.in-wishlist:hover {
    background: #c82333;
    border-color: #c82333;
}

.btn-wishlist.in-wishlist i {
    color: white;
}

/* Empty Wishlist Message */
.empty-wishlist {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.empty-wishlist-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-wishlist-icon {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.empty-wishlist h3 {
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.empty-wishlist p {
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.empty-wishlist .btn-primary {
    background: #007bff;
    border-color: #007bff;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.empty-wishlist .btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Search & Sort Section */
.search-sort-section {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    color: #333;
    font-weight: 600;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #007bff;
}

.btn-remove-all {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-remove-all:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-remove-all:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.search-sort-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: end;
}

.search-box .input-group {
    position: relative;
}

.search-box .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-box .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn-search {
    background: #007bff;
    border-color: #007bff;
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.btn-search:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.sort-box .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.sort-box .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Wishlist Count Badge */
.wishlist-count-badge {
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
    min-width: 18px;
    text-align: center;
    display: inline-block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wishlist-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .btn-remove-all {
        width: 100%;
        justify-content: center;
    }
    
    .search-sort-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .wishlist-item-content {
        padding: 1.25rem;
    }
    
    .wishlist-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .wishlist-item-actions {
        flex-direction: column;
    }
    
    .empty-wishlist {
        padding: 3rem 1.5rem;
    }
    
    .empty-wishlist-icon {
        font-size: 3rem;
    }
    
    .search-sort-section {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .wishlist-item-image {
        height: 180px;
    }
    
    .wishlist-item-content {
        padding: 1rem;
    }
    
    .wishlist-item-name {
        font-size: 1rem;
    }
    
    .current-price {
        font-size: 1.1rem;
    }
    
    .empty-wishlist {
        padding: 2rem 1rem;
    }
    
    .search-sort-section {
        padding: 1rem;
    }
}

/* Animation for adding/removing items */
@keyframes wishlistItemAdd {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wishlistItemRemove {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.wishlist-item.adding {
    animation: wishlistItemAdd 0.3s ease-out;
}

.wishlist-item.removing {
    animation: wishlistItemRemove 0.3s ease-out;
}

/* Loading state */
.wishlist-loading {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.wishlist-loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Wishlist Count Badges */
.wishlist-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 10px;
    margin-left: 6px;
    line-height: 1;
    transition: all 0.3s ease;
}

/* Desktop header badge */
#desktopWishlistCount {
    vertical-align: middle;
    font-size: 0.7rem;
}

/* Mobile sidebar badge - positioned in corner */
.quick-access-item {
    position: relative;
}

.mobile-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 0;
    z-index: 1;
}

/* Page title badge - now in hero section */
.page-badge {
    font-size: 1.2rem;
    min-width: 35px;
    height: 35px;
    padding: 0 12px;
    margin-left: 0;
    margin-right: 10px;
}

/* Wishlist count display in hero section */
.wishlist-count-display {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    gap: 0;
}

.wishlist-count-text {
    font-size: 1.1rem;
    color: #555;
    font-weight: 500;
}

/* Hide badge when count is 0 */
.wishlist-count-badge:empty,
.wishlist-count-badge[data-count="0"] {
    display: none;
}

/* Hover effect for badges */
.header-link:hover .wishlist-count-badge {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
}

/* Loading State - Same as smartphones */
.loading-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.loading-state i {
    color: #007bff;
}

/* Modern Spinner */
.modern-spinner {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 2rem auto;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: -0.45s;
    border-top-color: #007bff;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.3s;
    border-top-color: #28a745;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
}

.spinner-ring:nth-child(3) {
    animation-delay: -0.15s;
    border-top-color: #ffc107;
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-state h4 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.loading-state p {
    font-size: 1rem;
    color: #666;
}

/* Simple Confirmation Modal */
.confirm-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.confirm-icon {
    font-size: 2.5rem;
    color: #ffc107;
    flex-shrink: 0;
}

.confirm-message {
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.5;
    color: #333;
}

.modal-footer .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    min-width: 80px;
}

/* Mobile responsive styles for smartphone cards - EXACT copy from smartphones.css */
@media (max-width: 768px) {
    /* 2-column mobile grid and compact card sizing + vertical buttons */
    .wishlist-grid .smartphone-card { border-radius: 10px; }
    .wishlist-grid .card-image-container { height: 140px; padding: 0.75rem; }
    .wishlist-grid .card-content { padding: 0.75rem; }
    .wishlist-grid .product-name { font-size: 0.95rem; margin-bottom: 0.5rem; }
    .wishlist-grid .current-price { font-size: 1rem; }
    .wishlist-grid .card-actions { padding: 0.75rem; gap: 0.5rem; flex-direction: column; }
    .wishlist-grid .btn-compare,
    .wishlist-grid .btn-remove { font-size: 0.85rem; height: 34px; width: 100%; flex: none; }
}
