/*
 * MARTIVI cart v85.0
 * One namespace for the light-DOM shortcuts and the independent cart UI.
 * No legacy .martivi-cart-* selectors are used here.
 */

martivi-cart-root {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: block;
  pointer-events: none;
  visibility: visible;
}

martivi-cart-root.mc70-open {
  pointer-events: auto;
}

/* v85 uses ordinary DOM for the drawer; keep the same root behavior without
   relying on :host selectors. */
martivi-cart-root.mc70-open .mc70-shell {
  pointer-events: none;
}

martivi-cart-root.mc70-open .mc70-panel {
  pointer-events: auto !important;
}

martivi-cart-root.mc70-open .mc70-backdrop {
  pointer-events: auto;
}

/* The old catalogue order modal must not leave a transparent hit surface
   over the page while it is closed. */
.custom-model-main:not(.model-open) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.mc70-trigger {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(31, 111, 235, .18);
  border-radius: 8px;
  background: #fff;
  color: #1558b0;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.mc70-trigger:hover,
.mc70-trigger:focus-visible {
  border-color: #1f6feb;
  background: #f3f8ff;
  color: #0b4a9f;
  outline: none;
}

.mc70-trigger--header {
  position: relative;
  margin: 0;
}

.mc70-trigger--cart {
  min-height: 44px;
  padding: 9px 14px;
  border-color: transparent;
  border-radius: 23px;
  background: #006b8f;
  color: #fff;
  box-shadow: 0 7px 17px rgba(0, 64, 93, .22);
}

.mc70-trigger--cart:hover,
.mc70-trigger--cart:focus-visible {
  border-color: transparent;
  background: #004d68;
  color: #fff;
}

.mc70-trigger--floating {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147482990;
  min-width: 126px;
  box-shadow: 0 8px 24px rgba(18, 42, 74, .18);
}

.mc70-trigger--favorites {
  border-color: #ffc4c9;
  border-radius: 23px;
  background: #fff7f8;
  color: #c52646;
  box-shadow: 0 7px 17px rgba(160, 30, 60, .13);
}

.mc70-trigger--favorites:hover,
.mc70-trigger--favorites:focus-visible {
  border-color: #c52646;
  background: #c52646;
  color: #fff;
}

.mc70-trigger--favorites:hover .mc70-trigger-count,
.mc70-trigger--favorites:focus-visible .mc70-trigger-count {
  background: #fff;
  color: #c52646;
}

.mc70-trigger--favorites.mc70-trigger--floating {
  bottom: 68px;
}

.mc70-trigger-icon,
.mc70-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.mc70-trigger-icon .mc70-icon {
  width: 19px;
  height: 19px;
}

.mc70-trigger-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f1b300;
  color: #211d00;
  font-size: 12px;
  font-weight: 800;
  line-height: 20px;
}

.mc70-trigger--favorites .mc70-trigger-count {
  background: #d6294a;
  color: #fff;
}

/* Component styles ------------------------------------------------------ */

.mc70-panel,
.mc70-size-overlay,
.mc70-toast {
  color: #162335;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.4;
}

:host {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: block;
  pointer-events: none;
  color: #162335;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.4;
}

:host(.mc70-open) {
  pointer-events: auto;
}

.mc70-panel,
.mc70-panel *,
.mc70-panel *::before,
.mc70-panel *::after,
.mc70-size-overlay,
.mc70-size-overlay *,
.mc70-size-overlay *::before,
.mc70-size-overlay *::after,
.mc70-trigger,
.mc70-trigger *,
.mc70-trigger *::before,
.mc70-trigger *::after {
  box-sizing: border-box;
}

.mc70-panel button,
.mc70-panel input,
.mc70-size-overlay button,
.mc70-trigger {
  font: inherit;
}

.mc70-panel a {
  color: inherit;
}

.mc70-shell {
  position: absolute;
  inset: 0;
  pointer-events: none;
  isolation: isolate;
}

.mc70-backdrop {
  all: unset;
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  background: rgba(10, 23, 42, .52);
  cursor: default;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility 0s linear .18s;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.mc70-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: block;
  width: min(440px, 100vw);
  max-width: 100%;
  height: 100%;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  overflow-x: hidden;
  overflow-y: auto;
  border-left: 1px solid #e1e8f0;
  background: #fff;
  box-shadow: -12px 0 34px rgba(20, 42, 70, .2);
  isolation: isolate;
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
  overscroll-behavior: contain;
  transition: opacity .18s ease, visibility 0s linear .18s;
}

.mc70-panel button,
.mc70-panel input,
.mc70-panel a,
.mc70-size-overlay button {
  position: relative;
  z-index: 10;
  pointer-events: auto !important;
}

.mc70-panel,
.mc70-header,
.mc70-scroll,
.mc70-items,
.mc70-item,
.mc70-item-content,
.mc70-item-controls,
.mc70-favorites,
.mc70-favorite,
.mc70-favorite-content {
  pointer-events: auto !important;
}

:host(.mc70-open) .mc70-backdrop,
:host(.mc70-open) .mc70-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto !important;
  transition-delay: 0s;
}

.mc70-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 14px;
  padding: calc(15px + env(safe-area-inset-top)) 18px 14px;
  border-bottom: 1px solid #e5ebf2;
  background: #fff;
}

.mc70-heading {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 9px;
}

.mc70-heading h2 {
  margin: 0;
  color: #172536;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
}

.mc70-heading-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #1558b0;
  font-size: 12px;
  font-weight: 800;
}

.mc70-close {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 38px;
  min-width: 96px;
  padding: 8px 11px;
  border-radius: 7px;
  color: #44566d;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mc70-close:hover,
.mc70-close:focus-visible {
  background: #f0f4f8;
  color: #162335;
  outline: none;
}

.mc70-icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.mc70-button-icon .mc70-icon {
  width: 17px;
  height: 17px;
}

.mc70-scroll {
  display: block;
  flex: 0 0 auto;
  min-height: 0;
  height: auto;
  min-height: 0;
  padding: 14px 18px calc(24px + env(safe-area-inset-bottom));
  overflow: visible;
  pointer-events: auto;
  touch-action: auto !important;
  user-select: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.mc70-items,
.mc70-favorites {
  display: grid;
  gap: 11px;
}

.mc70-item,
.mc70-favorite {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 11px;
  border: 1px solid #e2e9f1;
  border-radius: 11px;
  background: #fff;
}

.mc70-item-image,
.mc70-favorite-image {
  display: block;
  width: 74px;
  height: 86px;
  overflow: hidden;
  border-radius: 8px;
  background: #f1f4f7;
  color: #7990a6;
  text-align: center;
  text-decoration: none;
}

.mc70-item-image img,
.mc70-favorite-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mc70-item-image--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.mc70-item-content,
.mc70-favorite-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
}

.mc70-item-name,
.mc70-favorite-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #1c2f45;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.28;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc70-item-name:hover,
.mc70-item-name:focus-visible,
.mc70-favorite-name:hover,
.mc70-favorite-name:focus-visible {
  color: #1558b0;
  text-decoration: underline;
  outline: none;
}

.mc70-item-size {
  margin-top: 4px;
  color: #6a7d91;
  font-size: 13px;
}

.mc70-item-price {
  margin-top: 3px;
  color: #172536;
  font-size: 15px;
}

.mc70-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 9px;
}

.mc70-quantity {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  overflow: hidden;
  border: 1px solid #d8e1eb;
  border-radius: 7px;
  background: #f8fafc;
}

.mc70-quantity-button {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #1558b0;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mc70-quantity-button:hover,
.mc70-quantity-button:focus-visible {
  background: #eaf3ff;
  outline: none;
}

.mc70-quantity-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  color: #172536;
  font-size: 14px;
  font-weight: 800;
}

.mc70-remove {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  padding: 6px 7px;
  border-radius: 6px;
  color: #b33b48;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mc70-remove:hover,
.mc70-remove:focus-visible {
  background: #fff0f1;
  color: #8e1d2a;
  outline: none;
}

.mc70-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 15px 0 12px;
  padding: 13px 2px 0;
  border-top: 1px solid #e4eaf1;
  color: #34495f;
  font-size: 15px;
}

.mc70-total strong {
  color: #172536;
  font-size: 18px;
}

.mc70-footer {
  position: sticky;
  z-index: 40;
  bottom: 0;
  display: grid;
  gap: 8px;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid #e4eaf1;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -7px 18px rgba(20, 42, 70, .08);
}

.mc70-footer-secondary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.mc70-footer-button {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 8px;
  border-radius: 7px;
  color: #1558b0;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mc70-footer-button:hover,
.mc70-footer-button:focus-visible {
  background: #f3f8ff;
  outline: none;
}

.mc70-footer-button--danger {
  color: #b33b48;
}

.mc70-footer-button--danger:hover,
.mc70-footer-button--danger:focus-visible {
  background: #fff0f1;
}

.mc70-action {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 56px;
  padding: 13px 16px;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mc70-action--primary {
  background: #1f6feb;
  color: #fff !important;
  text-shadow: 0 1px 1px rgba(0, 35, 90, .18);
}

.mc70-action--primary .mc70-button-label,
.mc70-action--primary .mc70-button-icon,
.mc70-action--primary .mc70-icon {
  color: #fff !important;
}

.mc70-action--primary .mc70-button-icon .mc70-icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
}

.mc70-action--primary:hover,
.mc70-action--primary:focus-visible {
  background: #1558b0;
  outline: none;
}

.mc70-action--secondary {
  border: 1px solid #cbdced;
  background: #fff;
  color: #1558b0;
}

.mc70-action--secondary:hover,
.mc70-action--secondary:focus-visible {
  border-color: #1f6feb;
  background: #f3f8ff;
  outline: none;
}

.mc70-action--quiet {
  background: #eef3f7;
  color: #465a70;
}

.mc70-action--quiet:hover,
.mc70-action--quiet:focus-visible {
  background: #e0e8ef;
  outline: none;
}

.mc70-action--danger {
  background: transparent;
  color: #b33b48;
}

.mc70-action--danger:hover,
.mc70-action--danger:focus-visible {
  background: #fff0f1;
  outline: none;
}

.mc70-action:disabled {
  cursor: wait;
  opacity: .58;
}

.mc70-message {
  min-height: 19px;
  margin: 0;
  color: #b33b48;
  font-size: 12px;
  line-height: 1.45;
}

.mc70-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 52px 18px 24px;
  color: #64788e;
  text-align: center;
}

.mc70-empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #eef4fa;
  color: #5b82aa;
  font-size: 26px;
}

.mc70-empty h3 {
  margin: 3px 0 0;
  color: #1c2f45;
  font-size: 17px;
}

.mc70-empty p {
  max-width: 290px;
  margin: 0 0 9px;
  font-size: 13px;
}

.mc70-favorite {
  grid-template-columns: 68px minmax(0, 1fr);
}

.mc70-favorite-image {
  width: 68px;
  height: 78px;
}

.mc70-favorite-content {
  gap: 7px;
}

.mc70-favorite-name {
  white-space: normal;
}

.mc70-favorite-view {
  color: #1558b0;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.mc70-favorite-view:hover,
.mc70-favorite-view:focus-visible {
  text-decoration: underline;
  outline: none;
}

.mc70-favorite-content .mc70-remove {
  align-self: flex-start;
  margin-top: auto;
}

.mc70-size-overlay {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 23, 42, .58);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, visibility 0s linear .16s;
}

:host(.mc70-open) .mc70-size-overlay--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.mc70-size-overlay--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.mc70-size-dialog {
  position: relative;
  width: min(390px, 100%);
  padding: 54px 20px 23px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(10, 23, 42, .25);
  text-align: center;
}

.mc70-size-dialog h3 {
  margin: 0;
  color: #172536;
  font-size: 18px;
}

.mc70-size-name {
  margin: 6px 0 17px;
  color: #64788e;
  font-size: 13px;
}

.mc70-size-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  min-width: 86px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #dbe4ed;
  background: #f6f9fc;
  color: #344b64;
  font-size: 12px;
  font-weight: 800;
}

/* Keep the dialog close control in its own top-right corner even when a
 * legacy button rule is loaded after this stylesheet. */
.mc70-size-dialog > .mc70-size-close {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 20 !important;
  box-sizing: border-box;
  margin: 0 !important;
  transform: none !important;
}

.mc70-size-close:hover,
.mc70-size-close:focus-visible {
  border-color: #b9cadd;
  background: #edf3f8;
  color: #172536;
}

.mc70-size-close .mc70-icon {
  width: 16px;
  height: 16px;
}

.mc70-size-options {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  gap: 8px;
}

.mc70-size-option {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 8px 4px;
  border: 1px solid #cbdced;
  border-radius: 7px;
  background: #f8fbff;
  color: #1558b0;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mc70-size-option:hover,
.mc70-size-option:focus-visible {
  border-color: #1f6feb;
  background: #eaf3ff;
  outline: none;
}

.mc70-toast {
  position: absolute;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 18px;
  z-index: 30;
  max-width: 420px;
  margin: 0 auto;
  padding: 11px 14px;
  border-radius: 8px;
  background: #172536;
  box-shadow: 0 8px 24px rgba(10, 23, 42, .22);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .16s ease, transform .16s ease;
}

.mc70-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 600px) {
  .mc70-trigger--floating {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    min-width: 116px;
  }

  .mc70-trigger--favorites.mc70-trigger--floating {
    bottom: calc(61px + env(safe-area-inset-bottom));
  }

  .mc70-trigger-label {
    font-size: 13px;
  }

  .mc70-header {
    padding-right: 13px;
    padding-left: 13px;
  }

  .mc70-scroll {
    padding-right: 13px;
    padding-left: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mc70-backdrop,
  .mc70-panel,
  .mc70-size-overlay,
  .mc70-toast {
    transition: none;
  }
}
