/* ============================================================================
   YAI Cart page + cart-row + Phase 1.5 promo styling
   ============================================================================ */

.yai-cart-row {
    display: grid;
    grid-template-columns: 80px 1fr auto auto 32px;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--yai-border, #e5e7eb);
}

.yai-cart-row:last-child { border-bottom: 0; }

/* Promo-free rows — soft yellow background to draw the eye */
.yai-cart-row.is-promo-free {
    background: linear-gradient(90deg, #fff8e1 0%, #fffce8 100%);
}

.yai-cart-img {
    position: relative;
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.yai-cart-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.yai-cart-img i { font-size: 30px; }

/* "🎁" stamp on free-item image */
.yai-cart-gift-stamp {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #fff;
    border: 2px solid #f59e0b;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.yai-cart-info { min-width: 0; }

.yai-cart-qty {
    display: flex;
    align-items: center;
    gap: 4px;
}

.yai-cart-qty input {
    width: 56px;
    text-align: center;
    -moz-appearance: textfield;
}

.yai-cart-qty input::-webkit-outer-spin-button,
.yai-cart-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.yai-cart-price { text-align: right; }
.yai-cart-remove { display: flex; justify-content: center; }

/* Header badge */
.yai-cart-icon-wrap { position: relative; }
.yai-cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--yai-red, #dc2626);
    color: #fff;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* "Added to cart" toast (yai-cart.js) */
.yai-cart-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--yai-blue, #1e3a8a);
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    transition: transform .25s;
}

.yai-cart-toast.show { transform: translateX(0); }

/* PROMO toast — separate, bigger, celebratory */
.yai-promo-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #fff;
    color: #1f2937;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 30px rgba(245, 158, 11, .3);
    z-index: 1250;
    min-width: 320px;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}

.yai-promo-toast.show {
    transform: translateX(0);
}

@media (max-width: 576px) {
    .yai-cart-row {
        grid-template-columns: 60px 1fr auto;
        grid-template-rows: auto auto;
    }
    .yai-cart-img { width: 60px; height: 60px; }
    .yai-cart-qty { grid-column: 2 / 3; grid-row: 2; }
    .yai-cart-price { grid-column: 3 / 4; }
    .yai-cart-remove { grid-column: 3 / 4; grid-row: 2; }
}
