/* Trendy E-Commerce Product Cards */

.modern-products-section {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 60px 0;
}

/* Section Header */
.section-header {
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.title-underline {
    width: 80px;
    height: 3px;
    background: #000;
    margin: 0 auto;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-form {
    width: 100%;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 14px 50px 14px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #6c757d;
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-clear:hover {
    background: #ff4757;
    color: white;
}

.search-clear i {
    font-size: 0.9rem;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    z-index: 1000;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    transition: background 0.2s ease;
    cursor: pointer;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.search-result-price {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #000;
}

.no-results {
    padding: 30px 20px;
    text-align: center;
    color: #6c757d;
    font-size: 1rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

/* Trendy Product Card */
.trendy-product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.trendy-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.product-card-link {
    display: block;
    text-decoration: none;
}

/* Product Image */
.trendy-product-image {
    position: relative;
    width: 100%;
    height: 350px;
    background: #f8f9fa;
    overflow: hidden;
}

.trendy-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.trendy-product-card:hover .trendy-product-image img {
    transform: scale(1.08);
}

/* Wishlist Icon */
.wishlist-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wishlist-icon:hover {
    background: #ff4757;
    transform: scale(1.1);
}

.wishlist-icon i {
    font-size: 1.3rem;
    color: #333;
    transition: color 0.3s ease;
}

.wishlist-icon:hover i {
    color: white;
}

.wishlist-icon.active {
    background: #ff4757;
}

.wishlist-icon.active i {
    color: white;
}

/* Stock Badge */
.stock-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
    letter-spacing: 0.5px;
}

.stock-badge.in-stock {
    background: #10b981;
    color: white;
}

.stock-badge.out-stock {
    background: #ef4444;
    color: white;
}

/* Product Info */
.trendy-product-info {
    padding: 20px;
}

.trendy-product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.4;
    min-height: 50px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trendy-product-card:hover .trendy-product-name {
    color: #3b82f6;
}

/* Product Rating */
.trendy-product-rating {
    display: flex;
    gap: 2px;
    margin-bottom: 12px;
}

.trendy-product-rating i {
    color: #fbbf24;
    font-size: 0.9rem;
}

/* Product Price */
.trendy-product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* Product Stock */
.trendy-product-stock {
    margin-top: 5px;
}

.stock-text {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

/* Category Section */
.category-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.category-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title i {
    color: #3b82f6;
}

.view-all-btn {
    padding: 10px 24px;
    background: #000;
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-all-btn:hover {
    background: #3b82f6;
    transform: translateX(5px);
    color: white;
}

.view-all-btn i {
    transition: transform 0.3s ease;
}

.view-all-btn:hover i {
    transform: translateX(3px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: 5rem;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.8rem;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 30px;
}

.btn-back-home {
    padding: 12px 30px;
    background: #000;
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-back-home:hover {
    background: #3b82f6;
    transform: translateY(-2px);
    color: white;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .modern-products-section {
        padding: 1rem 0;
    }
    
    .section-header {
        margin-bottom: 1.25rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 0.9375rem;
    }

    .trendy-product-image {
        height: 180px;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .view-all-btn {
        width: 100%;
        justify-content: center;
    }

    .trendy-product-info {
        padding: 10px 8px;
    }

    .trendy-product-name {
        font-size: 0.875rem;
        min-height: 34px;
    }

    .trendy-product-price {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    /* Section spacing */
    .modern-products-section {
        padding: 1rem 0;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Header - compact */
    .section-header {
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .section-subtitle {
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
    }
    
    /* Search Bar - Mobile */
    .search-container {
        margin-bottom: 1rem;
    }
    
    .search-input {
        padding: 10px 40px 10px 40px;
        font-size: 16px;           /* Must be 16px to prevent zoom on iOS */
        border-radius: 20px;
    }
    
    .search-icon {
        left: 12px;
        font-size: 1rem;
    }
    
    .search-clear {
        width: 24px;
        height: 24px;
        right: 10px;
    }
    
    .search-clear i {
        font-size: 0.75rem;
    }
    
    /* Search Results - Mobile */
    .search-results {
        max-height: 250px;
        border-radius: 0 0 12px 12px;
    }
    
    .search-result-item {
        padding: 10px 12px;
    }
    
    .search-result-image {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    
    .search-result-name {
        font-size: 0.8125rem;
    }
    
    .search-result-price {
        font-size: 0.75rem;
    }
    
    /* Grid - better spacing, 2 columns */
    .products-grid {
        gap: 12px;
        margin-bottom: 1.5rem;
    }
    
    /* Product card - compact */
    .trendy-product-card {
        border-radius: 8px;
    }
    
    /* Image - much smaller */
    .trendy-product-image {
        height: 120px;
    }
    
    /* Info section - minimal padding */
    .trendy-product-info {
        padding: 10px 8px;
    }

    .trendy-product-name {
        font-size: 0.75rem;
        min-height: 28px;
        margin-bottom: 5px;
        line-height: 1.2;
    }
    
    /* Rating - smaller */
    .trendy-product-rating {
        margin-bottom: 5px;
    }
    
    .trendy-product-rating i {
        font-size: 0.65rem;
    }

    .trendy-product-price {
        font-size: 0.9375rem;
    }
    
    .stock-text {
        font-size: 0.6875rem;
    }

    .wishlist-icon {
        width: 26px;
        height: 26px;
        top: 6px;
        right: 6px;
    }

    .wishlist-icon i {
        font-size: 0.875rem;
    }

    .stock-badge {
        font-size: 0.5625rem;
        padding: 3px 6px;
        top: 6px;
        left: 6px;
        border-radius: 6px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trendy-product-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.trendy-product-card:nth-child(1) { animation-delay: 0.1s; }
.trendy-product-card:nth-child(2) { animation-delay: 0.15s; }
.trendy-product-card:nth-child(3) { animation-delay: 0.2s; }
.trendy-product-card:nth-child(4) { animation-delay: 0.25s; }
.trendy-product-card:nth-child(5) { animation-delay: 0.3s; }
.trendy-product-card:nth-child(6) { animation-delay: 0.35s; }

/* Wishlist Notification */
.wishlist-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wishlist-notification.show {
    transform: translateX(0);
}

.wishlist-notification.success {
    background: #10b981;
}

.wishlist-notification.error {
    background: #ef4444;
}
