/* BagTrendify Commerce components – Runway visual language */
:root {
  --btf-text: #151413; --btf-muted: #66625c; --btf-line: #c8c8c8; --btf-bg: #fff; --btf-accent: #0e0e0e;
  --btf-soft: color-mix(in srgb, #151413 5%, #fff);
  --btf-ease: cubic-bezier(.16,1,.3,1); --btf-ease-spring: cubic-bezier(.34,1.56,.64,1); --btf-ease-sheet: cubic-bezier(.32,.72,0,1);
  --btf-pill: 30px;
}
.btf-label { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--btf-muted); font-variant-numeric: tabular-nums; }
.btf-chev { transition: transform .5s var(--btf-ease); flex: none; }
.is-dd-open > button .btf-chev { transform: rotate(180deg); }
.btf-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; overflow: hidden; clip: rect(0 0 0 0); }

/* Buttons (shared) */
.btf-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 24px; border: 1px solid var(--btf-text); border-radius: 0; background: var(--btf-text); color: #fff; font: inherit; font-size: 13px; font-weight: 500; letter-spacing: .02em; cursor: pointer; text-decoration: none; transition: transform .6s var(--btf-ease), background .45s, color .45s, box-shadow .6s var(--btf-ease); }
.btf-btn::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 60%; background: linear-gradient(100deg, transparent, rgb(255 255 255/.26) 50%, transparent); transform: translateX(-140%) skewX(-18deg); pointer-events: none; }
.btf-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -22px color-mix(in srgb, #151413 80%, transparent); color: #fff; }
.btf-btn:hover::before { transform: translateX(260%) skewX(-18deg); transition: transform 1.1s var(--btf-ease); }
.btf-btn:hover svg { transform: translateX(4px); }
.btf-btn svg { transition: transform .5s cubic-bezier(.2,1.6,.4,1); }
.btf-btn:active { transform: scale(.985); }
.btf-btn--ghost { background: transparent; color: var(--btf-text); }
.btf-btn--ghost:hover { background: var(--btf-text); color: #fff; }
.btf-btn--block { width: 100%; min-height: 56px; }
.btf-btn:disabled { opacity: .5; cursor: default; transform: none; }
.btf-btn:focus-visible { outline: 2px solid var(--btf-text); outline-offset: 3px; }

/* Currency switcher */
.btf-cur { position: relative; display: inline-block; }
.btf-cur__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; background: none; border: 0; color: inherit; font: inherit; font-size: 12px; letter-spacing: .06em; cursor: pointer; }
.btf-cur__sym { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--btf-line); border-radius: 50%; font-size: 11px; }
.btf-cur__list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 120; min-width: 220px; margin: 0; padding: 6px 0; list-style: none; background: #fff; border: 1px solid var(--btf-line); box-shadow: 0 24px 50px -28px rgb(0 0 0/.35); animation: btf-drop .5s var(--btf-ease); }
.btf-cur__list li { outline: none; }
.btf-cur__list a { display: grid; grid-template-columns: 30px 1fr 16px; align-items: center; gap: 10px; padding: 10px 16px; color: var(--btf-text); text-decoration: none; }
.btf-cur__list li:hover a, .btf-cur__list li:focus a { background: var(--btf-soft); }
.btf-cur__list li:focus-visible a { box-shadow: inset 0 0 0 2px var(--btf-text); }
.btf-cur__badge { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--btf-line); border-radius: 50%; font-size: 13px; transition: background .3s, color .3s; }
.btf-cur__list [aria-selected=true] .btf-cur__badge { background: var(--btf-text); color: #fff; border-color: var(--btf-text); }
.btf-cur__txt strong { display: block; font-size: 12px; font-weight: 500; letter-spacing: .06em; }
.btf-cur__txt small { display: block; font-size: 11px; color: var(--btf-muted); }
.btf-cur__check { opacity: 0; }
.btf-cur__list [aria-selected=true] .btf-cur__check { opacity: 1; }
.btf-cur--drawer .btf-cur__list, .btf-cur--footer .btf-cur__list { right: auto; left: 0; }
.btf-cur--footer .btf-cur__list { top: auto; bottom: calc(100% + 6px); }

/* Designed dropdown */
.btf-dd { position: relative; width: 100%; }
.btf-dd--sort { width: auto; min-width: 230px; }
.btf-dd__btn { width: 100%; min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: #fff; border: 1px solid var(--btf-line); border-radius: 0; color: var(--btf-text); font: inherit; font-size: 16px; text-align: left; cursor: pointer; transition: border-color .3s; }
.btf-dd--sort .btf-dd__btn { font-size: 13px; min-height: 44px; border-radius: var(--btf-pill); padding: 0 18px; }
.btf-dd__btn:hover, .is-dd-open > .btf-dd__btn { border-color: var(--btf-text); }
.btf-dd__btn:focus-visible { outline: 2px solid var(--btf-text); outline-offset: 2px; }
.btf-dd__pre { color: var(--btf-muted); }
.btf-dd__val { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btf-dd__val.is-ph { color: var(--btf-muted); }
.btf-dd__list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 130; max-height: 300px; overflow-y: auto; margin: 0; padding: 6px 0; list-style: none; background: #fff; border: 1px solid var(--btf-text); box-shadow: 0 24px 50px -28px rgb(0 0 0/.35); animation: btf-drop .45s var(--btf-ease); overscroll-behavior: contain; }
.btf-dd__list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 16px; font-size: 14px; cursor: pointer; outline: none; }
.btf-dd__list li svg { opacity: 0; flex: none; }
.btf-dd__list li:hover, .btf-dd__list li:focus { background: var(--btf-soft); }
.btf-dd__list li:focus-visible { box-shadow: inset 0 0 0 2px var(--btf-text); }
.btf-dd__list li[aria-selected=true] { font-weight: 500; }
.btf-dd__list li[aria-selected=true] svg { opacity: 1; }
.btf-dd__scrim { display: none; }
@media (max-width: 749px) {
  .btf-dd.is-sheet .btf-dd__scrim { display: block; position: fixed; inset: 0; z-index: 2147483000; background: rgb(12 10 8/.38); animation: btf-fade .5s var(--btf-ease); }
  .btf-dd.is-sheet .btf-dd__list { position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 2147483001; max-height: min(82vh, 640px); padding: 26px 0 calc(16px + env(safe-area-inset-bottom)); border: 0; border-radius: 20px 20px 0 0; box-shadow: 0 -24px 60px -24px rgb(0 0 0/.4); animation: btf-sheet-up .65s var(--btf-ease-sheet); }
  .btf-dd.is-sheet .btf-dd__list::before { content: ""; position: absolute; top: 10px; left: 50%; width: 34px; height: 4px; margin-left: -17px; border-radius: 2px; background: color-mix(in srgb, #151413 16%, transparent); }
  .btf-dd.is-sheet .btf-dd__list li { min-height: 52px; padding: 0 20px; font-size: 15px; }
  body.btf-sheet-lock { overflow: hidden; }
  .btf-dd--sort { min-width: 0; width: 100%; }
}

/* Quantity stepper */
.btf-qty { display: inline-flex !important; align-items: stretch; border: 1px solid var(--btf-line); height: 48px; background: #fff; border-radius: 999px; overflow: hidden; padding: 0 4px; }
.btf-qty input.qty { width: 64px !important; height: 100% !important; min-height: 0 !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; text-align: center; font-size: 16px !important; font-variant-numeric: tabular-nums; background: transparent !important; color: var(--btf-text) !important; -moz-appearance: textfield; box-shadow: none !important; }
.btf-qty input.qty::-webkit-outer-spin-button, .btf-qty input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.btf-qty__b { width: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--btf-text); cursor: pointer; transition: background .3s; }
.btf-qty__b:hover { background: var(--btf-soft); }
.btf-qty__b:active svg { transform: scale(.85); }
.btf-qty:focus-within { border-color: var(--btf-text); }

/* Tier table */
.btf-tiers { width: 100%; margin: 4px 0 22px; border-top: 1px solid var(--btf-line); padding-top: 18px; }
.btf-tiers__head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.btf-tiers__note { font-size: 12px; line-height: 1.5; color: var(--btf-muted); margin: 0; }
.btf-tiers__table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; margin: 0; border: 0; }
.btf-tiers__table th { text-align: left; font-weight: 400; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--btf-muted); padding: 0 8px 8px; border: 0; background: none; }
.btf-tiers__table td { padding: 9px 8px; border: 0; border-top: 1px solid var(--btf-line); background: none; transition: background .3s, color .3s; }
.btf-tiers__table th:last-child, .btf-tiers__table td:last-child { text-align: right; }
.btf-tiers__table th:first-child, .btf-tiers__table td:first-child { padding-left: 10px; }
.btf-tiers__table th:last-child, .btf-tiers__table td:last-child { padding-right: 10px; }
.btf-tier[data-min] { cursor: pointer; outline: none; }
.btf-tier[data-min]:hover td { background: var(--btf-soft); }
.btf-tier[data-min]:focus-visible td { box-shadow: inset 0 2px 0 var(--btf-text), inset 0 -2px 0 var(--btf-text); }
.btf-tier.is-active td { background: var(--btf-text); color: #fff; }
.btf-tier--quote td { color: var(--btf-muted); }
.btf-tier--quote a { color: var(--btf-text); text-decoration: underline; text-underline-offset: 3px; }
.btf-tiers__sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; }
.btf-tiers__sum > div { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--btf-line); border-radius: 10px; padding: 12px 14px; min-width: 0; }
.btf-tiers__sum .btf-label { font-size: 10px; letter-spacing: .14em; }
.btf-tiers__sum strong { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btf-tiers__sum > .btf-s-save-wrap { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; background: #eef6ef; border-color: #cfe3d2; color: #1f5f2c; padding: 10px 14px; }
.btf-tiers__sum > .btf-s-save-wrap strong { font-size: 14px; }
.btf-tiers__sum > div[hidden] { display: none; }
/* Rounded buy box with Single / Wholesale tabs */
.btf-tiers { background: var(--btf-soft); border: 1px solid var(--btf-line) !important; border-radius: 14px; padding: 18px !important; margin: 6px 0 18px !important; }
.btf-tiers__title { font-size: 15px; font-weight: 500; color: var(--btf-text); }
.btf-tiers__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #fff; border: 1px solid var(--btf-line); border-radius: 999px; padding: 4px; margin: 0 0 4px; }
.btf .btf-tiers__tab { min-height: 40px; border: 0 !important; border-radius: 999px !important; background: transparent !important; color: var(--btf-text) !important; font-size: 13px !important; font-weight: 500 !important; letter-spacing: .02em; text-transform: none; padding: 0 12px !important; cursor: pointer; box-shadow: none !important; transition: background .25s, color .25s !important; }
.btf .btf-tiers__tab:hover { background: var(--btf-soft) !important; }
.btf .btf-tiers__tab.is-active { background: var(--btf-text) !important; color: #fff !important; }
.btf .btf-tiers__tab:focus-visible { outline: 2px solid var(--btf-text); outline-offset: 2px; }
.btf-tiers__panel { margin-top: 14px; background: #fff; border: 1px solid var(--btf-line); border-radius: 10px; overflow: hidden; padding-top: 10px; }
.btf-tiers__panel[hidden] { display: none; }
.btf-tiers__panel .btf-tier.is-active td { background: var(--btf-text); }
@media (max-width: 420px) {
  .btf-tiers { padding: 14px !important; }
  .btf-tiers__sum { gap: 6px; }
  .btf-tiers__sum > div { padding: 10px; }
  .btf-tiers__sum strong { font-size: 15px; }
}
.btf-table-scroll { overflow-x: auto; }
.btf-tier-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
.btf-tier-table caption { text-align: left; font-size: 12px; color: var(--btf-muted); padding-bottom: 10px; }
.btf-tier-table th { text-align: left; font-weight: 400; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--btf-muted); padding: 0 12px 10px 0; border-bottom: 1px solid var(--btf-text); }
.btf-tier-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--btf-line); }

/* Forms */
.btf-form { display: flex; flex-direction: column; gap: 18px; }
.btf-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.btf-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.btf-field > label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--btf-text); }
.btf-field > label small { text-transform: none; letter-spacing: 0; color: var(--btf-muted); font-size: 11px; }
.btf-field input[type=text], .btf-field input[type=email], .btf-field input[type=tel], .btf-field textarea { width: 100%; min-height: 48px; padding: 12px 16px; border: 1px solid var(--btf-line); border-radius: 0; background: #fff; color: var(--btf-text); font: inherit; font-size: 16px; box-shadow: none; transition: border-color .3s; }
.btf-field textarea { min-height: 140px; resize: vertical; }
.btf-field input::placeholder, .btf-field textarea::placeholder { color: #9a958e; }
.btf-field input:hover, .btf-field textarea:hover { border-color: #8f8a83; }
.btf-field input:focus, .btf-field textarea:focus { border-color: var(--btf-text); outline: none; box-shadow: 0 0 0 1px var(--btf-text); }
.btf-field__err { display: none; margin: 0; font-size: 12px; color: #a3261b; }
.btf-field.is-invalid .btf-field__err { display: block; animation: btf-rise .5s var(--btf-ease); }
.btf-field.is-invalid input, .btf-field.is-invalid textarea, .btf-field.is-invalid .btf-dd__btn { border-color: #a3261b; }
.btf-field--check > label, .btf-field > label.btf-check { text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important; font-weight: 400; }
.btf-check { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.5; cursor: pointer; }
.btf-check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border: 1px solid var(--btf-text); border-radius: 0; background: #fff; display: grid; place-items: center; cursor: pointer; }
.btf-check input::after { content: ""; width: 10px; height: 6px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; transform: rotate(-45deg) scale(0); margin-top: -3px; transition: transform .35s var(--btf-ease-spring); }
.btf-check input:checked { background: var(--btf-text); }
.btf-check input:checked::after { transform: rotate(-45deg) scale(1); }
.btf-check input:focus-visible { outline: 2px solid var(--btf-text); outline-offset: 2px; }
.btf-check a { text-decoration: underline; text-underline-offset: 3px; }
.btf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.btf-form.is-sending [type=submit] { opacity: .6; }
.btf-form-state { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border: 1px solid var(--btf-text); animation: btf-rise .7s var(--btf-ease); outline: none; }
.btf-form-state strong { display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.btf-form-state p { margin: 0; font-size: 13px; color: var(--btf-muted); line-height: 1.5; }
.btf-form-state--ok { background: var(--btf-text); color: #fff; }
.btf-form-state--ok p { color: rgb(255 255 255/.75); }
.btf-form-state--err { border-color: #a3261b; }
.btf-form-state--err strong { color: #a3261b; }
.btf-tofill { background: #fff3c4; color: #5b4500; padding: 0 4px; font-size: .92em; }
.btf-cur-notice { margin: 0; font-size: 11px; line-height: 1.5; color: var(--btf-muted); }
@media (max-width: 749px) { .btf-form__row { grid-template-columns: 1fr; } }

.btf-curnote { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2147482500; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); padding: 6px 6px 6px 18px; background: var(--btf-text); color: #fff; font-size: 12px; box-shadow: 0 20px 40px -24px rgb(0 0 0/.5); animation: btf-drop .6s var(--btf-ease); }
.btf-curnote p { margin: 0; }
.btf-curnote a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
body .btf-curnote .btf-x { color: #fff !important; }

/* Consent */
.btf-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2147482000; display: flex; justify-content: center; pointer-events: none; }
.btf-consent__in { pointer-events: auto; width: min(680px, 100%); background: #fff; border: 1px solid var(--btf-text); padding: 20px 22px; box-shadow: 0 30px 60px -30px rgb(0 0 0/.45); animation: btf-sheet-up .8s var(--btf-ease-sheet); }
.btf-consent__txt { margin: 8px 0 16px; font-size: 13px; line-height: 1.55; }
.btf-consent__txt a { text-decoration: underline; text-underline-offset: 3px; }
.btf-consent__btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.btf-consent__btns .btf-btn { min-height: 44px; font-size: 12px; padding: 0 18px; }
.btf-consent-dlg { width: min(520px, calc(100vw - 32px)); border: 1px solid var(--btf-text); padding: 0; color: var(--btf-text); }
.btf-consent-dlg::backdrop { background: #0005; backdrop-filter: blur(4px); }
.btf-consent-dlg__in { padding: 24px; }
.btf-consent-dlg__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.btf-consent-dlg__head h2 { margin: 0; font-size: 22px; font-weight: 400; }
.btf-x { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; color: inherit; transition: transform .6s var(--btf-ease); }
.btf-x:hover { transform: rotate(90deg); }
.btf-consent-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 16px 0; border-top: 1px solid var(--btf-line); }
.btf-consent-row strong { font-size: 13px; font-weight: 500; }
.btf-consent-row p { margin: 4px 0 0; font-size: 12px; color: var(--btf-muted); line-height: 1.5; }
.btf-consent-dlg .btf-consent__btns { margin-top: 12px; }
.btf-switch { position: relative; flex: none; width: 46px; height: 26px; }
.btf-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.btf-switch span { position: absolute; inset: 0; border: 1px solid var(--btf-text); border-radius: 30px; transition: background .3s; }
.btf-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--btf-text); transition: transform .45s var(--btf-ease-spring), background .3s; }
.btf-switch input:checked + span { background: var(--btf-text); }
.btf-switch input:checked + span::after { transform: translateX(20px); background: #fff; }
.btf-switch input:focus-visible + span { outline: 2px solid var(--btf-text); outline-offset: 2px; }
.btf-switch.is-locked { opacity: .5; }
@media (max-width: 749px) { .btf-consent { left: 0; right: 0; bottom: 0; } .btf-consent__in { border-width: 1px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); } .btf-consent__btns .btf-btn { flex: 1 1 30%; } }

@keyframes btf-drop { from { opacity: 0; transform: translateY(-8px); } }
@keyframes btf-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes btf-fade { from { opacity: 0; } }
@keyframes btf-sheet-up { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) {
  .btf-cur__list, .btf-dd__list, .btf-dd.is-sheet .btf-dd__list, .btf-dd.is-sheet .btf-dd__scrim, .btf-consent__in, .btf-form-state, .btf-field.is-invalid .btf-field__err { animation: none !important; }
  .btf-btn, .btf-btn::before, .btf-btn svg, .btf-chev, .btf-switch span::after, .btf-check input::after, .btf-x { transition: none !important; }
}
