/* Complete listing_style.css - FIXED with Perfect Responsive Design + Inline Wishlist Feedback */

* {
    box-sizing: border-box;
}

body {
    font-family: 'Amazon Ember', Arial, sans-serif;
    background: rgba(255, 255, 255, 0);
    color: #0F1111;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 10000;
    min-width: 200px;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: slideInBounce 0.5s ease;
}

@keyframes slideInBounce {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    60% {
        transform: translateY(10px);
        opacity: 1;
    }
    80% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
}

.toast-icon {
    font-size: 24px;
    animation: giftWiggle 0.5s ease infinite alternate;
}

@keyframes giftWiggle {
    0% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}

.toast-message {
    flex: 1;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: grey;
    margin-bottom: 30px;
    text-align: center;
}

/* Filters */
.filters-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    
}

.filters-desktop {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
}

.filters-desktop select, .filters-desktop button {
    max-height:40px;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    transition: all 0.2s ease;
}

.filters-desktop select:focus, .filters-desktop button:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filters-desktop button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    
}

.filters-desktop button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Desktop Source Filter Container */
.source-filter-container {
    position: relative;
    display: inline-block;
}

.source-filter-dropdown {
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 120px;
    max-height:40px;
    user-select: none;
    
}

.source-filter-dropdown:hover {
    border-color: #9ca3af;
}

.source-filter-dropdown:focus,
.source-filter-dropdown.active {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.source-filter-dropdown span:first-child {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #374151;
}

.source-filter-dropdown span:last-child {
    font-size: 12px;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.source-filter-dropdown.active span:last-child {
    transform: rotate(180deg);
}

.source-filter-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.source-filter-options.show {
    display: block;
}

.source-filter-option {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid #f3f4f6;
}

.source-filter-option:last-child {
    border-bottom: none;
}

.source-filter-option:hover {
    background-color: #f9fafb;
}

.source-filter-option input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #6366f1;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.source-filter-option label {
    cursor: pointer;
    flex: 1;
    font-size: 14px;
    color: #374151;
    user-select: none;
}

.filters-mobile {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

#mobileFunnel {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: black;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mobileFunnel:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

#mobileFunnel svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* Mobile Popup */
.mobile-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 90vw;
    max-width: 400px;
    box-sizing: border-box;
}

.mobile-popup.show {
    display: flex !important;
    flex-direction: column;
}

.mobile-popup form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.mobile-filter-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.mobile-popup label {
    font-weight: 600;
    color: #0F1111;
    font-size: 14px;
    text-align: left;
    margin: 0;
    white-space: nowrap;
}

.mobile-popup select {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8fafc;
    width: 100%;
    box-sizing: border-box;
}

.mobile-popup select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.mobile-source-filter-container {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.mobile-source-filter-container > label {
    grid-column: 1;
    font-weight: 600;
    color: #0F1111;
    font-size: 14px;
    text-align: left;
    margin: 0;
}

.mobile-source-dropdown {
    grid-column: 2;
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.mobile-source-dropdown:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.mobile-source-dropdown.active {
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 14px;
    color: #6b7280;
    font-weight: bold;
}

.mobile-source-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
    color: #6366f1;
}

.mobile-source-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 4px;
}

.mobile-source-options.active,
.mobile-source-options.show {
    display: block;
}

.mobile-source-option {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-source-option:last-child {
    border-bottom: none;
}

.mobile-source-option:hover {
    background-color: #f8fafc;
}

.mobile-source-option input[type="checkbox"] {
    margin-right: 12px;
    accent-color: #6366f1;
    width: 18px;
    height: 18px;
}

.mobile-source-option label {
    cursor: pointer;
    flex: 1;
    margin: 0;
    font-size: 16px;
    color: #0F1111;
    font-weight: 500;
}

.mobile-popup .button-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
}

.mobile-popup button[type="submit"],
.mobile-popup button[type="button"] {
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.mobile-popup button[type="submit"] {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.mobile-popup button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.mobile-popup button[type="button"] {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.mobile-popup button[type="button"]:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Products Grid - FIXED */
.products-container {
    margin-top: 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    justify-content: center;
}

/* Product Card - COMPLETELY FIXED */
.product-card {
    background: #f2f5f3;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e7e7e7;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 520px;
}

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

/* Product Image Container with Share Button */
.product-image-container {
    position: relative;
    width: 100%;
    height: 320px;
    flex-shrink: 0;
    overflow: hidden;
}

.product-image-container a {
    display: block;
    width: 100%;
    height: 100%;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    transition: transform 0.3s ease;
    display: block;
}

.product-card:hover .product-image-container img {
    transform: scale(1.02);
}

/* Share Button */
.share-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.share-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-btn svg {
    width: 18px;
    height: 18px;
    color: #667eea;
}

.share-btn:active {
    transform: scale(0.95);
}

/* Product Content - FIXED */
.product-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    justify-content: flex-start;
}

/* Product Title Link - no styling */
.product-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Product Title - FIXED */
.product-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: black !important;
    margin: 0 0 10px 0 !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: 45px !important;
    cursor: pointer !important;
}

.product-title:hover {
    color: #C7511F !important;
}

/* Price and Source Container - FIXED */
.price-source-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 12px;
    min-height: 28px;
}

.product-price {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: black !important;
    margin: 0 !important;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Source Badge - FIXED */
.source-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
    white-space: nowrap;
    flex-shrink: 0;
}

.source-icon {
    font-size: 12px;
    line-height: 1;
}

.source-name {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

/* Rating Section - FIXED */
.product-rating-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
    min-height: 24px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.rating-stars {
    display: flex;
    align-items: center;
    gap: 1px;
    flex-shrink: 0;
}

.star {
    font-size: 16px !important;
    line-height: 1;
    color: #FFA41C;
}

.star.filled {
    color: #FFA41C;
}

.star.half {
    background: linear-gradient(90deg, #FFA41C 50%, #e5e5e5 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.star.empty {
    color: #e5e5e5;
}

.rating-number {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #0F1111 !important;
    margin: 0 !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.rating-count {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #007185 !important;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.rating-count:hover {
    color: #C7511F !important;
    text-decoration: underline;
}

/* Counts Display - FIXED */
.counts-display {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.wishlist-count-display,
.like-count-display {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.count-icon {
    font-size: 14px;
    line-height: 1;
}

.count-number {
    font-size: 12px;
    color: #565959;
    font-weight: 500;
    line-height: 1;
}

/* Button Container - FIXED at bottom */
.product-card .button-container {
    display: flex;
    gap: 8px;
    width: 100%;
    height: 44px;
    flex-shrink: 0;
    margin-top: 0;
}

/* Like Button - 70% width */
.product-card .like-btn {
    flex: 0 0 70%;
    padding: 10px;
    background: #FFF;
    border: 2px solid #8b5cf6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    color: #8b5cf6;
}

.product-card .like-btn:hover {
    background: #f3e8ff;
    border-color: #8b5cf6;
    transform: scale(1.05);
}

.product-card .like-btn.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    border: 2px solid #8b5cf6;
    color: white;
    animation: heartPulse 0.6s ease;
}

@keyframes heartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.like-icon {
    font-size: 18px;
    transition: transform 0.2s ease;
    line-height: 1;
}

.like-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.like-btn.active .like-icon {
    animation: heartBeat 1s ease infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

/* Wishlist Button - 30% width with SPARKLE + INLINE FEEDBACK */
.product-card .wishlist-btn {
    flex: 0 0 30%;
    padding: 10px;
    background: #FFF;
    border: 1px solid #D5D9D9;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
}

.product-card .wishlist-btn:hover {
    background: #F0E6FF;
    border-color: #764ba2;
    transform: scale(1.05);
}

.product-card .wishlist-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #667eea;
    animation: giftBounce 0.6s ease;
}

@keyframes giftBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-5px) scale(1.05); }
    50% { transform: translateY(0) scale(1.1); }
    75% { transform: translateY(-3px) scale(1.05); }
}

.gift-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
    line-height: 1;
}

.wishlist-btn.active .gift-icon {
    animation: giftRotate 2s ease infinite;
}

@keyframes giftRotate {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-10deg) scale(1.1); }
    50% { transform: rotate(0deg) scale(1); }
    75% { transform: rotate(10deg) scale(1.1); }
}

/* INLINE WISHLIST FEEDBACK - Black & White Minimal Style */
.wishlist-feedback {
    position: absolute;
    top: -32px;
    right: 0;
    background: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
    letter-spacing: 0.3px;
}

.wishlist-feedback::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 15%;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #333;
}

.wishlist-feedback.show {
    opacity: 1;
    transform: translateY(-4px);
}

.wishlist-feedback.added {
    background: #1a1a1a;
}

.wishlist-feedback.added::after {
    border-top-color: #1a1a1a;
}

.wishlist-feedback.removed {
    background: #555;
}

.wishlist-feedback.removed::after {
    border-top-color: #555;
}

/* SPARKLE ANIMATION */
.wishlist-btn.sparkle::before,
.wishlist-btn.sparkle::after {
    content: '✨';
    position: absolute;
    font-size: 20px;
    pointer-events: none;
    animation: sparkleFloat 1s ease-out forwards;
}

.wishlist-btn.sparkle::before {
    top: -10px;
    left: -10px;
    animation-delay: 0s;
}

.wishlist-btn.sparkle::after {
    top: -10px;
    right: -10px;
    animation-delay: 0.15s;
}

@keyframes sparkleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translateY(-20px) scale(1) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) scale(0.5) rotate(360deg);
    }
}

.wishlist-btn.sparkle {
    animation: shimmer 0.8s ease-out;
}

@keyframes shimmer {
    0%, 100% {
        box-shadow: 0 0 0 rgba(102, 126, 234, 0);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.8), 
                    0 0 40px rgba(118, 75, 162, 0.6),
                    inset 0 0 20px rgba(255, 255, 255, 0.3);
    }
}

/* Disabled state */
.product-card .wishlist-btn:disabled,
.product-card .like-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.no-products {
    text-align: center;
    padding: 80px 20px;
    color: #565959;
    font-size: 18px;
}

/* Desktop & Laptop Responsive */
@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1360px;
        margin: 0 auto;
    }
    
    .product-card {
        width: 100%;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-card {
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .product-card {
        width: 100%;
        height: 400px;
    }
    
    .product-image-container {
        height: 230px;
    }
}

/* Tablet View */
@media (max-width: 1024px) {
    .nav-links { 
        display: none; 
    }
    
}

/* Mobile View */
@media (max-width: 768px) {
    /* Toast on mobile */
    .toast {
        top: auto;
        bottom: 90px;
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(-20px);
        min-width: 250px;
        font-size: 14px;
        padding: 14px 20px;
    }
    
    .toast.show {
        transform: translateX(-50%) translateY(0);
    }
    
    /* Wishlist feedback on mobile */
    .wishlist-feedback {
        top: -28px;
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .wishlist-feedback::after {
        bottom: -4px;
        border-left: 4px solid transparent;
        border-right: 4px solid transparent;
        border-top: 4px solid #333;
    }
    
    .wishlist-feedback.added::after {
        border-top-color: #1a1a1a;
    }
    
    .wishlist-feedback.removed::after {
        border-top-color: #555;
    }
    
    body {
        background: #f3edfa;
    }
    
    .main-content {
        margin: 0;
        padding: 8px;
        border-radius: 0;
        box-shadow: none;
        background: #f3edfa;
        min-height: 100vh;
    }
    
    .page-title {
        font-size: 18px;
        margin-bottom: 12px;
        padding: 0 4px;
        color: #0F1111;
    }
    
    /* Mobile Grid - 2 columns */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 2px;
        margin-top: 8px;
    }
    
    /* Mobile Product Card */
    .product-card {
        width: 100%;
        height: auto;
        max-height:320px;
        padding: 5px;
        border-radius: 8px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
        background: #ffffff;
    }
    
    .product-card:hover {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
        transform: none;
    }
    
.product-image-container {
    height: 170px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #fff;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px 8px 0 0;
}
    
    .product-card:hover .product-image-container img {
        transform: none;
    }
    
    /* Mobile Share Button */
    .share-btn {
        width: 30px;
        height: 30px;
        top: 6px;
        right: 6px;
    }
    
    .share-btn svg {
        width: 15px;
        height: 15px;
    }
    
    /* Mobile Product Content */
    .product-content {
        padding: 8px;
        flex: 1;
        justify-content: flex-start;
    }
    
    /* Mobile Product Title */
    .product-title {
        font-size: 13px !important;
        font-weight: 500 !important;
        margin-bottom: 6px !important;
        line-height: 1.3 !important;
        height: 34px !important;
        -webkit-line-clamp: 2 !important;
    }
    
    /* Mobile Price and Source */
    .price-source-container {
        margin-bottom: 6px;
        gap: 6px;
        min-height: 22px;
        flex-wrap: nowrap;
    }
    
    .product-price {
        font-size: 14px !important;
    }
    
    .source-badge {
        padding: 2px 6px;
        font-size: 9px;
        border-radius: 3px;
    }
    
    .source-icon {
        font-size: 9px;
    }
    
    .source-name {
        font-size: 8px;
    }
    
    /* Mobile Rating Section */
    .product-rating-container {
        margin-bottom: 8px;
        min-height: 20px;
        gap: 6px;
    }
    
    .product-rating {
        gap: 3px;
    }
    
    .star {
        font-size: 12px !important;
    }
    
    .rating-number {
        font-size: 11px !important;
    }
    
    .rating-count {
        font-size: 11px !important;
    }
    
    .counts-display {
        gap: 4px;
    }
    
    .wishlist-count-display,
    .like-count-display {
        padding: 3px 6px;
        border-radius: 8px;
    }
    
    .count-icon {
        font-size: 11px;
    }
    
    .count-number {
        font-size: 10px;
    }
    
    /* Mobile Buttons */
    .product-card .button-container {
        gap: 6px;
        height: 38px;
        margin-top: 0;
    }
    
    .product-card .like-btn,
    .product-card .wishlist-btn {
        padding: 8px;
        border-radius: 6px;
    }
    
    .product-card .like-btn {
        font-size: 11px;
    }
    
    .like-icon {
        font-size: 14px;
    }
    
    .like-text {
        font-size: 11px;
    }
    
    .gift-icon {
        font-size: 16px;
    }
    
    .header-content {
        position: relative;
        justify-content: flex-start;
        gap: 16px;
    }
    
    .hamburger { 
        display: flex;
        position: static;
        order: 1;
        flex-shrink: 0;
    }
    
    .logo {
        order: 2;
        margin: 0;
        font-size: 24px;
        flex-shrink: 0;
    }
    
    .nav-links { 
        display: none; 
    }
    
    .header-content .auth-section { 
        display: flex;
        order: 3;
        margin-left: auto;
    }
    
    .btn-signup {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .filters-desktop {
        display: none !important;
    }
    
    .filters-mobile {
        display: block !important;
    }
    
    .filters-container {
        display: none !important;
    }
    
    .welcome-text {
        display: block;
        font-size: 13px;
    }
}

/* Small Mobile Screens */
@media (max-width: 480px) {
    .toast {
        font-size: 13px;
        padding: 12px 18px;
        min-width: 200px;
        bottom: 85px;
    }
    
    .wishlist-feedback {
        top: -22px;
        font-size: 9px;
        padding: 2px 7px;
    }
    
    .main-content {
        padding: 6px;
    }
    
    .products-grid {
        gap: 6px;
        padding: 3px;
    }
    
    .product-card {
        height: 310px;
        
    }
    
    .product-image-container {
        height: 160px;
    }
    
    .product-content {
        padding: 8px;
    }
    
    .product-title {
        font-size: 12px !important;
        height: 32px !important;
        margin-bottom: 5px !important;
    }
    
    .price-source-container {
        min-height: 20px;
        margin-bottom: 5px;
    }
    
    .product-price {
        font-size: 13px !important;
    }
    
    .source-badge {
        padding: 2px 5px;
        font-size: 8px;
    }
    
    .source-name {
        font-size: 7px;
    }
    
    .product-rating-container {
        min-height: 18px;
        margin-bottom: 6px;
    }
    
    .star {
        font-size: 11px !important;
    }
    
    .rating-number {
        font-size: 10px !important;
    }
    
    .rating-count {
        font-size: 10px !important;
    }
    
    .wishlist-count-display{
        display: none;
        
    }
    
    .count-icon {
       
        font-size: 10px;
    }
    
    .count-number {
        
        font-size: 9px;
    }
    
    .product-card .button-container {
        height: 36px;
        gap: 5px;
    }
    
    .product-card .like-btn,
    .product-card .wishlist-btn {
        padding: 6px;
        border-radius: 5px;
    }
    
    .product-card .like-btn {
        font-size: 10px;
    }
    
    .like-icon {
        font-size: 13px;
    }
    
    .like-text {
        font-size: 10px;
    }
    
    .gift-icon {
        font-size: 15px;
    }
    
    .share-btn {
        width: 28px;
        height: 28px;
        top: 5px;
        right: 5px;
    }
    
    .share-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .mobile-popup {
        width: 95vw;
        padding: 20px;
        max-height: 70vh;
    }

    .mobile-popup form {
        gap: 10px;
    }

    .mobile-popup select,
    .mobile-source-dropdown {
        padding: 9px 12px;
        font-size: 14px;
    }

    .mobile-popup .button-container {
        gap: 10px;
        margin-top: 10px;
    }

    .mobile-popup button[type="submit"],
    .mobile-popup button[type="button"] {
        padding: 11px 16px;
        font-size: 14px;
    }

    .mobile-popup label {
        font-size: 13px;
    }
    
    .welcome-text {
        font-size: 12px;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .header-content {
        padding: 0 10px;
    }
    
    .logo {
        font-size: 20px;
    }
}

/* Very Small Mobile Screens */
@media (max-width: 360px) {
    .toast {
        font-size: 12px;
        padding: 10px 16px;
        min-width: 180px;
        bottom: 80px;
    }
    
    .wishlist-feedback {
        top: -20px;
        font-size: 8px;
        padding: 2px 6px;
    }
    
    .main-content {
        padding: 4px;
    }
    
    .products-grid {
        gap: 5px;
        padding: 2px;
    }

    .product-card {
        height: 360px;
        border-radius: 6px;
    }

    .product-image-container {
        height: 150px;
    }

    .product-image-container img {
        border-radius: 6px 6px 0 0;
    }

    .product-content {
        padding: 6px;
    }

    .product-title {
        font-size: 11px !important;
        height: 29px !important;
        margin-bottom: 4px !important;
        line-height: 1.3 !important;
    }

    .price-source-container {
        min-height: 18px;
        margin-bottom: 4px;
        gap: 4px;
    }

    .product-price {
        font-size: 12px !important;
    }

    .source-badge {
        padding: 1px 4px;
        font-size: 7px;
    }

    .source-name {
        font-size: 6px;
    }

    .product-rating-container {
        min-height: 16px;
        margin-bottom: 5px;
        gap: 4px;
    }

    .star {
        font-size: 10px !important;
    }
    
    .rating-number {
        font-size: 9px !important;
    }
    
    .rating-count {
        font-size: 9px !important;
    }

    .counts-display {
        gap: 3px;
    }

    .wishlist-count-display,
    .like-count-display {
        padding: 2px 5px;
    }

    .count-icon {
        display: none;
        font-size: 9px;
    }
    
    .count-number {
        font-size: 8px;
    }

    .product-card .button-container {
        height: 32px;
        gap: 4px;
    }

    .product-card .like-btn,
    .product-card .wishlist-btn {
        padding: 5px;
        border-radius: 4px;
    }
    
    .product-card .like-btn {
        font-size: 9px;
    }
    
    .like-icon {
        font-size: 11px;
    }
    
    .like-text {
        font-size: 9px;
    }
    
    .gift-icon {
        font-size: 13px;
    }

    .share-btn {
        width: 26px;
        height: 26px;
        top: 4px;
        right: 4px;
    }
    
    .share-btn svg {
        width: 13px;
        height: 13px;
    }

    .mobile-popup {
        width: 96vw;
        padding: 18px;
    }

    .welcome-text {
        font-size: 11px;
        max-width: 100px;
    }

    .header-content {
        padding: 0 8px;
    }

    .logo {
        font-size: 18px;
    }
    
    .page-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
}

/* Loading states */
.product-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.wishlist-btn.loading,
.like-btn.loading {
    position: relative;
    color: transparent !important;
}

.wishlist-btn.loading::after,
.like-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .product-card,
    .like-btn,
    .wishlist-btn,
    .toast,
    .share-btn,
    .wishlist-feedback {
        transition: none;
        animation: none !important;
    }
    
    .gift-icon,
    .like-icon {
        animation: none !important;
    }
}

.product-card:focus-within {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.like-btn:focus,
.wishlist-btn:focus,
.share-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}