/* ============================================================
   MB PRODUCT CARD — v2 Modern Mobile-First Enhancements
   ============================================================ */

/* Quick-view overlay */
.mb-product-card__quickview {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(0deg, rgba(233,30,99,0.92) 0%, rgba(233,30,99,0.6) 60%, transparent 100%);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  padding: 20px 8px 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  z-index: 3;
  letter-spacing: 0.02em;
}
.mb-product-card:hover .mb-product-card__quickview,
.mb-product-card:focus-within .mb-product-card__quickview {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  cursor: pointer;
}
/* Always visible on true touch devices */
@media (hover: none) {
  .mb-product-card__quickview {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    background: linear-gradient(0deg, rgba(233,30,99,0.85) 0%, rgba(233,30,99,0.3) 70%, transparent 100%);
    padding: 16px 8px 8px;
    font-size: 0.72rem;
  }
}

/* Video badge */
.mb-product-card__video-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  z-index: 4;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Card footer: price + rating row */
.mb-product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 6px;
}
.mb-product-card__rating {
  font-size: 0.72rem;
  color: #f59e0b;
  letter-spacing: -1px;
  white-space: nowrap;
}

/* ---- Multi-image card gallery ---- */
.mb-card-gallery {
  position: relative;
  width: 100%;
  height: 100%;
}
.mb-card-gallery__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.mb-card-gallery__slide.active {
  opacity: 1;
  pointer-events: auto;
}
.mb-card-gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mb-card-gallery__dots {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 5;
  pointer-events: none;
}
.mb-card-gallery__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: background 0.2s, transform 0.2s;
}
.mb-card-gallery__dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* ---- Lightbox — full upgrade ---- */
.mb-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,0);
  transition: background 0.3s ease;
  padding: 0;
}
.mb-lightbox.active { background: rgba(0,0,0,0.75); }
.mb-lightbox__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.mb-lightbox__card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.mb-lightbox.active .mb-lightbox__card { transform: translateY(0); }
.mb-lightbox__close {
  position: absolute;
  top: 12px; right: 14px;
  background: rgba(0,0,0,0.08);
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  display: flex; align-items: center; justify-content: center;
}
.mb-lightbox__main,
.mb-lb-main {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #f5f5f5;
  overflow: hidden;
}
.mb-lightbox__main img,
.mb-lb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mb-lightbox__nav,
.mb-lb-prev,
.mb-lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 5;
}
.mb-lightbox__nav--prev, .mb-lb-prev { left: 10px; }
.mb-lightbox__nav--next, .mb-lb-next { right: 10px; }
.mb-lightbox__thumbs,
.mb-lb-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.mb-lightbox__thumbs::-webkit-scrollbar,
.mb-lb-thumbs::-webkit-scrollbar { display: none; }
.mb-lightbox__thumb,
.mb-lb-thumb {
  flex-shrink: 0;
  width: 60px; height: 60px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}
.mb-lightbox__thumb img,
.mb-lb-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.mb-lightbox__thumb.active,
.mb-lb-thumb.active { border-color: var(--mb-pink, #e91e63); }
.mb-lightbox__info,
.mb-lb-info {
  padding: 16px 20px 28px;
}
.mb-lightbox__name,
.mb-lb-name {
  font-family: var(--mb-font-display, Georgia, serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.mb-lightbox__vendor,
.mb-lightbox__price,
.mb-lb-price {
  font-size: 0.85rem;
  color: var(--mb-pink, #e91e63);
  font-weight: 600;
  margin-bottom: 12px;
}
.mb-lightbox__actions,
.mb-lb-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.mb-lightbox__cart,
.mb-lb-cart,
.mb-lb-view {
  flex: 1;
  display: block;
  text-align: center;
  padding: 12px 16px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.mb-lightbox__cart,
.mb-lb-cart {
  background: var(--mb-pink, #e91e63);
  color: #fff;
}
.mb-lb-view {
  background: #f5f5f5;
  color: #333;
}
.mb-lightbox__cart:active, .mb-lb-cart:active { transform: scale(0.97); }

/* Video in lightbox */
.mb-lightbox__video,
.mb-lb-video {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  cursor: pointer;
}
.mb-lightbox__video iframe,
.mb-lb-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ---- Product page gallery — Swiper upgrade ---- */
.mb-product__gallery {
  position: relative;
  background: #fff;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
}
.mb-product__gallery-swiper {
  width: 100%;
  aspect-ratio: 1;
}
.mb-product__gallery-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mb-product__gallery-swiper .swiper-pagination-bullet {
  background: rgba(233,30,99,0.4);
}
.mb-product__gallery-swiper .swiper-pagination-bullet-active {
  background: var(--mb-pink, #e91e63);
}
.mb-product__gallery-expand {
  position: absolute;
  bottom: 40px;
  right: 12px;
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  backdrop-filter: blur(4px);
}

/* Constrain WordPress emoji in quickview */
.mb-product-card__quickview .emoji,
.mb-product-card__quickview img.emoji {
  width: 16px !important;
  height: 16px !important;
  vertical-align: middle;
  display: inline-block;
}

/* Lightbox slide-up transition fix */
.mb-lightbox__card {
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1) !important;
}
.mb-lightbox.active .mb-lightbox__card {
  transform: translateY(0) !important;
}


/* ============================================================
   TASK 1 — Mobile Fullscreen Lightbox
   ============================================================ */
@media (max-width: 767px) {
  .mb-lightbox {
    align-items: stretch;
  }
  .mb-lightbox__card {
    max-width: 100vw !important;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .mb-lightbox__main {
    flex: 1;
    min-height: 0;
    aspect-ratio: unset;
  }
  .mb-lightbox__close {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.4rem !important;
    background: rgba(0,0,0,0.6) !important;
    color: #fff !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 100 !important;
  }
  .mb-lightbox__thumbs {
    flex-shrink: 0;
    padding-bottom: 8px;
  }
  .mb-lightbox__info {
    flex-shrink: 0;
    overflow-y: auto;
    padding-bottom: max(28px, env(safe-area-inset-bottom, 28px));
  }
}

/* ============================================================
   TASK 2 — Section Breathing Room (Dubai Mall whitespace)
   ============================================================ */
.mb-hp-zone {
  padding-top: 40px !important;
  padding-bottom: 40px !important;
}
.mb-hp-lifestyle-banner + .mb-hp-zone {
  padding-top: 52px !important;
}
.mb-hp-bar {
  margin-bottom: 24px !important;
}
@media (max-width: 767px) {
  .mb-hp-zone {
    padding-top: 28px !important;
    padding-bottom: 28px !important;
  }
  .mb-hp-lifestyle-banner + .mb-hp-zone {
    padding-top: 36px !important;
  }
}
