/* =========================
   MADAM AFRIC - PRODUCT CSS
========================= */

/* =========================
   SINGLE PRODUCT PAGE
========================= */

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

.madam-product-main {
  width: 100%;
  padding-block: 56px 80px;
  overflow: visible;
}

.madam-product-layout {
  display: grid;
  grid-template-columns: 48% 52%;
  gap: 56px;
  align-items: flex-start;
  overflow: visible;
}

/* =========================
   PRODUCT GALLERY DESKTOP
========================= */

.madam-product-gallery {
  width: 100%;
  position: relative;
  overflow: visible;
}

.madam-product-main-image {
  width: 100%;
  min-height: 560px;
  background: #f3f6ef;
  border-radius: 8px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

.madam-product-main-image img {
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: contain;
  display: block;
  padding: 36px;
}

.madam-product-thumbnails {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.madam-product-thumb {
  min-height: 250px;
  background: #f3f6ef;
  border-radius: 8px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

.madam-product-thumb img {
  width: 100%;
  height: 100%;
  max-height: 250px;
  object-fit: contain;
  padding: 24px;
  display: block;
}

/* Mobile gallery hidden on desktop */
.madam-mobile-gallery {
  display: none;
}

/* =========================
   STICKY PRODUCT SUMMARY
========================= */

.madam-product-summary {
  position: sticky;
  top: 110px;
  align-self: flex-start;
  height: fit-content;
  z-index: 2;
  padding-top: 10px;
}

/* =========================
   PRODUCT SUMMARY CONTENT
========================= */

.madam-product-title {
  margin: 0 0 12px;
  font-family: var(--font-main);
  font-size: 36px;
  line-height: 1.15;
  font-weight: 500;
  color: var(--color-dark);
}

.madam-product-price {
  margin-bottom: 26px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 500;
  color: var(--color-dark);
}

.madam-product-price del {
  font-size: 16px;
  color: rgba(34, 34, 34, 0.45);
  margin-right: 8px;
}

.madam-product-price ins {
  color: #c86b22;
  text-decoration: none;
}

.madam-product-description {
  max-width: 680px;
  margin-bottom: 36px;
}

.madam-product-description p {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(34, 34, 34, 0.78);
}

.madam-product-description h2 {
  margin: 0 0 16px;
  font-family: var(--font-main);
  font-size: 32px;
  line-height: 1.15;
  font-weight: 500;
  color: var(--color-dark);
}

.madam-product-description ul {
  margin: 0;
  padding-left: 20px;
}

.madam-product-description li {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(34, 34, 34, 0.78);
}

.madam-product-disclaimer {
  margin-bottom: 26px;
}

.madam-product-disclaimer h3 {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--color-dark);
}

.madam-product-disclaimer p {
  max-width: 680px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(34, 34, 34, 0.72);
}

.madam-product-rating {
  margin-bottom: 12px;
}

.madam-product-stock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  font-size: 14px;
  color: #4d6b36;
}

.stock-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #6b8a3a;
  display: inline-block;
}

.stock-dot.out {
  background: #b33a3a;
}

.madam-product-delivery {
  border: 1px solid rgba(34, 34, 34, 0.12);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 18px;
  font-size: 14px;
  color: rgba(34, 34, 34, 0.78);
}

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

.madam-product-cart {
  width: 100%;
  margin-bottom: 14px;
}

.madam-product-cart form.cart {
  width: 100%;
  display: flex !important;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  flex-wrap: nowrap;
}

.madam-product-cart form.cart::before,
.madam-product-cart form.cart::after {
  display: none !important;
  content: none !important;
}

.madam-product-cart .quantity {
  flex: 0 0 130px;
  width: 130px !important;
  height: 54px;
  border: 1px solid rgba(34, 34, 34, 0.16);
  border-radius: 999px;
  background: var(--color-white);

  display: grid !important;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;

  overflow: hidden;
  margin: 0 !important;
}

.madam-product-cart .quantity input.qty {
  width: 100% !important;
  height: 52px;
  border: none;
  outline: none;
  text-align: center;
  font-size: 16px;
  color: var(--color-dark);
  background: transparent;
  appearance: textfield;
  -moz-appearance: textfield;
  margin: 0 !important;
  padding: 0 !important;
}

.madam-product-cart .quantity input.qty::-webkit-outer-spin-button,
.madam-product-cart .quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.madam-qty-btn {
  width: 38px;
  height: 52px;
  border: none;
  background: transparent;
  color: rgba(34, 34, 34, 0.45);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  margin: 0;
}

.madam-qty-btn:hover {
  color: var(--color-dark);
}

.madam-product-cart button.single_add_to_cart_button {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
  height: 54px;
  border: none;
  border-radius: 999px;
  background: var(--color-dark) !important;
  color: var(--color-white) !important;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin: 0 !important;
  padding: 0 28px !important;
  white-space: nowrap;
  transition: background 0.3s ease, transform 0.3s ease;
}

.madam-product-cart button.single_add_to_cart_button:hover {
  background: #000000 !important;
  transform: translateY(-2px);
}

.madam-buy-now {
  width: 100%;
  height: 54px;
  border-radius: 999px;
  background: #606b57;
  color: var(--color-white);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 34px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.madam-buy-now:hover {
  background: var(--color-green-dark);
  transform: translateY(-2px);
}

.madam-product-share {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: rgba(34, 34, 34, 0.7);
}

.madam-product-share a {
  text-decoration: none;
  color: rgba(34, 34, 34, 0.7);
  font-weight: 600;
}

/* =========================
   BEST SELLERS
========================= */

.madam-best-sellers {
  background: #f3f6ef;
  padding-block: 72px 78px;
}

.madam-best-sellers-heading {
  text-align: center;
  margin-bottom: 44px;
}

.madam-best-sellers-heading h2 {
  margin: 0;
  font-family: var(--font-main);
  font-size: 36px;
  line-height: 1.2;
  font-weight: 400;
  color: var(--color-dark);
}

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

.madam-best-sellers-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 34px;
}

.madam-best-seller-card {
  text-align: center;
  text-decoration: none;
  color: var(--color-dark);
}

.madam-best-seller-image {
  width: 100%;
  height: 220px;
  background: transparent;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 18px;
}

.madam-best-seller-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.madam-best-seller-card:hover .madam-best-seller-image img {
  transform: scale(1.04);
}

.madam-best-seller-info h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--color-dark);
}

.madam-best-seller-info p {
  margin: 0;
  font-size: 14px;
  color: rgba(34, 34, 34, 0.7);
}

/* =========================
   TABLET PRODUCT PAGE
========================= */

@media (max-width: 1024px) {
  .madam-product-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .madam-product-summary {
    position: relative;
    top: auto;
  }

  .madam-best-sellers-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =========================
   MOBILE PRODUCT PAGE
========================= */

@media (max-width: 768px) {
  .madam-product-main {
    padding-block: 0 52px;
  }

  .madam-product-layout {
    display: flex;
    flex-direction: column;
    padding-inline: 0;
    gap: 0;
  }

  /* Hide desktop gallery on mobile */
  .madam-product-gallery {
    display: none;
  }

  /* Show mobile carousel gallery */
  .madam-mobile-gallery {
    width: 100%;
    display: block;
    position: relative;
    background: #f3f6ef;
    overflow: hidden;
  }

  .madam-mobile-gallery-viewport {
    width: 100%;
    overflow: hidden;
  }

  .madam-mobile-gallery-track {
    display: flex;
    transition: transform 0.45s ease;
    will-change: transform;
  }

  .madam-mobile-gallery-slide {
    flex: 0 0 100%;
    min-width: 100%;
    height: 440px;

    display: flex;
    align-items: center;
    justify-content: center;
  }

  .madam-mobile-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 32px;
    display: block;
  }

  .madam-mobile-gallery-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 16px 0 20px;
    background: var(--color-white);
  }

  .madam-gallery-arrow {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(34, 34, 34, 0.14);
    border-radius: 999px;
    background: var(--color-white);
    color: var(--color-dark);
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 0;
    line-height: 1;
  }

  .madam-gallery-arrow::before {
    content: "";
    width: 13px;
    height: 13px;
    border-top: 2px solid var(--color-dark);
    border-right: 2px solid var(--color-dark);
    display: block;
  }

  .madam-gallery-prev::before {
    transform: rotate(-135deg);
    margin-left: 4px;
  }

  .madam-gallery-next::before {
    transform: rotate(45deg);
    margin-right: 4px;
  }

  /* Product summary below gallery */
  .madam-product-summary {
    width: 100%;
    padding: 38px 5% 0;
    background: var(--color-white);
  }

  .madam-product-title {
    font-size: 30px;
    line-height: 1.15;
    margin-bottom: 12px;
  }

  .madam-product-price {
    font-size: 20px;
    margin-bottom: 24px;
  }

  .madam-product-description {
    max-width: 100%;
    margin-bottom: 30px;
  }

  .madam-product-description p {
    font-size: 15px;
    line-height: 1.65;
  }

  .madam-product-description h2 {
    font-size: 26px;
    margin-bottom: 14px;
  }

  .madam-product-description li {
    font-size: 15px;
  }

  .madam-product-disclaimer h3 {
    font-size: 24px;
  }

  .madam-product-disclaimer p {
    font-size: 13px;
  }

  .madam-product-delivery {
    font-size: 13px;
    padding: 16px;
  }

  /* Add to cart mobile */
  .madam-product-cart form.cart {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .madam-product-cart .quantity {
    flex: 0 0 112px;
    width: 112px !important;
    height: 50px;
    grid-template-columns: 32px 1fr 32px;
  }

  .madam-product-cart .quantity input.qty {
    height: 48px;
    font-size: 15px;
  }

  .madam-qty-btn {
    width: 32px;
    height: 48px;
    font-size: 21px;
  }

  .madam-product-cart button.single_add_to_cart_button {
    flex: 1 1 auto;
    height: 50px;
    font-size: 13px;
    padding: 0 12px !important;
  }

  .madam-buy-now {
    height: 50px;
    font-size: 14px;
  }

  /* Best sellers mobile */
  .madam-best-sellers {
    padding-block: 50px 58px;
  }

  .madam-best-sellers-heading {
    margin-bottom: 32px;
  }

  .madam-best-sellers-heading h2 {
    font-size: 30px;
  }

  .madam-best-sellers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 18px;
  }

  .madam-best-seller-card:nth-child(5) {
    display: none;
  }

  .madam-best-seller-image {
    height: 190px;
    margin-bottom: 14px;
  }

  .madam-best-seller-info h3 {
    font-size: 14px;
  }

  .madam-best-seller-info p {
    font-size: 13px;
  }
}

/* =========================
   SMALL MOBILE PRODUCT PAGE
========================= */

@media (max-width: 480px) {
  .madam-mobile-gallery-slide {
    height: 420px;
  }

  .madam-mobile-gallery-slide img {
    padding: 28px;
  }

  .madam-product-title {
    font-size: 28px;
  }

  .madam-product-summary {
    padding-inline: 5%;
  }

  .madam-best-seller-image {
    height: 165px;
  }
}

/* =========================
   BEST SELLERS IMAGE FIX
========================= */

.madam-best-sellers-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 46px 24px;
  align-items: start;
}

.madam-best-seller-card {
  display: block;
  width: 100%;
  min-width: 0;
  color: var(--color-dark);
  text-align: center;
  text-decoration: none;
}

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

.madam-best-seller-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-best-seller-img-primary {
  opacity: 1;
  z-index: 1;
}

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

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

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

.madam-best-seller-info {
  padding-top: 16px;
}

.madam-best-seller-info h3 {
  max-width: 260px;
  margin: 0 auto 8px;
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.32;
  font-weight: 500;
  color: var(--color-dark);
}

.madam-best-seller-info p {
  margin: 0;
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 500;
  color: var(--color-dark);
}

.madam-best-seller-info del {
  margin-right: 6px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(34, 34, 34, 0.55);
}

.madam-best-seller-info ins {
  font-weight: 600;
  color: #606b57;
  text-decoration: none;
}
/* =========================
   BEST SELLERS MOBILE FIX
========================= */

@media (max-width: 768px) {
  .madam-best-sellers {
    padding: 54px 0 64px;
  }

  .madam-best-sellers .container {
    padding-inline: 5%;
  }

  .madam-best-sellers-heading {
    margin-bottom: 34px;
  }

  .madam-best-sellers-heading h2 {
    font-size: 34px;
    line-height: 1.1;
  }

  .madam-best-sellers-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 34px 16px !important;
    align-items: start;
  }

  .madam-best-seller-card {
    display: block !important;
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  .madam-best-seller-card:nth-child(5) {
    display: none !important;
  }

  .madam-best-seller-image {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-height: 0 !important;
    margin-bottom: 14px !important;
    overflow: hidden !important;
    border-radius: 8px;
    background: #f3f6ef;
  }

  .madam-best-seller-img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    object-fit: contain !important;
    padding: 16px !important;
  }

  .madam-best-seller-info {
    padding-top: 0 !important;
  }

  .madam-best-seller-info h3 {
    max-width: 100%;
    margin: 0 auto 7px;
    font-size: 14px;
    line-height: 1.28;
    font-weight: 500;
  }

  .madam-best-seller-info p {
    margin: 0;
    font-size: 13px;
    line-height: 1.25;
  }

  .madam-best-seller-info del {
    font-size: 12px;
  }

  .madam-best-seller-info ins {
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .madam-best-sellers-grid {
    gap: 32px 14px !important;
  }

  .madam-best-seller-img {
    padding: 14px !important;
  }

  .madam-best-seller-info h3 {
    font-size: 13.5px;
  }
}

/* =========================
   PRODUCT SHIPPING ACCORDION
========================= */

.madam-product-shipping-accordion {
  width: 100%;
  margin-top: 24px;
  border-top: 1px solid rgba(34, 34, 34, 0.12);
  border-bottom: 1px solid rgba(34, 34, 34, 0.12);
  font-family: var(--font-main);
}

.madam-product-shipping-toggle {
  width: 100%;
  min-height: 58px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-dark);
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  text-align: left;
}

.madam-product-shipping-icon {
  width: 26px;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #f3f6ef;
  color: var(--color-dark);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
  line-height: 1;
  font-weight: 400;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.madam-product-shipping-accordion.is-open .madam-product-shipping-icon {
  transform: rotate(45deg);
  background: var(--color-dark);
  color: #ffffff;
}

.madam-product-shipping-content {
  display: none;
  padding: 0 0 22px;
}

.madam-product-shipping-accordion.is-open .madam-product-shipping-content {
  display: block;
}

.madam-product-shipping-content p {
  margin: 0 0 10px;
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.55;
  color: rgba(34, 34, 34, 0.68);
}

.madam-product-shipping-content p:last-child {
  margin-bottom: 0;
}

.madam-product-shipping-content strong {
  color: var(--color-dark);
  font-weight: 700;
}

@media (max-width: 768px) {
  .madam-product-shipping-accordion {
    margin-top: 22px;
  }

  .madam-product-shipping-toggle {
    min-height: 56px;
    font-size: 14px;
  }

  .madam-product-shipping-content p {
    font-size: 13px;
  }
}

/* Shipping accordion bullet list */

.madam-product-shipping-content ul {
  margin: 0;
  padding-left: 18px;
}

.madam-product-shipping-content li {
  margin: 0 0 10px;
  padding-left: 4px;
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.55;
  color: rgba(34, 34, 34, 0.68);
}

.madam-product-shipping-content li:last-child {
  margin-bottom: 0;
}

.madam-product-shipping-content li::marker {
  color: var(--color-dark);
}

/* =========================
   PRODUCT SHIPPING ACCORDION ANIMATION
========================= */

.madam-product-shipping-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;

  transform: translateY(-6px);
  transition:
    max-height 0.38s ease,
    opacity 0.28s ease,
    transform 0.28s ease,
    padding 0.28s ease;
}

.madam-product-shipping-accordion.is-open .madam-product-shipping-content {
  max-height: 320px;
  opacity: 1;
  padding: 0 0 22px;
  transform: translateY(0);
}

.madam-product-shipping-icon {
  transition:
    transform 0.28s ease,
    background 0.28s ease,
    color 0.28s ease;
}