* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: #f0f4f8;
    color: #2c3e50;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

main {
    padding: 2rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e3e8ed;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(26,115,232,0.15);
    border-color: #1a73e8;
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a73e8;
}

.product-description {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.original-price {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.9rem;
}

.offer-price {
    color: #1a73e8;
    font-weight: 600;
    font-size: 1.2rem;
}

.buy-button {
    display: inline-block;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(26,115,232,0.2);
    margin-top: auto;
}

.buy-button:hover {
    background: linear-gradient(135deg, #0d47a1, #1a73e8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(26,115,232,0.3);
}

footer {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 2rem;
}

.error-message {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: #1a73e8;
    font-weight: 500;
    margin: 2rem auto;
    max-width: 600px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.search-container:focus-within {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

#searchInput {
    background: transparent;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    width: 300px;
    font-size: 0.95rem;
    outline: none;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#searchButton {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#searchButton:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.category-filter {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.category-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.category-btn.active {
    background: white;
    color: #1a73e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .product-info {
        padding: 1rem;
    }

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

    .product-description {
        font-size: 0.8rem;
    }

    .buy-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .search-container {
        width: 100%;
    }

    #searchInput {
        width: 100%;
    }

    .category-filter {
        gap: 0.5rem;
    }

    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

.footer-section {
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer-section ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.footer-section ul li {
    margin-bottom: 0.8rem !important;
    list-style: none !important;
}

.footer-section ul li a {
    color: white !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
    padding: 0.5rem 0 !important;
    position: relative !important;
}

.footer-section ul li a::before {
    content: '→' !important;
    margin-right: 0.5rem !important;
    opacity: 0 !important;
    transform: translateX(-10px) !important;
    transition: all 0.3s ease !important;
}

.footer-section ul li a:hover {
    color: #ffd700 !important;
    transform: translateX(5px) !important;
}

.footer-section ul li a:hover::before {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.social-links {
    list-style: none !important;
    display: flex !important;
    justify-content: center !important;
    gap: 1.5rem !important;
    margin-top: 1rem !important;
}

.social-links li {
    display: inline-block !important;
    margin: 0 !important;
    list-style: none !important;
}

.social-links li a {
    color: white !important;
    font-size: 1.5rem !important;
    text-decoration: none !important;
    display: inline-block !important;
    padding: 0.5rem !important;
    transition: none !important;
    transform: none !important;
    position: static !important;
}

.social-links li a::before {
    display: none !important;
}

.social-links li a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    transform: none !important;
}

.image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background-color: #f5f5f5;
    color: #666;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.sort-container {
    display: flex;
    align-items: center;
}

.sort-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
}

.sort-select:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sort-select option {
    background: #1a73e8;
    color: white;
}

@media (max-width: 768px) {
    .filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-container {
        width: 100%;
    }
    
    .sort-select {
        width: 100%;
    }
}