/* =====================================================================
   Product-card meta: bulk-pricing trigger + tooltip, min-order pill,
   first custom-option hint.

   Markup is injected by Magento_Catalog product/list/item.phtml, which
   renders EVERYWHERE a product card appears: category & search listings,
   the CMS home-page product sliders, and PDP related/upsell sliders.

   These styles used to live in plp.css scoped to ".page-products
   .products-grid" — so off the listing pages (home sliders, etc.) the
   markup rendered unstyled (giant raw <svg>, broken layout overlapping
   the price). This file is self-contained (defines its own variables,
   scoped to .rm-card-meta) and is loaded site-wide via default.xml so
   the cards look right in every slider/grid.
   ===================================================================== */

.rm-card-meta {
    --rm-primary: #0D9488;
    --rm-primary-dark: #0F766E;
    --rm-primary-light: #F0FDFA;
    --rm-ink: #0F172A;
    --rm-text: #1F2937;
    --rm-muted: #6B7280;
    --rm-border: #E7EAEE;

    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Compact meta row: min-order pill + bulk-pricing trigger */
.rm-card-meta .rm-meta-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}

/* Minimum order qty pill */
.rm-card-meta .rm-minqty {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .7rem; font-weight: 700; white-space: nowrap;
    color: #92400E; background: #FFFBEB; border: 1px solid #FDE68A;
    border-radius: 9999px; padding: 3px 9px;
}

/* Bulk-pricing trigger (opens tooltip) */
.rm-card-meta .rm-tier-wrap { position: relative; display: inline-flex; }
.rm-card-meta .rm-tier-trigger {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .7rem; font-weight: 700; cursor: pointer; white-space: nowrap;
    color: var(--rm-primary-dark);
    background: var(--rm-primary-light);
    border: 1px solid #BEE9E2;
    border-radius: 9999px; padding: 3px 10px;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.rm-card-meta .rm-tier-trigger svg { width: 13px; height: 13px; flex: 0 0 auto; }
.rm-card-meta .rm-tier-trigger:hover,
.rm-card-meta .rm-tier-wrap:hover .rm-tier-trigger {
    background: var(--rm-primary); border-color: var(--rm-primary); color: #fff;
}

/* Tooltip / popover with the tier table */
.rm-card-meta .rm-tier-pop {
    position: absolute;
    bottom: 100%;
    margin-bottom: 8px;
    left: 0;
    z-index: 30;
    min-width: 190px;
    background: #fff;
    border: 1px solid var(--rm-border);
    border-radius: 12px;
    box-shadow: 0 16px 36px -12px rgba(16,24,40,.28), 0 4px 10px rgba(16,24,40,.10);
    overflow: hidden;
}
/* invisible hover bridge so moving cursor onto the tooltip doesn't close it */
.rm-card-meta .rm-tier-pop::before {
    content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 10px;
}
.rm-card-meta .rm-tier-pop::after { /* little arrow */
    content: ""; position: absolute; top: 100%; left: 18px;
    border: 6px solid transparent; border-top-color: #fff;
}
.rm-card-meta .rm-tier-pop-head {
    font-size: .66rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
    color: var(--rm-primary-dark); background: var(--rm-primary-light);
    padding: 7px 12px;
}
.rm-card-meta .rm-tier-row {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 6px 12px;
    font-size: .8rem;
    border-top: 1px solid #EFF3F2;
}
.rm-card-meta .rm-tier-qty { color: var(--rm-muted); font-weight: 600; }
.rm-card-meta .rm-tier-price { color: var(--rm-ink); font-weight: 800; }
.rm-card-meta .rm-tier-row:last-child .rm-tier-price { color: var(--rm-primary); }

/* First custom option hint — one compact line */
.rm-card-meta .rm-firstopt {
    font-size: .74rem; color: var(--rm-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rm-card-meta .rm-firstopt-label { font-weight: 700; color: var(--rm-text); }
.rm-card-meta .rm-firstopt-values { color: var(--rm-muted); }
