/*
 * MARTIVI.SHOP storefront card polish — v85
 *
 * This file only targets the catalogue/product-card hooks. It is loaded
 * after the legacy catalogue stylesheet so the cart drawer, Messenger and
 * WhatsApp styles remain independent.
 */

/* The photo/video toggle stays usable, but takes less space over the image. */
.main .martivi-card-media-switch,
.product-page .martivi-related-card .martivi-card-media-switch {
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .70) !important;
  box-shadow: 0 3px 10px rgba(20, 35, 55, .12);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.main .martivi-card-media-switch-button,
.product-page .martivi-related-card .martivi-card-media-switch-button {
  min-width: 0;
  min-height: 22px;
  padding: 2px 5px;
  border-radius: 999px;
  font-size: 9px;
  line-height: 1.1;
  white-space: nowrap;
}

.main .martivi-card-media-switch-button span,
.product-page .martivi-related-card .martivi-card-media-switch-button span {
  margin-right: 1px;
  font-size: 10px;
}

/* The legacy media helper prints the ID over the photo. The new ID is
 * rendered in the price row, on the far right of the card. */
.main .martivi-card-media > .numbertext,
.product-page .martivi-card-media > .numbertext {
  display: none !important;
}

.main .martivi-card-id,
.product-page .martivi-card-id,
.product-page .martivi-related-card .martivi-card-id {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: max-content;
  max-width: 46%;
  min-height: 20px;
  margin: 0 0 0 auto;
  padding: 2px 7px;
  border: 1px solid #b8dce6;
  border-radius: 6px;
  background: #e7f4f7;
  color: var(--gs-brand,#006b8f);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

/* Keep price + old price on the left and pin the ID to the right. */
.main .martivi-card-price-row,
.product-page .martivi-card-price-row,
.product-page .martivi-related-card .martivi-card-price-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
  gap: 6px;
  margin-bottom: 0;
}

.main .martivi-card-discount-row,
.product-page .martivi-card-discount-row,
.product-page .martivi-related-card .martivi-card-discount-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 25px;
  margin: 3px 0 5px;
  padding: 0 2px;
}

.main .martivi-card-discount,
.product-page .martivi-card-discount,
.product-page .martivi-related-card .martivi-card-discount {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 22px;
  padding: 4px 8px;
  border: 1px solid #ffd5d8;
  border-radius: 7px;
  background: #fff5f5;
  color: #c62835;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: .02em;
  text-align: center;
  white-space: nowrap;
}

/* Keep the visible "ზომები" label without an extra shoe icon. */
.main .martivi-card-sizes,
.product-page .martivi-card-sizes,
.product-page .martivi-related-card .martivi-card-sizes {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  min-height: 32px;
  margin-bottom: 11px;
  color: #1c2733 !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
  white-space: normal;
  overflow: visible !important;
  text-overflow: clip;
}

.main .martivi-card-sizes-label,
.product-page .martivi-card-sizes-label,
.product-page .martivi-related-card .martivi-card-sizes-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  width: auto;
  height: auto;
  gap: 0;
  color: #1c2733 !important;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.main .martivi-card-sizes-label-text,
.product-page .martivi-card-sizes-label-text,
.product-page .martivi-related-card .martivi-card-sizes-label-text {
  display: inline;
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.main .martivi-card-sizes-label .martivi-size-icon,
.product-page .martivi-card-sizes-label .martivi-size-icon,
.product-page .martivi-related-card .martivi-card-sizes-label .martivi-size-icon,
.main .martivi-size-icon,
.product-page .martivi-size-icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.product-page .size-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.product-page .size-title .martivi-size-icon {
  flex: 0 0 auto;
}

.main .martivi-card-sizes-separator,
.product-page .martivi-card-sizes-separator {
  display: inline;
  margin-right: 1px;
  color: #1c2733;
}

/* Textual card buttons receive the same cart icon used by the action pill. */
.main .martivi-add-to-cart,
.product-page .martivi-add-to-cart,
.product-page .product-add-to-cart,
.product-page .jump-order {
  gap: 9px;
}

.main .martivi-add-to-cart .martivi-button-icon,
.product-page .martivi-add-to-cart .martivi-button-icon,
.product-page .product-add-to-cart .martivi-button-icon,
.product-page .jump-order .martivi-button-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.main .martivi-add-to-cart .martivi-button-icon svg,
.product-page .martivi-add-to-cart .martivi-button-icon svg,
.product-page .product-add-to-cart .martivi-button-icon svg,
.product-page .jump-order .martivi-button-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.product-page .jump-order .martivi-button-icon svg {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.1;
}

.mobile-order button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: #111;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.mobile-order .martivi-button-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
}

.mobile-order .martivi-button-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.1;
}

.main .martivi-add-to-cart .martivi-button-label,
.product-page .martivi-add-to-cart .martivi-button-label,
.product-page .product-add-to-cart .martivi-button-label,
.product-page .jump-order .martivi-button-label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

/* Card add buttons stay compact enough for one clean line. The main
 * product-page action buttons keep their original, larger typography. */
.main .martivi-add-to-cart,
.product-page .martivi-related-card .martivi-add-to-cart {
  min-width: 0;
  max-width: 100%;
  gap: 6px;
  padding: 9px 12px;
  font-size: 12px !important;
  line-height: 1.15;
  white-space: nowrap;
}

.main .martivi-add-to-cart .martivi-button-icon,
.product-page .martivi-related-card .martivi-add-to-cart .martivi-button-icon {
  width: 18px;
  height: 18px;
}

.main .martivi-add-to-cart .martivi-button-icon svg,
.product-page .martivi-related-card .martivi-add-to-cart .martivi-button-icon svg {
  width: 18px;
  height: 18px;
}

.main .martivi-add-to-cart .martivi-button-label,
.product-page .martivi-related-card .martivi-add-to-cart .martivi-button-label {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 12px;
  white-space: nowrap;
}

/* Keep the product-page sale treatment aligned with the new SALE wording. */
.product-page .sale-badge {
  padding: 6px 9px;
  border: 1px solid #ffd5d8;
  border-radius: 999px;
  background: #fff5f5;
  color: #c62835;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
}

/* Filters stay on the desktop sidebar and disappear only on phone widths. */
@media screen and (max-width: 768px) {
  .main .martivi-home-sidebar,
  .main .martivi-filter-sidebar {
    display: none !important;
  }

  .main .martivi-card-id,
  .product-page .martivi-card-id,
  .product-page .martivi-related-card .martivi-card-id {
    max-width: 46%;
    margin-right: 0;
    margin-left: auto;
    padding-right: 6px;
    padding-left: 6px;
    font-size: 9px;
  }

  .main .martivi-card-details,
  .product-page .martivi-card-details {
    padding-right: 12px;
    padding-left: 12px;
  }

  .main .martivi-card-discount,
  .product-page .martivi-card-discount,
  .product-page .martivi-related-card .martivi-card-discount {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
