/* MONU CCTV — Custom Styles */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }

.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Touch-friendly: min 44px tap targets on mobile */
@media (max-width: 640px) {
    a, button { min-height: 44px; }
    nav a, .text-\[10px\] a, .text-xs a, footer a,
    span.rounded-full, span.px-2 { min-height: auto; }
}

/* Prevent horizontal overflow on narrow screens */
table { table-layout: auto; word-break: break-word; }
@media (max-width: 480px) {
    table td { padding-left: 0.5rem; padding-right: 0.5rem; font-size: 0.8125rem; }
    table td:first-child { white-space: normal; min-width: 5rem; }
}

/* Smooth horizontal scroll for image thumbnails */
.overflow-x-auto { -webkit-overflow-scrolling: touch; scrollbar-width: thin; scroll-snap-type: x proximity; }
.overflow-x-auto > * { scroll-snap-align: start; }
.overflow-x-auto::-webkit-scrollbar { height: 4px; }
.overflow-x-auto::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

/* Product detail: stack pricing cards on very small screens */
@media (max-width: 374px) {
    #pricing-section .grid-cols-2 { grid-template-columns: 1fr; }
    #pricing-section .text-xl { font-size: 1rem; }
}

/* Hide WhatsApp float when mobile enquiry bar is visible */
@media (max-width: 1023px) {
    body:has(#mobile-enquiry-bar) .whatsapp-float { bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
}

/* Better touch targets for gallery thumbnails on mobile */
@media (max-width: 640px) {
    .overflow-x-auto button { min-width: 4.5rem; min-height: 4.5rem; }
}

/* Safe area insets for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    #mobile-enquiry-bar { padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)); }
    .whatsapp-float { bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
}

@media print {
    header, footer, .whatsapp-float, nav[aria-label="Pagination"], #mobile-enquiry-bar { display: none !important; }
    main { padding: 0 !important; }
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1a1; }
