/* =========================================================
   Musayeta – Shop styling (archive, product, cart, checkout)
   Black & white, pill buttons, soft #f2f2f2 surfaces.
   ========================================================= */
:root {
  --msy-ink: #000;
  --msy-ink-2: #444;
  --msy-muted: #6b6b6b;
  --msy-line: #e5e5e5;
  --msy-surface: #f2f2f2;
  --msy-card: #fff;
  --msy-radius: 16px;
  --msy-radius-sm: 10px;
  --msy-pill: 100px;
}

/* ---------- Shared buttons ---------- */
.msy-shop-archive .breakdance-woocommerce .button,
.msy-shop-archive .breakdance-woocommerce button,
.msy-product .breakdance-woocommerce .button,
.msy-product .breakdance-woocommerce button.single_add_to_cart_button,
.msy-related .breakdance-woocommerce .button {
  background: var(--msy-ink); color: #fff; border: 0; border-radius: var(--msy-pill);
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 12px 22px; line-height: 1.2; transition: background-color .15s ease;
}
.msy-shop-archive .breakdance-woocommerce .button:hover,
.msy-shop-archive .breakdance-woocommerce button:hover,
.msy-product .breakdance-woocommerce button.single_add_to_cart_button:hover,
.msy-related .breakdance-woocommerce .button:hover { background: #333; color: #fff; }
.msy-product .breakdance-woocommerce button.single_add_to_cart_button.disabled,
.msy-product .breakdance-woocommerce button.single_add_to_cart_button:disabled { background: #bdbdbd; color: #fff; cursor: not-allowed; opacity: 1; }

/* ---------- Archive: intro ---------- */
.msy-shop-intro { max-width: 640px; }

/* ---------- Archive: sidebar ---------- */
.msy-shop-archive .bde-column:first-child { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + 140px); align-self: flex-start; }
.msy-shop-archive .widgettitle {
  font-size: 12px !important; font-weight: 700 !important; letter-spacing: .08em; text-transform: uppercase;
  color: var(--msy-ink) !important; margin: 0 0 12px !important;
}
.msy-shop-archive .bde-woo-widget,
.msy-shop-archive .bde-woo-shop-filters { background: transparent; }
.msy-shop-archive .bde-woo-widget + .bde-woo-widget,
.msy-shop-archive .bde-woo-widget + .bde-woo-shop-filters,
.msy-shop-archive .bde-woo-shop-filters .widget + .widget { border-top: 1px solid var(--msy-line); padding-top: 24px; margin-top: 0; }

/* product search: pill field with icon-less button */
.msy-shop-archive .woocommerce-product-search { display: flex; gap: 0; background: var(--msy-surface); border-radius: var(--msy-pill); padding: 4px; }
.msy-shop-archive .woocommerce-product-search .search-field {
  flex: 1 1 auto; min-width: 0; border: 0 !important; background: transparent !important; border-radius: var(--msy-pill) !important;
  padding: 8px 14px !important; font-size: 15px; box-shadow: none !important;
}
.msy-shop-archive .woocommerce-product-search button { padding: 10px 16px !important; }

/* categories */
.msy-shop-archive .product-categories, .msy-shop-archive .product-categories ul { list-style: none; margin: 0; padding: 0; }
.msy-shop-archive .product-categories li { border: 0 !important; padding: 0 !important; margin: 0; }
.msy-shop-archive .product-categories a {
  display: block; padding: 7px 0; color: var(--msy-ink) !important; text-decoration: none; font-size: 15px; font-weight: 600;
}
.msy-shop-archive .product-categories .children a { padding-left: 14px; font-weight: 400; color: var(--msy-ink-2) !important; }
.msy-shop-archive .product-categories a:hover { text-decoration: underline; text-underline-offset: 3px; }
.msy-shop-archive .product-categories .current-cat > a { text-decoration: underline; text-underline-offset: 3px; }

/* price slider */
.msy-shop-archive .price_slider.ui-slider { background: var(--msy-line) !important; height: 3px !important; border: 0 !important; margin: 14px 8px 18px !important; }
.msy-shop-archive .price_slider .ui-slider-range { background: var(--msy-ink) !important; }
.msy-shop-archive .price_slider .ui-slider-handle {
  width: 18px !important; height: 18px !important; top: -8px !important; border-radius: 50% !important;
  background: #fff !important; border: 2px solid var(--msy-ink) !important; box-shadow: none !important; cursor: grab;
}
.msy-shop-archive .price_slider_amount { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.msy-shop-archive .price_label { font-size: 14px; color: var(--msy-ink-2); }

/* attribute filters as chips */
.msy-shop-archive .woocommerce-widget-layered-nav-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.msy-shop-archive .woocommerce-widget-layered-nav-list__item { margin: 0 !important; padding: 0 !important; border: 0 !important; }
.msy-shop-archive .woocommerce-widget-layered-nav-list__item a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--msy-line);
  border-radius: var(--msy-pill); color: var(--msy-ink) !important; text-decoration: none; font-size: 13px; font-weight: 600; background: #fff;
}
.msy-shop-archive .woocommerce-widget-layered-nav-list__item a:hover { border-color: var(--msy-ink); }
.msy-shop-archive .woocommerce-widget-layered-nav-list__item--chosen a { background: var(--msy-ink); border-color: var(--msy-ink); color: #fff !important; }
.msy-shop-archive .woocommerce-widget-layered-nav-list .count { display: none; }

/* ---------- Archive: toolbar + grid ---------- */
.msy-shop-archive .woocommerce-result-count { color: var(--msy-muted); font-size: 14px; margin: 0 0 20px; }
.msy-shop-archive .woocommerce-ordering select { border-radius: var(--msy-pill); border: 1px solid var(--msy-line); padding: 8px 36px 8px 14px; font-size: 14px; background-color: #fff; }

.msy-shop-archive ul.products li.product,
.msy-related ul.products li.product {
  background: transparent !important; box-shadow: none !important; padding: 0 !important; text-align: left !important;
  display: flex !important; flex-direction: column;
}
.msy-shop-archive ul.products li.product .woocommerce-LoopProduct-link,
.msy-related ul.products li.product .woocommerce-LoopProduct-link { display: flex; flex-direction: column; gap: 6px; color: var(--msy-ink); text-decoration: none; flex: 1 1 auto; }
.msy-shop-archive .bde-woo-product-image,
.msy-related .bde-woo-product-image {
  aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--msy-radius); background: var(--msy-surface); margin-bottom: 10px !important;
}
.msy-shop-archive .bde-woo-product-image img,
.msy-related .bde-woo-product-image img {
  width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 0 !important; margin: 0 !important;
  transition: transform .4s ease;
}
.msy-shop-archive li.product:hover .bde-woo-product-image img,
.msy-related li.product:hover .bde-woo-product-image img { transform: scale(1.04); }
.msy-shop-archive .woocommerce-loop-product__title,
.msy-related .woocommerce-loop-product__title {
  font-size: 15px !important; font-weight: 700 !important; text-transform: uppercase; letter-spacing: .01em;
  color: var(--msy-ink) !important; margin: 0 !important; line-height: 1.3;
}
.msy-shop-archive li.product .price,
.msy-related li.product .price { font-size: 16px !important; font-weight: 600; color: var(--msy-ink) !important; margin: 0 !important; }
.msy-shop-archive li.product .price del,
.msy-related li.product .price del { color: var(--msy-muted) !important; font-weight: 400; margin-right: 6px; }
.msy-shop-archive li.product .price ins,
.msy-related li.product .price ins { text-decoration: none; }
.msy-shop-archive .bde-woo-product-footer,
.msy-related .bde-woo-product-footer { margin-top: 14px; }
.msy-shop-archive .bde-woo-product-footer .button,
.msy-related .bde-woo-product-footer .button {
  display: block; width: 100%; text-align: center; background: #fff !important; color: var(--msy-ink) !important;
  box-shadow: inset 0 0 0 1.5px var(--msy-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.msy-shop-archive .bde-woo-product-footer .button:hover,
.msy-related .bde-woo-product-footer .button:hover { background: var(--msy-ink) !important; color: #fff !important; }
.msy-shop-archive .onsale, .msy-related .onsale {
  background: var(--msy-ink) !important; color: #fff !important; border-radius: var(--msy-pill) !important; min-height: 0 !important; min-width: 0 !important;
  padding: 4px 10px !important; font-size: 11px !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.4 !important;
}
.msy-shop-archive .woocommerce-pagination ul { border: 0 !important; display: flex; gap: 8px; justify-content: center; }
.msy-shop-archive .woocommerce-pagination li { border: 0 !important; }
.msy-shop-archive .woocommerce-pagination a,
.msy-shop-archive .woocommerce-pagination span { min-width: 40px; height: 40px; display: inline-flex !important; align-items: center; justify-content: center; border-radius: var(--msy-pill); color: var(--msy-ink); }
.msy-shop-archive .woocommerce-pagination .current { background: var(--msy-ink) !important; color: #fff !important; }

/* phones: sidebar becomes a compact block above the grid */
@media (max-width: 767px) {
  .msy-shop-archive .bde-column:first-child { position: static; }
  .msy-shop-archive .bde-woo-widget-377-105 .product-categories { display: flex; flex-wrap: wrap; gap: 8px; }
  .msy-shop-archive .bde-woo-widget-377-105 .product-categories li { display: contents; }
  .msy-shop-archive .bde-woo-widget-377-105 .product-categories ul.children { display: contents; }
  .msy-shop-archive .bde-woo-widget-377-105 .product-categories a,
  .msy-shop-archive .bde-woo-widget-377-105 .product-categories .children a {
    padding: 6px 14px; border: 1px solid var(--msy-line); border-radius: var(--msy-pill); font-size: 13px; font-weight: 600; color: var(--msy-ink) !important; background: #fff;
  }
  .msy-shop-archive .bde-woo-product-footer .button { font-size: 11px; padding: 10px 12px; }
  .msy-shop-archive .woocommerce-loop-product__title { font-size: 13px !important; }
}

/* ---------- Single product ---------- */
.msy-product .woocommerce-product-gallery__image,
.msy-product .woocommerce-product-gallery__wrapper img,
.msy-product .flex-viewport { border-radius: var(--msy-radius); }
.msy-product .woocommerce-product-gallery .flex-viewport,
.msy-product .woocommerce-product-gallery__wrapper { background: var(--msy-surface); border-radius: var(--msy-radius); overflow: hidden; }
.msy-product .woocommerce-product-gallery__image img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.msy-product .flex-control-thumbs { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 12px !important; }
.msy-product .flex-control-thumbs li { width: auto !important; margin: 0 !important; float: none !important; }
.msy-product .flex-control-thumbs img {
  aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--msy-radius-sm); border: 2px solid transparent !important; opacity: .7; background: var(--msy-surface);
}
.msy-product .flex-control-thumbs img.flex-active,
.msy-product .flex-control-thumbs img:hover { border-color: var(--msy-ink) !important; opacity: 1; }
.msy-product .woocommerce-product-gallery__trigger { background: #fff !important; border-radius: 50%; }

@media (min-width: 1024px) {
  .msy-product-gallery { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + 130px); align-self: flex-start; }
}
.msy-product-summary .product-sku { font-size: 12px; letter-spacing: .06em; color: var(--msy-muted); text-transform: uppercase; }
.msy-product-summary .product-sku strong { font-weight: 500; }
/* Breakdance 3: tag-level heading colour no longer outranks the Woo default, so keep the title black here. */
.msy-product-summary .product_title { color: var(--msy-ink); }
.msy-product-summary p.price,
.msy-product-summary .price { font-size: 26px !important; font-weight: 700 !important; color: var(--msy-ink) !important; margin: 0 !important; }
.msy-product-summary .price del { color: var(--msy-muted) !important; font-weight: 400; font-size: .75em; margin-right: 8px; }
.msy-product-summary .price ins { text-decoration: none; }
.msy-product-summary .woocommerce-product-details__short-description,
.msy-product-summary .bde-product-description { color: var(--msy-ink-2); font-size: 16px; line-height: 1.6; }

/* variations */
.msy-product table.variations { border: 0 !important; margin: 0 0 8px !important; width: 100%; }
.msy-product table.variations tr { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.msy-product table.variations tr.msy-sw-single { display: none; }
.msy-product table.variations th,
.msy-product table.variations td { display: block; padding: 0 !important; border: 0 !important; background: none !important; text-align: left; }
.msy-product table.variations th label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--msy-ink); }
.msy-product .msy-sw-select { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.msy-product .msy-sw { display: flex; flex-wrap: wrap; gap: 8px; }
.msy-product .msy-sw__btn {
  min-width: 52px; min-height: 44px; padding: 8px 14px; border-radius: var(--msy-radius-sm); border: 1.5px solid var(--msy-line);
  background: #fff; color: var(--msy-ink); font-size: 14px; font-weight: 700; cursor: pointer; transition: border-color .15s, background-color .15s;
}
.msy-product .msy-sw__btn:hover { border-color: var(--msy-ink); }
.msy-product .msy-sw__btn[aria-checked="true"] { background: var(--msy-ink); border-color: var(--msy-ink); color: #fff; }
.msy-product .msy-sw__btn:disabled { color: #b5b5b5; background: #fafafa; text-decoration: line-through; cursor: not-allowed; border-color: var(--msy-line); }
.msy-product .msy-sw__btn:focus-visible { outline: 2px solid var(--msy-ink); outline-offset: 2px; }
.msy-product .reset_variations { font-size: 13px; color: var(--msy-muted) !important; margin-top: 4px; display: inline-block; }
.msy-product .woocommerce-variation-price .price { font-size: 20px !important; }
.msy-product .woocommerce-variation-availability .stock { font-size: 14px; font-weight: 600; }
.msy-product .stock.out-of-stock { color: #b42318; }

/* quantity + add to cart */
.msy-product form.cart .woocommerce-variation-add-to-cart,
.msy-product form.cart:not(.variations_form) { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.msy-product form.cart .quantity {
  display: inline-flex; align-items: center; border: 1.5px solid var(--msy-line); border-radius: var(--msy-pill); overflow: hidden; height: 52px; margin: 0 !important;
}
.msy-product form.cart .quantity input.qty { border: 0 !important; background: transparent !important; width: 44px; text-align: center; font-weight: 700; font-size: 16px; box-shadow: none !important; }
.msy-product form.cart .quantity button,
.msy-product form.cart .quantity .bde-woo-qty-button { background: transparent !important; color: var(--msy-ink) !important; border: 0 !important; width: 40px; height: 100%; font-size: 18px; padding: 0 !important; }
.msy-product .breakdance-woocommerce button.single_add_to_cart_button { flex: 1 1 220px; height: 52px; font-size: 13px; }

/* shipping / payment / returns */
.msy-product-info { list-style: none; margin: 4px 0 0; padding: 16px 18px; background: var(--msy-surface); border-radius: var(--msy-radius); display: grid; gap: 10px; }
.msy-product-info li { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; color: var(--msy-ink-2); }
.msy-product-info svg { flex: 0 0 20px; color: var(--msy-ink); }
.msy-product-info a { color: var(--msy-ink) !important; text-decoration: underline; text-underline-offset: 3px; }

/* attributes table */
.msy-product-summary table.product-attributes { margin-top: 8px; font-size: 14px; }
.msy-product-summary table.product-attributes th,
.msy-product-summary table.product-attributes td { border: 0 !important; border-bottom: 1px solid var(--msy-line) !important; padding: 10px 0 !important; text-align: left; background: none !important; }
.msy-product-summary table.product-attributes th { width: 35%; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--msy-ink); }

/* related */
.msy-related ul.products { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 1023px) { .msy-related ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
.msy-related .bde-heading { width: 100%; }
.msy-related .bde-wooproductslist { width: 100%; }

/* ---------- Notices ---------- */
.woocommerce-message, .woocommerce-info, .woocommerce-error,
.wc-block-components-notice-banner { border-radius: var(--msy-radius-sm) !important; }
.woocommerce-message .button, .woocommerce-message a.wc-forward { background: var(--msy-ink) !important; color: #fff !important; border-radius: var(--msy-pill) !important; }

/* ---------- Block cart & checkout ---------- */
.msy-page-title { font-size: 48px; font-weight: 700; line-height: 1.1; margin: 0 0 32px; color: var(--msy-ink); }
@media (max-width: 767px) { .msy-page-title { font-size: 32px; margin-bottom: 20px; } }

.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { color: var(--msy-ink); }
.wc-block-cart .wc-block-cart-items__header { font-size: 12px; letter-spacing: .08em; }
.wc-block-cart-items .wc-block-cart-item__image img { border-radius: var(--msy-radius-sm); background: var(--msy-surface); }
.wc-block-components-product-name { font-weight: 700 !important; text-transform: uppercase; color: var(--msy-ink) !important; text-decoration: none !important; }
.wc-block-components-product-metadata { color: var(--msy-muted); }
.wc-block-components-quantity-selector { border-radius: var(--msy-pill) !important; border-color: var(--msy-line) !important; }
.wc-block-components-quantity-selector::after { border-radius: var(--msy-pill) !important; border-color: var(--msy-line) !important; }

.wc-block-cart .wc-block-cart__sidebar .wc-block-components-sidebar,
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block {
  background: #fff; border-radius: var(--msy-radius); border: 1px solid var(--msy-line) !important;
}
.wc-block-cart__sidebar { padding: 20px 24px !important; }
.wc-block-components-totals-wrapper { border-color: var(--msy-line) !important; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-size: 20px !important; font-weight: 700 !important; }

.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.wp-block-woocommerce-cart .wc-block-components-button:not(.is-link),
.wp-block-woocommerce-checkout .wc-block-components-button:not(.is-link) {
  background: var(--msy-ink) !important; color: #fff !important; border: 0 !important; border-radius: var(--msy-pill) !important;
  min-height: 52px; font-size: 13px !important; font-weight: 700 !important; letter-spacing: .06em; text-transform: uppercase; text-decoration: none !important;
}
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover { background: #333 !important; }
.wc-block-cart__submit-button .wc-block-components-button__text { text-decoration: none !important; }

.wp-block-woocommerce-checkout .wc-block-components-checkout-step__title,
.wp-block-woocommerce-checkout .wc-block-components-title { font-size: 20px !important; font-weight: 700 !important; }
.wc-block-components-text-input input,
.wc-block-components-combobox .components-combobox-control__input,
.wc-block-components-select select,
.wc-blocks-components-select__select,
.wc-block-components-textarea {
  border-radius: var(--msy-radius-sm) !important; border-color: #cfcfcf !important;
}
.wc-block-components-text-input input:focus,
.wc-blocks-components-select__select:focus,
.wc-block-components-textarea:focus { border-color: var(--msy-ink) !important; box-shadow: 0 0 0 1px var(--msy-ink) !important; }
.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option { border-radius: var(--msy-radius-sm) !important; }
.wc-block-components-radio-control__input:checked { border-color: var(--msy-ink) !important; }
.wc-block-components-radio-control__input:checked::before { background: var(--msy-ink) !important; }
.wc-block-components-checkbox .wc-block-components-checkbox__input:checked { background: var(--msy-ink) !important; border-color: var(--msy-ink) !important; }
.wc-block-components-checkbox .wc-block-components-checkbox__mark { fill: #fff !important; }
.wc-block-checkout__terms { font-size: 14px; color: var(--msy-ink-2); }
.wc-block-checkout__terms a, .wc-block-components-checkout-return-to-cart-button { color: var(--msy-ink) !important; }

/* empty cart */
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title { font-size: 28px; }
.wp-block-woocommerce-empty-cart-block .wp-block-separator { display: none; }

/* Mini cart sidebar (header) */
.bde-mini-cart-offcanvas-body .button,
.bde-mini-cart-offcanvas-body .wc-forward {
  border-radius: var(--msy-pill) !important; font-size: 12px !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.bde-mini-cart-offcanvas-body .checkout { background: var(--msy-ink) !important; color: #fff !important; }

/* ---- patch 1: sidebar polish + keep sidebar beside grid on tablets ---- */
.msy-shop-archive .product-categories,
.msy-shop-archive .product-categories * { border: 0 !important; }
.msy-shop-archive .product-categories li { margin: 0 !important; }
.msy-shop-archive .widget_price_filter .widgettitle { margin-bottom: 22px !important; }
.msy-shop-archive .widget_price_filter .price_slider_wrapper { padding-top: 6px; }
.msy-shop-archive .woocommerce-widget-layered-nav-list__item a { border: 1px solid var(--msy-line) !important; }
.msy-shop-archive .woocommerce-widget-layered-nav-list__item--chosen a { border-color: var(--msy-ink) !important; }
@media (min-width: 768px) and (max-width: 1119px) {
  .msy-shop-archive .bde-columns { flex-direction: row !important; flex-wrap: nowrap !important; gap: 32px; }
  .msy-shop-archive .bde-columns > .bde-column:first-child { width: 240px !important; flex: 0 0 240px; }
  .msy-shop-archive .bde-columns > .bde-column:last-child { width: auto !important; flex: 1 1 auto; min-width: 0; }
}

/* ---- patch 2: product page fixes ---- */
.msy-product .bde-columns-385-107 { align-items: flex-start !important; }
.msy-product-gallery { justify-content: flex-start !important; }
.msy-product table.variations tr { display: flex !important; }
.msy-product table.variations tr.msy-sw-single { display: none !important; }
.msy-product .woocommerce-product-gallery .flex-viewport,
.msy-product .woocommerce-product-gallery__wrapper { background: #fff; border: 1px solid var(--msy-line); }
.msy-product .woocommerce-product-gallery__image img { object-fit: contain; }
.msy-product .flex-control-thumbs img { object-fit: contain; background: #fff; border: 2px solid var(--msy-line) !important; }
.msy-product .flex-control-thumbs img.flex-active,
.msy-product .flex-control-thumbs img:hover { border-color: var(--msy-ink) !important; }
.msy-product a.reset_variations { background: none !important; padding: 0 !important; border: 0 !important; text-decoration: underline; text-underline-offset: 3px; }
.msy-product form.cart .quantity { width: auto !important; padding: 0 4px; }
.msy-product form.cart .quantity .bde-quantity-button { position: static !important; transform: none !important; width: 40px !important; height: 100% !important; }
.msy-product form.cart .quantity input.qty { padding: 0 !important; color: var(--msy-ink) !important; -moz-appearance: textfield; }
.msy-product form.cart .quantity input.qty::-webkit-outer-spin-button,
.msy-product form.cart .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- patch 3: Breakdance sets columns to position:relative, so sticky needs !important ---- */
@media (min-width: 1024px) {
  .msy-product .msy-product-gallery { position: sticky !important; }
}
@media (min-width: 768px) {
  .msy-shop-archive .bde-columns > .bde-column:first-child { position: sticky !important; }
}
@media (max-width: 1023px) { .msy-product .msy-product-gallery { top: auto !important; } }
@media (max-width: 767px) { .msy-shop-archive .bde-columns > .bde-column:first-child { top: auto !important; } }

/* ---- patch 4: mini-cart sidebar escapes the sticky header's transform; wider qty ---- */
.bde-header-builder:has(.bde-mini-cart-offcanvas--active) { transform: none !important; }
.msy-product form.cart .quantity { width: 132px !important; min-width: 132px; justify-content: space-between; }
.bde-mini-cart-offcanvas-body a:not(.button):not(.remove) { color: var(--msy-ink) !important; font-weight: 700; text-transform: uppercase; text-decoration: none; }

/* ---- patch 5: chips sizing, mobile filter toggle ---- */
.msy-shop-archive .woocommerce-widget-layered-nav-list__item { width: auto !important; flex: 0 0 auto; }
.msy-shop-archive .woocommerce-widget-layered-nav-list__item a { width: auto !important; }
.msy-filter-toggle { display: none; }
@media (max-width: 767px) {
  .msy-shop-archive .bde-woo-widget-377-105 .product-categories a,
  .msy-shop-archive .bde-woo-widget-377-105 .product-categories .children a { display: inline-flex !important; width: auto !important; white-space: nowrap; }
  .msy-shop-archive .bde-woo-widget-377-105 .product-categories { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .msy-shop-archive .bde-woo-widget-377-105 .product-categories::-webkit-scrollbar { display: none; }
  .msy-shop-archive .bde-woo-widget-377-105 .widgettitle { display: none; }
  .msy-filter-toggle {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-bottom: 12px;
    padding: 10px 18px; border-radius: var(--msy-pill); border: 1.5px solid var(--msy-ink); background: #fff; color: var(--msy-ink);
    font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  }
  .msy-filter-toggle::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
  .is-filters-open > .msy-filter-toggle { background: var(--msy-ink); color: #fff; }
  .is-filters-open > .msy-filter-toggle::after { transform: rotate(-135deg) translateY(-2px); }
  .msy-shop-archive .msy-filters { display: none; padding: 16px 0 8px; }
  .msy-shop-archive .is-filters-open .msy-filters { display: grid; gap: 24px; }
  .msy-shop-archive .bde-columns > .bde-column:first-child { gap: 8px !important; margin-bottom: 8px; }
  .msy-shop-archive .bde-woo-widget + .bde-woo-widget { border-top: 0; padding-top: 0; }
}
@media (max-width: 767px) { .msy-shop-archive .bde-woo-widget-377-105 .product-categories { flex-direction: row !important; gap: 8px; } }
@media (max-width: 767px) { .msy-shop-archive .bde-woo-widget-377-105 .product-categories a { border: 1px solid #d4d4d4 !important; } }

/* =========================================================
   patch 6: filters & swatches polish
   ========================================================= */

/* ---- Active filters: removable chips ---- */
.msy-shop-archive .widget_layered_nav_filters ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.msy-shop-archive .widget_layered_nav_filters li { margin: 0 !important; padding: 0 !important; border: 0 !important; float: none !important; }
.msy-shop-archive .widget_layered_nav_filters li a {
  display: inline-flex !important; align-items: center; gap: 8px; min-height: 34px; padding: 6px 12px 6px 14px !important;
  border-radius: var(--msy-pill); background: var(--msy-ink) !important; color: #fff !important; border: 0 !important;
  font-size: 13px; font-weight: 600; text-decoration: none !important; line-height: 1.2;
}
.msy-shop-archive .widget_layered_nav_filters li a::before { content: none !important; display: none !important; }
.msy-shop-archive .widget_layered_nav_filters li a::after {
  content: "×"; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border-radius: 50%; background: rgba(255,255,255,.18); font-size: 14px; line-height: 1;
}
.msy-shop-archive .widget_layered_nav_filters li a:hover::after { background: rgba(255,255,255,.35); }
.msy-shop-archive .widget_layered_nav_filters li a:focus-visible { outline: 2px solid var(--msy-ink); outline-offset: 2px; }

/* ---- Attribute chips (size + artist) ---- */
.msy-shop-archive .woocommerce-widget-layered-nav-list__item a {
  min-height: 38px; padding: 6px 14px !important; transition: border-color .15s, background-color .15s, color .15s;
}
.msy-shop-archive .woocommerce-widget-layered-nav-list__item a:focus-visible { outline: 2px solid var(--msy-ink); outline-offset: 2px; }
.msy-shop-archive .woocommerce-widget-layered-nav-list__item--chosen a::before { content: none !important; }
.msy-shop-archive .woocommerce-widget-layered-nav-list__item--chosen a::after {
  content: ""; width: 6px; height: 10px; margin-left: 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) translateY(-2px);
}
/* size chips: equal width boxes, like the product page */
.msy-shop-archive .woocommerce-widget-layered-nav-list:has(a[href*="filter_size"]) .woocommerce-widget-layered-nav-list__item a { min-width: 52px; justify-content: center; border-radius: var(--msy-radius-sm); }

/* ---- Price slider ---- */
.msy-shop-archive .price_slider.ui-slider { height: 4px !important; border-radius: 4px; margin: 18px 11px 22px !important; }
.msy-shop-archive .price_slider .ui-slider-range { border-radius: 4px; }
.msy-shop-archive .price_slider .ui-slider-handle {
  width: 22px !important; height: 22px !important; top: -9px !important; margin-left: -11px !important;
  border-width: 2px !important; transition: transform .1s, box-shadow .1s; touch-action: none;
}
.msy-shop-archive .price_slider .ui-slider-handle:hover,
.msy-shop-archive .price_slider .ui-slider-handle.ui-state-active { transform: scale(1.12); }
.msy-shop-archive .price_slider .ui-slider-handle:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(0,0,0,.18) !important; }
.msy-shop-archive .price_slider_amount { flex-direction: row-reverse; }
.msy-shop-archive .price_slider_amount .button {
  background: #fff !important; color: var(--msy-ink) !important; box-shadow: inset 0 0 0 1.5px var(--msy-ink); padding: 9px 18px !important;
}
.msy-shop-archive .price_slider_amount .button:hover { background: var(--msy-ink) !important; color: #fff !important; }
.msy-shop-archive .price_label { font-size: 14px; font-weight: 600; color: var(--msy-ink); }
.msy-shop-archive .price_label .from, .msy-shop-archive .price_label .to {
  display: inline-block; padding: 3px 8px; border-radius: 6px; background: var(--msy-surface); font-weight: 700;
}

/* ---- Mobile toggle count badge ---- */
.msy-filter-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--msy-pill); background: var(--msy-ink); color: #fff; font-size: 11px; letter-spacing: 0;
}
.is-filters-open > .msy-filter-toggle .msy-filter-count { background: #fff; color: var(--msy-ink); }

/* ---- Size chips on product cards ---- */
.msy-card-sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.msy-shop-archive a.msy-card-size, .msy-related a.msy-card-size,
.msy-card-size {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 28px; padding: 0 8px;
  border: 1px solid var(--msy-line); border-radius: 6px; background: #fff; color: var(--msy-ink) !important;
  font-size: 11px; font-weight: 700; text-decoration: none !important; line-height: 1; transition: border-color .15s, background-color .15s, color .15s;
}
a.msy-card-size:hover, a.msy-card-size:focus-visible { border-color: var(--msy-ink); background: var(--msy-ink); color: #fff !important; }
a.msy-card-size:focus-visible { outline: 2px solid var(--msy-ink); outline-offset: 2px; }
.msy-card-size.is-oos { color: #b5b5b5 !important; background: #fafafa; position: relative; overflow: hidden; }
.msy-card-size.is-oos::after { content: ""; position: absolute; left: -2px; right: -2px; top: 50%; border-top: 1px solid #c4c4c4; transform: rotate(-20deg); }
@media (max-width: 767px) { .msy-card-size { min-width: 30px; height: 26px; padding: 0 6px; font-size: 10px; } }

/* ---- Product page swatches ---- */
.msy-product .msy-sw-value { font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--msy-ink-2); }
.msy-product .msy-sw { gap: 10px; }
.msy-product .msy-sw__btn { min-width: 56px; min-height: 48px; font-size: 15px; position: relative; }
.msy-product .msy-sw__btn:not(:disabled):active { transform: scale(.96); }
.msy-product .msy-sw__btn[aria-checked="true"] { box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.msy-product .msy-sw__btn.is-oos { text-decoration: none; overflow: hidden; }
.msy-product .msy-sw__btn.is-oos::after {
  content: ""; position: absolute; left: -4px; right: -4px; top: 50%; border-top: 1.5px solid #c4c4c4; transform: rotate(-24deg);
}
.msy-product .msy-sw-hint {
  margin: -6px 0 12px; padding: 10px 14px; border-radius: var(--msy-radius-sm); background: #fff4f2; color: #b42318;
  font-size: 14px; font-weight: 600;
}
.msy-product .msy-sw-hint[hidden] { display: none; }
.msy-product .msy-sw.is-shake { animation: msy-shake .4s ease; }
@keyframes msy-shake { 0%,100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) {
  .msy-product .msy-sw.is-shake { animation: none; }
  .msy-product .msy-sw__btn:not(:disabled):active { transform: none; }
}
.msy-card-sizes .msy-card-size { display: inline-flex !important; width: auto !important; flex: 0 0 auto !important; margin: 0 !important; }
/* sidebar is taller than the screen now – no sticky, so every filter stays reachable */
.msy-shop-archive .bde-columns > .bde-column:first-child { position: relative !important; top: auto !important; }
/* Breakdance defaults: column list + pale chosen bg – override */
.msy-shop-archive .woocommerce-widget-layered-nav-list { flex-direction: row !important; flex-wrap: wrap !important; }
.msy-shop-archive .woocommerce-widget-layered-nav-list__item--chosen a { background: var(--msy-ink) !important; border-color: var(--msy-ink) !important; color: #fff !important; }
.msy-shop-archive .woocommerce-widget-layered-nav-list__item a:hover { background: #fff; }
.msy-shop-archive .woocommerce-widget-layered-nav-list__item--chosen a:hover { background: #333 !important; }
.msy-shop-archive .price_slider_amount { flex-direction: column !important; align-items: flex-start !important; gap: 12px; }
.msy-shop-archive .price_slider_amount .price_label { order: -1; }
.msy-shop-archive .woocommerce-widget-layered-nav-list__item a { font-size: 13px !important; font-weight: 600 !important; line-height: 1.2 !important; }
