:root {
    --smb-teal:        #0D6B6A;
    --smb-teal-dark:   #0a5756;
    --smb-cream:       #FFF7E6;
    --smb-cream-deep:  #FBEBC9;
    --smb-amber:       #D89B2F;
    --smb-ink:         #1F2937;
    --smb-muted:       #6B7280;
    --smb-border:      #E5E7EB;
    --smb-radius:      14px;
    --smb-shadow:      0 10px 40px rgba(13, 107, 106, 0.18);
}

/* ─── Floating trigger ─────────────────────────────────────── */
.smb-floater {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99998;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px 14px 18px;
    background: var(--smb-teal);
    color: #fff;
    border: none;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(13, 107, 106, 0.35);
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
}
.smb-floater:hover { background: var(--smb-teal-dark); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(13, 107, 106, 0.4); }
.smb-floater__icon { font-size: 22px; line-height: 1; }

@media (max-width: 640px) {
    .smb-floater { right: 12px; bottom: 12px; padding: 12px 18px 12px 14px; }
    .smb-floater__label { display: none; }
    .smb-floater__icon { font-size: 24px; }
}

/* ─── Inline trigger button (shortcode) ─────────────────────── */
.smb-trigger--inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--smb-teal);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.smb-trigger--inline:hover { background: var(--smb-teal-dark); transform: translateY(-1px); }

/* ─── Modal shell ──────────────────────────────────────────── */
.smb-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.smb-modal[hidden] { display: none !important; }
/* [hidden] attribute MUST win over our own .smb-btn display:inline-flex etc. */
.smb-modal [hidden], .smb-fly-portal [hidden] { display: none !important; }
.smb-modal__scrim { position: absolute; inset: 0; background: rgba(13, 54, 54, 0.55); backdrop-filter: blur(4px); }
.smb-modal__panel {
    position: relative;
    background: #fff;
    width: min(880px, 96vw);
    max-height: 92vh;
    border-radius: var(--smb-radius);
    box-shadow: var(--smb-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: smb-pop 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes smb-pop { from { transform: scale(0.95) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

.smb-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px 16px;
    background: var(--smb-cream);
    border-bottom: 1px solid rgba(13, 107, 106, 0.1);
}
.smb-modal__brand { display: flex; gap: 14px; align-items: center; }
.smb-modal__logo { font-size: 36px; line-height: 1; }
.smb-modal__title { font-size: 22px; font-weight: 800; margin: 0; color: var(--smb-teal); letter-spacing: -0.01em; }
.smb-modal__sub   { font-size: 13px; margin: 2px 0 0; color: var(--smb-muted); }
.smb-modal__close { background: transparent; border: none; font-size: 28px; cursor: pointer; color: var(--smb-ink); line-height: 1; padding: 4px 10px; border-radius: 6px; }
.smb-modal__close:hover { background: rgba(0,0,0,0.06); }

.smb-modal__progress { height: 4px; background: var(--smb-cream-deep); }
.smb-modal__progress-bar { height: 100%; background: var(--smb-teal); transition: width 0.4s ease; }

.smb-modal__body { flex: 1; overflow-y: auto; padding: 24px 28px; }

.smb-modal__footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--smb-border);
    background: #fff;
}
.smb-footer-spacer { flex: 1; }

/* ─── Buttons ──────────────────────────────────────────────── */
.smb-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.smb-btn--primary { background: var(--smb-teal); color: #fff; }
.smb-btn--primary:hover:not(:disabled) { background: var(--smb-teal-dark); }
.smb-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }
.smb-btn--ghost { background: transparent; color: var(--smb-ink); border: 1px solid var(--smb-border); }
.smb-btn--ghost:hover { background: var(--smb-cream); border-color: var(--smb-teal); color: var(--smb-teal); }
.smb-btn--amber { background: var(--smb-amber); color: #fff; }
.smb-btn--amber:hover { background: #B07E22; }
.smb-btn--large { padding: 16px 32px; font-size: 17px; }
.smb-btn--block { width: 100%; justify-content: center; }

/* ─── Steps ────────────────────────────────────────────────── */
.smb-step { animation: smb-fade 0.35s ease; }
@keyframes smb-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.smb-step h3 {
    font-size: clamp(34px, 5vw, 60px) !important;
    font-weight: 300 !important;
    color: var(--smb-ink);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    line-height: 1.02;
    text-wrap: balance;
    max-width: 100%;
    word-wrap: break-word;
}
.smb-step .smb-step__sub { font-size: 15px; color: var(--smb-muted); margin: 0 0 24px; max-width: 56ch; }

/* Tile grid used across occasion / diet / meal pickers */
.smb-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.smb-tile {
    background: #fff;
    border: 2px solid var(--smb-border);
    border-radius: var(--smb-radius);
    padding: 20px 14px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: inherit;
    font-size: inherit;
    color: var(--smb-ink);
}
.smb-tile:hover { border-color: var(--smb-teal); background: var(--smb-cream); transform: translateY(-2px); }
.smb-tile.is-selected { border-color: var(--smb-teal); background: var(--smb-teal); color: #fff; }
.smb-tile.is-selected .smb-tile__label { color: #fff; }
.smb-tile__emoji { font-size: 32px; line-height: 1; }
.smb-tile__label { font-size: 14px; font-weight: 600; }

/* Meal cards (bigger, with intro) */
.smb-meal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.smb-meal-card {
    background: #fff;
    border: 2px solid var(--smb-border);
    border-radius: var(--smb-radius);
    padding: 18px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: inherit;
    color: var(--smb-ink);
    white-space: normal;       /* <button> defaults to nowrap in some UA sheets */
    overflow: hidden;
}
.smb-meal-card__title,
.smb-meal-card__intro,
.smb-meal-card__meta { white-space: normal; }
.smb-meal-card:hover { border-color: var(--smb-teal); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(13, 107, 106, 0.1); }
.smb-meal-card__header { display: flex; gap: 12px; align-items: center; }
.smb-meal-card__emoji  { font-size: 36px; line-height: 1; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: var(--smb-cream); border-radius: 10px; flex-shrink: 0; }
.smb-meal-card__emoji img { width: 100%; height: 100%; border-radius: 10px; object-fit: cover; }
.smb-meal-card__title  {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.25;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.smb-meal-card__header > div { min-width: 0; flex: 1; }
.smb-meal-card__meta   { font-size: 12px; color: var(--smb-muted); margin: 2px 0 0; }
.smb-meal-card__intro  { font-size: 13px; color: var(--smb-ink); margin: 0; line-height: 1.5; }
.smb-meal-card__chips  { display: flex; flex-wrap: wrap; gap: 6px; }
.smb-meal-card__chip   { font-size: 11px; padding: 3px 10px; border-radius: 999px; background: var(--smb-cream-deep); color: var(--smb-ink); font-weight: 600; }

/* People stepper */
.smb-people {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px;
    background: var(--smb-cream);
    border-radius: var(--smb-radius);
}
.smb-people__btn {
    width: 48px; height: 48px;
    background: #fff;
    border: 2px solid var(--smb-teal);
    color: var(--smb-teal);
    border-radius: 50%;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
}
.smb-people__btn:disabled { opacity: 0.3; cursor: not-allowed; }
.smb-people__value { font-size: 48px; font-weight: 800; color: var(--smb-teal); min-width: 80px; text-align: center; }
.smb-people__label { font-size: 14px; color: var(--smb-muted); text-align: center; margin: 8px 0 0; }

/* Ingredients review */
.smb-review { display: grid; grid-template-columns: 1fr 280px; gap: 24px; align-items: start; }
@media (max-width: 768px) { .smb-review { grid-template-columns: 1fr; } }

.smb-review__meal { padding: 16px; background: var(--smb-cream); border-radius: var(--smb-radius); margin-bottom: 16px; }
.smb-review__meal-title { font-size: 18px; font-weight: 700; margin: 0; }
.smb-review__meal-meta  { font-size: 13px; color: var(--smb-muted); margin: 4px 0 0; }

.smb-ingredients {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 8px;
}
.smb-ingredient {
    display: grid;
    grid-template-columns: 48px 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--smb-border);
    border-radius: 10px;
    transition: all 0.15s ease;
}
.smb-ingredient:hover { border-color: var(--smb-teal); }
.smb-ingredient--missing { background: #FFF4E6; border-color: var(--smb-amber); }
.smb-ingredient__img {
    width: 48px; height: 48px; border-radius: 8px; object-fit: cover;
    background: var(--smb-cream);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.smb-ingredient__img img { width: 100%; height: 100%; border-radius: 8px; object-fit: cover; }
.smb-ingredient__body { min-width: 0; }
.smb-ingredient__title { font-size: 14px; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.smb-ingredient__meta  { font-size: 12px; color: var(--smb-muted); margin: 2px 0 0; }
.smb-ingredient__meta--warn { color: var(--smb-amber); font-weight: 600; }
.smb-ingredient__qty  {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--smb-cream); border-radius: 999px; padding: 3px;
}
.smb-ingredient__qty-btn {
    width: 26px; height: 26px;
    background: #fff; border: none; border-radius: 50%;
    color: var(--smb-teal); font-weight: 700; font-size: 14px; cursor: pointer;
}
.smb-ingredient__qty-btn:hover { background: var(--smb-teal); color: #fff; }
.smb-ingredient__qty-val { min-width: 24px; text-align: center; font-weight: 700; color: var(--smb-ink); font-size: 14px; }
.smb-ingredient__remove {
    background: transparent; border: none; color: var(--smb-muted); font-size: 20px; cursor: pointer;
    width: 28px; height: 28px; border-radius: 50%; line-height: 1;
}
.smb-ingredient__remove:hover { background: #FEE2E2; color: #991B1B; }

/* Side rail summary */
.smb-summary { background: var(--smb-cream); padding: 20px; border-radius: var(--smb-radius); position: sticky; top: 0; }
.smb-summary h4 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--smb-muted); }
.smb-summary__total { font-size: 32px; font-weight: 800; color: var(--smb-teal); margin: 0 0 4px; }
.smb-summary__meta { font-size: 13px; color: var(--smb-muted); margin: 0 0 16px; }

/* Save-for-later box in review step */
.smb-save-row { margin-top: 12px; padding: 12px; background: #fff; border-radius: 10px; }
.smb-save-row input[type="text"] {
    width: 100%; padding: 8px 10px;
    border: 1px solid var(--smb-border); border-radius: 6px;
    font-family: inherit; font-size: 14px; margin: 6px 0;
}

/* Loading spinner */
.smb-step--loading { text-align: center; padding: 60px 20px; color: var(--smb-muted); }
.smb-spinner {
    width: 40px; height: 40px; border-radius: 50%;
    border: 3px solid var(--smb-cream-deep);
    border-top-color: var(--smb-teal);
    margin: 0 auto 16px;
    animation: smb-spin 0.8s linear infinite;
}
@keyframes smb-spin { to { transform: rotate(360deg); } }

/* Success state after add-to-cart */
.smb-success { text-align: center; padding: 40px 20px; }
.smb-success__emoji { font-size: 72px; margin-bottom: 12px; animation: smb-bounce 0.5s ease; }
@keyframes smb-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
.smb-success h3 { color: var(--smb-teal); margin: 0 0 8px; font-size: 24px; }
.smb-success p { color: var(--smb-muted); margin: 0 0 20px; }

/* ─── Flying item animation ────────────────────────────────── */
.smb-fly-portal { position: fixed; inset: 0; pointer-events: none; z-index: 99999; }
.smb-fly-item {
    position: fixed;
    width: 60px; height: 60px;
    background: var(--smb-cream);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(13, 107, 106, 0.3);
    pointer-events: none;
    transition: all 0.9s cubic-bezier(0.55, 0, 0.1, 1);
    will-change: transform, opacity, left, top;
}

/* ─── Account page ─────────────────────────────────────────── */
.smb-account__header { margin-bottom: 20px; }
.smb-account__header h3 { margin: 0 0 4px; color: var(--smb-teal); }
.smb-account__header p { margin: 0; color: var(--smb-muted); }

.smb-account__empty { text-align: center; padding: 40px 20px; background: var(--smb-cream); border-radius: var(--smb-radius); }
.smb-account__empty-emoji { font-size: 48px; margin-bottom: 12px; }
.smb-account__empty p { color: var(--smb-muted); margin: 0 0 16px; }

.smb-account__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.smb-saved-meal {
    display: flex; gap: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--smb-border);
    border-radius: var(--smb-radius);
}
.smb-saved-meal__emoji {
    width: 60px; height: 60px; border-radius: 10px;
    background: var(--smb-cream);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; flex-shrink: 0;
}
.smb-saved-meal__emoji img { width: 100%; height: 100%; border-radius: 10px; object-fit: cover; }
.smb-saved-meal__body { flex: 1; min-width: 0; }
.smb-saved-meal__body h4 { margin: 0 0 2px; font-size: 15px; }
.smb-saved-meal__meta { font-size: 12px; color: var(--smb-muted); margin: 0 0 10px; }
.smb-saved-meal__actions { display: flex; gap: 8px; }
.smb-saved-meal__actions .smb-btn { padding: 6px 14px; font-size: 13px; }
