/* Smart Revealing Header styles for MARIPOSA */

/* ==========================================================================
   Visibility Helpers
   ========================================================================== */
.mobile-only { display: none !important; }
.desktop-only { display: block !important; }

@media (max-width: 1100px) {
  .mobile-only { display: flex !important; }
  .desktop-only { display: none !important; }
}

/* ==========================================================================
   STATE 3: Revealing Header (Scroll Up)
   Design: Logo Left | Nav Center | Cart Right
   ========================================================================== */
#revealing-header {
  position: fixed;
  top: 0 !important;
  left: 0;
  width: 100%;
  z-index: 99999;
  background: #fcfbf4; /* Cream background */
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(.165,.84,.44,1);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

#revealing-header.is-visible {
  transform: translateY(0);
}

#revealing-header .mariposa-header-inner {
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  min-height: 80px;
}

/* Layout for Header 3: Logo(L) | Nav(C) | Cart(R) */
#revealing-header .mariposa-col-left { width: 25% !important; flex: 0 0 25% !important; justify-content: flex-start; }
#revealing-header .mariposa-col-center { width: 50% !important; flex: 0 0 50% !important; justify-content: center; }
#revealing-header .mariposa-col-right { width: 25% !important; flex: 0 0 25% !important; justify-content: flex-end; }

/* Force DARK LOGO on Header 3 (Cream background) */
#revealing-header .mariposa-logo-light { display: none !important; }
#revealing-header .mariposa-logo-dark {
  opacity: 1 !important;
  position: static !important;
  height: 60px !important;
  display: block !important;
  padding: 5px 0;
}

#revealing-header .mariposa-nav {
  gap: 45px;
  justify-content: center;
}

#revealing-header .mariposa-nav a {
  text-transform: capitalize;
  font-size: 16px;
  color: #1a1a1a !important;
}

/* ==========================================================================
   STATE 1 & 2: Initial Header (Top)
   Design: Cart Left | Logo Center | Nav Right
   ========================================================================== */
.mariposa-header-wrapper {
  position: fixed;
  top: 0 !important;
  left: 0;
  width: 100%;
  z-index: 99998;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.mariposa-header-wrapper.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.initial-header {
  background: transparent !important;
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.initial-header:hover,
.mariposa-header-wrapper.header-is-solid .initial-header {
  background: #ffffff !important;
  box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.initial-header .mariposa-header-inner {
  max-width: 1800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  min-height: 110px;
  position: relative;
}

/* Strictly equal columns to force perfect logo centering */
.initial-header .mariposa-col { width: 33.33%; flex: 1 0 33.33%; }
.initial-header .mariposa-col-left { justify-content: flex-start; gap: 20px; }
.initial-header .mariposa-col-center { justify-content: center; }
.initial-header .mariposa-col-right { justify-content: flex-end; }

/* Initial Header Logo Switching */
.initial-header .mariposa-logo-light,
.initial-header .mariposa-logo-dark {
  height: 95px;
  width: auto;
  transition: opacity 0.4s ease;
  padding: 5px 0;
}

.initial-header .mariposa-logo-dark {
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.initial-header:hover .mariposa-logo-light,
.mariposa-header-wrapper.header-is-solid .initial-header .mariposa-logo-light {
  opacity: 0;
}
.initial-header:hover .mariposa-logo-dark,
.mariposa-header-wrapper.header-is-solid .initial-header .mariposa-logo-dark {
  opacity: 1;
}

/* Typography for centered headers */
.initial-header .mariposa-nav a {
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 500;
}

.initial-header .mariposa-nav { gap: 40px; }

.initial-header .mariposa-nav a,
.initial-header .mariposa-cart-icon {
  color: #ffffff !important;
  transition: color 0.4s ease;
}

.initial-header:hover .mariposa-nav a,
.initial-header:hover .mariposa-cart-icon,
.mariposa-header-wrapper.header-is-solid .initial-header .mariposa-nav a,
.mariposa-header-wrapper.header-is-solid .initial-header .mariposa-cart-icon {
  color: #1a1a1a !important;
}

/* ==========================================================================
   Layout Offsets & Protection
   ========================================================================== */
body.mariposa-smart-header-enabled.header-is-solid-page .wrapper_inner {
  padding-top: 110px !important;
}

/* ==========================================================================
   Common Components
   ========================================================================== */
.mariposa-header { width: 100%; overflow: visible; }
.mariposa-col { box-sizing: border-box; display: flex; align-items: center; }
.mariposa-nav { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.mariposa-nav a { font-family: 'AmericanTypewriterCondensed', serif; text-decoration: none; padding: 5px 0; transition: opacity 0.3s ease; }
.mariposa-nav a:hover { opacity: 0.6; }
.mariposa-cart-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1; }

.mariposa-menu-trigger {
  flex-direction: column; gap: 6px; cursor: pointer; padding: 10px; margin-left: -10px; z-index: 100001;
}
.mariposa-menu-trigger span { display: block; width: 22px; height: 1px; background-color: currentColor; transition: transform 0.3s ease, opacity 0.3s ease; }

.mariposa-mobile-menu {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #fcfbf4; z-index: 99999;
  opacity: 0; visibility: hidden; transition: all 0.4s ease; display: flex; align-items: center; justify-content: center; text-align: center;
}
.mobile-menu-open .mariposa-mobile-menu { opacity: 1; visibility: visible; }

/* Responsive Breakpoints */
@media (max-width: 1100px) {
  .mariposa-menu-trigger { display: flex; }
  .mariposa-header .mariposa-header-inner { padding: 0 20px; min-height: 80px; }

  /* Force standard centered layout for all mobile/tablet views */
  .mariposa-col { flex: 1 1 0% !important; width: 33.33% !important; }

  /* Re-ordering for standard mobile balance */
  #revealing-header .mariposa-col-left { order: 1; justify-content: flex-start; }
  #revealing-header .mariposa-col-center { order: 2; display: flex !important; justify-content: center; }
  #revealing-header .mariposa-col-right { order: 3; justify-content: flex-end; }

  .initial-header .mariposa-logo-light,
  .initial-header .mariposa-logo-dark,
  #revealing-header .mariposa-logo-dark {
    height: 55px !important;
    max-width: 180px;
  }
}
