.so-bag-trigger { position: relative; }
.so-bag-badge { position: absolute; inset-block-start: 5px; inset-inline-end: 1px; display: grid; place-items: center; min-width: 16px; height: 16px; padding-inline: 3px; border-radius: 20px; background: var(--so-red); color: #fff; font-size: 10px; line-height: 1; font-weight: 800; }
.so-bag-badge[hidden], .so-bag-drawer [hidden] { display: none !important; }
body:has(.so-bag-drawer[open]) { overflow: hidden; }
.so-bag-drawer { position: fixed; inset-block: 0; inset-inline: auto 0; margin: 0; width: min(100%, 460px); height: 100dvh; max-width: 100%; max-height: none; padding: 0; border: 0; overflow: hidden; background: #fff; color: var(--so-ink); }
.so-bag-drawer::backdrop { background: #12121266; }
.so-bag-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; height: 100%; }
.so-bag-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; padding-inline: clamp(17px, 4vw, 26px); border-block-end: 1px solid var(--so-border); }
.so-bag-heading h2 { margin: 0; font-size: 1.24rem; line-height: 1.2; }
.so-bag-content { overflow-y: auto; overscroll-behavior: contain; padding-inline: clamp(17px, 4vw, 26px); }
.so-bag-status { margin: 0; padding: 12px clamp(17px, 4vw, 26px); background: #f6f6f6; font-size: .85rem; color: var(--so-muted); }
.so-bag-actions { display: grid; gap: 12px; padding: 18px clamp(17px, 4vw, 26px) max(19px, env(safe-area-inset-bottom)); border-block-start: 1px solid var(--so-border); }
.so-bag-view { min-height: 38px; display: grid; place-items: center; font-size: .85rem; font-weight: 700; }
.so-commerce-button { display: inline-flex; min-height: 48px; justify-content: center; align-items: center; gap: 12px; border: 1px solid var(--so-ink); border-radius: 28px; padding: 8px 19px; background: var(--so-ink); color: #fff; text-decoration: none; font: inherit; font-size: .9rem; font-weight: 760; }
.so-commerce-button:not(:disabled):hover { background: #b5141b; border-color: #b5141b; color: #fff; }
.so-commerce-button:disabled { cursor: default; background: #e2e2e2; border-color: #e2e2e2; color: #535353; }
.so-commerce-button svg { width: 17px; height: 17px; }
[dir='rtl'] :is(.so-commerce-button, .so-commerce-back) svg { transform: scaleX(-1); }
.so-bag-items { display: grid; margin: 0; padding: 0; list-style: none; }
.so-bag-item { display: grid; grid-template-columns: clamp(69px, 21%, 90px) minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 105px; padding-block: 14px; border-block-end: 1px solid var(--so-border); }
.so-bag-item:last-child { border-block-end: 0; }
.so-bag-item-media { display: grid; place-items: center; min-height: 70px; aspect-ratio: 1.12; background: #f6f6f6; }
.so-bag-item-media img { display: block; width: 100%; height: auto; object-fit: contain; mix-blend-mode: multiply; }
.so-bag-item-copy { display: grid; gap: 3px; font-size: .86rem; font-weight: 730; overflow-wrap: anywhere; }
.so-bag-item-copy a { text-decoration: none; }
.so-bag-item-copy a:hover { text-decoration: underline; }
.so-bag-item-copy small, .so-bag-item-copy dl { color: var(--so-muted); font-size: .75rem; font-weight: 500; }
.so-bag-item-copy dl { margin: 0; }
.so-bag-item-copy dl :is(dt, dd, p) { display: inline; margin: 0; }
.so-bag-item-actions { display: grid; justify-items: end; gap: 2px; align-self: center; white-space: nowrap; font-size: .8rem; font-weight: 750; }
.so-bag-remove { display: grid; place-items: center; width: 44px; height: 44px; margin-inline-end: -8px; border-radius: 50%; }
.so-bag-remove:hover { background: var(--so-subtle); }
.so-bag-remove svg { width: 17px; height: 17px; }
.so-bag-subtotal { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 2px 6px; font-size: .95rem; }
.so-bag-empty { display: grid; justify-items: center; text-align: center; align-content: center; padding: 36px 12px; }
.so-bag-empty > svg { width: 41px; height: 41px; }
.so-bag-empty p { margin: 10px 0 15px; font-size: 1rem; font-weight: 720; }

.so-commerce { width: min(100% - 2 * var(--so-gutter), 1200px); margin-inline: auto; padding-block: clamp(26px, 4.5vw, 64px) clamp(52px, 7vw, 96px); }
.so-commerce-intro { position: relative; display: grid; justify-items: center; gap: 11px; margin-block-end: clamp(22px, 3.4vw, 47px); }
.so-commerce-intro h1 { margin: 0; text-align: center; font-size: clamp(1.95rem, 3.7vw, 3rem); line-height: 1.12; letter-spacing: -.025em; }
.so-commerce-back { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; justify-self: start; font-size: .85rem; font-weight: 700; text-decoration: none; }
.so-commerce-back svg { width: 16px; height: 16px; transform: scaleX(-1); }
[dir='rtl'] .so-commerce-back svg { transform: none; }
.so-commerce-back:hover { text-decoration: underline; }
.so-commerce--cart .so-commerce-native > .woocommerce { display: grid; grid-template-columns: minmax(0, 1fr) minmax(275px, .46fr); gap: 30px clamp(22px, 4vw, 54px); align-items: start; }
.so-commerce--cart .woocommerce :is(.woocommerce-notices-wrapper, .so-cart-empty-mark, .cart-empty, .return-to-shop) { grid-column: 1 / -1; }
.so-commerce--cart .woocommerce-notices-wrapper:empty { display: none; }
.so-commerce--cart :is(.woocommerce-cart-form, .cart-collaterals) { min-width: 0; }
.so-commerce--cart .woocommerce table.shop_table { width: 100%; border: 0; margin: 0; border-collapse: collapse; }
.so-commerce--cart .woocommerce table.shop_table thead th { padding-block: 12px; color: var(--so-muted); border-block-end: 1px solid var(--so-border); font-size: .78rem; font-weight: 700; }
.so-commerce--cart .woocommerce table.shop_table td { border-block-start: 1px solid var(--so-border); padding: 14px 8px; vertical-align: middle; }
.so-commerce--cart .woocommerce .product-thumbnail { width: min(21%, 126px); }
.so-commerce--cart .woocommerce .product-thumbnail img { width: 100%; min-width: 56px; height: auto; aspect-ratio: 1.2; object-fit: contain; background: var(--so-subtle); }
.so-commerce--cart .woocommerce .product-name a { font-weight: 770; font-size: .94rem; text-decoration: none; }
.so-commerce--cart .woocommerce .product-name a:hover { text-decoration: underline; }
.so-commerce--cart .woocommerce .product-remove a.remove { display: grid; place-items: center; min-width: 32px; min-height: 36px; font-size: 1.22rem; color: var(--so-ink) !important; }
.so-commerce--cart .woocommerce .product-remove a.remove:hover { background: var(--so-subtle); }
.so-commerce--cart .woocommerce .cart-collaterals .cart_totals { float: none; width: 100%; padding: clamp(17px, 2.6vw, 30px); background: var(--so-subtle); }
.so-commerce--cart .cart_totals > h2 { font-size: 1.24rem; margin: 0 0 12px; }
.so-commerce--cart .cart_totals .checkout-button { margin: 0; }
.so-commerce--cart .cart_totals .wc-proceed-to-checkout { padding: 12px 0 0; }
.so-commerce--cart .woocommerce .quantity .qty { min-height: 42px; width: 4em; border-radius: 0; }
.so-commerce--cart .cart-empty, .so-commerce--cart .return-to-shop { text-align: center; }
.so-commerce--cart .woocommerce .cart-empty { padding: 0; margin: -15px 0 0; border: 0; background: transparent; font-size: 1.13rem; font-weight: 750; }
.so-commerce--cart .woocommerce .cart-empty::before { display: none; }
.so-cart-empty-mark { display: grid; place-items: center; margin-block-start: 9px; }
.so-cart-empty-mark svg { width: 47px; height: 47px; }
.so-commerce--cart .return-to-shop { margin: 0; }

.so-checkout-layout, .so-commerce--checkout form.checkout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .75fr); align-items: start; gap: clamp(24px, 5.7vw, 72px); }
.so-checkout-details { display: grid; gap: 24px; }
.so-checkout-details section { padding-block-end: 24px; border-block-end: 1px solid var(--so-border); }
.so-checkout-details section:last-child { border-block-end: 0; }
.so-checkout-details h2, .so-checkout-summary h2 { font-size: clamp(1.07rem, 2.1vw, 1.35rem); margin: 0 0 12px; line-height: 1.3; }
.so-checkout-sign-in { margin: 0 0 14px; color: var(--so-muted); font-size: .88rem; }
.so-checkout-sign-in a { font-weight: 720; color: var(--so-ink); }
.so-checkout-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 15px; min-width: 0; margin: 0; border: 0; padding: 0; }
.so-checkout-fields label { display: grid; gap: 5px; min-width: 0; color: var(--so-ink); font-size: .8rem; font-weight: 680; }
.so-checkout-fields input { width: 100%; min-height: 44px; padding: 8px 11px; border: 1px solid #dcdcdc; border-radius: 2px; color: var(--so-ink); background: #fff; opacity: 1; font-size: .95rem; font-weight: 500; }
.so-checkout-field-wide { grid-column: 1 / -1; }
.so-checkout-summary { position: sticky; inset-block-start: 133px; padding: clamp(17px, 2.6vw, 28px); background: var(--so-subtle); }
.so-checkout-summary > p { margin: 12px 0; color: var(--so-muted); font-size: .86rem; }
.so-checkout-summary .so-commerce-button { width: 100%; }
.so-checkout-summary .so-bag-empty { padding-block: 15px 22px; }
.so-commerce--checkout form.checkout > #customer_details { grid-column: 1; grid-row: 1 / span 2; }
.so-commerce--checkout form.checkout > :is(#order_review_heading,#order_review) { grid-column: 2; }
.so-commerce--checkout form.checkout > #order_review_heading { margin-block-end: -15px; }
.so-commerce--checkout #customer_details :is(.col-1,.col-2) { width: 100%; float: none; }
.so-commerce--checkout #order_review { padding: 20px; background: var(--so-subtle); }

.so-footer-payments:not(:empty) { display: grid; justify-items: center; padding-block: 0 26px; text-align: center; }
.so-payment-marks p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 9px; margin: 0 0 9px; font-size: .91rem; font-weight: 760; }
.so-payment-marks p span { color: var(--so-muted); font-size: .74rem; font-weight: 500; }
.so-payment-marks ul { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 19px; margin: 0; padding: 0; list-style: none; }
.so-payment-marks img { display: block; width: 53px; height: 30px; object-fit: contain; }
.so-footer-payments .so-payment-marks :is(p,ul) { justify-content: center; }
@media (max-width: 820px) {
  .so-commerce--cart .so-commerce-native > .woocommerce, .so-checkout-layout, .so-commerce--checkout form.checkout { grid-template-columns: minmax(0,1fr); }
  .so-commerce--checkout form.checkout > :is(#customer_details,#order_review_heading,#order_review) { grid-column: auto; grid-row: auto; }
  .so-checkout-summary { position: static; }
}
@media (max-width: 768px) {
  .so-commerce--cart .woocommerce table.shop_table_responsive tr.cart_item { display: grid; grid-template-columns: 80px minmax(0,1fr) auto; align-items: center; gap: 4px 10px; padding-block: 12px; border-block-start: 1px solid var(--so-border); background: #fff; }
  .so-commerce--cart .woocommerce table.shop_table_responsive tr.cart_item td { padding: 0; border: 0; background: none; text-align: start !important; }
  .so-commerce--cart .woocommerce table.shop_table_responsive tr.cart_item td::before { display: none; }
  .so-commerce--cart .woocommerce tr.cart_item td.product-thumbnail { display: block; grid-column: 1; grid-row: 1 / span 3; width: auto; }
  .so-commerce--cart .woocommerce tr.cart_item td.product-name { grid-column: 2; grid-row: 1; }
  .so-commerce--cart .woocommerce tr.cart_item td.product-price { grid-column: 2; grid-row: 2; font-size: .82rem; }
  .so-commerce--cart .woocommerce tr.cart_item td.product-quantity { grid-column: 2; grid-row: 3; }
  .so-commerce--cart .woocommerce tr.cart_item td.product-remove { grid-column: 3; grid-row: 1; justify-self: end; }
  .so-commerce--cart .woocommerce tr.cart_item td.product-subtotal { grid-column: 3; grid-row: 3; justify-self: end; font-size: .8rem; font-weight: 750; }
  .so-commerce--cart .woocommerce table.cart td.actions .coupon { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .so-commerce--cart .woocommerce table.cart td.actions .coupon :is(.input-text,.button) { width: 100%; margin: 0; }
}
@media (max-width: 380px) {
  .so-checkout-fields { grid-template-columns: minmax(0,1fr); }
  .so-bag-item { gap: 8px; }
}

/* Store feedback and the bag drawer share the storefront's warm neutrals. */
body .so-notice.so-notice,
body .woocommerce-error.so-notice-list {
  --notice-tone: #761f27;
  --notice-border: #e6d9d4;
  --notice-paper: #fbf7f4;
  box-sizing: border-box;
  clear: both;
  margin: 0 0 14px;
  border: 1px solid var(--notice-border);
  border-inline-start: 3px solid var(--notice-tone);
  border-radius: 7px;
  background: var(--notice-paper);
  color: #382729;
  font: 530 .88rem/1.5 var(--so-font);
  text-align: start;
  list-style: none;
}
body .so-notice.so-notice {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  min-height: 54px;
  padding: 11px clamp(11px, 2vw, 18px);
}
body .woocommerce-error.so-notice-list { display: block; padding: 0; }
body .so-notice-list .so-notice.so-notice { border: 0; margin: 0; background: transparent; }
body .so-notice-list .so-notice + .so-notice { border-block-start: 1px solid var(--notice-border); }
body .so-notice.so-notice::before,
body .so-notice.so-notice::after,
body .so-notice-list.woocommerce-error::before,
body .so-notice-list.woocommerce-error::after { content: none; }
body .so-notice.so-notice:focus, body .woocommerce-error.so-notice-list:focus {
  outline: 1px solid #997478;
  outline-offset: 2px;
}
.so-notice-icon {
  display: grid;
  width: 22px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--notice-tone);
  font-size: .75rem;
  line-height: 1;
  font-weight: 800;
}
.so-notice--success .so-notice-icon, .so-notice--error .so-notice-icon {
  border-color: var(--notice-tone);
  background: var(--notice-tone);
  color: white;
}
.so-notice-copy { min-width: 0; overflow-wrap: anywhere; }
.so-notice-copy p { margin: 0; }
.so-notice-copy a:not(.button) { color: var(--notice-tone); font-weight: 700; }
body .so-notice :is(.so-notice-action, .so-notice-copy) a.button {
  display: inline-flex;
  float: none;
  margin: 0;
  min-height: 36px;
  padding: 6px 14px;
  align-items: center;
  border: 1px solid #d4bdb9;
  border-radius: 30px;
  background: #fffdfb;
  color: var(--notice-tone);
  font: 750 .81rem/1.3 var(--so-font);
  text-decoration: none;
  white-space: normal;
}
body .so-notice a.button:hover { background: var(--notice-tone); border-color: var(--notice-tone); color: #fff; }
.so-notice-action { justify-self: end; }

.so-bag-drawer { background: #fffdfb; border-inline-start: 1px solid #e5d8d3; }
.so-bag-drawer::backdrop { background: #22151776; }
.so-bag-heading { border-color: #e7dad5; padding-block: 10px; }
.so-bag-heading h2 { font-family: Georgia, "Times New Roman", serif; color: #42262a; font-size: clamp(1.6rem, 5vw, 2rem); font-weight: 500; }
[dir='rtl'] .so-bag-heading h2 { font-family: var(--so-font); font-weight: 760; }
.so-bag-heading h2 span { margin-inline-start: 5px; font: 720 .78rem/1 var(--so-font); vertical-align: middle; }
.so-bag-item { border-color: #ede2dd; }
.so-bag-item-media { background: #f8f2ee; border-radius: 5px; }
.so-bag-actions { background: #faf5f1; border-color: #e7dad5; }
.so-bag-status { background: #f5ebe8; color: #642a30; box-shadow: inset 0 1px #e8d9d4; }
.so-bag-drawer :is(.so-bag-actions,.so-bag-empty) .so-commerce-button { background: #781f27; border-color: #781f27; color: #fff; }
.so-bag-drawer :is(.so-bag-actions,.so-bag-empty) .so-commerce-button:hover { background: #591820; border-color: #591820; }
.so-bag-view { color: #6a252b; text-underline-offset: .22em; }
@media (max-width: 600px) {
  body .so-notice.so-notice { grid-template-columns: 22px minmax(0, 1fr); align-items: start; }
  .so-notice-icon { margin-block-start: 1px; }
  .so-notice-action { grid-column: 2; justify-self: start; }
}

/* Confirmation toasts stay out of the layout, including on first render. */
.so-toast-tray,
body .so-notice.so-notice--success[data-so-toast] {
  position: fixed;
  z-index: 160;
  inset-block-start: calc(env(safe-area-inset-top, 0px) + 174px);
  inset-inline-end: clamp(12px, 3vw, 30px);
  width: min(380px, calc(100% - 24px));
}
.so-toast-tray {
  display: grid;
  gap: 8px;
  max-block-size: calc(100dvh - 198px);
  pointer-events: none;
}
body .so-notice.so-notice--success[data-so-toast] {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 36px;
  align-items: start;
  gap: 7px 10px;
  margin: 0;
  padding: 12px 10px 12px 13px;
  border: 1px solid #e5d6d1;
  border-inline-start: 3px solid #76242c;
  border-radius: 11px;
  background: #fffaf7;
  box-shadow: 0 9px 26px #32141520;
  color: #382529;
  pointer-events: auto;
}
body .so-toast-tray .so-notice.so-notice--success[data-so-toast] {
  position: relative;
  inset: auto;
  width: 100%;
  animation: so-toast-enter .2s ease-out;
  transition: opacity .15s ease, transform .15s ease;
}
.so-notice--success[data-so-toast] .so-notice-icon { margin-block-start: 3px; }
.so-notice--success[data-so-toast] .so-notice-copy { margin-block-start: 4px; }
.so-notice--success[data-so-toast] .so-notice-action { grid-column: 2; justify-self: start; }
body .so-notice--success[data-so-toast] .so-notice-action a.button {
  min-height: 40px;
  border: 0;
  padding: 6px 0;
  border-radius: 4px;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body .so-notice--success[data-so-toast] .so-notice-action a.button:hover { background: transparent; color: #41161b; }
.so-toast-close {
  position: relative;
  grid-area: 1 / 3;
  width: 36px;
  height: 36px;
  margin-block-start: -3px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #744950;
}
.so-toast-close:hover { background: #f3e8e4; color: #56232a; }
.so-toast-close::before, .so-toast-close::after {
  position: absolute;
  inset-block-start: calc(50% - .5px);
  inset-inline-start: calc(50% - 6px);
  width: 12px;
  height: 1px;
  background: currentColor;
  content: '';
}
.so-toast-close::before { transform: rotate(45deg); }
.so-toast-close::after { transform: rotate(-45deg); }
body .so-toast-tray .so-notice.so-notice--success[data-so-toast].is-leaving {
  animation: none;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}
@keyframes so-toast-enter {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 1199px) {
  .so-toast-tray, body .so-notice.so-notice--success[data-so-toast] {
    inset-block-start: calc(env(safe-area-inset-top, 0px) + 104px);
  }
}
@media (prefers-reduced-motion: reduce) {
  body .so-toast-tray .so-notice.so-notice--success[data-so-toast] { animation: none; transition: none; }
  body .so-toast-tray .so-notice.so-notice--success[data-so-toast].is-leaving { transform: none; }
}

.so-bag-content-state {
  display: grid;
  gap: 14px;
  padding-block: 23px;
  color: #643536;
}
.so-bag-content-state > p { margin: 0; font-size: .86rem; }
.so-bag-loading-row {
  display: grid;
  grid-template-columns: clamp(60px, 22%, 90px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding-block-end: 17px;
  border-block-end: 1px solid #ede2dd;
}
.so-bag-loading-row::before {
  content: '';
  aspect-ratio: 1.12;
  border-radius: 5px;
  background: #f3eae6;
}
.so-bag-loading-row span {
  height: 8px;
  width: min(56%, 122px);
  border-radius: 5px;
  background: #f3eae6;
  box-shadow: 0 15px #f3eae6;
  transform: translateY(-7px);
}
