/* =====================================================
   MyFitCart — Product Card Theme
   Colors matched to header nav: dark green + light green (lime)
===================================================== */

:root {
    --mfc-dark-green: #0b6e4f;
    --mfc-dark-green-hover: #095a41;
    --mfc-light-green: #8bc63f;
    --mfc-light-green-hover: #79b331;
}

.shop-section .product-card {
    position: relative;
    background: #fff;
    border: 1px solid #e6f0e9;
    border-radius: 14px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.shop-section .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(11, 110, 79, .18);
    border-color: var(--mfc-light-green);
}

.shop-section .product-img {
    position: relative;
    background: #f3f9f4;
}
.shop-section .product-img img {
    transition: transform .35s ease;
}
.shop-section .product-card:hover .product-img img {
    transform: scale(1.04);
}



.shop-section .lab-report-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--mfc-dark-green);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
    text-decoration: none;
}
.shop-section .lab-report-badge svg { width: 12px; height: 12px; }

.shop-section .product-info {
    padding: 10px 12px 12px;
}
.shop-section .product-info h4 {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 2px;
    height: 36px;          /* fixed, not min-height */
    max-height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.shop-section .product-info h4 a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #1f2937;
    font-weight: 600;
}

.shop-section .price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 2px 0 4px;
}
.shop-section .price-row .price {
    color: var(--mfc-dark-green);
    font-weight: 700;
    font-size: 16px;
}
.shop-section .price-row del {
    color: #9ca3af;
    font-size: 13px;
}

.shop-section .rating-badge {
    background: var(--mfc-dark-green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.shop-section .rating-badge svg { width: 10px; height: 10px; fill: #fff; }
.shop-section .review {
    font-size: 11px;
    color: #6b7280;
    margin-left: 6px;
}

/* ── Action row: Add to Cart / Counter + Buy Now ── */
.home-card-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 10px;
}
.home-cart-row {
    flex: 1;
    min-width: 0;
}

.home-addcart {
    width: 100%;
    height: 38px;
    background: var(--mfc-dark-green);
    border: 1px solid var(--mfc-dark-green);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, transform .15s ease;
}
.home-addcart:hover { background: var(--mfc-dark-green-hover); border-color: var(--mfc-dark-green-hover); }
.home-addcart:active { transform: scale(0.97); }
.home-addcart:disabled { opacity: .7; cursor: progress; }
.home-addcart.out-of-stock-btn {
    background: #d1d5db;
    border-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
}

.home-buynow {
    flex: 1;
    height: 38px;
    background: var(--mfc-light-green);
    border: none;
    color: #fff !important;
    font-weight: 700;
    font-size: 13px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: background .2s ease, transform .15s ease;
}
.home-buynow:hover { background: var(--mfc-light-green-hover); }
.home-buynow:active { transform: scale(0.97); }
.home-buynow.out-of-stock-buynow {
    background: #d1d5db;
    color: #6b7280 !important;
    pointer-events: none;
}

/* ── Quantity counter — replaces Add to Cart once item is added ── */
.home-qty-counter {
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--mfc-dark-green);
    border: 1px solid var(--mfc-dark-green);
    border-radius: 8px;
    overflow: hidden;
}
.home-qty-counter .qc-btn {
    width: 32px;
    height: 100%;
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease;
}
.home-qty-counter .qc-btn:hover { background: rgba(255,255,255,.18); }
.home-qty-counter .qc-btn:active { background: rgba(255,255,255,.28); }
.home-qty-counter .qc-value {
    flex: 1;
    height: 100%;
    background: var(--mfc-dark-green);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Buy Now on the product detail page (view-product.php uses .btn-buy-now) ── */
.btn-buy-now {
    background: var(--mfc-light-green) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 700;
    border-radius: 8px !important;
    transition: background .2s ease, transform .15s ease;
}
.btn-buy-now:hover { background: var(--mfc-light-green-hover) !important; }
.btn-buy-now:active { transform: scale(0.97); }

/* Toast — centered both horizontally and vertically */
.home-cart-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.9);
    background: var(--mfc-dark-green);
    color: #fff;
    padding: 16px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    max-width: 80vw;
    z-index: 9999;
    box-shadow: 0 12px 32px rgba(0,0,0,.3);
    animation: mfcToastPop .18s ease-out forwards;
}
.home-cart-toast.is-success { background: var(--mfc-dark-green); }
.home-cart-toast.is-error { background: #dc2626; }

@keyframes mfcToastPop {
    from { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}