/* =========================
   MADAM AFRIC SHOP PAGE
========================= */

.madam-shop-page {
  width: 100%;
  background: var(--color-white);
}

/* =========================
   SHOP HERO
========================= */

.madam-shop-hero {
  position: relative;
  width: 100%;
  min-height: 420px;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.42) 0%,
      rgba(0, 0, 0, 0.22) 46%,
      rgba(0, 0, 0, 0.06) 100%
    ),
    url("../images/shop-hero.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.madam-shop-hero-inner {
  min-height: 420px;
  display: flex;
  align-items: center;
}

.madam-shop-hero-content {
  max-width: 680px;
  color: var(--color-white);
}

.madam-shop-eyebrow {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.madam-shop-hero-content h1 {
  margin: 0 0 18px;
  font-family: var(--font-main);
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--color-white);
}

.madam-shop-description {
  max-width: 560px;
}

.madam-shop-description p {
  margin: 0;
  font-family: var(--font-main);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
}

/* =========================
   SHOP PRODUCTS SECTION
========================= */

.madam-shop-products-section {
  width: 100%;
  padding: 72px 0 86px;
  background: var(--color-white);
}

/* =========================
   SHOP TOOLBAR
========================= */

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

.madam-shop-result-count,
.madam-shop-result-count .woocommerce-result-count {
  margin: 0;
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  color: rgba(34, 34, 34, 0.62);
}

.madam-shop-ordering {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.madam-shop-ordering form,
.madam-shop-ordering .woocommerce-ordering {
  margin: 0;
}

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

.madam-shop-ordering select:focus,
.madam-shop-ordering .orderby:focus {
  border-color: var(--color-green);
}

/* =========================
   WOO PRODUCT GRID
========================= */

.madam-shop-products-section ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 46px 28px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.madam-shop-products-section ul.products::before,
.madam-shop-products-section ul.products::after {
  display: none !important;
}

.madam-shop-products-section ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
  text-align: center;
}

.madam-shop-products-section ul.products li.product a {
  text-decoration: none;
  color: var(--color-dark);
}

/* =========================
   PRODUCT IMAGE
========================= */

.madam-shop-products-section ul.products li.product a.woocommerce-LoopProduct-link {
  display: block;
}

.madam-shop-products-section ul.products li.product img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  margin: 0 !important;
  padding: 30px;
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
}

.madam-shop-products-section ul.products li.product a.woocommerce-LoopProduct-link::before {
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 18px;
  border-radius: 8px;
  background: #f3f6ef;
}

.madam-shop-products-section ul.products li.product a.woocommerce-LoopProduct-link img {
  position: absolute;
  inset: 0;
}

.madam-shop-products-section ul.products li.product a.woocommerce-LoopProduct-link {
  position: relative;
}

.madam-shop-products-section ul.products li.product:hover img {
  transform: scale(1.045);
}

/* =========================
   PRODUCT TITLE + PRICE
========================= */

.madam-shop-products-section .woocommerce-loop-product__title {
  max-width: 300px;
  margin: 0 auto 8px !important;
  padding: 0 !important;
  font-family: var(--font-main);
  font-size: 16px !important;
  line-height: 1.35;
  font-weight: 400;
  color: var(--color-dark);
}

.madam-shop-products-section ul.products li.product .price {
  display: flex !important;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  margin: 0 !important;
  font-family: var(--font-main);
  font-size: 16px !important;
  line-height: 1.25;
  font-weight: 400;
  color: var(--color-dark) !important;
}

.madam-shop-products-section ul.products li.product .price del {
  font-size: 12px;
  color: rgba(34, 34, 34, 0.45);
  opacity: 1;
}

.madam-shop-products-section ul.products li.product .price ins {
  color: #c86b22;
  text-decoration: none;
  font-weight: 500;
}

/* =========================
   SALE BADGE
========================= */

.madam-shop-products-section span.onsale {
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  min-width: auto !important;
  min-height: auto !important;
  margin: 0 !important;
  padding: 7px 12px !important;
  border-radius: 999px;
  background: var(--color-green) !important;
  color: var(--color-white) !important;
  font-family: var(--font-main);
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  text-transform: uppercase;
  z-index: 5;
}

/* =========================
   ADD TO CART BUTTON
========================= */

.madam-shop-products-section ul.products li.product .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 16px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--color-dark);
  background: var(--color-dark);
  color: var(--color-white);
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.madam-shop-products-section ul.products li.product .button:hover {
  background: var(--color-green-dark);
  border-color: var(--color-green-dark);
  color: var(--color-white);
  transform: translateY(-1px);
}

.madam-shop-products-section ul.products li.product .added_to_cart {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-green);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* =========================
   PAGINATION
========================= */

.madam-shop-pagination {
  margin-top: 58px;
  display: flex;
  justify-content: center;
}

.madam-shop-pagination nav.woocommerce-pagination {
  width: 100%;
}

.madam-shop-pagination ul.page-numbers {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  list-style: none !important;
}

.madam-shop-pagination ul.page-numbers li {
  border: none !important;
  margin: 0 !important;
}

.madam-shop-pagination .page-numbers {
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(34, 34, 34, 0.12);
  background: #ffffff;
  color: var(--color-dark);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 42px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
}

.madam-shop-pagination .page-numbers.current,
.madam-shop-pagination .page-numbers:hover {
  background: var(--color-dark);
  border-color: var(--color-dark);
  color: var(--color-white);
}

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

.madam-shop-empty {
  padding: 60px 0;
  text-align: center;
}

.madam-shop-empty p {
  margin: 0;
  font-size: 16px;
  color: rgba(34, 34, 34, 0.72);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {
  .madam-shop-products-section ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .madam-shop-hero {
    min-height: 520px;
    background:
      linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.52) 0%,
        rgba(0, 0, 0, 0.24) 46%,
        rgba(0, 0, 0, 0.08) 100%
      ),
      url("../images/shop-hero-mobile.webp");
    background-size: cover;
    background-position: center bottom;
  }

  .madam-shop-hero-inner {
    min-height: 520px;
    align-items: flex-start;
    justify-content: center;
    padding-top: 62px;
  }

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

  .madam-shop-eyebrow {
    margin-bottom: 14px;
    font-size: 12px;
  }

  .madam-shop-hero-content h1 {
    margin-bottom: 16px;
    font-size: 40px;
    line-height: 1.05;
  }

  .madam-shop-description p {
    font-size: 15px;
    line-height: 1.45;
  }

  .madam-shop-products-section {
    padding: 48px 0 66px;
  }

  .madam-shop-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    margin-bottom: 32px;
    padding-bottom: 20px;
  }

  .madam-shop-result-count,
  .madam-shop-result-count .woocommerce-result-count {
    width: 100%;
    font-size: 13px;
  }

  .madam-shop-ordering {
    width: 100%;
  }

  .madam-shop-ordering form,
  .madam-shop-ordering .woocommerce-ordering {
    width: 100%;
  }

  .madam-shop-ordering select,
  .madam-shop-ordering .orderby {
    width: 100%;
    min-width: 0;
    height: 42px;
    font-size: 13px;
  }

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

  .madam-shop-products-section ul.products li.product img {
    padding: 18px;
  }

  .madam-shop-products-section ul.products li.product a.woocommerce-LoopProduct-link::before {
    margin-bottom: 14px;
  }

  .madam-shop-products-section .woocommerce-loop-product__title {
    font-size: 14px !important;
    line-height: 1.32;
  }

  .madam-shop-products-section ul.products li.product .price {
    font-size: 14px !important;
  }

  .madam-shop-products-section ul.products li.product .button {
    min-height: 38px;
    margin-top: 12px;
    padding: 0 16px;
    font-size: 12px;
  }

  .madam-shop-pagination {
    margin-top: 44px;
  }
}

@media (max-width: 480px) {
  .madam-shop-hero {
    min-height: 480px;
  }

  .madam-shop-hero-inner {
    min-height: 480px;
    padding-top: 54px;
  }

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

  .madam-shop-products-section ul.products {
    gap: 32px 14px;
  }

  .madam-shop-products-section ul.products li.product img {
    padding: 14px;
  }

  .madam-shop-products-section .woocommerce-loop-product__title {
    font-size: 13.5px !important;
  }

  .madam-shop-pagination .page-numbers {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
    line-height: 38px;
  }
}

/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {
  .madam-shop-products-section ul.products li.product img,
  .madam-shop-products-section ul.products li.product .button {
    transition-duration: 0.01ms !important;
  }
}

/* =========================
   SHOP FIXES
   Pagination + Equal Add to Cart Alignment
========================= */

/* Pagination container fix */
.madam-shop-pagination {
  width: 100%;
  margin-top: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.madam-shop-pagination nav.woocommerce-pagination {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.madam-shop-pagination ul.page-numbers {
  width: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  list-style: none !important;
}

.madam-shop-pagination ul.page-numbers li {
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  float: none !important;
}

.madam-shop-pagination .page-numbers {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0 !important;
  border: 1px solid rgba(34, 34, 34, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: var(--color-dark);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 40px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.madam-shop-pagination .page-numbers.current,
.madam-shop-pagination .page-numbers:hover {
  background: var(--color-dark);
  border-color: var(--color-dark);
  color: var(--color-white);
}

/* Remove unwanted WooCommerce pagination bar/background */
.woocommerce nav.woocommerce-pagination {
  background: transparent !important;
}

.woocommerce nav.woocommerce-pagination ul {
  background: transparent !important;
}

/* Product card height alignment */
.madam-shop-products-section ul.products li.product {
  display: flex !important;
  flex-direction: column;
  height: 100%;
}

/* Product main link becomes flexible */
.madam-shop-products-section ul.products li.product a.woocommerce-LoopProduct-link {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  width: 100%;
}

/* Keep product title space consistent */
.madam-shop-products-section .woocommerce-loop-product__title {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Keep price space consistent */
.madam-shop-products-section ul.products li.product .price {
  min-height: 24px;
  margin-top: auto !important;
}

/* Push Add to Cart buttons to same height */
.madam-shop-products-section ul.products li.product .button {
  align-self: center;
  margin-top: 18px !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .madam-shop-pagination {
    margin-top: 44px;
  }

  .madam-shop-pagination .page-numbers {
    width: 38px;
    min-width: 38px;
    height: 38px;
    font-size: 13px;
    line-height: 36px;
  }

  .madam-shop-products-section .woocommerce-loop-product__title {
    min-height: 40px;
  }

  .madam-shop-products-section ul.products li.product .button {
    margin-top: 14px !important;
  }
}

@media (max-width: 480px) {
  .madam-shop-pagination ul.page-numbers {
    gap: 6px;
  }

  .madam-shop-pagination .page-numbers {
    width: 36px;
    min-width: 36px;
    height: 36px;
    font-size: 12.5px;
    line-height: 34px;
  }

  .madam-shop-products-section .woocommerce-loop-product__title {
    min-height: 38px;
  }
}

/* =========================
   SHOP PAGINATION CENTER FIX
========================= */

.madam-shop-pagination .page-numbers {
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

.madam-shop-pagination a.page-numbers,
.madam-shop-pagination span.page-numbers {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

.madam-shop-pagination .prev.page-numbers,
.madam-shop-pagination .next.page-numbers {
  font-size: 16px !important;
  line-height: 1 !important;
  padding-bottom: 2px !important;
}

@media (max-width: 768px) {
  .madam-shop-pagination .page-numbers {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
  }
}

@media (max-width: 480px) {
  .madam-shop-pagination .page-numbers {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }
}
/* =========================
   SHOP HERO MOBILE TEXT BOTTOM
========================= */

@media (max-width: 768px) {
  .madam-shop-hero {
    min-height: 560px;
    background-position: center bottom;
  }

  .madam-shop-hero-inner {
    min-height: 560px;
    align-items: flex-end;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 54px;
  }

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

@media (max-width: 480px) {
  .madam-shop-hero {
    min-height: 520px;
  }

  .madam-shop-hero-inner {
    min-height: 520px;
    padding-bottom: 44px;
  }
}

/* =========================
   SHOP HERO TEXT OVERLAY
   Desktop + Mobile
========================= */

.madam-shop-hero {
  position: relative;
}

.madam-shop-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.38);
  pointer-events: none;
}

.madam-shop-hero-inner {
  position: relative;
  z-index: 2;
}

/* Mobile: un poco más oscura para mejorar lectura */
@media (max-width: 768px) {
  .madam-shop-hero::before {
    background: rgba(0, 0, 0, 0.48);
  }
}