/* =====================================================
   PRODUCT PAGE — 2026 (loaded after theme-2026.css)
   Calm, modern buying panel: neutral tiles, ink for selection,
   green for savings, red only on the main Buy Now button.
   ===================================================== */

/* "100% HALAL" tag above the name: quiet outline pill */
.product-info .halal-badge,
.product-badges .halal-badge {
    display: inline-block; width: fit-content; align-self: flex-start; text-align: left; margin-bottom: 12px;
    background: transparent; color: var(--color-ink);
    border: 1.5px solid var(--color-ink); border-radius: 999px;
    font: 700 .7rem/1 var(--font-body); letter-spacing: .12em;
    padding: 6px 12px; box-shadow: none;
}

/* ---------- pack size selector ---------- */
.product-bundle-selector {
    background: #fff;
    border: 1px solid var(--color-gray-light);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: none;
}
.bundle-selector-header { margin-bottom: 14px; }
.bundle-selector-header h3 {
    font: 800 1.2rem/1 var(--font-heading); letter-spacing: .04em; text-transform: uppercase;
    color: var(--color-ink); margin: 0 0 4px;
}
.bundle-selector-subtitle { color: var(--color-gray-dark); font-size: .86rem; font-weight: 500; }
/* Two-line tiles in two columns:
     SIX                $43.50
     6 bags · $7.25/bag
   with "Save N%" as a small tag on the tile's top edge. */
.bundle-size-options {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px; row-gap: 16px;           /* row gap leaves room for the tags */
    padding-top: 6px;
}
.bundle-size-option {
    position: relative;
    display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 3px;
    min-width: 0; text-align: left;
    padding: 13px 12px 12px;
    container-type: inline-size;              /* lets the text adapt to the tile's own width */
    background: #fff; color: var(--color-ink);
    border: 1.5px solid var(--color-gray-light);
    border-radius: 14px;
    box-shadow: none;
    transition: border-color .15s ease, background-color .15s ease;
}
.bundle-size-option:hover { border-color: #b9b4ad; transform: none; background: #fff; }
.bundle-size-option.active {
    border-color: var(--color-ink);
    background: var(--color-cream);
    box-shadow: inset 0 0 0 1px var(--color-ink);
}
.bundle-size-option .option-top {
    display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.bundle-size-option .option-label,
.bundle-size-option.active .option-label {
    font: 800 1.15rem/1 var(--font-heading); text-transform: uppercase; letter-spacing: .03em;
    color: var(--color-ink); white-space: nowrap;
}
.bundle-size-option .option-price,
.bundle-size-option.active .option-price {
    font: 800 1.3rem/1 var(--font-heading); color: var(--color-ink); margin: 0; white-space: nowrap;
}
.bundle-size-option .option-detail {
    font-size: .76rem; line-height: 1.3; color: var(--color-gray-dark);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bundle-size-option .option-savings {
    position: absolute; top: 0; right: 12px; transform: translateY(-50%);
    font: 700 .64rem/1 var(--font-body); letter-spacing: .04em; text-transform: uppercase;
    color: #fff; background: #13803b;
    padding: 4px 7px; border-radius: 999px; border: 0; white-space: nowrap;
}
@media (min-width: 1280px) {
    .bundle-size-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* narrow tiles (phones, tablet split view): slightly smaller type so the
   detail line always fits on one line */
@container (max-width: 150px) {
    .bundle-size-option .option-label { font-size: 1.02rem; }
    .bundle-size-option .option-price { font-size: 1.14rem; }
    .bundle-size-option .option-detail { font-size: .7rem; letter-spacing: -.005em; }
}
@media (max-width: 340px) {
    .bundle-size-options { grid-template-columns: 1fr; }
}

/* ---------- price block ---------- */
.product-pricing-full {
    background: transparent; border: 0; padding: 4px 0 0;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.product-pricing-full .price {
    font: 800 2.4rem/1 var(--font-heading); color: var(--color-ink);
}
.product-pricing-full .free-shipping-badge, .free-shipping-badge {
    background: #e7f6ec; color: #13803b;
    font: 700 .72rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
    padding: 7px 11px; border-radius: 999px; border: 0;
}
.shipping-info-subtle { color: var(--color-gray-dark); font-size: .85rem; }

/* ---------- one-time / subscribe ---------- */
.purchase-type { gap: 10px; }
.pt-option {
    background: #fff; border: 1.5px solid var(--color-gray-light); border-radius: 14px;
    box-shadow: none; color: var(--color-ink);
    transition: border-color .15s ease, background-color .15s ease;
}
.pt-option:hover { border-color: #b9b4ad; }
.pt-option.active {
    border-color: var(--color-ink); background: var(--color-cream);
    box-shadow: inset 0 0 0 1px var(--color-ink);
}
.pt-title { font-weight: 700; color: var(--color-ink); }
.pt-price, .pt-option.active .pt-price { font: 800 1.35rem/1.1 var(--font-heading); color: var(--color-ink); }
.pt-per { font: 600 .8rem var(--font-body); color: var(--color-gray-dark); }
.pt-sub { color: var(--color-gray-dark); }
.pt-badge {
    background: #13803b; color: #fff;
    font: 700 .66rem/1 var(--font-body); letter-spacing: .05em; text-transform: uppercase;
    border-radius: 999px; padding: 5px 9px;
}

/* ---------- gallery thumbnails ---------- */
.calorie-thumbnail { border: 1.5px solid var(--color-gray-light); border-radius: 12px; background: #fff; }
.calorie-thumbnail.active { border-color: var(--color-ink); box-shadow: inset 0 0 0 1px var(--color-ink); background: #fff; }
.calorie-thumb-label, .calorie-thumbnail.active .calorie-thumb-label { color: var(--color-ink); font-weight: 600; }

/* ---------- category chips ---------- */
.category-tag { background: var(--color-gray-lighter); color: var(--color-ink-soft); border: 0; border-radius: 999px; }

/* ---------- buttons: one strong red action ---------- */
.product-actions-full .add-to-cart { background: var(--color-ink); color: #fff; }
.product-actions-full .buy-now, .product-actions-full .btn-cta { background: var(--color-primary); color: #fff; }
.quantity-selector button, .quantity-selector .quantity-input { border-radius: 12px; border: 1.5px solid var(--color-gray-light); }

/* never let the name and price collide, whatever the label length */
.bundle-size-option .option-top { min-width: 0; }
.bundle-size-option .option-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bundle-size-option .option-price { flex: none; }

/* second row: bag count left, per-bag price right (under the price).
   Nothing is ever cut off: the bag count wraps inside its column if needed. */
.bundle-size-option .option-detail {
    display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
    white-space: normal; overflow: visible; text-overflow: clip;
}
.bundle-size-option .o-bags { min-width: 0; }
.bundle-size-option .o-per { flex: none; white-space: nowrap; }

/* small phones: when the selector is narrow, one tile per row (never squeezed) */
.product-bundle-selector { container-type: inline-size; }
@container (max-width: 320px) {
    .bundle-size-options { grid-template-columns: 1fr; row-gap: 14px; }
}

/* no sticky add-to-cart bar any more: no extra bottom padding needed */
@media (max-width: 767px) { .product-details { padding-bottom: 24px; } }

/* Related / bundle products: a card left alone on its row sits centered */
.related-grid, .bundle-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.related-grid > *, .bundle-grid > * { flex: 0 0 100%; min-width: 0; }
@media (min-width: 480px) { .related-grid > *, .bundle-grid > * { flex-basis: calc((100% - 16px) / 2); } }
@media (min-width: 768px) { .related-grid > *, .bundle-grid > * { flex-basis: calc((100% - 32px) / 3); } }
@media (min-width: 1024px) { .related-grid > * { flex-basis: calc((100% - 48px) / 4); } }
