/**
 * Homepage — New Arrivals.
 * Scoped under .v-new-arrivals / .v-home-section--new-arrivals.
 */

/* --------------------------------------------------------------------------
   Section shell
   -------------------------------------------------------------------------- */

.v-new-arrivals {
  --v-na-cols: 4;

  display: flex;
  flex-direction: column;
  gap: var(--v-space-8);
}

/* Sharp editorial cards inside this section */
.v-new-arrivals .v-product-card__media,
.v-new-arrivals .v-product-card__quick-add,
.v-new-arrivals .v-badge {
  border-radius: 0;
}

.v-new-arrivals .v-product-card__swatch {
  border-radius: 50%;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.v-new-arrivals__header {
  display: flex;
  flex-direction: column;
  gap: var(--v-space-5);
  align-items: flex-start;
}

.v-new-arrivals__copy {
  display: flex;
  flex-direction: column;
  gap: var(--v-space-3);
  max-width: 36rem;
}

.v-new-arrivals__eyebrow {
  margin: 0;
  letter-spacing: 0.22em;
}

.v-new-arrivals__heading {
  margin: 0;
  font-family: var(--v-font-display);
  font-weight: var(--v-font-weight-regular);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--v-color-ink);
}

.v-new-arrivals__desc {
  margin: 0;
  max-width: 28rem;
  font-size: var(--v-text-md);
  line-height: var(--v-leading-relaxed);
  color: var(--v-color-ink-muted);
  font-weight: var(--v-font-weight-light);
}

.v-new-arrivals__cta-btn {
  letter-spacing: 0.14em;
  min-height: 44px;
}

/* --------------------------------------------------------------------------
   Product grid
   -------------------------------------------------------------------------- */

.v-new-arrivals__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--v-space-5) var(--v-space-4);
}

.v-new-arrivals__item {
  min-width: 0;
}

@media (max-width: 379.98px) {
  .v-new-arrivals__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 768px) {
  .v-new-arrivals {
    gap: var(--v-space-9);
  }

  .v-new-arrivals__header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--v-space-8);
  }

  .v-new-arrivals__grid {
    gap: var(--v-space-7) var(--v-space-5);
  }
}

@media (min-width: 1024px) {
  .v-new-arrivals {
    gap: var(--v-space-10);
  }

  .v-new-arrivals__grid {
    grid-template-columns: repeat(var(--v-na-cols, 4), minmax(0, 1fr));
    gap: var(--v-space-8) var(--v-space-5);
  }
}

/* --------------------------------------------------------------------------
   Product card refinements (section-scoped)
   -------------------------------------------------------------------------- */

.v-new-arrivals .v-product-card {
  gap: var(--v-space-3);
}

.v-new-arrivals .v-product-card__media {
  aspect-ratio: auto;
  background: var(--v-color-paper-warm);
}

.v-new-arrivals .v-product-card__link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.v-new-arrivals .v-product-card__link:focus-visible {
  outline: none;
  box-shadow: var(--v-shadow-focus);
}

.v-new-arrivals .v-product-card__imgs {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: var(--v-product-card-ratio, 4 / 5);
  overflow: hidden;
}

.v-new-arrivals .v-product-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 13%;
  transform: scale(1.035);
  transition:
    opacity var(--v-duration-slow) var(--v-ease-standard),
    transform var(--v-duration-slow) var(--v-ease-emphasized);
}

.v-new-arrivals .v-product-card__img--secondary {
  opacity: 0;
}

@media (hover: hover) and (pointer: fine) {
  .v-new-arrivals .v-product-card:hover .v-product-card__img--primary,
  .v-new-arrivals .v-product-card:focus-within .v-product-card__img--primary {
    transform: scale(1.055);
  }

  .v-new-arrivals .v-product-card--has-hover-image:hover .v-product-card__img--primary,
  .v-new-arrivals .v-product-card--has-hover-image:focus-within .v-product-card__img--primary {
    opacity: 0;
    transform: scale(1.035);
  }

  .v-new-arrivals .v-product-card--has-hover-image:hover .v-product-card__img--secondary,
  .v-new-arrivals .v-product-card--has-hover-image:focus-within .v-product-card__img--secondary {
    opacity: 1;
    transform: scale(1.055);
  }
}

.v-new-arrivals .v-product-card__actions {
  left: var(--v-space-3);
  right: var(--v-space-3);
  bottom: var(--v-space-3);
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--v-space-2);
}

.v-new-arrivals .v-product-card__wishlist {
  min-width: 44px;
  min-height: 44px;
  background: rgba(247, 245, 240, 0.94);
  color: var(--v-color-ink);
  border: 0;
}

.v-new-arrivals .v-product-card__wishlist:hover,
.v-new-arrivals .v-product-card__wishlist:focus-visible {
  background: #fff;
}

.v-new-arrivals .v-product-card__quick-add {
  margin-left: auto;
  min-height: 44px;
  padding-inline: 1rem;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  background: rgba(247, 245, 240, 0.94);
  color: var(--v-color-ink);
  border: 0;
}

.v-new-arrivals .v-product-card__quick-add:hover,
.v-new-arrivals .v-product-card__quick-add:focus-visible {
  background: #fff;
  color: var(--v-color-ink);
}

.v-new-arrivals .v-product-card__title {
  font-family: var(--v-font-body);
  font-size: var(--v-text-sm);
  font-weight: var(--v-font-weight-medium);
  letter-spacing: 0.01em;
}

.v-new-arrivals .v-product-card__title a:focus-visible {
  outline: none;
  box-shadow: var(--v-shadow-focus);
}

.v-new-arrivals .v-price del {
  opacity: 0.55;
  margin-right: 0.35em;
}

.v-new-arrivals .v-badge--sold-out {
  background: rgba(247, 245, 240, 0.92);
  color: var(--v-color-ink);
}

.v-new-arrivals .v-product-card__swatches {
  list-style: none;
  margin: var(--v-space-2) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.v-new-arrivals .v-product-card__swatch {
  display: block;
  width: 0.75rem;
  height: 0.75rem;
  border: 1px solid rgba(18, 20, 18, 0.18);
  background: var(--v-color-paper-warm);
}

.v-new-arrivals .v-product-card__swatch--muted {
  background: repeating-linear-gradient(
    -45deg,
    #e8e4dc,
    #e8e4dc 2px,
    #f7f5f0 2px,
    #f7f5f0 4px
  );
}

.v-new-arrivals .v-product-card--sold-out .v-product-card__img--primary {
  opacity: 0.72;
}

/* --------------------------------------------------------------------------
   Admin empty state
   -------------------------------------------------------------------------- */

.v-new-arrivals__empty {
  padding: var(--v-space-9) var(--v-space-5);
  border: 1px dashed var(--v-color-border-strong, #d4cfc4);
  text-align: center;
}

.v-new-arrivals__empty-title {
  margin: 0 0 var(--v-space-2);
  font-family: var(--v-font-display);
  font-size: var(--v-text-xl, 1.25rem);
  font-weight: var(--v-font-weight-regular);
}

.v-new-arrivals__empty-text {
  margin: 0 auto;
  max-width: 32rem;
  color: var(--v-color-ink-muted);
  font-size: var(--v-text-sm);
  line-height: var(--v-leading-relaxed);
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .v-new-arrivals .v-product-card__img,
  .v-new-arrivals .v-product-card__actions {
    transition: none !important;
  }

  .v-new-arrivals .v-product-card:hover .v-product-card__img--primary,
  .v-new-arrivals .v-product-card:focus-within .v-product-card__img--primary {
    transform: scale(1.035);
  }
}
