/* =========================
   COLLECTION HERO
========================= */

.madam-collection-hero {
  position: relative;
  width: 100%;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  background-image: url("../images/collections/collection-hero-desktop.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.madam-collection-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.madam-collection-hero-inner {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.madam-collection-hero-content {
  width: min(100%, 860px);
  margin-inline: auto;
  text-align: center;
  color: #ffffff;
}

.madam-collection-hero-content h1 {
  margin: 0 0 22px;
  font-family: var(--font-main);
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.045em;
  color: #ffffff;
}

.madam-collection-hero-content p {
  max-width: 760px;
  margin: 0 auto;
  font-family: var(--font-main);
  font-size: 21px;
  line-height: 1.35;
  font-weight: 500;
  color: #ffffff;
}

/* =========================
   COLLECTION PRODUCT GRID
========================= */

.madam-collection-products-section {
  width: 100%;
  padding: 72px 0 96px;
  background: #ffffff;
}

.madam-collection-products-section .container {
  max-width: 1480px;
}

.madam-collection-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 46px 22px;
}

.madam-collection-product-card {
  width: 100%;
  min-width: 0;
}

.madam-collection-product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #f3f6ef;
  text-decoration: none;
}

.madam-collection-product-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 24px;
  transition: opacity 0.35s ease, transform 0.45s ease;
}

.madam-product-img-primary {
  opacity: 1;
  z-index: 1;
}

.madam-product-img-hover {
  opacity: 0;
  z-index: 2;
}

.madam-collection-product-card:hover .madam-product-img-primary {
  opacity: 0;
  transform: scale(1.03);
}

.madam-collection-product-card:hover .madam-product-img-hover {
  opacity: 1;
  transform: scale(1.03);
}

.madam-collection-product-info {
  padding-top: 16px;
  text-align: center;
}

.madam-collection-product-info h2 {
  max-width: 260px;
  margin: 0 auto 9px;
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.32;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--color-dark);
}

.madam-collection-product-info h2 a {
  color: inherit;
  text-decoration: none;
}

.madam-collection-product-info h2 a:hover {
  color: var(--color-green-dark);
}

.madam-collection-product-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 500;
  color: var(--color-dark);
}

.madam-collection-product-price del {
  opacity: 0.48;
  font-size: 13px;
  font-weight: 400;
  color: rgba(34, 34, 34, 0.62);
}

.madam-collection-product-price ins {
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  color: #c86b22;
}

/* =========================
   COLLECTION EMPTY STATE
========================= */

.madam-collection-empty {
  padding: 48px;
  border-radius: 18px;
  background: #f7f7f5;
  text-align: center;
}

.madam-collection-empty h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.2;
  color: var(--color-dark);
}

.madam-collection-empty p {
  margin: 0;
  color: rgba(34, 34, 34, 0.65);
}
/* =========================
   COLLECTION SORT TOOLBAR
========================= */

.madam-collection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(34, 34, 34, 0.08);
}

.madam-collection-count {
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.4;
  color: rgba(34, 34, 34, 0.62);
}

.madam-collection-order-form {
  display: flex;
  align-items: center;
  gap: 12px;
}

.madam-collection-order-form label {
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
  color: rgba(34, 34, 34, 0.62);
}

.madam-collection-order-form select {
  min-width: 210px;
  height: 42px;
  border: 1px solid rgba(34, 34, 34, 0.14);
  border-radius: 999px;
  background: #ffffff;
  padding: 0 42px 0 16px;
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
  color: var(--color-dark);
  outline: none;
  cursor: pointer;
}

.madam-collection-order-form select:focus {
  border-color: var(--color-green);
}

/* =========================
   EXCLUSIVELY FOR YOU
========================= */

.madam-exclusive-section {
  width: 100%;
  padding: 92px 0 104px;
  background: #ffffff;
}

.madam-exclusive-section .container {
  max-width: 1480px;
}

.madam-exclusive-heading {
  max-width: 760px;
  margin: 0 auto 54px;
  text-align: center;
}

.madam-exclusive-heading h2 {
  margin: 0 0 16px;
  font-family: var(--font-main);
  font-size: clamp(38px, 4.2vw, 58px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--color-dark);
}

.madam-exclusive-heading h2 em {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  color: var(--color-dark);
}

.madam-exclusive-heading p {
  max-width: 680px;
  margin: 0 auto;
  font-family: var(--font-main);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 400;
  color: rgba(34, 34, 34, 0.68);
}

.madam-exclusive-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 28px;
  align-items: stretch;
}

.madam-exclusive-image {
  width: 100%;
  min-height: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f6ef;
}

.madam-exclusive-image img {
  width: 100%;
  height: 100%;
  min-height: 720px;
  display: block;
  object-fit: cover;
  object-position: center;
}

.madam-exclusive-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 46px 22px;
  align-content: stretch;
}

/* Mantiene el mismo tamaño visual que la cuadrícula principal */
.madam-exclusive-product-card {
  width: 100%;
  min-width: 0;
}

/* Asegura que las imágenes sigan cuadradas como la grilla */
.madam-exclusive-product-card .madam-collection-product-media {
  aspect-ratio: 1 / 1;
}

/* Ajuste fino para que las dos filas acompañen la altura de la imagen */
.madam-exclusive-products .madam-collection-product-card {
  display: flex;
  flex-direction: column;
}

.madam-exclusive-products .madam-collection-product-media {
  flex: 0 0 auto;
}

.madam-exclusive-products .madam-collection-product-info {
  flex: 0 0 auto;
}

/* =========================
   RELATED COLLECTIONS
========================= */

.madam-related-collections-section {
  width: 100%;
  padding: 86px 0 76px;
  background: #ffffff;
}

.madam-related-collections-section .container {
  max-width: 1480px;
}

.madam-related-collections-heading {
  text-align: center;
  margin-bottom: 26px;
}

.madam-related-collections-heading h2 {
  margin: 0;
  font-family: var(--font-main);
  font-size: clamp(34px, 3.4vw, 46px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--color-dark);
}

.madam-related-collections-heading h2 em {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  color: var(--color-green);
}

.madam-related-collections-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  padding-bottom: 54px;
  border-bottom: 1px solid rgba(34, 34, 34, 0.12);
}

.madam-related-collection-card {
  min-width: 0;
  display: block;
  text-align: center;
  color: var(--color-dark);
  text-decoration: none;
}

.madam-related-collection-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f6ef;
}

.madam-related-collection-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 22px;
  transition: transform 0.45s ease;
}

.madam-related-collection-card:hover .madam-related-collection-image img {
  transform: scale(1.08);
}

.madam-related-collection-info {
  padding-top: 18px;
}

.madam-related-collection-info h3 {
  margin: 0 0 6px;
  font-family: var(--font-main);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 400;
  color: var(--color-dark);
}

.madam-related-collection-info p {
  margin: 0;
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 400;
  color: rgba(34, 34, 34, 0.68);
}

/* =========================
   COLLECTION PAGE MOBILE
========================= */

@media (max-width: 768px) {

  /* =========================
     MOBILE HERO
  ========================= */

  .madam-collection-hero {
    min-height: 660px;
    max-height: 660px;
    align-items: flex-start;
    background-image: url("../images/collections/collection-hero-mobile.webp") !important;
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
  }

  .madam-collection-hero-overlay {
    background: rgba(0, 0, 0, 0.42);
  }

  .madam-collection-hero-inner {
    min-height: 660px;
    align-items: flex-start;
    padding-top: 78px;
  }

  .madam-collection-hero-content {
    width: 100%;
    max-width: 92%;
    margin-inline: auto;
    text-align: center;
  }

  .madam-collection-hero-content h1 {
    margin: 0 0 18px;
    font-size: 42px;
    line-height: 1.02;
    letter-spacing: -0.04em;
  }

  .madam-collection-hero-content p {
    max-width: 340px;
    font-size: 16px;
    line-height: 1.38;
    font-weight: 500;
  }

  /* =========================
     MOBILE PRODUCT GRID BASE
  ========================= */

  .madam-collection-products-section {
    padding: 48px 0 68px;
  }

  .madam-collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 16px;
  }

  .madam-collection-product-img {
    padding: 18px;
  }

  .madam-collection-product-info {
    padding-top: 12px;
  }

  .madam-collection-product-info h2 {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.3;
  }

  .madam-collection-product-price {
    font-size: 14px;
    gap: 6px;
  }

  .madam-collection-product-price del {
    font-size: 12px;
  }

  .madam-collection-product-price ins {
    font-size: 14px;
  }

  .madam-collection-toolbar {
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
  }

  .madam-collection-order-form {
    gap: 8px;
  }

  .madam-collection-order-form select {
    min-width: 160px;
    height: 38px;
    font-size: 12px;
    padding: 0 34px 0 14px;
  }

  /* =========================
     MOBILE EXCLUSIVELY FOR YOU
  ========================= */

  .madam-exclusive-section {
    padding: 58px 0 72px;
  }

  .madam-exclusive-heading {
    max-width: 92%;
    margin: 0 auto 34px;
  }

  .madam-exclusive-heading h2 {
    margin-bottom: 12px;
    font-size: 36px;
    line-height: 1.06;
  }

  .madam-exclusive-heading p {
    max-width: 340px;
    font-size: 15px;
    line-height: 1.45;
  }

  .madam-exclusive-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .madam-exclusive-image {
    width: 100%;
    min-height: auto;
    border-radius: 10px;
  }

  .madam-exclusive-image img {
    width: 100%;
    height: 520px;
    min-height: 520px;
    object-fit: cover;
    object-position: center;
  }

  .madam-exclusive-products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 16px;
  }

  .madam-exclusive-product-card .madam-collection-product-media {
    aspect-ratio: 1 / 1;
  }

  /* =========================
     MOBILE RELATED COLLECTIONS
  ========================= */

  .madam-related-collections-section {
    padding: 58px 0 64px;
  }

  .madam-related-collections-heading {
    margin-bottom: 26px;
  }

  .madam-related-collections-heading h2 {
    font-size: 34px;
    line-height: 1.08;
  }

  .madam-related-collections-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
    padding-bottom: 42px;
  }

  .madam-related-collection-image {
    aspect-ratio: 1 / 1;
  }

  .madam-related-collection-image img {
    padding: 18px;
  }

  .madam-related-collection-info {
    padding-top: 13px;
  }

  .madam-related-collection-info h3 {
    font-size: 15px;
    line-height: 1.25;
  }

  .madam-related-collection-info p {
    font-size: 13px;
  }
}

/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 480px) {

  .madam-collection-hero {
    min-height: 620px;
    max-height: 620px;
  }

  .madam-collection-hero-inner {
    min-height: 620px;
    padding-top: 64px;
  }

  .madam-collection-hero-content h1 {
    font-size: 36px;
  }

  .madam-collection-hero-content p {
    font-size: 15px;
  }

  .madam-collection-toolbar {
    flex-direction: column;
  }

  .madam-collection-order-form {
    width: 100%;
    justify-content: space-between;
  }

  .madam-collection-order-form select {
    min-width: 190px;
  }

  .madam-exclusive-image img {
    height: 460px;
    min-height: 460px;
  }

  .madam-exclusive-heading h2 {
    font-size: 32px;
  }

  .madam-exclusive-products {
    gap: 30px 14px;
  }

  .madam-related-collections-grid {
    gap: 26px 14px;
  }
}