/* ══════════════════ SHARED COMPONENTS ══════════════════ */

/* ── Section Wrapper ── */
.product-section { padding: 24px 0; background: #fff; }
.section-light { background: #f1f8ee; }

/* ── Section Title ── */
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.section-title h2 { font-size: 20px; font-weight: 700; color: var(--dark); margin: 0; position: relative; }
.section-title h2::after { content: ''; position: absolute; bottom: -12px; left: 0; width: 40px; height: 3px; background: var(--primary); border-radius: 2px; }
.view-all { font-size: 13px; font-weight: 600; color: var(--primary); display: flex; align-items: center; gap: 4px; }
.view-all:hover { gap: 7px; }

/* ── Category Tabs ── */
.section-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.tab-btn { padding: 9px 20px; border: 1px solid #333; border-radius: 6px; font-size: 13px; font-weight: 700; cursor: pointer; background: #fff; color: #333; transition: all 0.2s; font-family: inherit; }
.tab-btn:hover { background: #f8f8f8; border-color: #111; }
.tab-btn.active { background: #1a1e24; color: #fff; border-color: #1a1e24; }

/* ── Product Grid ── */
.product-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── Product Card ── */
.product-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.product-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    border-color: rgba(61, 145, 48, 0.2);
}
.product-img-wrap {
    position: relative;
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    padding: 0;
    overflow: hidden;
}
.product-img-wrap img {
    height: 100%;
    width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }

.wishlist-btn {
    position: absolute; top: 15px; right: 15px; width: 32px; height: 32px;
    background: #fff; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; color: #888; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10; transition: all 0.2s;
}
.wishlist-btn:hover { color: #ff4757; }

.servings-badge {
    position: absolute; top: 15px; right: 55px; background: #fff; border-radius: 50%;
    width: 45px; height: 45px; display: flex; flex-direction: column; align-items: center;
    justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.1); z-index: 10; border: 1px solid #eee;
}
.servings-badge .count { font-size: 16px; font-weight: 800; line-height: 1; color: #333; }
.servings-badge .label { font-size: 8px; font-weight: 700; text-transform: uppercase; color: #888; }

.card-badge {
    position: absolute; top: 15px; left: 15px; background: var(--primary); color: #fff;
    font-size: 10px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase;
    padding: 4px 10px; border-radius: 4px; z-index: 5;
}

.card-badge.recommended-badge {
    left: auto; right: 15px; background: #ff8c00;
}

.product-info { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }
.rating-pill { background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; display: flex; align-items: center; gap: 4px; }
.veg-icon { width: 16px; height: 16px; border: 1px solid var(--primary); padding: 2px; display: flex; align-items: center; justify-content: center; }
.veg-icon::after { content: ''; width: 8px; height: 8px; background: var(--primary); border-radius: 50%; }
.product-name { font-size: 14px; font-weight: 700; color: #333; line-height: 1.4; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 40px; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.current-price { font-size: 18px; font-weight: 800; color: #111; }
.old-price { font-size: 14px; color: #999; text-decoration: line-through; }
.discount-tag { font-size: 12px; font-weight: 700; color: #ff4757; margin-top: 2px; }
.discount-details { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #2ecc71; font-weight: 600; margin-top: -4px; }
.discount-amt { color: #2ecc71; }
.card-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.btn-add-cart { width: 100%; background: #fff; color: var(--primary); border: 1px solid var(--primary); padding: 10px; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; }
.btn-add-cart:hover { background: #f0f7ef; }
.btn-buy-now { width: 100%; background: var(--primary); color: #fff; border: none; padding: 12px; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; text-align: center; transition: all 0.2s; }
.btn-buy-now:hover { background: var(--primary-dark); }

/* ── Banner Section ── */
.banner-section { padding: 16px 0; }
.banner-section img { width: 100%; border-radius: 8px; aspect-ratio: 1252 / 310; object-fit: cover; display: block; }

/* ── Responsive ── */
@media (max-width: 1100px) {
    .product-row { grid-template-columns: repeat(3, 1fr); gap: 15px; }
}

@media (max-width: 768px) {
    .product-row { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .product-img-wrap { height: 200px; }
}

@media (max-width: 576px) {
    .product-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-img-wrap { height: 160px; }
    .product-info { padding: 12px 10px; gap: 4px; }
    .product-name { font-size: 13px; height: 36px; }
    .current-price { font-size: 15px; }
    .old-price { font-size: 12px; }
    .card-actions { gap: 6px; margin-top: 8px; }
    .btn-add-cart, .btn-buy-now { padding: 8px; font-size: 12px; }

    /* Horizontal scroll tabs */
    .section-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        gap: 8px;
    }
    .section-tabs::-webkit-scrollbar { display: none; }
    .tab-btn {
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 12px;
        white-space: nowrap;
    }
}
