/* Shopiyen - TrustPilot Style CSS */

/* Brand colors */
:root {
    --brand: #0691FF;
    --brand-dark: #0581E6;
    --star: #FDC22D;
}

/* Line clamp utility for text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

/* TrustPilot-style rating stars */
.text-star {
    color: #f59e0b; /* yellow-500 */
}

/* Rating Stars helper (used with inline svg mix) */
.rating-stars { color: var(--star); }
.rating-stars .text-gray-300 { color: #D1D5DB !important; }

/* Smooth transitions for interactive elements */
.transition-all {
    transition: all 0.2s ease-in-out;
}

/* Custom hover effects for business cards */
.business-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* External button (blue brand) */
.btn-external {
    display: block;
    width: 100%;
    background-color: var(--brand);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 500;
    transition: background-color 0.2s ease;
}
.btn-external:hover { background-color: var(--brand-dark); }

/* Responsive Design for Sidebar Layout */
@media (max-width: 1024px) {
    .lg\:grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
    
    .lg\:col-span-3,
    .lg\:col-span-1 {
        grid-column: span 1 !important;
    }
    
    /* Stack sidebar below main content on mobile */
    .lg\:col-span-1 {
        order: 2;
    }
}

/* Sidebar Sticky Positioning */
.sticky {
    position: sticky;
    top: 1.5rem;
}

/* Sidebar container with proper stacking */
.sidebar-container {
    position: sticky;
    top: 1.5rem;
    height: fit-content;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
}

/* Individual sidebar items spacing */
.sidebar-item {
    margin-bottom: 1.5rem;
}

.sidebar-item:last-child {
    margin-bottom: 0;
}

/* Mobile responsive sticky */
@media (max-width: 1024px) {
    .sidebar-container {
        position: static;
        top: auto;
        max-height: none;
        overflow-y: visible;
    }
}

/* Enhanced Pagination Visibility */
.pagination-container {
    background-color: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
}

/* Category Links in Sidebar */
.category-link {
    display: block;
    color: #2563eb;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.category-link:hover {
    color: #1d4ed8;
    background-color: #dbeafe;
}

/* Popular Search Tags */
.popular-search-tag {
    color: #2563eb;
    font-size: 0.875rem;
    background-color: #dbeafe;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.popular-search-tag:hover {
    color: #1d4ed8;
    background-color: #bfdbfe;
}

/* Search input focus styling */
.search-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

/* Filter pill hover effects */
.filter-pill:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

/* Custom button styling */
.btn-primary {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s ease-in-out;
}

.btn-primary:hover {
    background-color: #2563eb;
}

/* Trust score styling */
.trust-score {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    font-weight: bold;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    text-align: center;
}

/* Category badge styling */
.category-badge {
    background-color: #eff6ff;
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

/* Verified badge styling */
.verified-badge {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Enhanced pagination styling */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    text-decoration: none;
    color: #374151;
    font-size: 0.875rem;
}

.pagination a:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.pagination .current {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Responsive design improvements */
@media (max-width: 768px) {
    .business-card {
        margin: 0.5rem 0;
    }
    
    .filter-pills {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .sort-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Product card hover transitions */
.product-card { transition: all 0.3s ease; }
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Loading animation */
.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Focus styles for accessibility */
.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
