/* Products Component */

/* Product Filters */
.product-filters {
    background: var(--white);
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 80px;
    z-index: var(--z-sticky);
}

.filter-wrapper {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-full);
    background: var(--white);
    color: var(--text-color);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.filter-btn:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Featured Banner Section */
.featured-banner-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: var(--spacing-2xl) 0;
}

.featured-banner {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-banner h2 {
    color: var(--white);
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-md);
}

.featured-banner p {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-2xl);
    opacity: 0.9;
}

.featured-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.featured-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-normal);
}

.featured-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.2);
}

.featured-badge {
    position: absolute;
    top: -10px;
    right: var(--spacing-md);
    background: var(--primary-dark);
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.featured-item h3 {
    color: var(--white);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-lg);
}

.featured-item .brand {
    font-size: var(--font-size-sm);
    opacity: 0.8;
    margin-bottom: 2px;
}

.featured-item .merchant {
    display: block;
    font-size: var(--font-size-xs);
    opacity: 0.7;
    margin-bottom: var(--spacing-xs);
}

.featured-item p {
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
    font-size: var(--font-size-sm);
}

.featured-item .price {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--white);
    display: block;
    margin-bottom: var(--spacing-md);
}

.featured-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: var(--spacing-md);
}

.featured-item .price-original {
    font-size: var(--font-size-sm);
    opacity: 0.7;
    text-decoration: line-through;
}

.featured-item .price.on-sale {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: #ffcdd2;
}

.featured-item .btn {
    background: var(--white);
    color: var(--primary-color);
    border: none;
}

.featured-item .btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

/* Products Section */
.products-section {
    padding: var(--spacing-3xl) 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.products-count {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-xl);
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card.hidden {
    display: none;
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--accent-color);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

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

.product-badge {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    background: var(--primary-color);
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
}

.product-badge.bestseller {
    background: var(--secondary-color);
}

.product-badge.new {
    background: var(--primary-dark);
}

.product-badge.sale {
    background: #d32f2f;
    left: auto;
    right: var(--spacing-sm);
}

.product-content {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-brand {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.product-merchant {
    display: block;
    color: var(--text-muted);
    font-size: var(--font-size-xs);
    margin-bottom: var(--spacing-xs);
}

.product-name {
    color: var(--text-color);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-sm);
    line-height: var(--line-height-tight);
}

.product-description {
    color: var(--text-light);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.product-tags {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}

.product-tag {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--accent-color);
    color: var(--text-color);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.product-price {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
}

.product-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.product-price-original {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    text-decoration: line-through;
}

.product-price.on-sale {
    color: #d32f2f;
}

.product-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--border-radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.product-link:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* No Products Message */
.no-products {
    text-align: center;
    padding: var(--spacing-3xl);
    color: var(--text-muted);
}

.no-products p {
    font-size: var(--font-size-lg);
}

/* Disclosure Banner */
.disclosure-banner {
    background: var(--accent-color);
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.disclosure-banner p {
    font-size: var(--font-size-sm);
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
}

.disclosure-banner a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Category Cards (Homepage) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-xl);
    background: var(--white);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all var(--transition-normal);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.category-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-color);
    border-radius: 50%;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.category-card h3 {
    color: var(--text-color);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-xs);
}

.category-card p {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    text-align: center;
}

/* Trust Section */
.trust-section {
    background: var(--accent-color);
    padding: var(--spacing-3xl) 0;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
}

.trust-item {
    text-align: center;
    padding: var(--spacing-lg);
}

.trust-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: 50%;
    margin: 0 auto var(--spacing-md);
    color: var(--primary-color);
}

.trust-item h3 {
    color: var(--text-color);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-sm);
}

.trust-item p {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-filters {
        padding: var(--spacing-md) 0;
        position: static;
    }

    .filter-wrapper {
        gap: var(--spacing-sm);
    }

    .filter-btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: var(--font-size-xs);
    }

    .featured-items {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .featured-banner h2 {
        font-size: var(--font-size-2xl);
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: var(--spacing-lg);
    }

    .products-header {
        flex-direction: column;
        text-align: center;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .category-card {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    .featured-banner-section {
        padding: var(--spacing-xl) 0;
    }

    .featured-item {
        padding: var(--spacing-md);
    }

    .product-card {
        margin: 0 auto;
        max-width: 340px;
    }

    .product-image {
        height: 180px;
    }

    .product-content {
        padding: var(--spacing-md);
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .product-filters,
    .disclosure-banner {
        display: none;
    }

    .featured-banner-section {
        background: none;
        color: var(--text-color);
    }

    .featured-banner h2 {
        color: var(--primary-color);
    }

    .featured-item {
        background: var(--white);
        border: 1px solid var(--border-color);
        color: var(--text-color);
    }

    .featured-item h3 {
        color: var(--primary-color);
    }

    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }

    .product-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .filter-btn {
        border-width: 3px;
    }

    .filter-btn.active {
        border-color: var(--primary-color);
        background: var(--primary-color);
    }

    .featured-item {
        border-color: var(--white);
        border-width: 2px;
    }

    .product-card {
        border-width: 2px;
    }

    .product-tag {
        border: 1px solid var(--text-color);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .featured-badge {
        animation: none;
    }

    .product-card:hover,
    .featured-item:hover,
    .category-card:hover {
        transform: none;
    }

    .product-card:hover .product-image img {
        transform: none;
    }

    .product-link:hover {
        transform: none;
    }
}
