/*
 * Martivi.Shop catalogue grid
 *
 * Desktop uses four cards per row. Product photos are rendered in a
 * proportional 3:4 portrait frame with a bottom anchor: object-fit: cover keeps the
 * image from stretching, and object-position: center bottom crops excess
 * space from the top rather than cutting the sneaker through the middle.
 */
/* The catalogue fills the desktop viewport while keeping the legacy markup. */
@media screen and (min-width: 769px) {
  .main .wrap {
    width: min(1600px, 96%);
    max-width: none;
  }

  .main .section.group {
    display: block;
    width: 100%;
  }

  .main .cont.span_2_of_3 {
    float: none;
    width: 100%;
    margin: 0;
  }
}

/* Four cards per row on desktop, matching the denser reference catalogue. */
.main .top-box {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  margin: 0 0 30px;
  box-sizing: border-box;
  align-items: stretch;
}

.main .top-box::after,
.main .top-box1::after {
  display: none;
}

.main .top-box > .col_1_of_3 {
  display: block;
  float: none;
  width: auto;
  min-width: 0;
  margin: 0 !important;
  box-sizing: border-box;
}

.main .top-box > .col_1_of_3 > a {
  display: block;
  height: 100%;
}

.main .top-box > .col_1_of_3 .inner_content {
  box-sizing: border-box;
  height: 100%;
}

/* Homepage AJAX responses used to arrive in six-card chunks. Their internal
 * four-card wrappers left a two-card row with a large empty area. Flatten only
 * the homepage collection wrappers so all loaded cards share one responsive
 * grid; catalogue pages keep their existing row structure. */
.main .martivi-home-products #postData {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  align-items: stretch;
}

.main .martivi-home-products #postData > .top-box {
  display: contents;
}

.main .martivi-home-products #postData > .top-box.martivi-home-ajax-row--partial {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 24px;
  width: 100%;
  margin: 0;
}

.main .martivi-home-products #postData > .clear {
  display: none !important;
}

.main .martivi-home-products #postData > .top-box > .col_1_of_3 {
  margin: 0 !important;
}

/* The offer block is server-rendered separately from the homepage collection.
 * Its final incomplete row gets the same natural-width treatment. */
.main .aqcia .martivi-home-offer-row--partial {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

@media screen and (max-width: 1199px) {
  .main .martivi-home-products #postData {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  .main .martivi-home-products #postData > .top-box.martivi-home-ajax-row--partial {
    gap: 20px;
  }
}

@media screen and (max-width: 900px) {
  .main .martivi-home-products #postData {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .main .martivi-home-products #postData > .top-box.martivi-home-ajax-row--partial {
    gap: 16px;
  }
}

@media screen and (max-width: 600px) {
  .main .martivi-home-products #postData {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .main .martivi-home-products #postData > .top-box.martivi-home-ajax-row--partial {
    gap: 14px;
  }
}

@media screen and (max-width: 1199px) {
  .main .top-box {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

@media screen and (max-width: 900px) {
  .main .top-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media screen and (max-width: 600px) {
  .main .top-box {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.main .col_1_of_3 {
  box-sizing: border-box;
}

.main .product_image {
    aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f7f7f7;
}

.main .product_image img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center bottom;
}

/* Modern catalogue presentation (keeps the legacy markup and SEO intact). */
.main .col_1_of_3 {
  background: #fff;
  border: 1px solid #e6eaf0;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(20, 35, 55, .09);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.main .col_1_of_3:hover {
  background: #fff;
  color: inherit;
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(20, 35, 55, .16);
}

.main .inner_content { padding: 0 0 14px; }
.main .product_image { border-radius: 14px 14px 0 0; }
.main .price { padding: 14px 16px 0; }
.main p.title { color: #1c2733; font-weight: 700; line-height: 1.35; }
.main span.actual { color: #e53935 !important; line-height: 1.45; }
.main .btn.btn-green.accept { border: 0; border-radius: 22px; background: #006b8f; color: #fff; padding: 10px 20px; font-weight: 700; cursor: pointer; }
.main .btn.btn-green.accept:hover { background: #004d68; }

@media screen and (max-width: 768px) {
  .main .col_1_of_3 { border-radius: 11px; box-shadow: 0 4px 14px rgba(20, 35, 55, .1); }
  .main .price { padding: 11px 12px 0; }
}

/* Filter panel: a left sidebar on desktop, stacked controls on smaller screens. */
.main .martivi-filter-panel {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 18px 0 28px;
  padding: 16px;
  background: #f7f9fc;
  border: 1px solid #e5eaf0;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(20, 35, 55, .06);
}

.main .martivi-filter-form {
  display: flex;
  align-items: flex-end;
  flex-wrap: nowrap;
  width: 100%;
  gap: 12px;
  margin: 0;
}

.main .martivi-filter-control {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
  gap: 7px;
}

.main .martivi-filter-label {
  display: block;
  min-height: 15px;
  color: #5b6876;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.main .martivi-filter-control .filterselect,
.main .martivi-filter-control input[type="number"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 13px;
  border: 1px solid #d8dee8 !important;
  border-radius: 9px;
  background: #fff !important;
  color: #111 !important;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

/* Searchable filter controls use the same full-size field treatment as the
 * From/To price inputs. */
.main .martivi-search-dropdown {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
}

.main .martivi-search-dropdown.is-open {
  z-index: 100;
}

.main .martivi-select-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #d8dee8 !important;
  border-radius: 9px;
  background: #fff !important;
  color: #111 !important;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.main .martivi-select-toggle:hover,
.main .martivi-search-dropdown.is-open .martivi-select-toggle {
  border-color: #006b8f !important;
  box-shadow: 0 0 0 2px rgba(0, 107, 143, .12);
}

.main .martivi-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main .martivi-select-chevron {
  flex: 0 0 auto;
  margin-left: 10px;
  color: #687482;
  font-size: 18px;
  line-height: 1;
}

.main .martivi-select-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 1000;
  box-sizing: border-box;
  max-height: 290px;
  padding: 10px;
  overflow-y: auto;
  background: #fff !important;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(20, 35, 55, .18);
}

.main .martivi-search-dropdown.is-open .martivi-select-menu {
  display: block;
}

.main .martivi-select-search {
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  margin: 0 0 8px;
  padding: 0 10px;
  border: 1px solid #d8dee8;
  border-radius: 7px;
  background: #fff !important;
  color: #111 !important;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.main .martivi-select-search:focus {
  border-color: #006b8f;
  outline: 2px solid rgba(0, 107, 143, .12);
}

.main .martivi-select-options {
  display: grid;
  gap: 2px;
}

.main .martivi-filter-option,
.main .martivi-filter-check-option {
  box-sizing: border-box;
  width: 100%;
  min-height: 36px;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: #fff !important;
  color: #111 !important;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.main .martivi-filter-option:hover,
.main .martivi-filter-option.is-selected,
.main .martivi-filter-check-option:hover,
.main .martivi-filter-check-option:has(input:checked) {
  background: #f1f6f8 !important;
  color: #00405d !important;
}

.main .martivi-filter-reset {
  display: block;
  width: 100%;
  min-height: 32px;
  margin: 0 0 7px;
  padding: 5px 8px;
  border: 0;
  border-bottom: 1px solid #edf0f3;
  background: #fff !important;
  color: #006b8f !important;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.main .martivi-filter-reset:hover,
.main .martivi-filter-reset:focus-visible {
  color: #004d68 !important;
}

.main .martivi-filter-check-option {
  display: flex;
  align-items: center;
  gap: 9px;
}

.main .martivi-filter-check-option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #006b8f;
}

.main .martivi-filter-check-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main .martivi-select-options [hidden] {
  display: none !important;
}

.main .martivi-filter-control .filterselect option,
.main .box select#SizeSelect,
.main .box select#SizeSelect option {
  background-color: #fff !important;
  color: #111 !important;
}

.main .box {
  display: none !important;
}

.main .martivi-filter-control .filterselect {
  padding-right: 32px;
  appearance: auto;
}

.main .martivi-filter-control .filterselect:focus,
.main .martivi-filter-control input[type="number"]:focus {
  border-color: #006b8f !important;
  outline: 2px solid rgba(0, 107, 143, .14);
}

.main .martivi-filter-control input[type="number"] {
  -moz-appearance: textfield;
}

.main .martivi-filter-control input[type="number"]::-webkit-inner-spin-button,
.main .martivi-filter-control input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.main .martivi-price-control {
  flex: 1.35 1 0;
}

.main .martivi-price-inputs {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 44px;
}

.main .martivi-price-inputs input[type="number"] {
  flex: 1 1 0;
  width: 0;
}

.main .martivi-price-inputs > span {
  flex: 0 0 auto;
  color: #9aa5b1;
  font-weight: 700;
}

.main .martivi-filter-form .find2 {
  flex: 0 0 auto;
  align-self: flex-end;
  min-width: 102px;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 9px;
  background: #006b8f;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.main .martivi-filter-form .find2:hover {
  background: #004d68;
}

.main .martivi-filter-panel .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* The catalogue search now lives at the top of the sticky left filter card. */
.main .martivi-filter-search-control {
  width: 100%;
  padding-bottom: 2px;
}

.main .martivi-filter-search-box {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 44px;
  overflow: hidden;
  border: 1px solid #d8dee8;
  border-radius: 9px;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.main .martivi-filter-search-box:focus-within {
  border-color: #006b8f;
  box-shadow: 0 0 0 2px rgba(0, 107, 143, .12);
}

.main .martivi-filter-search-box input {
  min-width: 0;
  flex: 1 1 auto;
  height: 100%;
  padding: 0 11px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111;
  font: inherit;
  font-size: 13px;
}

.main .martivi-filter-search-box button {
  display: inline-flex;
  width: 44px;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  border: 0;
  background: #006b8f;
  color: #fff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.main .martivi-filter-search-box button:hover,
.main .martivi-filter-search-box button:focus-visible {
  background: #004d68;
  outline: 0;
}

.main .martivi-filter-search-control + .martivi-filter-control {
  margin-top: 1px;
}

@media screen and (max-width: 1024px) {
  .main .martivi-filter-form {
    flex-wrap: wrap;
  }

  .main .martivi-filter-control {
    flex: 1 1 calc(33.333% - 12px);
  }

  .main .martivi-price-control {
    flex: 1 1 calc(66.666% - 12px);
  }
}

@media screen and (max-width: 768px) {
  .main .martivi-filter-panel {
    padding: 14px;
  }

  .main .martivi-filter-form {
    align-items: stretch;
    gap: 12px;
  }

  .main .martivi-filter-control,
  .main .martivi-price-control {
    flex: 1 1 100%;
  }

  .main .martivi-filter-form .find2 {
    flex: 1 1 100%;
  }
}

/* Rovers-style catalogue split: filters stay visible on the left while the
 * product grid uses the remaining desktop width. */
.main .martivi-catalog-layout {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.main .martivi-filter-sidebar {
  position: relative;
  z-index: 20;
  min-width: 0;
}

.main .martivi-filter-heading {
  margin: 0 0 10px;
  color: #1c2733;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.main .martivi-products-area {
  min-width: 0;
}

/* Keep every dropdown surface readable, including the legacy mega-menu. */
.megamenu .megapanel,
.megamenu .megapanel .row,
.megamenu .megapanel .col1,
.megamenu .megapanel .h_nav,
.megamenu .megapanel .h_nav ul,
.megamenu .megapanel .h_nav ul li,
.megamenu .megapanel .h_nav ul li a {
  background: #fff !important;
  color: #111 !important;
}

.megamenu .megapanel .h_nav h4 {
  color: #222 !important;
}

.megamenu .megapanel .h_nav ul li a {
  display: block;
  padding: 2px 5px;
}

.megamenu .megapanel .h_nav ul li a:hover {
  background: #f3f5f8 !important;
  color: #00405d !important;
}

@media screen and (min-width: 1025px) {
  .main .martivi-catalog-layout {
    display: grid;
    grid-template-columns: minmax(280px, 300px) minmax(0, 1fr);
    align-items: start;
    gap: 30px;
  }

  .main .martivi-filter-sidebar {
    position: sticky;
    top: 20px;
    z-index: 20;
  }

  .main .martivi-filter-sidebar .martivi-filter-panel {
    margin: 0;
    padding: 18px 16px;
    background: #fff;
  }

  .main .martivi-filter-sidebar .martivi-filter-form {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 14px;
  }

  .main .martivi-filter-sidebar .martivi-filter-control,
  .main .martivi-filter-sidebar .martivi-price-control {
    flex: 0 0 auto;
    width: 100%;
  }

  .main .martivi-filter-sidebar .martivi-filter-form .find2 {
    width: 100%;
  }
}

@media screen and (max-width: 1024px) {
  .header-bottom-right {
    width: 100%;
    float: none;
    margin-top: 12px;
  }

  .main .martivi-filter-sidebar {
    margin-bottom: 24px;
  }

  .main .martivi-select-menu {
    max-height: min(290px, 45vh);
  }
}

/* Homepage layout: keep the navigation stack on the left and the catalogue
 * content on the right, with the same responsive behavior as find.php. */
.main .martivi-home-layout {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.main .martivi-home-sidebar,
.main .martivi-home-products {
  min-width: 0;
}

.main .martivi-home-sidebar {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 20;
}

.main .martivi-home-sidebar .martivi-filter-heading {
  order: 1;
}

.main .martivi-home-sidebar .martivi-filter-panel {
  order: 2;
}

.main .martivi-home-sidebar .seo-brand-home {
  order: 3;
}

.main .martivi-home-sidebar .seo-model-home {
  order: 4;
}

.main .martivi-home-sidebar .seo-faq-home {
  order: 5;
}

.main .martivi-home-sidebar .seo-size-home {
  order: 6;
}

.main .martivi-home-sidebar .seo-local-home {
  order: 7;
}

.main .martivi-home-sidebar .seo-brand-home,
.main .martivi-home-sidebar .seo-model-home,
.main .martivi-home-sidebar .seo-size-home,
.main .martivi-home-sidebar .seo-local-home,
.main .martivi-home-sidebar .seo-faq-home {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 18px !important;
  text-align: left !important;
}

.main .martivi-home-sidebar .seo-brand-home h2,
.main .martivi-home-sidebar .seo-model-home h2,
.main .martivi-home-sidebar .seo-size-home h2,
.main .martivi-home-sidebar .seo-local-home h2,
.main .martivi-home-sidebar .seo-faq-home h2 {
  margin-bottom: 12px !important;
  font-size: 18px !important;
  text-align: left !important;
}

.main .martivi-home-sidebar .seo-brand-home > div,
.main .martivi-home-sidebar .seo-model-home > div,
.main .martivi-home-sidebar .seo-size-home > div,
.main .martivi-home-sidebar .seo-local-home > div,
.main .martivi-home-sidebar .seo-faq-home > div {
  max-width: none !important;
  justify-content: flex-start !important;
}

.main .martivi-home-sidebar .martivi-filter-control,
.main .martivi-filter-sidebar .martivi-filter-control {
  position: relative;
  z-index: 1;
}

.main .martivi-filter-control.is-open-control {
  z-index: 300;
}

/* Raise the complete control, not only the absolute menu, so an open brand
 * list always sits above the following color/size controls. */
.main .martivi-home-sidebar .martivi-filter-control:has(.martivi-search-dropdown.is-open),
.main .martivi-filter-sidebar .martivi-filter-control:has(.martivi-search-dropdown.is-open) {
  z-index: 200;
}

.main .martivi-home-sidebar .martivi-search-dropdown.is-open,
.main .martivi-filter-sidebar .martivi-search-dropdown.is-open {
  z-index: 201;
}

.main .martivi-home-products {
  min-width: 0;
}

@media screen and (min-width: 1025px) {
  .main .martivi-home-layout {
    display: grid;
    grid-template-columns: minmax(280px, 300px) minmax(0, 1fr);
    align-items: start;
    gap: 30px;
  }

  .main .martivi-home-sidebar {
    align-self: start;
    position: sticky;
    top: 20px;
  }

  /* A long homepage sidebar must remain fully reachable. The script adds
   * this class when the filter/SEO stack is taller than the viewport. */
  .main .martivi-home-sidebar.martivi-home-sidebar--tall {
    position: relative;
    top: auto;
  }

  .main .martivi-home-sidebar .martivi-filter-panel {
    margin: 0 0 18px;
    padding: 18px 16px;
    background: #fff;
  }

  .main .martivi-home-sidebar .martivi-filter-form {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 14px;
  }

  .main .martivi-home-sidebar .martivi-filter-control,
  .main .martivi-home-sidebar .martivi-price-control {
    flex: 0 0 auto;
    width: 100%;
  }

  .main .martivi-home-sidebar .martivi-filter-form .find2 {
    width: 100%;
  }
}

@media screen and (max-width: 1024px) {
  .main .martivi-home-sidebar {
    margin-bottom: 24px;
  }
}

/* Product cards: keep the photo portrait and move every commercial detail
 * below it. The image zoom is clipped to the photo frame, so the card never
 * changes its height while hovering. */
.main .product_image {
  position: relative;
}

.main .product_image img {
  transition: transform .36s cubic-bezier(.2, .7, .2, 1);
  transform-origin: center bottom;
  will-change: transform;
}

/* One bounded media layer lets the card switch between the first photo,
 * the hover photo and an optional product video without changing card height. */
.main .martivi-card-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #f7f7f7;
}

.main .martivi-card-media .martivi-card-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center bottom;
  opacity: 1;
  transition: opacity .22s ease, transform .36s cubic-bezier(.2, .7, .2, 1);
}

.main .martivi-card-media .martivi-card-image--alternate {
  z-index: 2;
  opacity: 0;
}

.main .product_image:hover .martivi-card-media.has-alternate .martivi-card-image--alternate,
.main .product_image:focus-within .martivi-card-media.has-alternate .martivi-card-image--alternate {
  opacity: 1;
}

.main .product_image:hover .martivi-card-media.has-alternate .martivi-card-image--primary,
.main .product_image:focus-within .martivi-card-media.has-alternate .martivi-card-image--primary {
  opacity: 0;
}

/* With one uploaded photo, hovering must zoom that photo rather than reveal
 * an empty white alternate layer. */
.main .martivi-card-media:not(.has-alternate) .martivi-card-image--primary {
  opacity: 1;
}

.main .martivi-card-media.is-video .martivi-card-image {
  opacity: 0 !important;
}

.main .martivi-card-media-empty {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #788694;
  font-size: 13px;
}

.main .martivi-card-video {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  background: #101820;
}

.main .martivi-card-media.is-video .martivi-card-video {
  display: flex;
}

.main .martivi-card-video iframe,
.main .martivi-card-video video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.main .martivi-card-video-error {
  padding: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.main .martivi-card-media-switch {
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: auto;
  z-index: 9;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 5px 15px rgba(20, 35, 55, .18);
}

.main .martivi-card-media-switch-button {
  min-width: 54px;
  min-height: 27px;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #596875;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.main .martivi-card-media-switch-button span {
  margin-right: 2px;
  font-size: 12px;
}

.main .martivi-card-media-switch-button.is-active,
.main .martivi-card-media-switch-button:hover,
.main .martivi-card-media-switch-button:focus-visible {
  background: #006b8f;
  color: #fff;
  outline: none;
}

.main .martivi-card-media > .numbertext {
  z-index: 4;
}

/* Quick actions appear over the upper-right corner of each product photo. */
.main .martivi-card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity .2s ease, transform .2s ease;
}

.main .col_1_of_3:hover .martivi-card-actions,
.main .col_1_of_3:focus-within .martivi-card-actions {
  opacity: 1;
  transform: translateX(0);
}

.main .martivi-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(216, 222, 232, .9);
  border-radius: 50%;
  background: #fff;
  color: #1c2733;
  box-shadow: 0 5px 14px rgba(20, 35, 55, .16);
  font: inherit;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.main .martivi-card-action:hover,
.main .martivi-card-action:focus-visible {
  background: #006b8f;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 107, 143, .28);
  outline: none;
  transform: translateY(-1px);
}

.main .martivi-card-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
}

.main .martivi-card-action-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.main .martivi-card-quick-action .martivi-card-action-icon {
  font-size: 21px;
}

.main .martivi-card-favorite-action.is-favorite {
  background: #fff1f2;
  border-color: #ffc4c9;
  color: #d6294a;
}

.main .martivi-card-favorite-action.is-favorite:hover,
.main .martivi-card-favorite-action.is-favorite:focus-visible {
  background: #d6294a;
  color: #fff;
}

.main .col_1_of_3:hover .product_image img,
.main .col_1_of_3:focus-within .product_image img {
  transform: scale(1.07);
}

.main .martivi-card-details {
  display: flex;
  min-height: 184px;
  padding: 15px 16px 17px;
  box-sizing: border-box;
}

.main .martivi-card-details .cart-left {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
}

.main .martivi-card-details > .clear {
  display: none;
}

.main .martivi-card-title {
  width: 100%;
  min-height: 39px;
  margin: 0 0 8px;
  color: #1c2733 !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
}

.main .martivi-card-price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  width: 100%;
  margin-bottom: 7px;
}

.main .martivi-card-current-price {
  color: #006b8f;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
}

.main .martivi-card-old-price {
  color: #8a949e;
  font-size: 14px;
  font-weight: 700;
  text-decoration: line-through;
}

.main .martivi-card-discount,
.main .martivi-card-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  box-sizing: border-box;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff0f0;
  color: #d62929;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.main .martivi-card-badge {
  margin: 0 0 7px;
  background: #eef8ff;
  color: #006b8f;
}

.main .martivi-card-sizes {
  width: 100%;
  min-height: 38px;
  margin: 0 0 11px;
  color: #e53935;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.main .martivi-card-sizes-label {
  font-weight: 800;
}

.main .martivi-add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: auto;
  padding: 9px 17px;
  border: 0;
  border-radius: 22px;
  background: #006b8f;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.main .martivi-add-to-cart:hover,
.main .martivi-add-to-cart:focus-visible {
  background: #004d68;
  transform: translateY(-1px);
}

.main .martivi-filter-panel,
.main .martivi-filter-sidebar,
.main .martivi-home-sidebar,
.main .martivi-filter-control,
.main .martivi-search-dropdown {
  overflow: visible;
}

/* Floating cart drawer */
.martivi-cart-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  border-radius: 26px;
  background: #006b8f;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 64, 93, .3);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.martivi-cart-button--floating {
  position: fixed;
}

body.martivi-cart-open {
  overflow: hidden;
}

.martivi-cart-button:hover,
.martivi-cart-button:focus-visible {
  background: #004d68;
}

/* Header pages render the cart immediately after the search field. */
.martivi-header-cart {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 6px 0 0;
}

.martivi-header-favorites {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 6px 0 0 10px;
}

.header-bottom-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.header-bottom-right .search {
  float: none;
  flex: 0 1 230px;
  margin: 6px 0 0;
}

.martivi-header-cart .martivi-cart-button,
.martivi-cart-button--header {
  position: static;
  right: auto;
  bottom: auto;
  z-index: 1;
  min-height: 44px;
  padding: 8px 13px;
  border-radius: 23px;
  box-shadow: 0 7px 17px rgba(0, 64, 93, .22);
  white-space: nowrap;
}

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

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

.martivi-button-label {
  display: inline-block;
}

.martivi-cart-icon {
  font-size: 20px;
  line-height: 1;
}

.martivi-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #f1b300;
  color: #211d00;
  font-size: 12px;
  line-height: 1;
}

.martivi-favorites-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #ffc4c9;
  border-radius: 23px;
  background: #fff7f8;
  color: #c52646;
  box-shadow: 0 7px 17px rgba(160, 30, 60, .13);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.martivi-favorites-button:hover,
.martivi-favorites-button:focus-visible {
  background: #c52646;
  color: #fff;
  outline: none;
}

.martivi-favorites-button .martivi-favorites-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.martivi-favorites-button .martivi-ui-icon {
  width: 20px;
  height: 20px;
}

.martivi-favorites-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #d6294a;
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

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

.martivi-favorites-button--floating {
  position: fixed;
  right: 22px;
  bottom: 82px;
  z-index: 10000;
}

.martivi-cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  visibility: hidden;
  background: rgba(14, 24, 34, .42);
  opacity: 0;
  transition: opacity .22s ease, visibility .22s ease;
}

.martivi-cart-overlay.is-open {
  visibility: visible;
  opacity: 1;
}

.martivi-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10002;
  display: flex;
  width: min(420px, 94vw);
  flex-direction: column;
  background: #fff;
  box-shadow: -12px 0 32px rgba(14, 24, 34, .2);
  transform: translateX(105%);
  transition: transform .25s ease;
}

.martivi-favorites-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10002;
  display: flex;
  width: min(420px, 94vw);
  flex-direction: column;
  background: #fff;
  box-shadow: -12px 0 32px rgba(14, 24, 34, .2);
  transform: translateX(105%);
  transition: transform .25s ease;
}

.martivi-cart-drawer.is-open {
  transform: translateX(0);
}

.martivi-favorites-drawer.is-open {
  transform: translateX(0);
}

.martivi-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #e5eaf0;
}

.martivi-cart-header h2 {
  margin: 0;
  color: #1c2733;
  font-size: 22px;
}

.martivi-cart-close,
.martivi-cart-size-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f4f7;
  color: #26333f;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.martivi-cart-close .martivi-ui-icon,
.martivi-cart-size-close .martivi-ui-icon {
  width: 19px;
  height: 19px;
}

.martivi-cart-body {
  flex: 1 1 auto;
  padding: 16px 20px 24px;
  overflow-y: auto;
}

.martivi-cart-empty {
  margin: 28px 0;
  color: #667381;
  text-align: center;
}

.martivi-cart-items {
  display: grid;
  gap: 12px;
}

.martivi-cart-item {
  display: flex;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0f3;
}

.martivi-cart-item > img,
.martivi-cart-item-link {
  flex: 0 0 66px;
  width: 66px;
  height: 88px;
}

.martivi-cart-item-link {
  display: block;
  overflow: hidden;
  border-radius: 8px;
}

.martivi-cart-item-link img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  object-position: center bottom;
}

.martivi-cart-item-info {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  color: #596875;
  font-size: 13px;
}

.martivi-cart-item-info strong,
.martivi-cart-item-name {
  color: #1c2733;
  font-size: 14px;
  line-height: 1.25;
}

.martivi-cart-item-name {
  display: block;
  text-decoration: none;
  font-weight: 800;
}

.martivi-cart-item-name:hover,
.martivi-cart-item-name:focus-visible {
  color: #006b8f;
}

.martivi-cart-item-price {
  color: #006b8f;
  font-weight: 800;
}

.martivi-cart-item-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
}

.martivi-cart-item-actions > button {
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  border: 1px solid #d8dee8;
  border-radius: 6px;
  background: #fff;
  color: #26333f;
  cursor: pointer;
}

.martivi-cart-item-actions > span {
  min-width: 18px;
  color: #1c2733;
  font-weight: 800;
  text-align: center;
}

.martivi-cart-item-actions .martivi-cart-remove {
  margin-left: auto;
  border: 0;
  color: #d62929;
  font-size: 11px;
}

.martivi-cart-item-actions .martivi-cart-remove,
.martivi-cart-item-actions .martivi-cart-remove .martivi-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.martivi-cart-item-actions .martivi-cart-remove {
  gap: 3px;
  min-width: 55px;
  padding: 0 4px;
}

.martivi-cart-item-actions .martivi-ui-icon {
  width: 15px;
  height: 15px;
}

.martivi-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0;
  padding-top: 14px;
  border-top: 1px solid #e5eaf0;
  color: #1c2733;
}

.martivi-cart-checkout {
  display: grid;
  gap: 10px;
}

.martivi-cart-checkout label {
  display: grid;
  gap: 5px;
  color: #596875;
  font-size: 13px;
  font-weight: 700;
}

.martivi-cart-checkout input {
  box-sizing: border-box;
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  color: #1c2733;
  font: inherit;
}

.martivi-cart-checkout > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 4px;
  border: 0;
  border-radius: 9px;
  background: #006b8f;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.martivi-cart-checkout .martivi-continue-shopping {
  margin-top: 0;
  border: 1px solid #cbdbe3;
  background: #f3f8fa;
  color: #006b8f;
}

.martivi-cart-checkout .martivi-continue-shopping:hover,
.martivi-cart-checkout .martivi-continue-shopping:focus-visible {
  background: #e5f2f6;
  color: #004d68;
}

.martivi-cart-checkout .martivi-close-cart {
  border: 1px solid #d8dee8;
  background: #fff;
  color: #596875;
}

.martivi-cart-checkout .martivi-close-cart:hover,
.martivi-cart-checkout .martivi-close-cart:focus-visible {
  background: #f5f7f9;
  color: #1c2733;
}

.martivi-cart-checkout .martivi-clear-cart {
  border: 1px solid #ffc4c9;
  background: #fff5f6;
  color: #c52646;
}

.martivi-cart-checkout .martivi-clear-cart:hover,
.martivi-cart-checkout .martivi-clear-cart:focus-visible {
  background: #c52646;
  color: #fff;
}

.martivi-cart-checkout > button:disabled {
  cursor: wait;
  opacity: .65;
}

.martivi-cart-message {
  min-height: 18px;
  margin: 0;
  color: #d62929;
  font-size: 12px;
  line-height: 1.4;
}

.martivi-favorites-items {
  display: grid;
  gap: 12px;
}

.martivi-favorite-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0f3;
}

.martivi-favorite-item > img {
  flex: 0 0 66px;
  width: 66px;
  height: 88px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center bottom;
}

.martivi-favorite-info {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 7px;
}

.martivi-favorite-link {
  color: #1c2733;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.martivi-favorite-link:hover {
  color: #006b8f;
}

.martivi-favorite-view {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  color: #006b8f;
  font-size: 12px;
  font-weight: 800;
}

.martivi-favorite-view:hover {
  color: #004d68;
}

.martivi-favorite-view .martivi-ui-icon {
  width: 16px;
  height: 16px;
}

.martivi-favorite-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 0 0 auto;
  min-height: 30px;
  padding: 4px 7px;
  border: 0;
  border-radius: 7px;
  background: #fff5f6;
  color: #c52646;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.martivi-favorite-remove:hover,
.martivi-favorite-remove:focus-visible {
  background: #c52646;
  color: #fff;
  outline: none;
}

.martivi-favorite-remove .martivi-ui-icon {
  width: 15px;
  height: 15px;
}

.martivi-cart-notice {
  position: fixed;
  right: 22px;
  bottom: 82px;
  z-index: 10010;
  max-width: min(360px, calc(100vw - 44px));
  padding: 11px 15px;
  border-radius: 9px;
  background: #1c2733;
  color: #fff;
  box-shadow: 0 8px 20px rgba(14, 24, 34, .22);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}

.martivi-cart-notice.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.martivi-cart-size-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(14, 24, 34, .48);
}

.martivi-cart-size-dialog {
  position: relative;
  width: min(360px, 100%);
  padding: 25px 22px 22px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(14, 24, 34, .25);
}

.martivi-cart-size-dialog h3 {
  margin: 0 35px 5px 0;
  color: #1c2733;
  font-size: 20px;
}

.martivi-cart-size-name {
  margin: 0 0 16px;
  color: #667381;
  font-size: 13px;
}

.martivi-cart-size-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.martivi-cart-size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.martivi-cart-size-options button {
  min-width: 48px;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  color: #1c2733;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.martivi-cart-size-options button:hover,
.martivi-cart-size-options button:focus-visible {
  border-color: #006b8f;
  background: #eef8ff;
  color: #006b8f;
}

@media screen and (max-width: 600px) {
  .martivi-cart-button {
    right: 12px;
    bottom: 12px;
  }

  .martivi-cart-button--floating {
    bottom: 72px;
  }

  .martivi-cart-button-text {
    display: none;
  }

  .martivi-favorites-button-text {
    display: none;
  }

  .martivi-header-favorites {
    margin-left: 6px;
  }

  .martivi-favorites-button--floating {
    right: 12px;
    bottom: 70px;
  }

  .martivi-cart-notice {
    right: 12px;
    bottom: 128px;
  }

  .main .martivi-card-details {
    min-height: 178px;
    padding: 13px 12px 15px;
  }

  .main .martivi-card-actions {
    top: 8px;
    right: 8px;
    gap: 6px;
    opacity: 1;
    transform: none;
  }

  .main .martivi-card-action {
    width: 37px;
    height: 37px;
  }

  .martivi-favorite-item > img {
    flex-basis: 58px;
    width: 58px;
    height: 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .main .product_image img,
  .main .martivi-card-media .martivi-card-image,
  .main .martivi-add-to-cart,
  .martivi-cart-overlay,
  .martivi-cart-drawer,
  .martivi-favorites-drawer,
  .martivi-cart-notice {
    transition: none;
  }

  .main .col_1_of_3:hover .product_image img,
  .main .col_1_of_3:focus-within .product_image img {
    transform: none;
  }

  .main .martivi-card-actions {
    transition: none;
  }
}
