/* Component-specific styles */

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-discount {
    background-color: #ef4444;
    color: white;
}

.badge-platform {
    color: white;
    font-weight: 600;
}

.badge-niche {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
}

/* Price display */
.price-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.price-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
}

.price-original {
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: line-through;
}

.price-savings {
    font-size: 0.875rem;
    color: #059669;
    font-weight: 500;
}

/* Rating display */
.rating-container {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.rating-stars {
    color: #fbbf24;
}

.rating-text {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Button styles */
.btn-primary {
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

/* Filter section */
.filters-container {
    background: white;
    padding: 2rem 0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.filter-input,
.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-input:focus,
.filter-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Section headers */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.section-icon {
    width: 2rem;
    height: 2rem;
    margin-right: 0.75rem;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
}

/* Grid layouts */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Product card */
.product-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
}

.product-content {
    padding: 1rem;
}

.product-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3rem;
}

.product-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.5rem;
}

/* Platform specific colors */
.platform-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.platform-shopee {
    background-color: #ee4d2d;
}

.platform-aliexpress {
    background-color: #ff6a00;
}

.platform-amazon {
    background-color: #ff9900;
    color: #000;
}

.platform-magazine-luiza {
    background-color: #0066cc;
}

.platform-temu {
    background-color: #00c851;
}

/* Discount badge */
.discount-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Niche badges */
.niche-badges {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.niche-badge {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

/* Rating stars */
.rating-stars {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.star-filled {
    color: #fbbf24;
}

.star-empty {
    color: #d1d5db;
}

/* Loading states */
.loading-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.loading-image {
    width: 100%;
    height: 12rem;
    background-color: #f3f4f6;
}

.loading-content {
    padding: 1rem;
}

.loading-title {
    height: 1.5rem;
    background-color: #f3f4f6;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.loading-description {
    height: 1rem;
    background-color: #f3f4f6;
    border-radius: 0.25rem;
    margin-bottom: 0.75rem;
}

.loading-price {
    height: 1.25rem;
    width: 50%;
    background-color: #f3f4f6;
    border-radius: 0.25rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #d1d5db;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.empty-state-description {
    font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 1rem;
    }
    
    .filters-container {
        padding: 1rem 0;
    }
    
    .filter-input,
    .filter-select {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .product-title {
        font-size: 0.875rem;
    }
    
    .product-description {
        font-size: 0.75rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
    
    .filter-input,
    .filter-select {
        border: 2px solid #000;
    }
}

