/* Health Marketplace Page Styles */

.page-container-fluid {
    width: 100%;
    max-width: 100%;
    padding: 2rem 2rem;
    background: #ffffff;
    min-height: 100vh;
}

.feed-dashboard-header {
    margin-bottom: 2.5rem;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.header-content {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.25rem;
    letter-spacing: -0.03em;
}

.page-subtitle {
    color: #64748b;
    font-size: 0.95rem;
}

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

/* CATEGORY BAR - SCROLLABLE BUT RESTORED ORIGINAL DESIGN */
.filter-pills {
    display: block !important;
    white-space: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x !important;
    scrollbar-width: none !important;
    
    /* RESTORED DESIGN */
    background: #fff !important;
    padding: 5px !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
    border: none !important;
    margin-bottom: 0 !important;
}

.filter-pills::-webkit-scrollbar {
    display: none !important;
}

.pill {
    display: inline-block !important;
    background: transparent !important;
    border: none !important;
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    border-radius: 8px !important; /* Original slightly rounded corner */
    cursor: pointer !important;
    transition: all 0.2s !important;
    text-decoration: none !important;
    vertical-align: middle !important;
    margin-right: 4px !important;
}

.pill:hover {
    background: #f8fafc !important;
    color: #1e293b !important;
}

.pill.active {
    background: #111 !important;
    color: #fff !important;
    box-shadow: none !important;
}

.search-wrapper-inline {
    position: relative;
    width: 300px;
}

.search-wrapper-inline input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.search-wrapper-inline input:focus {
    border-color: #111;
}

.search-wrapper-inline i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.masonry-feed-container {
    column-count: 5;
    column-gap: 20px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s;
    break-inside: avoid;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: #ddd;
}

.product-image-area {
    height: 200px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.emoji-placeholder {
    font-size: 4rem;
}

.sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #fff1f2;
    color: #e11d48;
    font-weight: 800;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 6px;
}

.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.wishlist-btn:hover {
    color: #e11d48;
    transform: scale(1.1);
}

.wishlist-btn:active {
    transform: scale(0.92);
}

.wishlist-btn.active {
    color: #e11d48;
    background: #fff1f2;
}

.wishlist-btn.active i {
    color: #e11d48;
}

.card-body {
    padding: 1.25rem;
}

.vendor-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.product-name {
    font-size: 1rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.rating-row {
    font-size: 0.8rem;
    color: #111;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}

.reviews {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.7rem;
}

.price-action-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.price-block {
    display: flex;
    flex-direction: column;
}

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

.current-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: #111;
}

.add-btn {
    background: #0f172a;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.add-btn:hover {
    transform: scale(1.08);
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.add-btn:active {
    transform: scale(0.92);
}

.add-btn.added {
    background: #16a34a !important;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.add-btn i {
    pointer-events: none;
}

/* Desktop Fix (Enable wrapping on large screens) */
@media (min-width: 901px) {
    .filter-pills {
        display: flex !important;
        flex-wrap: wrap !important;
        white-space: normal !important;
        overflow-x: visible !important;
    }
}

/* Responsive */
@media (max-width: 1600px) {
    .masonry-feed-container {
        column-count: 4;
    }
}

@media (max-width: 1200px) {
    .masonry-feed-container {
        column-count: 3;
    }
}

@media (max-width: 900px) {
    .masonry-feed-container {
        column-count: 2;
    }

    .filter-pills-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .filter-pills {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 5px !important;
        border-radius: 12px !important;
        background: #fff !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
    }

    .search-wrapper-inline {
        width: 100% !important;
    }
}

@media (max-width: 600px) {
    .page-container-fluid {
        padding: 1rem;
    }

    .feed-dashboard-header {
        margin-bottom: 1.5rem;
    }

    .masonry-feed-container {
        column-count: 1;
        padding: 0 4px;
    }

    .product-card {
        border-radius: 16px;
    }
}

}