/* =====================================================
   ORDER JERKY (2026): bright cream page, photo banner,
   savings-card size picker, light product cards.
   Loads after order-jerky.css and theme-2026.css.
   ===================================================== */

.shop-section {
    background: var(--color-cream);
    color: var(--color-ink);
    padding-top: calc(var(--shipping-banner-height, 40px) + var(--header-height, 72px) + 16px);
}
.products-video-bg, .products-overlay { display: none; }
body:has(.shop-section) main { padding-top: 0; }

/* ---------- banner: title + bright lineup photo ---------- */
.shop-banner {
    display: grid; gap: 4px; align-items: center;
    margin: 0 0 18px; padding: 18px 16px 0;
    background: #eceef1; border-radius: var(--radius-xl); overflow: hidden;
}
.shop-banner .shop-header { text-align: center; margin: 0; color: var(--color-ink); }
.shop-banner .shop-title { color: var(--color-ink); font-size: clamp(2rem, 8vw, 3.4rem); line-height: .95; margin: 0 0 8px; }
.shop-banner .shop-subtitle { color: var(--color-gray-dark); opacity: 1; font-size: .95rem; padding: 0; max-width: 46ch; }
.shop-banner-photo img { display: block; width: 100%; height: auto; }
@media (min-width: 700px) {
    .shop-banner { grid-template-columns: minmax(0, 1fr) min(48%, 560px); gap: 24px; padding: 24px 0 24px 32px; margin-bottom: 26px; }
    .shop-banner .shop-header { text-align: left; }
    .shop-banner .shop-subtitle { margin: 0; font-size: 1rem; }
}
@media (min-width: 1024px) {
    .shop-banner { padding: 28px 0 28px 40px; }
    .shop-banner .shop-subtitle { font-size: 1.05rem; }
}

/* ---------- size picker: savings cards ---------- */
.size-tabs {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; padding-top: 8px !important;
    max-width: none; margin: 0 0 18px; padding: 0;
    background: none; border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
}
@media (min-width: 640px)  { .size-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .size-tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 12px; } }

.size-tabs .size-tab {
    position: relative; min-width: 0; flex: none;
    display: grid; justify-items: start; align-content: start; gap: 3px;
    padding: 14px 14px 12px; text-align: left;
    background: #fff; color: var(--color-ink);
    border: 1.5px solid var(--color-gray-light); border-radius: 16px;
    box-shadow: var(--shadow-sm); transform: none;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.size-tabs .size-tab:hover { border-color: #b9b4ad; background: #fff; }
.size-tabs .size-tab.active {
    background: var(--color-ink); border-color: var(--color-ink); color: #fff;
    box-shadow: 0 10px 24px rgba(18, 18, 18, .18);
}
.size-name { font: 700 .68rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--color-gray-dark); }
.size-bags { font: 800 1.7rem/1 var(--font-heading); text-transform: uppercase; letter-spacing: .01em; margin-top: 4px; }
.size-per { font: 800 1.05rem/1.1 var(--font-body); }
.size-per small { font-size: .78rem; font-weight: 600; color: var(--color-gray-dark); }
.size-ship { font: 600 .76rem/1.2 var(--font-body); color: var(--color-gray-dark); margin-top: 2px; }
.size-ship.is-free { color: #13803b; font-weight: 700; }
.size-tab.active .size-name, .size-tab.active .size-per small, .size-tab.active .size-ship { color: rgba(255, 255, 255, .78); }
.size-tab.active .size-ship.is-free { color: #7be495; }
/* "Popular" / "Best price" pill sits on the card's top edge, clear of the text */
.size-flag {
    position: absolute; top: 0; right: 12px; transform: translateY(-50%);
    padding: 4px 8px; border-radius: 999px;
    background: var(--color-ink); color: #fff; border: 1.5px solid var(--color-cream);
    font: 700 .6rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.size-flag-best { background: #13803b; }
.size-tab.active .size-flag { background: #fff; color: var(--color-ink); }

/* Build Your Own: full-width card under the sizes */
.size-tabs .size-tab-byo {
    grid-column: 1 / -1;
    display: flex; flex-direction: row; align-items: center; justify-content: flex-start;
    gap: 14px; padding: 14px 16px; text-align: left;
}
.size-byo-icon {
    flex: none; width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; background: var(--color-ink); color: #fff;
    font: 600 1.6rem/1 var(--font-body);
}
.size-byo-text { display: grid; gap: 3px; flex: 1; min-width: 0; }
.size-byo-text strong { font: 800 1.3rem/1 var(--font-heading); text-transform: uppercase; letter-spacing: .02em; }
.size-byo-text span { font-size: .85rem; color: var(--color-gray-dark); }
.size-byo-arrow { font-size: 1.3rem; font-weight: 700; }
.size-tab-byo.active .size-byo-icon { background: #fff; color: var(--color-ink); }
.size-tab-byo.active .size-byo-text span { color: rgba(255, 255, 255, .78); }

/* old badge styles from order-jerky.css are not used by the new cards */
.size-tabs .tab-free-ship, .size-tabs .tab-popular { display: none; }

/* ---------- line under the picker ---------- */
.tab-intro { color: var(--color-ink); margin-bottom: 20px; }
.intro-primary { font-weight: 700; }
.intro-savings { color: #13803b; }

/* ---------- product cards ---------- */
.size-card {
    background: #fff; border: 1px solid var(--color-gray-light); border-radius: 18px;
    box-shadow: var(--shadow-sm);
}
.size-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-name, .card-name a { color: var(--color-ink); }
.card-name a:hover { color: var(--color-ink); text-decoration: underline; }
.card-contents { color: var(--color-gray-dark); }
.card-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.card-price { color: var(--color-ink); }

/* ---------- Build Your Own panel + flavor CTA on the light page ---------- */
.byo-panel { background: #fff; border: 1px solid var(--color-gray-light); box-shadow: var(--shadow-md); }
.recommend-cta-card { background: var(--color-ink); }
.recommend-cta-card .btn { background: #fff; color: var(--color-ink); }

@media (max-width: 374px) {
    .size-tabs .size-tab { padding: 12px 10px 10px; }
    .size-bags { font-size: 1.45rem; }
    .size-flag { right: 8px; font-size: .54rem; padding: 3px 6px; }
}

/* ---------- prices on the size cards: pack price, singles price struck, save tag ---------- */
.size-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; margin-top: 4px; }
.size-price strong { font: 800 1.25rem/1.1 var(--font-heading); letter-spacing: .01em; }
.size-price s { font: 600 .8rem/1 var(--font-body); color: var(--color-gray); }
.size-tabs .size-per { font-size: .9rem; font-weight: 700; }
.size-save {
    justify-self: start; margin-top: 3px; padding: 3px 7px; border-radius: 6px;
    background: #e7f5eb; color: #13803b; font: 800 .66rem/1.2 var(--font-body); letter-spacing: .04em; text-transform: uppercase;
}
.size-tab.active .size-price s { color: rgba(255, 255, 255, .6); }
.size-tab.active .size-save { background: rgba(123, 228, 149, .16); color: #7be495; }

/* Build Your Own card price tag */
.size-byo-price {
    flex: none; display: inline-flex; align-items: baseline; gap: 3px; flex-wrap: wrap; justify-content: flex-end;
    padding: 6px 10px; border-radius: 10px; background: #e7f5eb; color: #13803b; font: 600 .78rem/1.1 var(--font-body);
}
.size-byo-price strong { font: 800 1.1rem/1 var(--font-heading); }
.size-byo-price s { color: var(--color-gray); font-weight: 600; margin-left: 2px; }
.size-tab-byo.active .size-byo-price { background: rgba(123, 228, 149, .16); color: #7be495; }
.size-tab-byo.active .size-byo-price s { color: rgba(255, 255, 255, .6); }
@media (max-width: 479px) {
    .size-tabs .size-tab-byo { flex-wrap: wrap; row-gap: 10px; }
    .size-byo-text { flex: 1 1 calc(100% - 100px); }
    .size-byo-price { order: 3; margin-left: 54px; justify-content: flex-start; }
}

/* ---------- Build Your Own builder: pack buttons + live price box ---------- */
.byo-size-price s { font-size: .78rem; font-weight: 600; opacity: .6; margin-left: 4px; }
.byo-summary { align-items: center; }
.byo-summary-count { display: grid; gap: 4px; font-weight: 400; }
.byo-sum-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.byo-sum-price strong { font: 800 1.7rem/1 var(--font-heading); color: var(--color-ink); }
.byo-sum-price s { font: 600 .9rem/1 var(--font-body); color: var(--color-gray); }
.byo-sum-save { padding: 3px 8px; border-radius: 6px; background: #e7f5eb; color: #13803b; font: 800 .72rem/1.2 var(--font-body); letter-spacing: .04em; text-transform: uppercase; }
.byo-sum-meta { font: 600 .86rem/1.3 var(--font-body); color: var(--color-gray-dark); }
.byo-sum-deal { font: 700 .8rem/1.3 var(--font-body); color: #13803b; }
.byo-sum-mix { margin: 2px 0 0; }

/* ---------- product grid: a card left alone on its row sits centered ---------- */
.size-grid { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 14px; }
.size-grid[hidden] { display: none !important; }
.size-grid > .size-card { flex: 0 0 calc((100% - 14px) / 2); min-width: 0; }
@media (max-width: 359px) { .size-grid > .size-card { flex-basis: 100%; } }
@media (min-width: 600px) {
    .size-grid { gap: 18px; }
    .size-grid > .size-card { flex-basis: calc((100% - 36px) / 3); }
}
@media (min-width: 900px) {
    .size-grid { gap: 20px; }
    .size-grid > .size-card { flex-basis: calc((100% - 60px) / 4); }
}

/* ---------- no flicker ---------- */
/* Hover: shadow only. Lifting the card made it jitter when the mouse sat
   on its bottom edge (card moves up, mouse is "off", card drops, repeat). */
.size-card, .size-card:hover { transform: none; }
.size-card:hover { box-shadow: var(--shadow-md); border-color: #cfc9c1; }
/* No gray tap flash on phones */
.size-tabs .size-tab, .size-card a, .size-card button, .byo-size-btn,
.mixp-btn, .mixp-tool, .mixp-fill { -webkit-tap-highlight-color: transparent; }
/* Hold the space the size buttons and products will fill, so the footer
   doesn't show first and then get pushed down. */
.size-tabs:not(:has(.size-tab)) { min-height: 640px; }
.size-grid:not([hidden]):not(:has(.size-card)) { min-height: 480px; }
@media (min-width: 640px)  { .size-tabs:not(:has(.size-tab)) { min-height: 470px; } }
@media (min-width: 1024px) { .size-tabs:not(:has(.size-tab)) { min-height: 290px; } }

/* ---------- Add to Cart lines up across a row ----------
   Cards in a row stretch to the same height; the body fills the card and
   the button sits at the bottom, however much text is above it. */
.size-grid { align-items: stretch; }
.size-grid > .size-card { display: flex; flex-direction: column; }
.size-card .card-body { flex: 1 1 auto; }
.size-card .card-body > [data-add-id] { margin-top: auto; }
