/* Product cards */
.mc-grid-items__empty {
  padding: 20px;
  border: 1px dashed var(--mc-color-border);
  color: var(--mc-color-text-muted);
}

.mc-grid-items__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.mc-product-card {
  height: auto;
  background: var(--mc-color-surface);
  display: flex;
  clip-path: polygon(
    var(--mc-chamfer-xl) 0,
    100% 0,
    100% calc(100% - var(--mc-chamfer-xl)),
    calc(100% - var(--mc-chamfer-xl)) 100%,
    0 100%,
    0 var(--mc-chamfer-xl)
  );
}

.mc-product-card__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  gap: 26px;
}

.mc-product-card__image {
  display: block;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.mc-product-card__image img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--mc-bg-neutral-100);
  transition: transform 0.3s ease;
}

.mc-product-card__image:hover img {
  transform: scale(1.1);
}

.mc-product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 20px;
  padding: 0 20px 20px;
}

.mc-product-card__title {
  margin: 0;
  font-size: clamp(15px, 0.85rem + 0.35vw, 18px);
  font-weight: 500;
  line-height: 1.3;
  min-height: calc(1.3em * 2);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mc-product-card__title a {
  color: var(--mc-color-black);
  text-decoration: none;
}

.mc-product-card__title a:hover {
  color: var(--mc-color-text-strong);
}

.mc-product-card__description {
  margin: 0;
  color: var(--mc-color-text);
  font-size: clamp(12px, 0.72rem + 0.2vw, 14px);
  line-height: 1.45;
  min-height: calc(1.45em * 3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mc-product-card__description.is-empty {
  visibility: hidden;
}

.mc-product-card__description p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mc-product-card__attribute-terms {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 1.3em;
}

.mc-product-card__attribute-term {
  margin: 0;
  font-size: clamp(12px, 0.72rem + 0.2vw, 14px);
  line-height: 1.3;
  color: #02273e;
}

.mc-product-card__attribute-label {
  font-weight: 500;
}

.mc-product-card__attribute-terms.is-empty {
  visibility: hidden;
}

.mc-product-card__price {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  flex: 0 0 auto;
  font-size: clamp(18px, 11cqw, 28px);
  font-weight: 500;
  line-height: 1.25;
  overflow: visible;
  text-overflow: clip;
}

.mc-product-card__price-value {
  display: inline-block;
  white-space: nowrap;
}

.mc-product-card__price-value .woocommerce-Price-amount {
  white-space: nowrap;
}

.mc-product-card__price del {
  color: #8ca4ab;
  font-size: 0.8em;
  font-weight: 400;
}

.mc-product-card__price ins {
  text-decoration: none;
  color: #db5559;
}

.mc-product-card__price .mc-price-tax-note {
  font-size: clamp(10px, 0.64rem + 0.15vw, 12px);
  font-weight: 400;
  line-height: 1.2;
  color: #8ca4ab;
  white-space: nowrap;
  display: block;
  text-align: center;
  align-self: center;
  margin-top: 0.15em;
}

.mc-product-card__actions {
  margin-top: auto;
}

.mc-product-card__actions .button {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  height: auto;
  padding: 14px;
  border: 0;
  font-size: clamp(13px, 0.75rem + 0.25vw, 16px);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--mc-color-surface);
  text-decoration: none;
  line-height: 1.1;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
  background: var(--mc-color-black);
  clip-path: polygon(
    var(--mc-chamfer-lg) 0,
    100% 0,
    100% calc(100% - var(--mc-chamfer-lg)),
    calc(100% - var(--mc-chamfer-lg)) 100%,
    0 100%,
    0 var(--mc-chamfer-lg)
  );
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.mc-product-card__actions .button:hover {
  background: var(--mc-color-black-hover);
  color: var(--mc-color-surface);
}

.mc-product-card__actions .button svg {
  flex: 0 0 auto;
}

.mc-product-card__actions .button span {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.mc-product-card--skeleton {
  pointer-events: none;
}

.mc-product-card__skeleton {
  position: relative;
  background: #e8edf0;
  overflow: hidden;
}

.mc-product-card__skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  animation: mc-product-skeleton-shimmer 1.2s infinite;
}

.mc-product-card__skeleton--image {
  aspect-ratio: 1 / 1;
}

.mc-product-card__skeleton--title {
  height: 22px;
  width: 80%;
}

.mc-product-card__skeleton--text {
  height: 14px;
  width: 100%;
}

.mc-product-card__skeleton--text.short {
  width: 68%;
}

.mc-product-card__skeleton--price {
  height: 26px;
  width: 38%;
}

.mc-product-card__skeleton--button {
  margin-top: auto;
  height: 46px;
  width: 100%;
}

@keyframes mc-product-skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

.mc-product-card__actions .button.is-loading,
.mc-product-card__actions .button.is-added {
  cursor: not-allowed;
}

.mc-product-card__actions .button.is-disabled,
.mc-product-card__actions .button[aria-disabled="true"],
.mc-product-card__actions .button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .mc-product-card__inner {
    gap: 18px;
  }

  .mc-product-card__body {
    gap: 14px;
    padding: 0 14px 14px;
  }

  .mc-product-card__description {
    min-height: calc(1.45em * 2);
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .mc-product-card__actions .button {
    gap: 6px;
    padding: 10px 8px;
    min-height: 40px;
    font-size: clamp(10px, 2.7vw, 12px);
    line-height: 1;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
    letter-spacing: 0.01em;
  }

  .mc-product-card__actions .button svg {
    width: 16px;
    height: 16px;
  }

  .mc-product-card__actions .button span {
    white-space: nowrap;
  }
}
