/* ExtraCoins storefront — mobile quick fixes */

.ec-store-nav {
  padding-top: env(safe-area-inset-top, 0px);
}

.ec-store-banner {
  border-bottom: 1px solid transparent;
}

.ec-store-banner--vacation {
  background: #fff7ed;
  border-bottom-color: #fed7aa;
  color: #9a3412;
}

.ec-store-banner--demo {
  background: #eff6ff;
  border-bottom-color: #bfdbfe;
  color: #1e3a8a;
}

.ec-store-banner--market-closed {
  background: #f8fafc;
  border-bottom-color: #cbd5e1;
  color: #334155;
}

.ec-store-banner--inactive {
  background: #fef2f2;
  border-bottom-color: #fecaca;
  color: #991b1b;
}

.ec-store-banner__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: none;
  white-space: nowrap;
}

.ec-store-banner__link:hover {
  background: #1e40af;
  color: #fff !important;
}

@media (max-width: 767.98px) {
  /* Room for sticky cart bar + iOS home indicator */
  body.ec-has-mobile-cart-bar {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  }

  /* Header icon tap targets */
  .ec-mobile-search-toggle,
  #navbar_top .ec-cart-trigger,
  #navbar_top .md\:hidden.p-2 {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #navbar_top .ec-cart-trigger {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  /* Offcanvas nav links */
  #offcanvasNavbar2 .offcanvas-body a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  /* Product grid: full-width add buttons */
  .ec-add-to-cart {
    min-height: 48px;
    font-size: 1rem;
  }

  .ec-add-cart-row .qtyClass {
    min-height: 44px;
    font-size: 1rem;
  }

  /* Shop pagination */
  .ec-shop-pagination a,
  .ec-shop-pagination span {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Checkout: summary flows below form on phone */
  .ec-checkout-summary {
    position: static !important;
    top: auto !important;
  }

  /* Cart panel checkout button */
  #ec-cart-footer .btn-lg {
    min-height: 48px;
  }

  /* Product detail: keep buy box reachable while scrolling */
  .ec-detail-buy {
    position: sticky;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 30;
    background: #f8fafc;
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
  }

  body.ec-has-mobile-cart-bar .ec-detail-buy {
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Sticky mobile cart bar */
.ec-mobile-cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ec-mobile-cart-bar.hidden {
  display: none !important;
}

.ec-mobile-cart-bar__open {
  flex: 1;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-weight: 600;
  font-size: 0.95rem;
}

.ec-mobile-cart-bar__checkout {
  flex: 1;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.ec-mobile-cart-bar__checkout:hover {
  background: #000;
  color: #fff;
}

/* Legacy fixed cart trigger — keep in header flow on modern layout */
#navbar_top .ec-cart-trigger {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  background: transparent;
}