/* ==========================================================================
   Product card (markup: components/store/product-card.blade.php)
   Photo with % OFF ribbon and veg mark; delivery tag, the full name (at least 2 lines), pack;
   at the bottom the price and ADD side by side. Cards in a row line up because the
   bottom row is pushed to the end of each card.

   Colours: ink #1C1530 · muted #6A6080 · crossed MRP #9A90AE
            photo #FAF9FC with #F0ECF5 border · ribbon #5B21B6 · tag #F1ECFB / #5B21B6
            out of stock #3E3650
   ========================================================================== */

.product-card {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---------- Photo ---------- */

.product-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid #F0ECF5;
    border-radius: 14px;
    background: #FAF9FC;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card__photo-link {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card__img {
    width: 86%;
    height: 86%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.product-card__ribbon {
    position: absolute;
    top: 0;
    left: 8px;
    padding: 3px 6px 4px;
    border-radius: 0 0 6px 6px;
    background: #5B21B6;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
}

.product-card__sold-out {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    padding: 4px 10px;
    border-radius: 8px;
    background: #3E3650;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* ---------- Text ---------- */

.product-card__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Delivery types of a product that cannot go every way, e.g. "Pickup only" */
.product-card__mode-tag {
    align-self: flex-start;
    max-width: 100%;
    padding: 2px 6px;
    border-radius: 6px;
    background: #F1ECFB;
    color: #5B21B6;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.3;
}

/* The full name, never cut off; at least two lines high, and the price row is pushed to the bottom so cards in a row still line up */
.product-card__name {
    min-height: calc(13px * 1.3 * 2);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #1C1530;    overflow-wrap: break-word;
}

.product-card__name a {
    color: inherit;
}

.product-card__pack {
    min-height: 15px;
    margin: 0;
    font-size: 11px;
    line-height: 15px;
    color: #6A6080;
}

/* Loyalty points pill (look: components/points-pill.css) */
.product-card__points {
    align-self: flex-start;
    margin-top: 2px;
}

/* ---------- Bottom row: price · ADD ---------- */

.product-card__foot {
    margin-top: auto;
    padding-top: 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
}

.product-card__prices {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.product-card__price {
    font-size: 14px;
    font-weight: 800;
    color: #1C1530;
}

.product-card__mrp {
    font-size: 11px;
    color: #9A90AE;
}

/* Hide prices add-on: MRP with "Best price on request" under it (takes the full row) */
.product-card__prices--hidden {
    flex: 1 1 100%;
    align-items: flex-start;
    gap: 5px;
}

.product-card__foot .cart-control {
    margin-left: auto;
}

/* A little smaller than the default ADD and stepper (components/cart-control.css) */
.product-card .add-button {
    width: 60px;
    height: 32px;
    font-size: 13px;
    box-shadow: none;
}

.product-card .stepper {
    min-width: 80px;
    height: 32px;
}

.product-card .stepper__button {
    width: 24px;
    height: 32px;
}

.product-card .stepper__qty {
    font-size: 14px;
}

/* ---------- The same delivery tag on the product page ---------- */

.product-info__mode-tag {
    align-self: flex-start;
    margin: 0;
    padding: 4px 10px;
    border-radius: 10px;
    background: #F1ECFB;
    color: #5B21B6;
    font-size: 12px;
    font-weight: 800;
}
