/* ==========================================================================
   Shop Nuvia — Responsive Styles
   Breakpoints: 320px, 360px, 375px, 390px, 414px, 480px, 768px, 992px, 1200px, 1440px
   ========================================================================== */

/* Universal Overflow Protection */
body {
  overflow-x: clip;
  max-width: 100%;
}

/* ==========================================================================
   Mobile & Tablet Universal (Under 992px)
   ========================================================================== */
@media (max-width: 991px) {
  :root { --header-height: 64px; --header-h: 64px; }
  .site-header-inner,
  .hero-container,
  .section-container,
  .footer-inner,
  .page-container {
    padding-left: clamp(14px, 4vw, 24px) !important;
    padding-right: clamp(14px, 4vw, 24px) !important;
  }

  /* Desktop nav hidden on mobile */
  .desktop-nav {
    display: none !important;
  }

  /* Hamburger visible on mobile */
  .hamburger-btn {
    display: flex !important;
  }

  /* Header arrangement on mobile:
     [Hamburger] [Logo] ... [Search] [Wishlist] [Cart] */
  .site-header-inner {
    height: 64px;
    gap: 12px;
  }

  .nav-brand {
    margin-right: auto;
  }

  .header-actions {
    gap: 10px;
  }

  /* Hero on mobile: stacked vertically, full visibility */
  .hero-section {
    padding: clamp(32px, 8vw, 64px) 0 40px;
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
    text-align: left;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero-actions .btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
    text-align: center;
    justify-content: center;
  }

  /* Hero stack scaled down smoothly on mobile, never hidden */
  .hero-visual {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    height: 380px;
  }

  .stack-card {
    width: 210px !important;
    height: 270px !important;
  }

  /* Category Tiles Stacked on Mobile */
  .category-tiles-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .category-tile {
    height: clamp(240px, 42vw, 320px) !important;
  }

  /* Editorial Banner Stacked */
  .editorial-banner {
    grid-template-columns: 1fr !important;
  }

  .editorial-visual {
    height: 280px !important;
  }

  .editorial-content {
    padding: clamp(24px, 5vw, 40px) !important;
  }

  /* Testimonials Grid */
  .testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }

  /* Minimalist Feature Cards (Square Cards) */
  .square-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  /* 2-column layout for product cards on mobile */
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  .product-card {
    border-radius: 8px;
  }

  .product-card .card-content {
    padding: 10px 10px 12px;
  }

  .product-card .product-title {
    font-size: 0.88rem;
    line-height: 1.25;
  }

  .product-card .price-row {
    margin-top: 4px;
    margin-bottom: 8px;
  }

  .product-card .btn-quick-add {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  /* Filter bar wraps cleanly */
  .catalog-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .catalog-search-box {
    width: 100%;
    flex: none;
    min-width: 0;
  }

  .catalog-filters {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
  }

  .filter-group {
    flex: 1 1 calc(50% - 6px);
    min-width: 130px;
  }

  .filter-select {
    width: 100%;
  }

  /* Cart & Checkout responsive layouts */
  .cart-layout,
  .checkout-layout,
  .product-detail-layout,
  .contact-page-layout {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  /* Cart Table horizontal scrolling container */
  .cart-items-card {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .cart-table {
    min-width: 480px;
  }

  /* Checkout form inputs */
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Contact cards 2-column on tablet */
  .contact-details-col {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  .contact-details-col .contact-response-badge,
  .contact-details-col .social-section {
    grid-column: 1 / -1;
  }

  /* Footer responsive stacking */
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 28px 20px !important;
  }

  .footer-brand-col {
    grid-column: 1 / -1;
  }

  .footer-newsletter-col {
    grid-column: 1 / -1;
  }

  /* Horizontal swipe cards for content-heavy blocks */
  .swipe-row-mobile {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .swipe-row-mobile > * {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
}

/* ==========================================================================
   Tablet adjustments (768px to 991px)
   ========================================================================== */
@media (min-width: 768px) and (max-width: 991px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr !important;
  }

  .hero-visual {
    max-width: 440px;
    height: 420px;
  }

  .stack-card {
    width: 240px !important;
    height: 310px !important;
  }
}

/* ==========================================================================
   Mobile adjustments (under 680px)
   ========================================================================== */
@media (max-width: 680px) {
  .contact-details-col {
    grid-template-columns: 1fr !important;
  }

  .testimonials-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   Mobile small adjustments (under 480px / 375px / 320px)
   ========================================================================== */
@media (max-width: 480px) {
  .site-header-inner {
    height: 58px;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .nav-brand-text {
    font-size: 1.125rem;
    letter-spacing: 0.04em;
  }

  .header-btn {
    width: 36px;
    height: 36px;
  }

  .hero-title {
    font-size: clamp(1.75rem, 7.5vw, 2.2rem) !important;
    line-height: 1.15 !important;
  }

  .hero-visual {
    max-width: 320px;
    height: 330px;
  }

  .stack-card {
    width: 185px !important;
    height: 240px !important;
  }

  .square-card-grid {
    grid-template-columns: 1fr !important;
  }

  .hero-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .hero-actions .btn {
    width: 100% !important;
    flex: 1 1 100% !important;
  }

  .product-grid {
    gap: 10px !important;
  }

  .product-card .card-content {
    padding: 8px 8px 10px;
  }

  .badge-tag {
    font-size: 0.65rem;
    padding: 3px 6px;
  }

  .wishlist-btn-card {
    width: 30px;
    height: 30px;
    top: 8px;
    right: 8px;
  }

  .cart-table th,
  .cart-table td {
    padding: 10px 6px;
    font-size: 0.85rem;
  }

  .cart-item-img {
    width: 52px;
    height: 65px;
  }

  .qty-btn {
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
  }

  .contact-form-card,
  .form-card,
  .order-summary-card {
    padding: 20px 16px !important;
  }
}

/* ==========================================================================
   Extra small screens (320px - 360px)
   ========================================================================== */
@media (max-width: 360px) {
  .site-header-inner {
    height: 54px !important;
    gap: 6px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .header-actions {
    gap: 6px !important;
  }

  .header-btn {
    width: 32px !important;
    height: 32px !important;
  }

  .brand-monogram {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.85rem !important;
  }

  .nav-brand-text {
    font-size: 1.05rem !important;
  }

  .hero-actions .btn {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
  }

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

  .product-card .price-current {
    font-size: 0.85rem !important;
  }

  .product-card .btn-quick-add {
    font-size: 0.72rem !important;
    padding: 6px 8px !important;
    white-space: nowrap !important;
  }

  .purchase-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .purchase-row .btn {
    width: 100% !important;
  }

  .btn {
    font-size: 0.88rem !important;
    padding: 10px 14px !important;
  }

  .contact-card {
    padding: 14px 12px !important;
    gap: 12px !important;
  }

  .toast-container {
    width: 95% !important;
    top: 12px !important;
  }

  .toast {
    padding: 10px 12px !important;
    font-size: 0.82rem !important;
  }
}

/* ==========================================================================
   Desktop & Large Desktop (992px+)
   ========================================================================== */
@media (min-width: 992px) {
  .hamburger-btn {
    display: none !important;
  }

  .desktop-nav {
    display: flex !important;
  }

  .mobile-drawer,
  .drawer-overlay {
    display: none !important;
  }

  .product-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* ==========================================================================
   Ultra-wide / 1440px+ centering
   ========================================================================== */
@media (min-width: 1440px) {
  .site-header-inner,
  .hero-container,
  .section-container,
  .footer-inner,
  .page-container {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 320px) and (max-width: 480px) { .catalog-controls { margin-bottom: 16px; } }


