/* =========================================================
   MEHFARO - COMMERCE ENHANCEMENTS
   Additive only: search bar, promotion slider, video deals.
========================================================= */

:root {
  --mf-commerce-gold: #c58a21;
  --mf-commerce-gold-hover: #d9a43a;
  --mf-commerce-ink: #172025;
  --mf-commerce-green: #0d5a46;
  --mf-commerce-glass: rgba(255, 255, 255, 0.72);
}

/* =========================================================
   LARGE HEADER SEARCH
========================================================= */

.main-header .header-inner {
  gap: 22px !important;
}

.main-header .commerce-search-panel {
  flex: 1 1 520px;
  min-width: 260px;
  max-width: 760px;
  margin: 0 18px !important;
  padding: 0 !important;
  position: static !important;
  inset: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.main-header .commerce-search-panel .search-wrapper {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 48px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(197, 138, 33, 0.42) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 8px 30px rgba(40, 31, 14, 0.08) !important;
}

.main-header .commerce-search-panel #searchInput {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  height: 48px !important;
  padding: 0 18px !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: var(--mf-commerce-ink) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
}

.main-header .commerce-search-panel #searchInput::placeholder {
  color: rgba(23, 32, 37, 0.58) !important;
}

.main-header .commerce-search-panel #clearSearch {
  width: 46px !important;
  height: 48px !important;
  border: 0 !important;
  border-left: 1px solid rgba(197, 138, 33, 0.20) !important;
  background: var(--mf-commerce-gold) !important;
  color: #111 !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

@media (min-width: 781px) {
  .main-header .commerce-search-panel {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  .main-header .search-toggle {
    display: none !important;
  }
}

/* =========================================================
   PROMOTION SLIDER
========================================================= */

.mf-promo-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 22px auto 12px;
  position: relative;
  z-index: 3;
}

.mf-promo-frame {
  position: relative;
  min-height: 320px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 18px 52px rgba(32, 24, 9, 0.12);
}

.mf-promo-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.mf-promo-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.mf-promo-slide img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
}

.mf-promo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 28px;
  background: linear-gradient(to top, rgba(10, 17, 15, 0.70), rgba(10, 17, 15, 0.04) 62%);
}

.mf-promo-copy {
  max-width: 640px;
  color: #fff;
}

.mf-promo-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 11px;
  border-radius: 999px;
  margin-bottom: 10px;
  background: var(--mf-commerce-gold);
  color: #111;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mf-promo-copy h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4.2vw, 54px);
  line-height: .98;
  letter-spacing: -.04em;
}

.mf-promo-copy p {
  margin: 10px 0 0;
  max-width: 580px;
  color: rgba(255,255,255,.90);
  font-size: 14px;
  line-height: 1.55;
}

.mf-promo-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  margin-top: 16px;
  border-radius: 999px;
  background: var(--mf-commerce-gold);
  color: #111;
  text-decoration: none;
  font-weight: 900;
}

.mf-promo-action:hover {
  background: var(--mf-commerce-gold-hover);
}

.mf-promo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
  color: #111;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  z-index: 4;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.mf-promo-prev { left: 14px; }
.mf-promo-next { right: 14px; }

.mf-promo-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 5;
}

.mf-promo-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.56);
  cursor: pointer;
}

.mf-promo-dot.is-active {
  width: 24px;
  border-radius: 999px;
  background: var(--mf-commerce-gold);
}

/* =========================================================
   VIDEO DEALS
========================================================= */

.mf-video-section {
  width: min(1180px, calc(100% - 36px));
  margin: 34px auto;
  padding: 28px;
  border-radius: 26px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(255,255,255,.76);
}

.mf-video-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.mf-video-kicker {
  color: var(--mf-commerce-gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.mf-video-head h2 {
  margin: 5px 0 0;
  color: var(--mf-commerce-ink);
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -.045em;
}

.mf-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mf-video-card {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(197,138,33,.14);
}

.mf-video-media {
  aspect-ratio: 16 / 10;
  background: #101918;
}

.mf-video-media video,
.mf-video-media iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
}

.mf-video-body {
  padding: 15px;
}

.mf-video-body h3 {
  margin: 0;
  color: var(--mf-commerce-ink);
  font-size: 18px;
}

.mf-video-meta {
  margin-top: 8px;
  color: #42524e;
  font-size: 12px;
  line-height: 1.45;
}

.mf-video-shop {
  display: inline-flex;
  margin-top: 12px;
  color: var(--mf-commerce-gold);
  font-weight: 900;
  text-decoration: none;
}

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

@media (max-width: 980px) {
  .mf-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .main-header .header-inner {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }

  .main-header .commerce-search-panel {
    order: 4;
    flex: 1 0 100%;
    max-width: none;
    margin: 0 !important;
  }

  .main-header .commerce-search-panel:not(.active):not(.open):not(.show) {
    display: none !important;
  }

  .main-header .commerce-search-panel.active,
  .main-header .commerce-search-panel.open,
  .main-header .commerce-search-panel.show {
    display: block !important;
  }

  .mf-promo-shell,
  .mf-video-section {
    width: calc(100% - 20px);
  }

  .mf-promo-frame,
  .mf-promo-slide img {
    min-height: 250px;
  }

  .mf-promo-overlay {
    padding: 20px;
  }

  .mf-promo-nav {
    width: 36px;
    height: 36px;
  }

  .mf-video-section {
    padding: 20px;
  }

  .mf-video-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   MEHFARO - FINAL DESKTOP HEADER FIT
========================================================= */

@media (min-width: 981px) {

  .main-header .header-inner {
    gap: 16px !important;
  }

  .desktop-nav {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 18px !important;
    flex: 0 0 auto !important;
  }

  .desktop-nav a {
    font-size: 17px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .main-header .commerce-search-panel {
    flex: 1 1 360px !important;
    min-width: 250px !important;
    max-width: 560px !important;
    margin: 0 8px !important;
  }

  .main-header .header-actions {
    flex: 0 0 auto !important;
  }
}
/* =========================================================
   MEHFARO - HERO PROMOTION + VIDEO LAYOUT
   ---------------------------------------------------------
   APPEND ONLY to css/store-commerce.css
   Existing store/cart/search/checkout CSS remains untouched.
========================================================= */

/* Desktop: text + promotion mini slider + featured video */
.hero.mf-commerce-hero {
  display: grid !important;
  grid-template-columns:
    minmax(0, 1.16fr)
    minmax(260px, .84fr)
    minmax(260px, .84fr) !important;
  align-items: center !important;
  gap: 18px !important;
}

.hero.mf-commerce-hero .hero-content {
  grid-column: 1 !important;
  min-width: 0 !important;
  position: relative !important;
  z-index: 4 !important;
}

/* Keep the main hero heading strong but fit it into the new 3-column row. */
@media (min-width: 1101px) {
  .hero.mf-commerce-hero .hero-content h1 {
    font-size: clamp(46px, 4.4vw, 70px) !important;
  }

  .hero.mf-commerce-hero .hero-description {
    max-width: 470px !important;
  }
}

/* =========================================================
   PROMOTION MINI SLIDER INSIDE HERO
========================================================= */

.hero.mf-commerce-hero .mf-hero-promo-slot {
  grid-column: 2 !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  z-index: 5 !important;
}

.hero.mf-commerce-hero .mf-hero-promo-slot[hidden] {
  display: none !important;
}

.hero.mf-commerce-hero .mf-promo-frame {
  width: 100% !important;
  min-height: 360px !important;
  height: 360px !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,255,255,.70) !important;
  background: rgba(255,255,255,.46) !important;
  box-shadow: 0 18px 46px rgba(39, 27, 8, .13) !important;
}

.hero.mf-commerce-hero .mf-promo-slide,
.hero.mf-commerce-hero .mf-promo-slide img {
  width: 100% !important;
  height: 100% !important;
  min-height: 360px !important;
  border-radius: 24px !important;
}

.hero.mf-commerce-hero .mf-promo-slide img {
  object-fit: cover !important;
}

.hero.mf-commerce-hero .mf-promo-overlay {
  padding: 18px !important;
  border-radius: 24px !important;
}

.hero.mf-commerce-hero .mf-promo-shop-button {
  min-height: 40px !important;
  padding: 0 16px !important;
  font-size: 11px !important;
}

.hero.mf-commerce-hero .mf-promo-nav {
  width: 34px !important;
  height: 34px !important;
  font-size: 18px !important;
}

.hero.mf-commerce-hero .mf-promo-prev {
  left: 10px !important;
}

.hero.mf-commerce-hero .mf-promo-next {
  right: 10px !important;
}

.hero.mf-commerce-hero .mf-promo-dots {
  bottom: 10px !important;
}

/* =========================================================
   FEATURED VIDEO INSIDE HERO
========================================================= */

.hero.mf-commerce-hero .mf-hero-video-slot {
  grid-column: 3 !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  z-index: 5 !important;
}

.hero.mf-commerce-hero .mf-hero-video-slot[hidden] {
  display: none !important;
}

.mf-hero-video-card {
  height: 360px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.70);
  background: rgba(255,255,255,.64);
  box-shadow: 0 18px 46px rgba(39, 27, 8, .13);
  backdrop-filter: blur(8px);
}

.mf-hero-video-topline {
  min-height: 42px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255,255,255,.74);
  color: #172025;
}

.mf-hero-video-topline span {
  color: #c58a21;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .16em;
}

.mf-hero-video-topline strong {
  font-size: 10px;
  font-weight: 950;
}

.mf-hero-video-media {
  min-height: 0;
  background: #101918;
  overflow: hidden;
}

.mf-hero-video-media video,
.mf-hero-video-media iframe {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  border: 0;
  object-fit: cover;
}

.mf-hero-video-footer {
  min-height: 76px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,.82);
}

.mf-hero-video-footer > div {
  min-width: 0;
}

.mf-hero-video-footer small {
  display: block;
  margin-bottom: 3px;
  color: #c58a21;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .12em;
}

.mf-hero-video-footer strong {
  display: block;
  overflow: hidden;
  color: #172025;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mf-hero-video-footer a {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #c58a21;
  color: #111111;
  font-size: 10px;
  font-weight: 950;
  text-decoration: none;
}

/* Once a real video is available, the old fashion visual is no longer needed. */
.hero.mf-commerce-hero.mf-has-video .hero-visual {
  display: none !important;
}

/* If there is no promotion yet, keep a clean two-column hero. */
.hero.mf-commerce-hero:not(.mf-has-promotions) {
  grid-template-columns:
    minmax(0, 1.16fr)
    minmax(320px, .84fr) !important;
}

.hero.mf-commerce-hero:not(.mf-has-promotions) .mf-hero-video-slot,
.hero.mf-commerce-hero:not(.mf-has-promotions) .hero-visual {
  grid-column: 2 !important;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) and (min-width: 781px) {
  .hero.mf-commerce-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  .hero.mf-commerce-hero .hero-content {
    grid-column: 1 / -1 !important;
  }

  .hero.mf-commerce-hero .mf-hero-promo-slot {
    grid-column: 1 !important;
  }

  .hero.mf-commerce-hero .mf-hero-video-slot,
  .hero.mf-commerce-hero .hero-visual {
    grid-column: 2 !important;
  }

  .hero.mf-commerce-hero .mf-promo-frame,
  .hero.mf-commerce-hero .mf-promo-slide,
  .hero.mf-commerce-hero .mf-promo-slide img,
  .mf-hero-video-card {
    height: 330px !important;
    min-height: 330px !important;
  }
}

/* =========================================================
   MOBILE - STACK CLEANLY
========================================================= */

@media (max-width: 780px) {
  .hero.mf-commerce-hero,
  .hero.mf-commerce-hero:not(.mf-has-promotions) {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .hero.mf-commerce-hero .hero-content,
  .hero.mf-commerce-hero .mf-hero-promo-slot,
  .hero.mf-commerce-hero .mf-hero-video-slot,
  .hero.mf-commerce-hero .hero-visual,
  .hero.mf-commerce-hero:not(.mf-has-promotions) .mf-hero-video-slot,
  .hero.mf-commerce-hero:not(.mf-has-promotions) .hero-visual {
    grid-column: 1 !important;
    width: 100% !important;
  }

  .hero.mf-commerce-hero .hero-content {
    order: 1 !important;
  }

  .hero.mf-commerce-hero .mf-hero-promo-slot {
    order: 2 !important;
  }

  .hero.mf-commerce-hero .mf-hero-video-slot,
  .hero.mf-commerce-hero .hero-visual {
    order: 3 !important;
  }

  .hero.mf-commerce-hero .mf-promo-frame,
  .hero.mf-commerce-hero .mf-promo-slide,
  .hero.mf-commerce-hero .mf-promo-slide img,
  .mf-hero-video-card {
    height: 270px !important;
    min-height: 270px !important;
    border-radius: 20px !important;
  }

  .hero.mf-commerce-hero .mf-promo-slide img,
  .hero.mf-commerce-hero .mf-promo-overlay {
    border-radius: 20px !important;
  }

  .mf-hero-video-footer {
    min-height: 70px;
  }

  .hero.mf-commerce-hero.mf-has-video .hero-visual {
    display: none !important;
  }
}
/* =========================================================
   MEHFARO - RESPONSIVE WATERMARK BACKGROUND
========================================================= */

:root {
  --mf-watermark-image:
    url("../images/mehfaro-watermark-desktop.png");
}

html,
body {
  margin: 0 !important;
  min-width: 100% !important;
  min-height: 100% !important;
  background: #f7f1e7 !important;
}

body {
  min-height: 100vh !important;
  min-height: 100dvh !important;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;

  background-image: var(--mf-watermark-image);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

  opacity: 0.26;

  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

main,
.hero,
.section {
  background-color: transparent !important;
}

.soft-section {
  background: rgba(247, 241, 231, 0.62) !important;
}

/* ULTRAWIDE / LED */
@media (min-aspect-ratio: 2/1) {
  :root {
    --mf-watermark-image:
      url("../images/mehfaro-watermark-ultrawide.png");
  }
}

/* NORMAL DESKTOP / LAPTOP */
@media (min-aspect-ratio: 3/2) and (max-aspect-ratio: 2/1) {
  :root {
    --mf-watermark-image:
      url("../images/mehfaro-watermark-desktop.png");
  }
}

/* TABLET LANDSCAPE */
@media (min-aspect-ratio: 5/4) and (max-aspect-ratio: 3/2) {
  :root {
    --mf-watermark-image:
      url("../images/mehfaro-watermark-tablet.png");
  }
}

/* SQUARE / TABLET PORTRAIT / SMALL WINDOW */
@media (min-aspect-ratio: 3/4) and (max-aspect-ratio: 5/4) {
  :root {
    --mf-watermark-image:
      url("../images/mehfaro-watermark-square.png");
  }
}

/* MOBILE / VERY NARROW WINDOW */
@media (max-aspect-ratio: 3/4) {
  :root {
    --mf-watermark-image:
      url("../images/mehfaro-watermark-mobile.png");
  }

  body::before {
    opacity: 0.23;
  }
}
