/* ══════════════════════════════════════════════════════════
   RESPONSIVE POLISH — FULL DEVICE COVERAGE PATCH
   Loaded after ultra-resist.css. Fills gaps for very small
   phones, foldables, tablets, landscape phones and ultra-wide
   monitors, without touching the original design system.
══════════════════════════════════════════════════════════ */

/* ── GLOBAL SAFETY NET ── */
img, svg, video, canvas, iframe { max-width: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }
* { min-width: 0; } /* stops flex/grid children from forcing overflow */
table { max-width: 100%; }

/* ── FLUID PRODUCT IMAGE (was fixed 270px, now scales with card width) ── */
.prod-img-wrap { height: auto; aspect-ratio: 1 / 1; }

/* ══════════════════════════
   TABLET / SMALL LAPTOP (769px – 992px)
   Tighten up the gap between the 992px and 1199px rules.
══════════════════════════ */
@media (max-width: 992px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .srv-page-body { padding: 1.75rem; }
  .contact-info-card, .contact-form-card, .checkout-card { padding: 1.5rem; }
  .new-deal-card-img, .deals-pg-img { height: 180px; }
  .cat-img { height: 200px; }
}

/* ══════════════════════════
   TABLES — widen the overflow-safe range so tablets
   (577–767px) never clip pricing / size-chart tables
══════════════════════════ */
@media (max-width: 767px) {
  .size-chart-table, .pricing-table {
    display: block; width: 100%; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .size-chart-table th, .size-chart-table td,
  .pricing-table th, .pricing-table td { white-space: nowrap; }
}

/* ══════════════════════════
   STANDARD PHONES (up to 480px)
══════════════════════════ */
@media (max-width: 480px) {
  .section-title { font-size: clamp(1.5rem, 8vw, 2.1rem) !important; }
  .section-tag { font-size: .62rem; letter-spacing: 2px; }
  .section-sub { font-size: .82rem; }

  .hero-content { padding: .85rem 1rem .25rem; }
  .hero-title { letter-spacing: 1px; }
  .hero-title em { letter-spacing: 4px; }
  .hero-badge { font-size: .6rem; padding: 6px 12px; gap: 6px; }

  .btn-primary-custom, .btn-outline-custom { padding: 10px 16px; font-size: .75rem; }

  .process-card, .feature-card { padding: 1.2rem 1rem; }
  .prod-body, .new-deal-body { padding: 1rem; }
  .new-deal-title { font-size: 1.1rem; }
  .prod-price, .new-deal-price-amt { font-size: 1.2rem; }

  .checkout-card, .contact-info-card, .contact-form-card { padding: 1.25rem; }
  .checkout-title, .contact-info-card h4 { font-size: 1.4rem; }
  .slip-card { padding: 1.75rem 1.25rem; }
  .slip-title { font-size: 1.8rem; }

  .cart-item-img { width: 58px; height: 58px; }
  .cart-head, .cart-foot { padding: 1rem; }
  .cart-items { padding: .75rem 1rem; }

  .srv-page-body { padding: 1.25rem; }
  .srv-page-body h3 { font-size: 1.5rem; }
  .srv-page-img { height: 160px; }
  .deals-pg-img { height: 150px; }

  #adminOverlay > div { padding: 0; }
  #adminOverlay h4 { font-size: 1.3rem; }
  #adminOverlay > div > div:first-child { padding: 1rem 1.25rem; }
  #adminOrderList { padding: 1rem 1.25rem !important; }

  .product-modal-header { padding: 1rem 1.1rem .75rem; }
  .product-modal-header h3 { font-size: 1.25rem; }
  .product-modal-views { padding: 1rem 1.1rem; gap: .8rem; }
  .product-modal-meta, .product-modal-actions { padding-left: 1.1rem; padding-right: 1.1rem; }
  .product-modal-price { font-size: 1.5rem; }
}

/* ══════════════════════════
   VERY SMALL / OLDER PHONES (up to 360px)
══════════════════════════ */
@media (max-width: 360px) {
  #navbar { padding: 0 .6rem; }
  .nav-logo img { height: 42px; max-width: 115px; }
  .hero-title { font-size: clamp(1.7rem, 9vw, 2.6rem) !important; }
  .hero-actions button, .hero-actions .btn-primary-custom, .hero-actions .btn-outline-custom { font-size: .72rem; padding: 10px 14px; }
  .hero-stat { padding: .5rem .6rem; }
  .hero-stat .num { font-size: 1.15rem; }
  .hero-stat .lbl { font-size: .5rem; letter-spacing: 1px; }
  .section-title { font-size: 1.4rem !important; }
  .process-num { font-size: 1.6rem; }
  .new-deal-tag, .tshirt-sku, .prod-sku { font-size: .58rem; }
  .form-control-dark, .form-control-custom { padding: 11px 13px; font-size: .84rem; }
}

/* ══════════════════════════
   LANDSCAPE PHONES (short viewport height)
   Complements the existing max-height:760px rule with a
   tighter squeeze for very short landscape screens.
══════════════════════════ */
@media (max-height: 430px) and (orientation: landscape) {
  #hero { min-height: 100svh; padding-top: var(--header-total); }
  .hero-badge { display: none; }
  .hero-title { font-size: clamp(1.4rem, 6vw, 2.2rem) !important; margin-bottom: .3rem; }
  .hero-title em { display: none; }
  .hero-subtitle { display: none; }
  .hero-actions { gap: .5rem; margin-bottom: .4rem; }
  .hero-dots { margin: .3rem auto .4rem; }
  .hero-stats { display: none !important; }
  .hero-scroll { display: none; }
  .mobile-menu { max-height: 70vh; }
}

/* ══════════════════════════
   FOLDABLES / NARROW TALL SCREENS (≤ 280px, e.g. Galaxy Fold cover)
══════════════════════════ */
@media (max-width: 280px) {
  .hero-actions { flex-direction: column; }
  .hero-actions button { width: 100%; }
  .nav-logo img { max-width: 90px; }
  .cart-btn, .hamburger { width: 36px; height: 36px; }
}

/* ══════════════════════════
   TOUCH TARGET SAFETY (any coarse-pointer device)
══════════════════════════ */
@media (pointer: coarse) {
  .hero-dot { padding: 8px; margin: -8px; background-clip: content-box; }
  .cart-close, .product-modal-close { min-width: 40px; min-height: 40px; }
  .nav-social a, .mobile-social-row a, .footer-social a { min-width: 36px; min-height: 36px; }
}

/* ══════════════════════════
   LARGE / ULTRA-WIDE DESKTOPS (1600px+)
   Keeps content from feeling lost on very wide monitors.
══════════════════════════ */
@media (min-width: 1600px) {
  .container { max-width: 1400px; }
  .hero-content { max-width: 1040px; }
  .checkout-wrap { max-width: 800px; }
}
@media (min-width: 1920px) {
  .container { max-width: 1540px; }
  .hero-content { max-width: 1160px; }
}

/* ══════════════════════════
   PRINT (order slip) — keep it clean when printed
══════════════════════════ */
@media print {
  #site-header, .cart-overlay, .cart-sidebar, footer,
  .btn-outline-custom, .toast-container, .wa-float { display: none !important; }
}

/* ══════════════════════════════════════════════════════════
   FLOATING WHATSAPP BUTTON — fixed bottom-right, all pages
══════════════════════════════════════════════════════════ */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 6px 24px rgba(0,0,0,.45), 0 0 0 rgba(37,211,102,.6);
  z-index: 99970; /* below toast (99999) / cart (99991) / admin (999990), above page content */
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.wa-float:hover, .wa-float:focus-visible {
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 8px 30px rgba(0,0,0,.55);
}
.wa-float-ping {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  opacity: .55;
  animation: waFloatPing 2.4s cubic-bezier(0.4,0,0.2,1) infinite;
  pointer-events: none;
}
@keyframes waFloatPing {
  0%   { transform: scale(1);   opacity: .55; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (max-width: 480px) {
  .wa-float { width: 50px; height: 50px; font-size: 1.45rem; right: 14px; bottom: 14px; }
}
/* Keep it clear of the mobile bottom bar / cart bar if one is open near the bottom */
@media (max-width: 767px) {
  .wa-float { bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-float-ping { animation: none; display: none; }
}
