/* ==========================================================================
   MINISTORE RESPONSIVE BREAKPOINT STYLES
   ========================================================================== */

/* Touch Target Accessibility (Min 44px) */
button, 
.btn-primary-green, 
.btn-outline-green, 
.btn-add-product, 
.stepper-btn, 
.store-header-btn,
.btn-sort-toggle,
.bottom-nav-item {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.category-chip {
  min-width: 58px;
}

/* ==========================================================================
   MOBILE DEVICES: <= 576px (320px, 360px, 375px, 390px, 414px, 430px)
   ========================================================================== */
@media (max-width: 576px) {
  /* Landing Hero */
  .hero-title {
    font-size: 2.35rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-mockup-wrapper {
    margin-top: 2.5rem;
    min-height: auto;
  }
  
  .phone-device {
    width: 270px;
    height: 540px;
    border-radius: 38px;
  }

  /* Adjust floating cards on small screens */
  .floating-stat-card {
    min-width: 120px;
    padding: 0.5rem 0.75rem;
  }
  
  .card-stat-sales {
    top: 30px;
    right: -10px;
  }
  
  .card-stat-orders {
    top: 170px;
    right: -18px;
  }
  
  .card-stat-visitors {
    bottom: 50px;
    right: -10px;
  }

  .handwriting-badge.hero-accent {
    display: none; /* Keep clean on small mobile */
  }

  /* Trust Bar */
  .trust-bar-section {
    padding: 1.75rem 0;
  }
  
  .trust-label {
    font-size: 0.775rem;
  }

  .trust-icon-box {
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
  }

  /* Features & Pricing */
  .section-title {
    font-size: 1.75rem;
  }

  .step-arrow-divider {
    display: none;
  }

  /* Catalogue Container */
  .catalogue-shell {
    max-width: 100%;
    box-shadow: none;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    padding: 0 0.75rem 7.5rem;
  }

  .promo-banner {
    min-height: 140px;
    padding: 1rem;
  }

  .promo-banner-title {
    font-size: 1.05rem;
  }

  .promo-banner-sub {
    font-size: 0.7rem;
  }
}

/* Extra small mobile (<= 360px: e.g. iPhone SE, Galaxy Fold folded) */
@media (max-width: 360px) {
  .hero-title {
    font-size: 2rem;
  }

  .phone-device {
    width: 240px;
    height: 480px;
  }

  .products-grid {
    gap: 0.5rem;
  }

  .product-title {
    font-size: 0.8rem;
  }

  .product-price-current {
    font-size: 0.9rem;
  }

  .sticky-cart-total {
    font-size: 1rem;
  }

  .btn-view-cart {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   TABLET: 577px - 991px
   ========================================================================== */
/* ==========================================================================
   DESKTOP: >= 992px (REFERENCE IMAGE 4)
   ========================================================================== */
@media (min-width: 992px) {
  .hero-title {
    font-size: 3.5rem;
  }

  /* SaaS Landing Page Layout */
  .features-grid-custom {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  /* Customer Catalogue Store Desktop Layout (Reference Image 4) */
  .catalogue-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background-color: var(--ms-bg) !important;
  }

  /* Hide Mobile-Only Components on Desktop */
  .store-header {
    display: none !important;
  }

  .promo-banner-container {
    display: none !important;
  }

  .sticky-cart-bar {
    display: none !important;
  }

  .mobile-bottom-nav {
    display: none !important;
  }

  /* Show Desktop-Only Components on Desktop */
  .desktop-store-navbar {
    display: block !important;
  }

  .desktop-hero-banner {
    display: flex !important;
  }

  .store-desktop-sidebar {
    display: flex !important;
  }

  .products-grid-desktop {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    padding: 0 !important;
  }
}

/* ==========================================================================
   MOBILE & TABLET (< 992px) - STRICT 100% MOBILE-FIRST (REFERENCE IMAGE 2 & 3)
   ========================================================================== */
@media (max-width: 991px) {
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    background-color: #ffffff !important;
  }

  .catalogue-shell {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background-color: #ffffff !important;
    overflow-x: clip !important;
  }

  .store-desktop-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .store-desktop-main {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  /* Hide Desktop-Only Components on Mobile */
  .desktop-store-navbar {
    display: none !important;
  }

  .desktop-hero-banner {
    display: none !important;
  }

  .store-desktop-sidebar {
    display: none !important;
  }

  /* Show Mobile-Only Components on Mobile */
  .store-header {
    display: block !important;
    width: 100% !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
  }

  .promo-banner-container {
    display: block !important;
    width: 100% !important;
    padding: 0.75rem 0.85rem 0.35rem !important;
    box-sizing: border-box !important;
  }

  .promo-banner {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .categories-scroller-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 0.35rem 0.85rem 0.75rem !important;
    box-sizing: border-box !important;
  }

  .products-section {
    width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .products-section-header {
    padding: 0.5rem 0.85rem !important;
    box-sizing: border-box !important;
  }

  .products-grid,
  .products-grid-desktop {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
    padding: 0 0.85rem 7.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Floating Cart Pill (Slides Up Above Bottom Nav) */
  .sticky-cart-bar {
    display: flex !important;
    position: fixed !important;
    bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    width: calc(100% - 1.5rem) !important;
    max-width: 480px !important;
    z-index: 1050 !important;
  }

  /* Fixed Bottom Nav (Matching Reference Image 2) */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    z-index: 1040 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06) !important;
    border-top: 1px solid var(--ms-border) !important;
  }
}

/* Safe Area Insets for iOS Home Indicator */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .sticky-cart-bar {
    bottom: calc(66px + env(safe-area-inset-bottom));
  }
  
  .mobile-bottom-nav {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  }
}
