/* ===========================
   FFL Retail Ops Analytics Grid
   =========================== */

.fflops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.fflops-product {
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.fflops-product:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
}

.fflops-product-image {
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
}

.fflops-product-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.fflops-product:hover .fflops-product-image img {
    transform: scale(1.05);
}

/* Info section grows to fill available space, pushing button to bottom */
.fflops-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 14px 14px 0;
}

.fflops-product-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.35;
    flex: 1;
}

.fflops-product-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fflops-product-title a:hover {
    color: #2563eb;
}

.fflops-product-price {
    display: block;
    padding: 0;
    margin-bottom: 4px;
    font-size: 17px;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.02em;
}

/* Add to Bag / View Product button pinned at bottom */
.fflops-product-action {
    padding: 10px 14px 14px;
    margin-top: auto;
}

.fflops-add-to-bag,
.fflops-view-product {
    display: block;
    width: 100%;
    text-align: center;
    padding: 11px 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.fflops-add-to-bag {
    background: #1a1a1a;
    color: #fff;
    border: none;
}

.fflops-add-to-bag:hover {
    background: #333;
    color: #fff;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fflops-view-product {
    background: #f5f5f5;
    color: #1a1a1a;
    border: 1px solid #ddd;
}

.fflops-view-product:hover {
    background: #eaeaea;
    color: #1a1a1a;
    transform: scale(1.02);
}

.fflops-empty {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* ===========================
   Badge Base
   =========================== */

.fflops-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    z-index: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

/* ===========================
   Badge Colors Per Group
   =========================== */

/* Best Seller — gold */
.fflops-badge-top_products {
    background: #d4a017;
}

/* Trending — blue */
.fflops-badge-trending {
    background: #2563eb;
}

/* On Sale — red */
.fflops-badge-on_sale {
    background: #dc2626;
}

/* Best Price — purple */
.fflops-badge-price_gaps {
    background: #7c3aed;
}

/* New Arrivals — teal */
.fflops-badge-new_arrivals {
    background: #0d9488;
}

/* Back in Stock — green */
.fflops-badge-back_in_stock {
    background: #16a34a;
}

/* Smart Buy — dark slate */
.fflops-badge-margin_opportunities {
    background: #475569;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 600px) {
    .fflops-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .fflops-product {
        border-radius: 8px;
    }

    .fflops-product-info {
        padding: 10px 10px 0;
    }

    .fflops-product-title {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .fflops-product-price {
        font-size: 15px;
    }

    .fflops-product-action {
        padding: 8px 10px 10px;
    }

    .fflops-badge {
        font-size: 10px;
        padding: 3px 8px;
        top: 6px;
        left: 6px;
    }

    .fflops-add-to-bag,
    .fflops-view-product {
        font-size: 11px;
        padding: 9px 0;
    }
}
