:root {
    --ikea-blue: #0058a3;
    --ikea-yellow: #fbd914;
    --text-dark: #111111;
    --text-gray: #484848;
    --border-color: #dfdfdf;
    --bg-light: #f5f5f5;
    --badge-pink: #e00b55;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    background-color: #fff;
    line-height: 1.5;
}

/* Header */
.header {
    padding: 16px;
    border-bottom: 2px solid #009639; /* The green line from the image */
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
}

.close-btn, .menu-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-dark);
}

h1 {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    flex-grow: 1;
}

.url {
    display: none; /* Hide URL on mobile view for cleaner look, or keep it small */
    font-size: 10px;
    color: var(--text-gray);
    position: absolute;
    top: 36px;
    left: 50%;
    transform: translateX(-50%);
}

.header-count {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.search-container {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-logo {
    height: 32px;
    width: auto;
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    background-color: var(--bg-light);
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--ikea-blue);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 8px 16px;
}

.filters::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background-color: var(--bg-light);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-btn:hover {
    background-color: #e5e5e5;
}

.filter-btn.active {
    background-color: var(--text-dark);
    color: white;
}

.arrow {
    margin-left: 4px;
}

/* Product List */
.product-list {
    padding: 0 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.compare-checkbox {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-gray);
}

.compare-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1px solid var(--text-gray);
    border-radius: 4px;
}

.product-main {
    display: flex;
    gap:  12px;
}

.product-image-container {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    aspect-ratio: 1 / 1;
    background-color: white;
    overflow: hidden;
}

.badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--badge-pink);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    z-index: 1;
}

.main-img {
    width: 100%;
    max-width: 200px;
    max-height: 200px;
    aspect-ratio: 1;
    object-fit: cover;
    
}

.carousel-dots {
    display: flex;
    gap: 4px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #dfdfdf;
}

.dot.active {
    background-color: var(--text-dark);
    width: 16px;
    border-radius: 4px;
}

.product-details {
    flex: 1;
    justify-content: center;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
}

.product-desc {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    
    display: flex;
    align-items: flex-start;
}

.currency {
    font-size: 16px;
    margin-top: 4px;
    margin-left: 2px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
}

.stars {
    font-size: 14px;
    letter-spacing: -1px;
}

.review-count {
    font-size: 12px;
    color: var(--text-gray);
    text-decoration: underline;
}

.product-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.cart-btn {
    background-color: var(--ikea-blue);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cart-btn:hover {
    background-color: #004580;
}

.cart-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.wishlist-btn {
    background-color: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-dark);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.more-options {
    margin-top: 16px;
}

.more-options p {
    font-size: 12px;
    color: var(--text-gray);
    
}

.thumbnails {
    display: flex;
    gap: 8px;
}

.thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 1px solid transparent;
    cursor: pointer;
}

.thumb.active {
    border-bottom: 2px solid var(--text-dark);
}

@media (min-width: 768px) {
    .product-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 24px;
    }
    .product-card {
        border: 1px solid var(--border-color);
        padding: 12px;
        border-radius: 8px;
    }
    .product-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .product-image-container {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .product-details {
        width: 100%;
        align-items: center;
    }
    .product-desc {
        text-align: center;
    }
    .product-price {
        justify-content: center;
    }
    .product-actions {
        justify-content: center;
    }
    .compare-checkbox {
        justify-content: center;
    }
}
/* Add to the end of public/styles.css */
/* Lazy Loading Animation */
.lazy-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.lazy-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll to Top Button */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    font-size: 20px;
    border: none;
    outline: none;
    background-color: white;
    color: var(--text-dark);
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 48px;
    height: 48px;
    font-weight: bold;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    border: 1px solid var(--border-color);
}

#scrollTopBtn:hover {
    background-color: var(--bg-light);
}

/* Fallback background for missing images */
.product-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    background-color: white;
    aspect-ratio: 1 / 1;
    overflow: hidden; /* subtle placeholder color */
    border-radius: 8px;
    position: relative;
    min-height: 150px;
}

