/* Product cards: one design for every shop page. Sizes follow the card's own width. */
.na-card {
  container-type: inline-size;
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-width: 0;
  padding: 7px;
  border: 1px solid #e9e9ee;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 28px -24px rgba(11, 11, 15, 0.45);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

/* The photo stands on a golden horizon. The middle stays pure white, so white photo
   backgrounds don't show (blending them away is slow: the home page has 200+ cards). */
.na-img-link {
  display: block;
  border-radius: 18px;
}

.na-img-box {
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  padding: 9% 9% 14%;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: inset 0 0 14px #e6e6ee;
  box-shadow: inset 0 0 8cqi #e2e2ea;
}

.na-img-box::before {
  content: "";
  position: absolute;
  top: 89%;
  left: -30%;
  z-index: 1;
  width: 160%;
  height: 60%;
  border-radius: 50%;
  background: linear-gradient(#ffd94d, #fdb004 30%);
  box-shadow: 0 -1px 0 1px #ffffff, 0 -4px 22px rgba(253, 190, 20, 0.5);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.na-img-box img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.na-card:has(.na-badge--sold) .na-img-box {
  filter: grayscale(1);
  opacity: 0.6;
}

/* On the photo's lower edge, clear of the product. */
.na-badge {
  position: absolute;
  top: 15px;
  top: calc(100cqi - 24px);
  left: 15px;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  background: #0b0b0f;
  color: #fdc404;
  font-family: var(--pd-font-body);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.na-badge--sold {
  background: #62626e;
  color: #ffffff;
}

.na-card .mi-wish {
  top: 13px;
  right: 13px;
}

.na-body {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: 17px 5px 4px;
}

.na-name {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.8em;
  margin: 0;
  font-family: var(--pd-font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.na-name a,
.na-name a:visited {
  color: #17171c;
  font: inherit;
  text-decoration: none;
}

.na-name a:hover {
  color: #8a6400;
  text-decoration: none;
}

.na-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 7px;
}

.na-price--new {
  order: -1;
  color: #0b0b0f;
  font-family: var(--pd-font-heading, "Poppins", sans-serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.na-price--old,
.na-price--na {
  color: #70707c;
  font-family: var(--pd-font-body);
  font-size: 12px;
  font-weight: 500;
}

.na-price--old {
  text-decoration: line-through;
}

.na-actions {
  margin-top: auto;
  padding-top: 4px;
}

.na-btn {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  border: 0;
  border-radius: 999px;
  font-family: var(--pd-font-heading, "Poppins", sans-serif);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.na-btn--buy,
.na-btn--details,
.na-btn--details:visited {
  justify-content: space-between;
  width: 100%;
  height: 40px;
  padding: 0 5px 0 15px;
  background: #0b0b0f;
  color: #ffffff;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.na-btn--buy::after,
.na-btn--details::after {
  content: "";
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: #fdc404 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0b0f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 15px no-repeat;
  transition: background-color 0.25s ease;
}

.na-btn--soldout {
  justify-content: center;
  width: 100%;
  height: 40px;
  background: #f1f1f5;
  color: #62626e;
  cursor: not-allowed;
}

/* Add to Cart: a round button on the photo's corner that opens to show its name. */
.na-btn--cart {
  position: absolute;
  top: -27px;
  right: 2px;
  z-index: 2;
  flex-direction: row-reverse;
  max-width: 40px;
  height: 40px;
  padding: 0 0 0 16px;
  overflow: hidden;
  background: #fdc404;
  box-shadow: 0 0 0 5px #ffffff;
  color: #0b0b0f;
  transition: max-width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.25s ease;
}

.na-btn--cart::before {
  content: "";
  flex: 0 0 40px;
  height: 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b0b0f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 3.5h2.6l2.3 11.2A1.6 1.6 0 0 0 9 16h8.6a1.6 1.6 0 0 0 1.5-1.2l1.7-6.9H6.2M9.5 20h.01M17.5 20h.01'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.na-btn--cart:disabled {
  cursor: default;
}

.na-btn--cart:disabled:not(.na-btn--added)::before {
  opacity: 0.4;
}

.na-btn--added {
  background: #0b0b0f;
}

.na-btn--added::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fdc404' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.na-btn:focus-visible,
.na-img-link:focus-visible,
.na-name a:focus-visible {
  outline: 2px solid #0b0b0f;
  outline-offset: 2px;
}

@media (hover: hover) {
  .na-card:hover {
    border-color: #fdc404;
    box-shadow: 0 26px 34px -24px rgba(214, 150, 0, 0.75);
    transform: translateY(-5px);
  }

  .na-card:hover .na-img-box::before {
    transform: translateY(-7%);
  }

  .na-card:hover .na-img-box img {
    transform: translateY(-2%) scale(1.04);
  }

  .na-card:hover .na-btn--buy,
  .na-card:hover .na-btn--details {
    background: #fdc404;
    color: #0b0b0f;
  }

  .na-card:hover .na-btn--buy::after,
  .na-card:hover .na-btn--details::after {
    background-color: #ffffff;
  }

  .na-btn--cart:not(:disabled):hover {
    max-width: 150px;
  }
}

.na-btn--cart:not(:disabled):focus-visible {
  max-width: 150px;
}

/* Very small phones: longer words need the arrow's space. */
@container (max-width: 150px) {
  .na-btn--details,
  .na-btn--buy:disabled {
    justify-content: center;
    padding: 0;
  }

  .na-btn--details::after,
  .na-btn--buy:disabled::after {
    display: none;
  }
}

@container (min-width: 230px) {
  .na-badge {
    top: calc(100cqi - 30px);
    left: 17px;
    padding: 7px 11px;
    font-size: 11.5px;
  }

  .na-body {
    gap: 8px;
    padding: 18px 9px 7px;
  }

  .na-name {
    font-size: 14.5px;
  }

  .na-price--new {
    font-size: 19px;
  }

  .na-price--old,
  .na-price--na {
    font-size: 13px;
  }

  .na-btn {
    font-size: 14px;
  }

  .na-btn--buy,
  .na-btn--details,
  .na-btn--details:visited,
  .na-btn--soldout {
    height: 44px;
    padding-left: 20px;
  }

  .na-btn--buy::after,
  .na-btn--details::after {
    flex-basis: 34px;
    height: 34px;
  }

  .na-btn--cart {
    top: -32px;
    right: 6px;
    max-width: 46px;
    height: 46px;
  }

  .na-btn--cart::before {
    flex-basis: 46px;
    height: 46px;
    background-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .na-card,
  .na-card * {
    transition: none !important;
  }
}
