:root {
    --primary-color: #ff6347; /* Tomato */
    --primary-hover: #ff4f2e;
    --secondary-color: #1d9bf0; /* Twitter Blue */
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --background-light: #f8fafc;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 12px 20px -5px rgb(0 0 0 / 0.1);
}

/* Product Grid Layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    padding: 1rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.product-details {
    padding: 1rem;
}

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

.store-name {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    text-decoration: none;
}

.store-name:hover {
    color: #4f46e5;
}

.verified-badge {
    width: 14px;
    height: 14px;
    margin-left: 4px;
    color: #4f46e5;
}

.price-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-price, .discounted-price {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.original-price {
    font-size: 0.85rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.discount-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Loading Animation */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    grid-column: 1 / -1;
}

.loading-dots {
    display: flex;
    gap: 0.5rem;
}

.loading-dots div {
    width: 0.75rem;
    height: 0.75rem;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: loading 1s infinite;
}

.loading-dots div:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots div:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loading {
    0%, 100% {
        transform: scale(0.5);
        opacity: 0.5;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Lazy Loading */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy.loaded {
    opacity: 1;
}

/* Tablet View */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile View */
@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0.75rem;
    }

    .product-details {
        padding: 0.75rem;
    }

    .product-title {
        font-size: 0.875rem;
    }

    .store-name {
        font-size: 0.75rem;
    }

    .product-price, .discounted-price {
        font-size: 0.875rem;
    }
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color);
}

.text-secondary {
    color: var(--secondary-color);
}

.text-muted {
    color: var(--text-muted);
}

.bg-primary {
    background-color: var(--primary-color);
}

.bg-light {
    background-color: var(--background-light);
}

.rounded {
    border-radius: 0.5rem;
}

.shadow {
    box-shadow: var(--shadow);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-outline {
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Verified Badge */
.verified-badge {
    display: inline-flex;
    align-items: center;
    color: var(--secondary-color);
}

.verified-badge svg {
    width: 1rem;
    height: 1rem;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 1280px) {
    .container {
        max-width: 1024px;
    }
}

@media (max-width: 1024px) {
    .container {
        max-width: 768px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Grid Container */
.grid {
    display: grid;
    gap: 1rem;
}

/* Loading Container */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    width: 100%;
}

.loading-dots {
    display: flex;
    gap: 0.5rem;
}

.loading-dots div {
    width: 0.75rem;
    height: 0.75rem;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: bounce 0.5s ease-in-out infinite;
}

.loading-dots div:nth-child(2) {
    animation-delay: 0.1s;
}

.loading-dots div:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-0.5rem); }
}

/* Responsive Grid */
@media (max-width: 640px) {
    .grid {
        gap: 0.75rem;
    }
} 