/* Wishlist Button Styles */
.btn-wishlist {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 8px;
    left: 8px;
}

.btn-wishlist:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-wishlist i {
    color: #666;
    font-size: 16px;
    transition: all 0.3s ease;
    display: block;
}

.btn-wishlist:hover i {
    color: #e74c3c;
}

.btn-wishlist.wishlisted {
    background: rgba(231, 76, 60, 0.9);
}

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

.btn-wishlist.wishlisted:hover {
    background: rgba(231, 76, 60, 1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-wishlist {
        width: 36px;
        height: 36px;
    }
    
    .btn-wishlist i {
        font-size: 14px;
    }
}

/* Wishlist Button for Product Detail Page */
.btn-wishlist-detail {
    background: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-left: 10px;
}

.btn-wishlist-detail:hover {
    background: #f8f9fa;
    border-color: #e74c3c;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-wishlist-detail i {
    color: #666;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-wishlist-detail:hover i {
    color: #e74c3c;
}

.btn-wishlist-detail.wishlisted {
    background: #e74c3c;
    border-color: #e74c3c;
}

.btn-wishlist-detail.wishlisted i {
    color: white;
}

.btn-wishlist-detail.wishlisted:hover {
    background: #c0392b;
    border-color: #c0392b;
}

/* Wishlist List Page Styles */
.wishlist-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.wishlist-table .table {
    margin-bottom: 0;
}

.wishlist-table .thead-bg {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.wishlist-table th {
    font-weight: 600;
    color: #495057;
    padding: 15px 12px;
    border: none;
    font-size: 14px;
}

.wishlist-table td {
    padding: 15px 12px;
    vertical-align: middle;
    border-color: #e9ecef;
}

.wishlist-table .product-thumbnail {
    width: 120px;
}

.wishlist-table .product-thumbnail img {
    border-radius: 6px;
    object-fit: cover;
}

.wishlist-table .product-details {
    min-width: 200px;
}

.wishlist-table .product-name {
    font-weight: 500;
    color: #212529;
    margin-bottom: 5px;
    font-size: 16px;
}

.wishlist-table .product-price {
    font-weight: 600;
    color: #e74c3c;
    font-size: 18px;
}

.wishlist-table .product-stock {
    font-size: 14px;
}

.wishlist-table .text-in-stock {
    color: #28a745;
    font-weight: 500;
}

.wishlist-table .text-out-stock {
    color: #dc3545;
    font-weight: 500;
}

.wishlist-table .product-action {
    min-width: 120px;
}

.wishlist-table .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wishlist-table .btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
    transform: translateY(-1px);
}

.wishlist-table .btn-secondary.disabled {
    background: #6c757d;
    border-color: #6c757d;
    opacity: 0.6;
    cursor: not-allowed;
}

.wishlist-table .remove-icon {
    background: #dc3545;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.wishlist-table .remove-icon:hover {
    background: #c82333;
    transform: scale(1.1);
}

.wishlist-table .remove-icon i {
    color: white;
}

/* Empty Wishlist Styles */
.empty-wishlist {
    text-align: center;
    padding: 60px 20px;
}

.empty-wishlist .icon {
    margin-bottom: 20px;
}

.empty-wishlist h1 {
    color: #495057;
    margin-bottom: 15px;
}

.empty-wishlist p {
    color: #6c757d;
    margin-bottom: 30px;
    font-size: 16px;
}

.empty-wishlist .btn-primary {
    background: #007bff;
    border-color: #007bff;
    padding: 12px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.empty-wishlist .btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
}

/* Responsive Wishlist Table */
@media (max-width: 768px) {
    .wishlist-table {
        font-size: 14px;
    }
    
    .wishlist-table th,
    .wishlist-table td {
        padding: 10px 8px;
    }
    
    .wishlist-table .product-thumbnail {
        width: 80px;
    }
    
    .wishlist-table .product-thumbnail img {
        width: 60px;
        height: 60px;
    }
    
    .wishlist-table .product-name {
        font-size: 14px;
    }
    
    .wishlist-table .product-price {
        font-size: 16px;
    }
    
    .wishlist-table .btn-secondary {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .wishlist-table .remove-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .wishlist-table .table-responsive {
        border: none;
    }
    
    .wishlist-table .table {
        border: none;
    }
    
    .wishlist-table th,
    .wishlist-table td {
        border: none;
        padding: 8px 4px;
    }
    
    .wishlist-table .product-details {
        min-width: 150px;
    }
    
    .wishlist-table .product-action {
        min-width: 100px;
    }
}

/* Search Modal Styles */
.search-container {
    position: relative;
}

.search-input {
    border: 2px solid #e9ecef;
    font-size: 16px;
    transition: all 0.3s ease;
    padding: 15px 20px;
}

.search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.search-input::placeholder {
    color: #6c757d;
    font-style: italic;
}

.input-group-text {
    border: 2px solid #e9ecef;
    border-right: none;
    background: #f8f9fa;
}

.search-input:focus + .input-group-text {
    border-color: #007bff;
}

#searchBtn {
    background: white;
    border: 2px solid #007bff;
    color: #007bff;
    transition: all 0.3s ease;
    font-weight: 600;
    padding: 15px 30px;
}

#searchBtn:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

#searchBtn:active {
    transform: translateY(0);
}

.search-results-area {
    max-height: 450px;
    overflow-y: auto;
    margin-top: 20px;
    border-radius: 12px;
    background: #ffffff;
    padding: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-results-area::-webkit-scrollbar {
    width: 8px;
}

.search-results-area::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.search-results-area::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.search-results-area::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading and No Results */
#searchLoading {
    padding: 60px 20px;
}

#searchLoading .spinner-border {
    border-width: 3px;
}

#noResults {
    padding: 60px 20px;
    color: #6c757d;
}

.no-results-icon {
    color: #dee2e6;
    margin-bottom: 20px;
}

.no-results-icon i {
    opacity: 0.5;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
}

.modal-header {
    background: white;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

.btn-close {
    color: #6c757d;
}

/* Search Results Product Cards */
.search-results-area .product-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.search-results-area .product-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.search-results-area .product-image {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 20px;
}

.search-results-area .product-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.search-results-area .product-category {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
}

.search-results-area .product-price {
    font-size: 20px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 10px;
}

.search-results-area .product-rating {
    font-size: 13px;
    color: #6c757d;
}

.search-results-area .btn-wishlist {
    width: 40px;
    height: 40px;
    margin-left: 20px;
}

.search-results-area .btn-wishlist i {
    font-size: 16px;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 10px;
    }
    
    .search-results-area {
        max-height: 350px;
        padding: 15px;
    }
    
    .search-results-area .product-card {
        padding: 15px;
    }
    
    .search-results-area .product-image {
        width: 70px;
        height: 70px;
        margin-right: 15px;
    }
    
    .search-results-area .product-title {
        font-size: 16px;
    }
    
    .search-results-area .product-price {
        font-size: 18px;
    }
    
    .search-results-area .btn-wishlist {
        width: 35px;
        height: 35px;
        margin-left: 15px;
    }
    
    .search-results-area .btn-wishlist i {
        font-size: 14px;
    }
    
    .input-group-lg {
        flex-direction: column;
    }
    
    .input-group-lg .input-group-text {
        border-radius: 8px 8px 0 0 !important;
        border-right: 2px solid #e9ecef !important;
        border-bottom: none;
    }
    
    .input-group-lg .search-input {
        border-radius: 0 0 8px 8px !important;
        border-left: 2px solid #e9ecef !important;
        border-top: none;
    }
    
    .input-group-lg #searchBtn {
        border-radius: 8px !important;
        margin-top: 10px;
        width: 100%;
    }
}

/* Product Filter Styles */
.filter-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.filter-sidebar:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-section {
    border-bottom: 1px solid #f8f9fa;
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

.filter-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-section:first-child {
    padding-top: 0;
}

.filter-header h6 {
    color: #212529;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.filter-options {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 8px;
}

.filter-options::-webkit-scrollbar {
    width: 4px;
}

.filter-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.filter-options::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.filter-options::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.form-check {
    margin-bottom: 0.75rem;
    padding-left: 1.75rem;
}

.form-check:last-child {
    margin-bottom: 0;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-left: -1.75rem;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-check-input:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-check-label {
    font-size: 0.875rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 400;
    line-height: 1.4;
}

.form-check-label:hover {
    color: #0d6efd;
}

.form-check-input:checked + .form-check-label {
    color: #0d6efd;
    font-weight: 500;
}

.price-range-container {
    padding: 0.5rem 0;
}

.price-range-container .form-control {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.price-range-container .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.price-slider {
    margin-top: 1rem;
    padding: 0 0.5rem;
}

#filter-loading,
#filter-loading-mobile {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    border: 1px solid #e9ecef;
}

#product-count {
    font-size: 0.875rem;
    color: #6c757d;
}

#sort-select {
    min-width: 160px;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.2s ease;
}

#sort-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Mobile Filter Styles */
#filter-sidebar {
    width: 320px;
}

#filter-sidebar .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#filter-toggle {
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#filter-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#active-filter-count {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Price Range Slider */
.noUi-connect {
    background: linear-gradient(90deg, #0d6efd, #0b5ed7);
}

.noUi-handle {
    border: 2px solid #0d6efd;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.noUi-handle:hover {
    background: #f8f9fa;
    transform: scale(1.1);
}

.noUi-handle:active {
    transform: scale(1.15);
}

.noUi-tooltip {
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    padding: 4px 8px;
}

/* Filter Animation */
.filter-section {
    transition: all 0.3s ease;
}

.filter-section:hover {
    background: rgba(13, 110, 253, 0.02);
    border-radius: 8px;
    padding: 1.25rem 0.75rem;
    margin: 0 -0.75rem;
}

/* Clear Filter Button */
.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
    transition: all 0.2s ease;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: translateY(-1px);
}

/* Tag Filter Specific Styles */
.tag-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    max-height: none;
    overflow-y: visible;
    padding: 0.5rem 0;
}

.tag-filter-container .form-check {
    margin-bottom: 0;
    padding-left: 0;
    min-width: calc(50% - 0.375rem);
    position: relative;
}

.tag-filter-container .form-check-input {
    display: none;
}

.tag-filter-container .form-check-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    margin: 0;
    position: relative;
    overflow: hidden;
    min-height: 44px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tag-filter-container .form-check-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.tag-filter-container .form-check-label:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #adb5bd;
    color: #212529;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tag-filter-container .form-check-label:hover::before {
    left: 100%;
}

.tag-filter-container .form-check-input:checked + .form-check-label {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border-color: #0d6efd;
    color: white;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
    transform: translateY(-1px);
}

.tag-filter-container .form-check-input:checked + .form-check-label::after {
    content: '✓';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0.9;
}

/* Tag Filter Animation */
.tag-filter-container .form-check {
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

.tag-filter-container .form-check:nth-child(1) { animation-delay: 0.1s; }
.tag-filter-container .form-check:nth-child(2) { animation-delay: 0.2s; }
.tag-filter-container .form-check:nth-child(3) { animation-delay: 0.3s; }
.tag-filter-container .form-check:nth-child(4) { animation-delay: 0.4s; }
.tag-filter-container .form-check:nth-child(5) { animation-delay: 0.5s; }
.tag-filter-container .form-check:nth-child(6) { animation-delay: 0.6s; }

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

/* Tag Filter Focus States */
.tag-filter-container .form-check-input:focus + .form-check-label {
    outline: 2px solid #86b7fe;
    outline-offset: 2px;
}

/* Tag Filter Loading State */
.tag-filter-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.tag-filter-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Filter Adjustments */
@media (max-width: 768px) {
    .filter-section {
        padding: 1rem 0;
    }
    
    .filter-header h6 {
        font-size: 0.9rem;
    }
    
    .form-check-label {
        font-size: 0.8rem;
    }
    
    #sort-select {
        min-width: 140px;
        font-size: 0.8rem;
    }
    
    .filter-sidebar {
        position: static;
    }
}

@media (max-width: 576px) {
    #filter-sidebar {
        width: 100%;
    }
    
    .filter-section {
        padding: 0.75rem 0;
    }
    
    .form-check {
        margin-bottom: 0.5rem;
    }
    
    .tag-filter-container .form-check {
        min-width: calc(100% - 0.375rem);
    }
    
    .tag-filter-container .form-check-label {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
        min-height: 48px;
    }
    
    .tag-filter-container {
        gap: 0.5rem;
    }
} 