* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Figtree', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #111;
    background-color: white;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

button, select, input {
    font-family: inherit;
    outline: none;
    border: none;
}

header {
    background-color: #fff;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -2px;
    color: #111;
}

.logo span {
    color: #FE283F;
}

.search-container {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.search-bar {
    display: flex;
    width: 100%;
    background-color: #f1f3f5;
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-bar input {
    flex: 1;
    padding: 0.6rem 1rem;
    border-radius: 9999px 0 0 9999px;
    background: transparent;
    font-size: 0.95rem;
}

.search-bar button {
    background-color: #FE283F;
    color: #fff;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-bar button:hover {
    background-color: #ff5061;
}

.filter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem auto 0;
    padding: 0 0;
    max-width: 1200px;
}

.filter-group {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-group:hover {
    border-color: #FE283F;
}

.filter-group select {
    appearance: none;
    background: transparent;
    padding-right: 1rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.filter-group i {
    position: absolute;
    right: 0.6rem;
    pointer-events: none;
    color: #555;
}

main {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.product-item {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0px 0px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.product-image {
    width: 250px;
    height: 250px;
    position: relative;
    overflow: hidden;
    object-fit: cover;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.03);
}

.product-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-info p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.product-price {
    font-weight: 700;
    color: #111;
    margin-top: auto;
    padding-top: 0.5rem;
}


.product-colors {
    font-size: 0.8rem;
    color: #666;
    margin: 0.3rem 0;
    padding: 0.2rem 0.5rem;
    background-color: #f1f3f5;
    border-radius: 4px;
    display: inline-block;
}

button {
    border-radius: 8px;
    cursor: pointer;
}

.product-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Image container for positioning the icon */
.product-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image-container img {
    transform: scale(1.03);
}

/* Eye icon overlay */
.product-clicks-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.85);
    padding: 4px 8px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #555;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.product-clicks-overlay i {
    font-size: 0.85rem;
}

.product-brand {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0.3rem 0;
}

.product-category {
    font-size: 0.8rem;
    color: #aaa;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .search-container {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    /* Modified filter nav for single row */
    .filter-nav {
        padding: 0 0rem;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none; /* For Firefox */
        -ms-overflow-style: none; /* For IE and Edge */
        white-space: nowrap;
        gap: 0.5rem;
        margin-top: 1rem;
    }

    .filter-nav::-webkit-scrollbar {
        display: none; /* For Chrome, Safari, and Opera */
    }

    .filter-group {
        flex-shrink: 0;
    }

    /* Adjusted products grid for 2 columns */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-top: 1rem;
    }

    /* 1:1 square product images */
    .product-image,
    .product-image-container {
        width: 100%;
        height: 0;
        padding-bottom: 100%; /* Creates square aspect ratio */
        position: relative;
    }

    .product-image img,
    .product-image-container img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Adjust product info padding */
    .product-info {
        padding: 0.75rem;
    }

    .product-title {
        font-size: 0.95rem;
    }
}

footer {
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #555;
    margin-top: 2rem;
}

footer p {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.4;
}

footer a {
    color: #FE283F;
    font-weight: 500;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #ff5061;
}
