/**
Product card, blog card and album card common styles

*/

/* Border and shadow */

.card {
  /* overflow: hidden; */
}

.card:hover .card-hover-visible {
  visibility: visible;
}

.card__inner {
  position: relative;
  box-sizing: border-box;
  border-radius: var(--border-radius);
  border: var(--border-width) solid var(--color-border);
  isolation: isolate
}

.card__images {
  padding: var(--image-padding);
  border-start-start-radius: var(--border-radius);
  border-start-end-radius: var(--border-radius);
  isolation: isolate
}

.card__images:hover .card__images-hover-visible {
  visibility: visible;
}

.card__images .collection-entry-image__default {
  display: block;
}

.card--standard .card__texts {
  padding: 16px 0;
}

.card--card .card__texts {
  padding: 16px;
}

.card__texts > div,
.card__texts > p,
.card__texts h5,
.card__texts > button,
.card__images .overlay-title,
.card__texts h3 {
  text-align: var(--text-alignment);
}

.collection-card .overlay-title {
  color: #fff;
  height: 40px;
  background: linear-gradient(360deg, rgba(0, 0, 0, 0.8) 0%, rgba(102, 102, 102, 0) 100%);
  border-radius: var(--border-radius);
}

@media (min-width: 960px) {
  .product-image:hover .product-image__second-image {
    opacity: 1;
    transition: opacity var(--duration-default) ease-in-out;
    background-color: white;
  }

  .collection-card .overlay-title {
    height: 80px;
  }
}

.product-card__image {
  min-height: 110px;
}

.product-image__carousel {
  width: 100%;
}

.image-carousel__control {
  gap: 6px;
}

.image-carousel__control .i-spzhtml-slide-indicator__dot.i-spzhtml-slide-indicator__dot--active,
.image-carousel__control .i-spzhtml-slide-indicator__progress-bar.i-spzhtml-slide-indicator__progress-bar--active {
  background-color: var(--color-text-0);
}

.image-carousel__control .i-spzhtml-slide-indicator__dot,
.image-carousel__control .i-spzhtml-slide-indicator__progress-bar {
  background-color: var(--color-text-3);
}

.product-snippet__thumbnails-item__img {
  text-align: start;
}

/* Sliding mode */
.product-snippet__thumbnails__carousel
  .product-snippet__thumbnails-item
  > input:checked
  + .product-snippet__thumbnails-item__img::after,
.product-snippet__thumbnails__carousel .product-snippet__thumbnails-item:hover::after {
  inset-inline-end: 6px !important;
}

.product-snippet__thumbnails-item:hover::after,
.product-snippet__thumbnails-item input:checked + .product-snippet__thumbnails-item__img::after {
  inset: 0;
  content: '';
  position: absolute;
  border: 1px solid var(--color-input-border);
  border-radius: var(--variant-pills-radius);
}
@media (max-width: 958.98px) {
  .product-snippet__thumbnails-item:hover::after {
    border: none ;
  }
}

.product-snippet__thumbnails-item__img > spz-img {
  border-radius: var(--variant-pills-radius);
}

.product-snippet__thumbnails-item {
  width: 32px;
  height: 40px;
}

/* Collection card: Cosy-style round texture dots */
.product-snippet__thumbnails.is-swatch-dot {
  gap: 4px;
  align-items: center;
  min-height: 20px;
}
.product-snippet__thumbnails.is-swatch-dot.sliding,
.product-snippet__thumbnails.is-swatch-dot.tile {
  gap: 4px;
}
.product-thumbnail-one-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.product-thumbnail-one-line .product-snippet__thumbnails-item {
  display: none;
}
.product-thumbnail-one-line.expanded .product-snippet__thumbnails-item {
  display: block;
}
.product-thumbnail-one-line.expanded .product-thumbnail-one-line__remain {
  display: none;
}
.product-snippet__thumbnails.is-swatch-dot .product-thumbnail-one-line {
  gap: 4px;
  align-items: center;
}
.product-snippet__thumbnails.is-swatch-dot .product-snippet__thumbnails-item,
.product-snippet__thumbnails.is-swatch-dot .product-snippet__thumbnails__carousel .product-snippet__thumbnails-item {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.product-snippet__thumbnails.is-swatch-dot .product-snippet__thumbnails-item__img {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
}
.product-snippet__thumbnails.is-swatch-dot .product-snippet__thumbnails-item__img > spz-img,
.product-snippet__thumbnails.is-swatch-dot .product-snippet__thumbnails-item__img img {
  width: 14px !important;
  height: 14px !important;
  border-radius: 999px;
  object-fit: cover;
}
.product-snippet__thumbnails.is-swatch-dot .product-snippet__thumbnails-item:hover::after,
.product-snippet__thumbnails.is-swatch-dot
  .product-snippet__thumbnails-item
  input:checked
  + .product-snippet__thumbnails-item__img::after {
  inset: -3px;
  border: 1px solid var(--color-foreground-heading);
  border-radius: 999px;
}
@media (max-width: 958.98px) {
  .product-snippet__thumbnails.is-swatch-dot .product-snippet__thumbnails-item:hover::after {
    border: 1px solid var(--color-foreground-heading);
  }
}
.product-snippet__thumbnails.is-swatch-dot .product-thumbnail-one-line__remain {
  height: 14px;
  min-height: 14px;
  font-size: 11px;
  line-height: 14px;
}
.product-snippet__thumbnails.is-swatch-dot .product-snippet__thumbnails__carousel {
  height: 20px !important;
}

/* Solid color dots (brand map; hide product thumb img) */
.product-snippet__thumbnails.is-swatch-solid .product-snippet__thumbnails-item__img {
  background-color: var(--color-border);
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: inset 0 0 0 1px var(--color-border);
}
.product-snippet__thumbnails.is-swatch-solid .product-snippet__thumbnails-item__img > spz-img,
.product-snippet__thumbnails.is-swatch-solid .product-snippet__thumbnails-item__img img {
  opacity: 0 !important;
  pointer-events: none;
}

.product-snippet__thumbnails__carousel .product-snippet__thumbnails-item {
  width: 38px;
}

.product-snippet__thumbnails.sliding,
.product-snippet__thumbnails.tile {
  gap: 6px;
  flex-wrap: wrap;
}

/* Scroll thumbnails left and right buttons */
.product-snippet__thumbnails {
  position: relative;
}
/* Left and right arrows must be based on the upper element to locate, otherwise the edge will be transparent when the card is hovered and enlarged, the -5px below is to cover the edge */
.product-snippet__thumbnails__carousel {
  position: static !important;
}

.product-snippet__thumbnails__carousel .spz-carousel-button {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100%;
  cursor: pointer;
  top: 50% !important;
  transform: translateY(-50%) !important;
}
.product-snippet__thumbnails__carousel .spz-carousel-button.spz-disabled {
  opacity: 0;
  pointer-events: none;
}
.product-snippet__thumbnails__carousel .spz-carousel-button-next {
  inset-inline-end: 0 !important;
  inset-inline-start: auto !important;
}
.product-snippet__thumbnails__carousel .spz-carousel-button-prev {
  inset-inline-start: 0 !important;
  inset-inline-end: auto !important;
}

.product-thumbnail-one-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.product-thumbnail-one-line .product-snippet__thumbnails-item {
  display: none;
}

.product-thumbnail-one-line.expanded .product-snippet__thumbnails-item {
  display: block;
}
.product-thumbnail-one-line.expanded .product-thumbnail-one-line__remain {
  display: none;
}

.product-variant-render[finish] spz-loading[role='loading'] {
  display: none;
}

.product-variant-popup {
  max-height: 90%;
  overflow-y: auto;
  font-size: 12px;
  line-height: 16px;
}
/* Popup sits on mobile; keep original ladder, not the +8 heading bump */
.product-variant-popup .pd-info-variants-title,
.product-variant-popup .h4 {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}
.product-variant-popup .atlas-variant-button label,
.product-variant-popup .atlas-variant-button label span {
  font-size: 12px;
  line-height: 16px;
}
/* At least 2 size pills per row in the card overlay; more columns when the popup is wider. */
.product-variant-popup__values {
  display: grid;
  width: 100%;
  gap: 10px;
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(4.5rem, max(0px, calc((100% - 10px) / 2))), 1fr)
  );
}
.product-variant-popup__values .atlas-variant-button {
  min-width: 0;
  width: 100%;
}
.product-variant-popup__values .atlas-variant-button label {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-inline: 8px;
  flex-shrink: 1;
}
.product-variant-popup + .i-spzhtml-lightbox-mask {
  display: none;
}

.atlas-product-snippet {
  overflow: visible !important;
}
.atlas-product-snippet.open-variant-popup .shoplazza-productLabel-wrapper.painter  {
  visibility: hidden;
}

.product-card__form[status*="unavailable"] button[role='addToCart'],
.product-card__form[status='soldout'] button[role='addToCart'] {
  background-color: var(--color-disabled-background) !important;
  color: var(--color-disabled-text) !important;
  border-color: var(--color-disabled-border) !important;
  pointer-events: none;
  cursor: default;
}
.atlas-product-snippet .product__quick-add:not(.product__quick-add--icon),
.atlas-product-snippet .quick-wishlist {
  -webkit-backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

/*
  Card labels + quick-add.
  Sizes are the 375px mobile spec (card width 174px) and scale with the image.
  100cqw is the image width.
  Labels follow the reading direction: English top-left, Arabic top-right.
  The + button stays on the physical left. pinQuickAdd repeats that inline.
*/
.product-card .product-snippet__img-wrapper,
.pd-img {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
}
.product-card .product_snippet__labels {
  left: auto;
  right: auto;
  bottom: auto;
  inset-inline-end: auto;
  top: calc(100cqw * 4 / 174) !important;
  inset-inline-start: calc(100cqw * 8 / 174) !important;
  align-items: flex-start;
  gap: calc(100cqw * 2 / 174);
  max-width: calc(100% - (100cqw * 16 / 174));
}
.product-card .product_snippet__labels .badge {
  padding: calc(100cqw * 2 / 174) calc(100cqw * 6 / 174);
  border-radius: calc(100cqw * 4 / 174);
  min-width: 0;
  min-height: 0;
}
.product-card .product__quick-add--icon {
  inset-inline-start: auto;
  inset-inline-end: auto;
  right: auto;
  top: auto;
  bottom: calc(100cqw * 4 / 174) !important;
  left: calc(100cqw * 8 / 174) !important;
  z-index: 4 !important;
  width: calc(100cqw * 18 / 174) !important;
  height: calc(100cqw * 18 / 174) !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.product-card .product__quick-add--icon > .button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 0.5px solid #F3F3F5 !important;
  overflow: visible !important;
  color: var(--color-primary-button-text, #fff);
}
.product-card .product__quick-add--icon .button-content,
.product-card .product__quick-add--icon .atlas-icon,
.product-card .product__quick-add--icon spz-custom-theme-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: calc(100cqw * 18 / 174 * 14 / 22) !important;
  height: calc(100cqw * 18 / 174 * 14 / 22) !important;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  line-height: 0;
}
.product-card .product__quick-add--icon .button-content svg,
.product-card .product__quick-add--icon .atlas-icon svg,
.product-card .product__quick-add--icon svg,
.product-card .product__quick-add--icon img {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none;
  object-fit: contain;
  display: block;
}

.product__quick-add .button[disabled] {
  display: none;
}


.card__texts spz-text>spz-currency {
  display: inline-block;
}

/*
  Landed-price bar on the card image.
  174px card = the 375px spec. Every length is that spec times image width / 174.
*/
.nb-card-landed {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  pointer-events: none;
}
.pd-images-carousel[zoom-in] .nb-card-landed,
.page-zoom-in .nb-card-landed {
  display: none;
}
.nb-card-landed__bar {
  height: calc(100cqw * 26 / 174);
  display: flex;
  align-items: center;
  overflow: hidden;
  background-image: linear-gradient(90deg, #673b14 0%, #674326 46%, #553318 100%);
}
.nb-card-landed__lines {
  width: 100%;
  min-width: 0;
  padding-left: calc(100cqw * 30 / 174);
  padding-right: calc(100cqw * 71 / 174);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(100cqw * 2 / 174);
}
html[dir='rtl'] .nb-card-landed__lines {
  text-align: right;
}
.nb-card-landed__row {
  margin: 0;
  display: flex;
  align-items: center;
  gap: calc(100cqw * 2 / 174);
  min-width: 0;
  font-size: calc(100cqw * 7 / 174);
  line-height: 1;
  font-weight: 500;
}
html[dir='rtl'] .nb-card-landed__row {
  justify-content: flex-start;
}
.nb-card-landed__lines > .nb-card-landed__row:first-child {
  align-items: baseline;
}
.nb-card-landed__lines > .nb-card-landed__row:first-child .nb-card-landed__icon {
  align-self: center;
}
.nb-card-landed__lines > .nb-card-landed__row:last-child {
  font-size: calc(100cqw * 6 / 174);
}
.nb-card-landed__icon {
  width: calc(100cqw * 10 / 174) !important;
  height: calc(100cqw * 10 / 174) !important;
  max-width: none !important;
  max-height: none !important;
  flex: 0 0 calc(100cqw * 10 / 174) !important;
  object-fit: contain;
  display: block;
}
.nb-card-landed .money {
  display: inline-flex;
  align-items: center;
  direction: ltr;
  unicode-bidi: isolate;
  gap: calc(100cqw * 1 / 174);
}
.nb-card-landed__unit {
  display: inline-block;
  unicode-bidi: isolate;
}
.nb-card-landed__num,
.nb-card-landed__num .money {
  font-size: calc(100cqw * 10 / 174);
  line-height: 1;
}
.nb-card-landed__num .nb-card-landed__unit {
  font-size: calc(100cqw * 7 / 174);
  line-height: 1;
}
.nb-card-landed__ink,
.nb-card-landed__ink .money {
  background-image: linear-gradient(0deg, #ffe8bc 0%, #fadcb6 50%, #ce9c5a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}
.nb-card-landed__pay {
  position: absolute;
  right: -1px;
  bottom: 0;
  z-index: 3;
  width: calc(100cqw * 68 / 174 + 1px);
  height: calc(100cqw * 38 / 174);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: calc(100cqw * 3 / 174);
  padding: calc(100cqw * 2 / 174) calc(100cqw * 9 / 174) calc(100cqw * 2 / 174) calc(100cqw * 10 / 174);
  background: #FEF3DF;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 38'%3E%3Cpath fill='white' d='M-1 40H70V-1H12Q8 0 7.18 3.92L-1 40Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 38'%3E%3Cpath fill='white' d='M-1 40H70V-1H12Q8 0 7.18 3.92L-1 40Z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.nb-card-landed__pay::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(-55deg, #935629 0%, #7f4b23 48%, #663a15 100%);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 38'%3E%3Cpath fill='white' d='M-1 40H70V-1H12Q8 0 7.18 3.92L-1 40Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 38'%3E%3Cpath fill='white' d='M-1 40H70V-1H12Q8 0 7.18 3.92L-1 40Z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.nb-card-landed__pay-kicker,
.nb-card-landed__pay-num {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  line-height: 1;
  font-weight: 600;
  text-align: right;
}
.nb-card-landed__pay-kicker {
  font-size: calc(100cqw * 8 / 174);
}
.nb-card-landed__pay-num,
.nb-card-landed__pay-num .money {
  font-size: calc(100cqw * 18 / 174);
}
.nb-card-landed__pay-num .money,
.nb-card-landed__pay-num .nb-card-landed__pay-money {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: nowrap;
  white-space: nowrap;
  direction: ltr;
  gap: 0.2em;
}
.nb-card-landed__pay-num .nb-card-landed__unit {
  font-size: calc(100cqw * 8 / 174);
  line-height: 1;
}
.nb-card-landed__pay-ink,
.nb-card-landed__pay-ink .money,
.nb-card-landed__pay-money,
.nb-card-landed__pay-figure,
.nb-card-landed__pay-num .nb-card-landed__unit {
  background-image: linear-gradient(-42deg, #f4ce97 0%, #f0deb6 50%, #ce9c5a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}

/* PDP first image has no + button. Left copy only: inset 8, type +2. Price block stays the card size. */
.pd-img .nb-card-landed__lines {
  padding-left: calc(100cqw * 8 / 174);
  padding-right: calc(100cqw * 72 / 174);
}
.pd-img .nb-card-landed__row {
  font-size: calc(100cqw * 9 / 174);
}
.pd-img .nb-card-landed__lines > .nb-card-landed__row:last-child {
  font-size: calc(100cqw * 8 / 174);
}
.pd-img .nb-card-landed__num,
.pd-img .nb-card-landed__num .money {
  font-size: calc(100cqw * 12 / 174);
}
.pd-img .nb-card-landed__num .nb-card-landed__unit {
  font-size: calc(100cqw * 9 / 174);
}


