/* =========================================
   SHOP PAGE STYLES (shop.css)
   ========================================= */

body { background-color: #f8f9fa; }

/* --- PAGE HEADER --- */
.shop-header { padding: 50px 20px; text-align: center; background: #fff; border-bottom: 1px solid #eee; }
.shop-header h1 { font-size: 2.2rem; color: #2C3E50; margin-bottom: 10px; font-family: 'Playfair Display', serif; }
.shop-header p { color: #6c7a89; font-size: 15px; }

/* --- AMAZON/FLIPKART STYLE TOOLBAR --- */
.shop-toolbar { max-width: 1300px; margin: 25px auto; padding: 0 5%; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }

/* Category Pills */
.category-filters { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }
.filter-btn { background: #fff; border: 1px solid #ddd; padding: 8px 18px; border-radius: 30px; font-size: 14px; font-weight: 500; color: #555; cursor: pointer; transition: 0.3s; }
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: #2C3E50; color: #fff; border-color: #2C3E50; }

/* Search & Sort Controls */
.shop-controls { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
.search-box { position: relative; }
.search-box input { padding: 10px 15px 10px 40px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; width: 250px; font-family: 'Poppins', sans-serif; outline: none; transition: 0.3s; }
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(183,110,121,0.1); }
.search-box i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #999; }
.sort-box select { padding: 10px 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; cursor: pointer; font-family: 'Poppins', sans-serif; background: #fff; }

/* --- PREMIUM PRODUCT GRID --- */
.products-section { padding: 0 5% 60px; max-width: 1300px; margin: 0 auto; }
#advancedShopGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px; }

.shop-card { background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #eee; transition: 0.3s; position: relative; display: flex; flex-direction: column; cursor: pointer; text-decoration: none; }
.shop-card:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(0,0,0,0.06); border-color: #f0e4de; }

.card-img-wrap { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; position: relative; background: #fdfdfd; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.shop-card:hover .card-img-wrap img { transform: scale(1.05); }

.card-badge { position: absolute; top: 10px; left: 10px; background: #27ae60; color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; z-index: 2; }

.card-info { padding: 18px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.card-title { font-size: 15px; color: #2C3E50; margin-bottom: 8px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 42px; }
.card-price { font-size: 18px; color: var(--primary); font-weight: 700; margin-bottom: 15px; }

.btn-add-cart { width: 100%; background: #fff; color: #2C3E50; border: 1px solid #ddd; padding: 10px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center; gap: 8px; }
.shop-card:hover .btn-add-cart { background: #2C3E50; color: #fff; border-color: #2C3E50; }
.btn-add-cart:active { transform: scale(0.97); }

/* --- NO RESULTS MESSAGE --- */
.no-results { text-align: center; padding: 50px 20px; color: #777; font-size: 1.2rem; display: none; grid-column: 1 / -1; }

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 768px) {
    .shop-header { padding: 30px 15px; }
    .shop-header h1 { font-size: 1.8rem; }
    .products-section { padding: 0 10px 40px; }
    .shop-toolbar { padding: 0 10px; flex-direction: column; align-items: stretch; gap: 12px; margin: 15px auto 20px; }
    
    .category-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 5px; -ms-overflow-style: none; scrollbar-width: none; }
    .category-filters::-webkit-scrollbar { display: none; }
    .filter-btn { padding: 6px 14px; font-size: 13px; white-space: nowrap; border-radius: 20px; }
    
    .shop-controls { flex-direction: row; gap: 10px; width: 100%; }
    .search-box { flex: 2; }
    .search-box input { width: 100%; padding: 10px 15px 10px 35px; }
    .search-box i { left: 12px; font-size: 13px; }
    .sort-box { flex: 1; }
    .sort-box select { width: 100%; padding: 10px 5px; font-size: 13px; }

    #advancedShopGrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .shop-card { border-radius: 8px; }
    .card-badge { font-size: 9px; padding: 3px 6px; top: 8px; left: 8px; }
    .card-info { padding: 10px; }
    .card-title { font-size: 12px; line-height: 1.3; height: 32px; margin-bottom: 5px; }
    .card-price { font-size: 15px; margin-bottom: 10px; }
    .btn-add-cart { padding: 8px 5px; font-size: 12px; gap: 5px; border-radius: 6px; }
    .btn-add-cart i { font-size: 11px; }
}

@media (max-width: 360px) {
    .shop-controls { flex-direction: column; }
    .sort-box select { padding: 10px; }
}