
/* INY MOBILE RESPONSIVE PATCH
   Only responsive/mobile behavior is changed. Existing desktop design, colors,
   animations, Supabase, cart and WhatsApp logic are left intact.
*/
@media (max-width: 768px) {
  html { overflow-x: hidden; }
  body { overflow-x: hidden; width: 100%; }

  img, video, iframe, svg { max-width: 100%; }

  /* Prevent common fixed-width sections from overflowing */
  .container, .section, section, main, header, footer {
    max-width: 100%;
  }

  /* Header / navigation */
  header, .header, .site-header, .iny-header {
    width: 100%;
  }
  nav, .nav, .navbar, .navigation {
    max-width: 100%;
  }

  /* Hide desktop navigation when the existing mobile toggle is present */
  .menu-toggle,
  .iny-shared-toggle,
  .mobile-menu-toggle,
  .hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Common grids collapse cleanly */
  .grid,
  .products-grid,
  .product-grid,
  .shop-grid,
  .journal-grid,
  .collections-grid,
  .collection-grid,
  .cards-grid {
    grid-template-columns: 1fr !important;
  }

  /* Two-column layouts become one column */
  .two-column,
  .two-col,
  .split,
  .content-grid,
  .hero-grid,
  .contact-grid,
  .product-layout,
  .cart-layout {
    grid-template-columns: 1fr !important;
  }

  /* Flex rows wrap instead of overflowing */
  .row,
  .actions,
  .button-group,
  .hero-actions,
  .product-actions,
  .cart-actions {
    flex-wrap: wrap;
  }

  /* Typography */
  h1 {
    font-size: clamp(2.25rem, 11vw, 4rem);
    line-height: 1.02;
  }
  h2 {
    font-size: clamp(1.75rem, 8vw, 3rem);
    line-height: 1.08;
  }
  h3 {
    font-size: clamp(1.2rem, 5vw, 1.75rem);
  }

  /* Keep long text and buttons inside the viewport */
  p, a, button, input, textarea, select {
    max-width: 100%;
  }

  button, .btn, .button, a.btn {
    min-height: 44px;
  }

  /* Product cards */
  .product-card,
  .product-item,
  .card {
    width: 100%;
    max-width: 100%;
  }

  /* Product images */
  .product-card img,
  .product-image img,
  .product-media img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  /* Product descriptions: retain the requested two-line card behavior */
  .product-card .description,
  .product-card .product-description,
  .product-item .description,
  .product-item .product-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  /* Forms */
  form {
    width: 100%;
  }
  input, textarea, select {
    width: 100%;
    box-sizing: border-box;
    font-size: 16px; /* avoids iOS zoom */
  }

  /* Cart */
  .cart-item {
    grid-template-columns: 72px 1fr auto !important;
    gap: 10px !important;
  }
  .cart-item img {
    width: 72px !important;
    height: 88px !important;
    object-fit: cover;
  }

  /* Tables / wide elements */
  table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }

  /* Footer */
  footer .footer-grid,
  .footer-grid,
  .footer-columns,
  .footer-links {
    grid-template-columns: 1fr !important;
  }

  /* Avoid fixed-height desktop hero/sections on small screens */
  .hero {
    min-height: 70svh;
    height: auto;
  }

  /* Comfortable mobile spacing */
  section {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 480px) {
  h1 { font-size: clamp(2rem, 12vw, 3rem); }
  h2 { font-size: clamp(1.65rem, 9vw, 2.35rem); }

  section {
    padding-left: 15px;
    padding-right: 15px;
  }

  .hero {
    min-height: 68svh;
  }

  .hero-actions,
  .product-actions,
  .cart-actions,
  .button-group {
    width: 100%;
  }

  .hero-actions > *,
  .product-actions > *,
  .cart-actions > *,
  .button-group > * {
    width: 100%;
  }
}


/* INY logo blue — headings across all customer pages */
body h1, body h2, body h3, body h4, body h5, body h6,
body .section-title, body .page-title, body .hero-title,
body .product-title, body .collection-title {
  color: var(--iny-logo-blue, #35B8D6) !important;
}


/* =========================================================
   INY FINAL CUSTOMER-PANEL REPAIR PASS
   Targeted fixes only: mobile menu, category stacking,
   Size Guide heading clipping, hero note cleanup, and
   founder/footer spacing. Existing desktop styling is preserved.
   ========================================================= */
@media (max-width: 760px) {
  .iny-shared-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
  }

  .iny-shared-toggle {
    position: relative !important;
    z-index: 10003 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    padding: 6px !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
  }

  .iny-shared-toggle span {
    display: block !important;
    width: 25px !important;
    height: 2px !important;
    margin: 3px 0 !important;
    background: var(--ny-pink-deep, #e98289) !important;
    border-radius: 999px !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .iny-shared-nav {
    position: fixed !important;
    top: 68px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: calc(100dvh - 68px) !important;
    max-height: calc(100dvh - 68px) !important;
    z-index: 10002 !important;
    display: none !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    pointer-events: none !important;
    visibility: hidden !important;
    background: rgba(255,250,247,.99) !important;
    padding: 10px 20px 32px !important;
    box-shadow: 0 18px 35px rgba(32,28,24,.14) !important;
  }

  .iny-shared-nav.open {
    display: flex !important;
    pointer-events: auto !important;
    visibility: visible !important;
  }

  .iny-shared-nav a {
    width: 100% !important;
    min-height: 52px !important;
    padding: 17px 0 !important;
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
  }

  body.iny-menu-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  /* Home categories: one clean vertical column on mobile. */
  .categories {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .category {
    width: 100% !important;
    max-width: 360px !important;
    margin-inline: auto !important;
  }

  /* Prevent the Size Guide heading from clipping the final glyph. */
  .client-size .section-heading {
    width: 100% !important;
    min-width: 0 !important;
  }

  .client-size .size-guide-title {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    padding-right: 2px !important;
  }

  .client-size .size-guide-title .word,
  .client-size .size-guide-title .word-inner {
    overflow: visible !important;
  }

  .client-size .size-guide-title em {
    display: inline !important;
    white-space: normal !important;
  }

  .client-size-image {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .client-size-image img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* The old hero bottom-right text card must never return. */
  .hero .hero-note,
  .hero > .hero-art > .hero-note,
  .hero-note-legacy {
    display: none !important;
  }

  /* Keep the founder section comfortable on narrow screens. */
  .iny-founder-story {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}

/* The supplied customer-panel archive does not contain a founder portrait.
   Use the bundled handmade story artwork until a dedicated portrait is provided. */
.founder-image-frame img[src*="founder.jpg"] { display: none !important; }

/* Footer logo image sizing for the home page. */
.footer .footer-logo {
  display: inline-flex !important;
  width: 150px !important;
  align-items: center !important;
  margin-bottom: 10px !important;
}
.footer .footer-logo img {
  display: block !important;
  width: 150px !important;
  height: auto !important;
}
