/* Gen Z Aesthetic - Fresh & Modern */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@400;500&display=swap');

:root {
    --primary: #EE4D2D;
    /* Shopee Orange */
    --secondary: #FF5722;
    /* Bright Orange */
    --accent: #FFE5DB;
    /* Light Orange */
    --success: #26AA99;
    /* Shopee Teal */
    --dark: #212121;
    --light: #F5F5F5;
    --card-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    --card-hover-shadow: 0 2px 8px rgba(238, 77, 45, 0.15);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: var(--dark);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

a {
    text-decoration: none;
}

/* Sticky Header - Shopee Style */
header {
    background: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand-logo {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

.brand-logo span {
    color: var(--dark);
}

/* Search Bar - Shopee Style */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: white;
    border: 2px solid var(--primary);
    border-radius: 2px;
    padding: 8px 120px 8px 15px;
    width: 100%;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(238, 77, 45, 0.1);
}

.search-icon {
    position: absolute;
    right: 10px;
    background: var(--primary);
    color: white;
    width: 100px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 2px;
    transition: background 0.2s;
}

.search-icon:hover {
    background: var(--secondary);
}

/* Product Grid - Shopee Style */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    padding: 10px;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
        padding: 15px;
    }
}

.product-card {
    background: white;
    border-radius: 2px;
    border: 1px solid #ececec;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--primary);
}

.product-image {
    position: relative;
    aspect-ratio: 4/5;
    background: #f1f3f5;
    overflow: hidden;
}

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

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

/* Shopee-Style Badges */
.badge-mall {
    position: absolute;
    top: 0;
    left: 0;
    background: #D0011B;
    color: white;
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    z-index: 5;
}

.badge-free-shipping {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--success);
    color: white;
    padding: 3px 8px;
    border-radius: 2px;
    font-size: 0.65rem;
    font-weight: 600;
    z-index: 5;
}

.badge-featured {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #FFD400 0%, #FF9500 100%);
    color: #804000;
    padding: 3px 8px;
    border-radius: 2px;
    font-size: 0.65rem;
    font-weight: 700;
    z-index: 5;
}

.badge-number {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 2px 6px rgba(238, 77, 45, 0.3);
    z-index: 10;
    border: 2px solid white;
    transition: transform 0.2s ease;
}

@media (min-width: 768px) {
    .badge-number {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

.product-card:hover .badge-number {
    transform: scale(1.1);
}

.product-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 6px;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 33px;
}

.product-price {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.store-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 2px;
    background: #f8f9fa;
    color: #999;
    display: inline-block;
    margin-bottom: 6px;
}

.short-note {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 15px;
    font-style: italic;
    flex-grow: 1;
}

.btn-buy {
    width: 100%;
    padding: 8px;
    border-radius: 2px;
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: auto;
}

.btn-buy:hover {
    background: var(--secondary);
    box-shadow: 0 2px 8px rgba(238, 77, 45, 0.3);
    color: white;
}

/* Category Filter (Horizontal Scroll) */
.category-filter {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.category-filter::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 2px;
    background: white;
    color: #666;
    border: 1px solid #d9d9d9;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.cat-pill.active,
.cat-pill:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    color: #adb5bd;
    font-size: 0.9rem;
}

footer a {
    color: #adb5bd;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--primary);
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Loader */
.loader-container {
    display: flex;
    justify-content: center;
    padding: 40px;
}