/* ====================== RESET & BASE ====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    padding-bottom: 80px;
    min-height: 100vh;
}


/* ====================== SEARCH BAR ====================== */
.search-bar {
    margin: 60px 20px 20px;
    background: #f0f0f0;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-bar input {
    border: none;
    background: none;
    font-size: 16px;
    width: 100%;
    outline: none;
}

.search-bar i {
    font-size: 20px;
    color: #666;
}

/* ====================== BANNER ====================== */
.banner {
    margin: 20px 20px 10px;
    background: #000;
    color: white;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
}

/* ====================== CATEGORIES ====================== */
.categories {
    display: flex;
    overflow-x: auto;
    padding: 20px;
    gap: 20px;
    scrollbar-width: none;
    margin-bottom: 10px;
}

.categories::-webkit-scrollbar { display: none; }

.category-item {
    text-align: center;
    min-width: 70px;
}

.cat-icon {
    width: 60px;
    height: 60px;
    background: #eee;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 8px;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-item p {
    font-size: 13px;
    color: #555;
}

.see-more {
    color: #ffb84d;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 10px;
    align-self: center;
}

/* ====================== SECTION TITLE ====================== */
.section-title {
    padding: 0 20px;
    margin: 20px 0 15px;
}

.section-title h3 {
    font-size: 20px;
    font-weight: 700;
}

/* ====================== PRODUCTS GRID ====================== */
/* ⭐ PRODUCT GRID - Perfect Mobile Layout */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px;
}

/* ⭐ PRODUCT CARD */
.product-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
}

/* ⭐ IMAGE WRAPPER */
.product-card .image-wrapper {
    position: relative;
    width: 100%;
    height: 160px;   /* ← FIXED perfect image height */
    border-radius: 12px;
    overflow: hidden;
}

/* ⭐ PRODUCT IMAGE */
.product-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* ← Proper cropping */
    display: block;
}

/* ⭐ HEART ICON */
.product-card .heart-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    padding: 6px;
    border-radius: 50%;
    font-size: 16px;
    color: #444;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ⭐ TITLE */
.product-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 10px 10px 4px;
    color: #222;
}

/* ⭐ PRICE ROW */
.product-card .price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    margin-bottom: 10px;
}

/* ⭐ ORIGINAL PRICE */
.product-card .orig-price {
    text-decoration: line-through;
    color: #888;
    font-size: 13px;
}

/* ⭐ SELLING PRICE */
.product-card .sell-price {
    color: #e63946;
    font-weight: bold;
    font-size: 15px;
}

/* ====================== LOADING ====================== */
#loading {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 14px;
    display: none;
}

/* ====================== BOTTOM NAV ====================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    z-index: 1000;
}

.nav-item {
    text-align: center;
    color: #999;
    font-size: 12px;
}

.nav-item.active {
    color: #ffb84d;
}

.nav-item i {
    font-size: 24px;
    margin-bottom: 4px;
    display: block;
}
/* ====================== RESPONSIVE ====================== */
@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 40px;
    }
    
    .banner {
        max-width: 1200px;
        margin: 20px auto;
        border-radius: 20px;
    }
    
    .search-bar {
        max-width: 800px;
        margin: 60px auto 20px;
    }
}
/* Open Login Button */
.open-login-btn {
    background: purple;
    color: white;
    padding: 12px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 18px;
}

/* Popup Overlay (Hidden default) */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    justify-content: center;
    align-items: center;
}

/* Show popup when targeted */
.popup-overlay:target {
    display: flex;
}

/* Popup Box */
.popup-box {
    width: 330px;
    background: #f4f4f4;
    padding: 28px;
    border-radius: 12px;
}

/* Back button */
.back-btn {
    font-size: 18px;
    text-decoration: none;
    color: black;
    margin-bottom: 10px;
    display: inline-block;
}

/* Input Fields */
.input-box {
    width: 100%;
    padding: 10px;
    margin-bottom: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.forgot {
    font-size: 14px;
    float: right;
    color: purple;
    margin-bottom: 20px;
    text-decoration: none;
}

/* Buttons */
.login-btn {
    width: 100%;
    padding: 12px;
    background: purple;
    color: white;
    border: none;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 16px;
}

.signup-btn {
    width: 100%;
    padding: 12px;
    background: white;
    border: 2px solid purple;
    color: purple;
    border-radius: 6px;
    font-size: 16px;
    margin-top: 12px;
}
