/* ================================================================
   MOBILE RESPONSIVE OVERRIDES — Amogha Cafe & Restaurant
   Loaded LAST to override all other stylesheets.
   Organized by breakpoint: 768px → 480px → 360px → landscape
   ================================================================ */

/* === SECTION 1: Base fixes (always applied) === */

/* Language switcher touch targets */
.lang-btn {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    cursor: pointer;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

/* Prevent nav overflow from causing horizontal scroll */
header, nav, .navbar {
    max-width: 100vw;
}

/* Hide carousel scrollbars for clean mobile look */
.category-carousel::-webkit-scrollbar,
.stories-scroll::-webkit-scrollbar,
.reviews-carousel::-webkit-scrollbar,
.allergen-filter-bar::-webkit-scrollbar { display: none; }

.category-carousel,
.stories-scroll,
.reviews-carousel,
.allergen-filter-bar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Floating cart bar: safe-area support for notched phones */
#floating-cart-bar,
.floating-cart-bar {
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
}

/* Smooth momentum scrolling on all scrollable areas */
.menu-items, .gallery-grid, .specials-grid,
.stories-scroll, .reviews-carousel {
    -webkit-overflow-scrolling: touch;
}

/* Fix small font sizes on hero slide overlays */
.slide-label {
    font-size: 0.75rem;
}
.slide-price {
    font-size: 0.8rem;
}
.slide-price .telugu-sub {
    font-size: 0.7rem;
}
.status-text {
    font-size: 0.75rem;
}

/* FAQ heading fix: h4 changed to h3 for proper heading hierarchy */
.faq-item h3 {
    font-size: inherit;
    font-weight: inherit;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

/* Reset button defaults on close buttons (converted from span to button for a11y) */
button.close,
button.lightbox-close {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    line-height: inherit;
}

/* AI chat close button — increase touch target */
.ai-chat-close {
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
}

/* AI chat send button — ensure touch target */
.ai-chat-send, #ai-chat-send {
    min-width: 44px !important;
    min-height: 44px !important;
}

/* Gallery slideshow dots — touch target */
.gallery-dot {
    min-width: 28px;
    min-height: 28px;
    padding: 8px;
    cursor: pointer;
}


/* === SECTION 2: @media (max-width: 768px) — Tablet & Large Phone === */

@media (max-width: 768px) {

    /* -- Hero -- */
    .hero {
        padding: 8rem 1.5rem 4rem;
    }
    .hero-content {
        bottom: 3rem;
        padding: 2rem 1.5rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }
    .hero-tagline::before,
    .hero-tagline::after {
        width: 30px;
        margin: 0 0.6rem;
    }
    .hero-buttons {
        gap: 1rem;
        flex-wrap: wrap;
    }
    .hero-buttons .cta-button {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    /* -- Gallery: 2 columns -- */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem;
    }
    .gallery-grid .gallery-item {
        height: 200px;
    }

    /* -- Reviews: tighter cards -- */
    .review-card {
        padding: 1.5rem 1.2rem 1.2rem 1.5rem;
        min-width: 260px;
    }
    .review-card::before {
        font-size: 3rem;
        top: 0.2rem;
        left: 0.8rem;
    }

    /* -- Contact: single column -- */
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
    .contact-form-section {
        padding: 1.8rem 1.2rem;
    }
    .contact {
        padding: 4rem 1.5rem;
    }

    /* -- Modals: tighter -- */
    .modal-content {
        width: 95%;
        padding: 1.8rem 1.2rem;
        margin: 2% auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* -- Touch targets: enforce 44px minimum -- */
    .allergen-filter-btn,
    .filter-btn,
    .allergen-pill,
    .safe-for-me-toggle,
    .spice-level,
    .category-item,
    .lang-btn,
    .story-bubble {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* -- Touch targets: critical mobile fixes -- */
    .add-to-cart {
        min-height: 44px;
    }
    .hub-chip {
        min-height: 44px;
    }
    .gallery-slide-btn,
    .gallery-prev,
    .gallery-next {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .carousel-btn,
    .carousel-prev,
    .carousel-next {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .write-review-btn {
        min-height: 44px;
        padding: 0.6rem 1.5rem;
    }
    .newsletter-btn {
        min-height: 44px;
    }
    .sticky-order-bar {
        min-height: 48px !important;
    }
    .sticky-order-bar .bar-cta,
    .bar-cta {
        height: 44px !important;
        min-height: 44px !important;
    }
    .floating-cart-btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
    .weather-item-chip {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
    .ai-suggest-btn {
        min-height: 44px;
        padding: 0.5rem 0.8rem;
    }
    .contact-link,
    .footer-contact-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    /* Footer links */
    footer a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    .ai-chat-close {
        min-width: 44px !important;
        min-height: 44px !important;
    }
    #ai-chat-send {
        min-width: 44px !important;
        min-height: 44px !important;
    }
    #ai-chat-input {
        min-height: 44px !important;
    }
    .ai-suggest-btn {
        min-height: 44px !important;
        padding: 0.5rem 0.8rem !important;
    }

    /* -- Social proof toast: above FABs -- */
    .social-proof-toast {
        bottom: 140px !important;
    }

    /* -- FAB stacking: prevent overlap between back-to-top and ai-chat-fab -- */
    .back-to-top {
        bottom: 140px !important;
    }
    .ai-chat-fab {
        bottom: 76px !important;
    }

    /* -- Badge grid: 2 columns -- */
    .badge-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* -- Reservation modal: stack fields -- */
    .reservation-row {
        flex-direction: column;
        gap: 0;
    }

    /* -- About cards: consistent sizing -- */
    .about-card, .info-card {
        padding: 1.5rem;
    }

    /* -- Specials grid: 2 columns -- */
    .specials-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }

    /* -- Newsletter: stack form vertically -- */
    .newsletter-card {
        flex-direction: column !important;
        text-align: center;
    }
    .newsletter-form {
        flex-direction: column !important;
        width: 100%;
        max-width: 100%;
    }
    .newsletter-input-group {
        flex-direction: column;
    }
    .newsletter-privacy {
        text-align: center;
        width: 100%;
        margin-top: 8px;
    }
}


/* === SECTION 3: @media (max-width: 480px) — Small Phones === */

@media (max-width: 480px) {

    /* -- Hero: stack buttons, reduce spacing -- */
    .hero {
        padding: 6rem 1rem 3rem;
    }
    .hero-content {
        bottom: 2rem;
        padding: 1.5rem 1rem;
    }
    .hero-tagline {
        letter-spacing: 0.25em;
        font-size: 0.85rem;
    }
    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }
    .hero-subtitle {
        font-size: 0.95rem;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    .hero-buttons .cta-button {
        width: 100%;
        max-width: 280px;
        text-align: center;
        padding: 0.8rem 1.5rem;
    }

    /* -- Sections: reduce padding -- */
    .about, .specials, .menu, .reviews, .contact, .faq,
    #gallery, .stats-section, .chef-section, .testimonials,
    .social-feed, .newsletter-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .contact {
        padding: 3rem 1rem;
    }

    /* -- Gallery: single column -- */
    .gallery-grid {
        grid-template-columns: 1fr !important;
    }
    .gallery-grid .gallery-item {
        height: 220px;
    }

    /* -- Specials: single column -- */
    .specials-grid {
        grid-template-columns: 1fr !important;
    }

    /* -- Stats: tighter -- */
    .stat-item {
        padding: 0.75rem 1rem;
    }

    /* -- Modals: bottom-sheet pattern -- */
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
        padding: 1.5rem 1rem;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }

    /* -- Checkout steps: compact -- */
    .checkout-progress {
        gap: 0.3rem;
    }
    .checkout-progress-line {
        width: 16px;
    }

    /* -- Font size floor: minimum 12px for readability -- */
    .sp-text, .sp-time, .badge-card-desc, .badge-card-date,
    .filter-count, .reorder-chip, .delivery-time-estimate,
    .queue-metric-label, .queue-footer, .queue-message,
    .loyalty-progress-hint, .tier-perks li,
    .referral-progress-text, .story-author {
        font-size: max(0.78rem, 12px);
    }

    /* -- Reviews carousel: smaller cards -- */
    .review-card {
        min-width: 240px;
        padding: 1.2rem 1rem;
    }

    /* -- Chef section: stack -- */
    .chef-content {
        flex-direction: column;
        text-align: center;
    }
    .chef-image {
        margin: 0 auto 1.5rem;
    }

    /* -- Section headings -- */
    h2 {
        font-size: clamp(1.4rem, 6vw, 2rem);
    }
}


/* === SECTION 4: @media (max-width: 360px) — Ultra-Small Phones === */

@media (max-width: 360px) {

    /* -- Hero: aggressive reduction -- */
    .hero {
        padding: 5rem 0.75rem 2.5rem;
    }
    .hero-content {
        padding: 1.2rem 0.75rem;
        bottom: 1.5rem;
    }
    .hero-title {
        font-size: clamp(1.5rem, 10vw, 2rem);
    }
    .hero-tagline {
        letter-spacing: 0.15em;
        font-size: 0.75rem;
    }
    /* Hide decorative lines on tiny screens */
    .hero-tagline::before,
    .hero-tagline::after {
        display: none;
    }
    .hero-subtitle {
        font-size: 0.8rem;
    }
    .hero-buttons .cta-button {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }

    /* -- Container padding -- */
    .container {
        padding: 0 0.75rem;
    }

    /* -- Section padding -- */
    section,
    .about, .specials, .menu, .reviews, .contact,
    #gallery, .stats-section, .chef-section {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* -- Section headings smaller -- */
    h2 {
        font-size: clamp(1.2rem, 7vw, 1.6rem);
        margin-bottom: 1.5rem;
    }

    /* -- Modals: tight -- */
    .modal-content {
        padding: 1.2rem 0.8rem;
        border-radius: 12px 12px 0 0;
    }
    .checkout-progress-num {
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }

    /* -- FABs: compact -- */
    .whatsapp-float {
        width: 44px !important;
        height: 44px !important;
    }
    .ai-chat-fab {
        width: 40px !important;
        height: 40px !important;
        bottom: 68px !important;
    }
    .ai-fab-badge {
        font-size: 8px;
    }
    .back-to-top {
        width: 40px !important;
        height: 40px !important;
        bottom: 116px !important;
    }
    .referral-fab {
        bottom: 156px !important;
        font-size: 0.75rem;
    }
    .social-proof-toast {
        bottom: 120px !important;
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }

    /* -- Music & voice FABs: compact -- */
    .music-toggle {
        width: 40px !important;
        height: 40px !important;
    }
    .voice-order-btn {
        width: 44px !important;
        height: 44px !important;
    }

    /* -- Badge grid: single column -- */
    .badge-grid {
        grid-template-columns: 1fr;
    }

    /* -- Allergen bar: horizontal scroll -- */
    .allergen-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.4rem;
        padding-bottom: 0.3rem;
    }
    .allergen-filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    /* -- Menu item cards -- */
    .menu-item-card {
        padding: 0.6rem;
    }
    .item-header h4 {
        font-size: 0.85rem;
    }
    .price {
        font-size: 0.9rem;
    }
    .spice-level {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    .add-to-cart {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    /* -- Category carousel items smaller -- */
    .category-item {
        min-width: 56px;
    }
    .category-img-wrap {
        width: 48px;
        height: 48px;
    }
    .category-name {
        font-size: 0.6rem;
    }

    /* -- Cart modal items -- */
    .cart-item-name {
        font-size: 0.85rem;
    }
    .qty-btn {
        width: 28px;
        height: 28px;
    }

    /* -- Floating cart bar -- */
    #floating-cart-bar .floating-cart-count,
    .floating-cart-bar .floating-cart-count {
        font-size: 0.75rem;
    }

    /* -- Contact form -- */
    .contact-form-section {
        padding: 1.2rem 0.8rem;
    }
    #contact-form input,
    #contact-form textarea {
        padding: 0.7rem;
        font-size: 0.85rem;
    }

    /* -- Stories bubbles smaller -- */
    .story-bubble {
        min-height: 36px;
    }
    .story-avatar-ring {
        width: 52px;
        height: 52px;
    }
    .story-avatar {
        font-size: 1.2rem;
    }
    .story-author {
        font-size: 0.6rem;
    }

    /* -- Live queue widget -- */
    .queue-card {
        padding: 0.8rem;
    }
    .queue-metric-value {
        font-size: 1.4rem;
    }

    /* -- Loyalty widget in nav -- */
    .loyalty-widget, #loyalty-widget {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}


/* === SECTION 5: Landscape Phones === */

@media (orientation: landscape) and (max-height: 500px) {

    /* -- Hero: reduce vertical space -- */
    .hero {
        min-height: 80vh;
        padding: 4rem 2rem 2rem;
    }
    .hero-content {
        bottom: 1rem;
    }
    .hero-title {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }
    .hero-tagline {
        font-size: 0.75rem;
        letter-spacing: 0.2em;
        margin-bottom: 0.5rem;
    }
    .hero-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    .hero-buttons {
        gap: 0.5rem;
    }
    .hero-buttons .cta-button {
        padding: 0.5rem 1.2rem;
        font-size: 0.8rem;
    }

    /* -- Hide hero scroll indicator -- */
    .hero-scroll-indicator,
    .scroll-indicator {
        display: none;
    }

    /* -- All sections: reduce vertical padding -- */
    .about, .specials, .menu, .reviews, .contact, .faq,
    #gallery, .stats-section, .chef-section, .testimonials {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    /* -- Stats: use horizontal space -- */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* -- Gallery: 3 columns in landscape -- */
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .gallery-grid .gallery-item {
        height: 160px;
    }

    /* -- Modals: shorter -- */
    .modal-content {
        max-height: 85vh;
        margin: 1% auto;
    }

    /* -- Section headings smaller -- */
    h2 {
        font-size: clamp(1.2rem, 3vw, 1.8rem);
        margin-bottom: 1rem;
    }

    /* -- Header: slim -- */
    header, nav {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}


/* === SECTION 6: Menu Page Specific Overrides === */

@media (max-width: 480px) {
    /* Menu page title */
    .menu-page-header h1,
    .menu-title {
        font-size: 1.5rem;
    }
    .menu-page-header p,
    .menu-subtitle {
        font-size: 0.85rem;
    }

    /* Menu items: tighter grid */
    .menu-items {
        gap: 0.6rem;
    }

    /* Search bar */
    .menu-search-input,
    input[placeholder*="Search menu"] {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    /* Filter toggle buttons */
    .veg-toggle-btn, .nonveg-toggle-btn,
    [class*="filter-toggle"] {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-height: 36px;
    }

    /* Floating cart bar */
    #floating-cart-bar {
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .menu-page-header h1,
    .menu-title {
        font-size: 1.2rem;
    }

    .menu-items {
        gap: 0.4rem;
    }

    .menu-item-card {
        padding: 0.5rem;
    }

    .carousel-arrow {
        width: 28px;
        height: 28px;
    }

    .category-img-wrap {
        width: 46px;
        height: 46px;
    }
    .category-item {
        min-width: 54px;
        gap: 4px;
    }
    .category-name {
        font-size: 0.58rem;
    }
}


/* === SECTION 7: Touch Target Enforcement (all sizes) === */

@media (pointer: coarse) {
    /* Ensure all interactive elements meet 44px touch target minimum */
    button, .btn, [role="button"],
    input[type="submit"], input[type="button"],
    .add-to-cart, .cta-button, .qty-btn,
    .close, .modal-close,
    .nav-link, .signin-nav-btn,
    .carousel-arrow {
        min-height: 44px;
    }

    /* Buttons that are also navigation arrows need min-width */
    .carousel-arrow, .qty-btn, .close, .modal-close,
    .gallery-slide-btn, .carousel-btn {
        min-width: 44px;
    }

    /* Gallery slideshow arrows */
    .gallery-slide-btn.gallery-prev,
    .gallery-slide-btn.gallery-next,
    .gallery-prev, .gallery-next {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Reviews carousel arrows */
    .carousel-btn.carousel-prev,
    .carousel-btn.carousel-next {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Write a Review button */
    .write-review-btn {
        min-height: 44px;
        padding: 0.6rem 1.5rem;
    }

    /* Newsletter subscribe buttons */
    .newsletter-btn {
        min-height: 44px;
        padding: 0.6rem 1.2rem;
    }

    /* Sticky order bar CTA */
    .bar-cta {
        min-height: 44px;
        padding: 0.5rem 1.2rem;
    }

    /* Floating cart View Cart button */
    .floating-cart-btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }

    /* Weather suggestion chips */
    .weather-item-chip {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }

    /* AI chat suggestion buttons */
    .ai-suggest-btn {
        min-height: 44px;
        padding: 0.5rem 0.8rem;
    }

    /* Phone number / contact links */
    .contact-link,
    .footer-contact-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Footer navigation links */
    footer a,
    .footer-links a,
    .footer-nav a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Privacy policy / terms links */
    .footer-bottom a,
    .legal-links a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Hub chips (gamification) */
    .hub-chip {
        min-height: 44px;
    }

    /* Quantity controls need bigger tap area */
    .qty-minus, .qty-plus {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Spice selector tappable */
    .spice-level {
        min-height: 36px;
        padding: 6px 12px;
    }

    /* Close buttons */
    .close, .modal-close, .story-close {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* AI chat close and send */
    .ai-chat-close {
        min-width: 44px;
        min-height: 44px;
    }
    #ai-chat-send, .ai-chat-send {
        min-width: 44px;
        min-height: 44px;
    }

    /* AI chat input */
    #ai-chat-input {
        min-height: 44px;
    }
}


/* === SECTION 8: Safe Area Support for Notched Devices === */

@supports (padding: env(safe-area-inset-bottom)) {
    /* Bottom fixed elements */
    #floating-cart-bar,
    .floating-cart-bar {
        padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    }

    /* FABs respect safe areas */
    .whatsapp-float {
        bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .ai-chat-fab {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .voice-order-btn {
        bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .music-toggle {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .back-to-top {
        bottom: calc(140px + env(safe-area-inset-bottom, 0px)) !important;
    }
    .referral-fab {
        bottom: calc(192px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Header respects safe area top (status bar) */
    header, nav {
        padding-top: max(0.8rem, env(safe-area-inset-top, 0px));
    }

    /* Modals respect safe areas */
    @media (max-width: 480px) {
        .modal-content {
            padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
        }
    }
}


/* === SECTION 9: Reduced Motion Enhancements === */

@media (prefers-reduced-motion: reduce) {
    .hero-slideshow, .hero-slideshow *,
    .social-proof-toast, .auth-toast,
    .cart-fly-item, .loyalty-points-floater,
    .streak-milestone-overlay {
        animation: none !important;
        transition: none !important;
    }
    .gallery-item:hover {
        transform: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* === iOS zoom prevention: all inputs must be >= 16px on mobile === */
@media (max-width: 768px) {
    input,
    textarea,
    select,
    #ai-chat-input,
    .chat-input,
    .search-input,
    .meal-planner-controls input,
    .form-input,
    [type="text"],
    [type="email"],
    [type="tel"],
    [type="number"],
    [type="password"],
    [type="search"] {
        font-size: max(1rem, 16px) !important;
    }
}

/* === Focus-visible styles for keyboard navigation (accessibility) === */
button:focus-visible,
.btn:focus-visible,
[role="button"]:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--gold, #D4A017);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(212, 160, 23, 0.2);
}

/* === 360px ultra-small phone fixes === */
@media (max-width: 360px) {
    /* FAB stack: tighten vertical spacing */
    .whatsapp-float  { bottom: 20px !important; }
    .ai-chat-fab     { bottom: 64px !important; }
    .back-to-top     { bottom: 110px !important; }
    .referral-fab    { bottom: 154px !important; }

    /* Modal safe-area on tiny phones */
    .modal-content {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }

    /* Gallery height on tiny phones */
    .gallery-grid .gallery-item {
        height: 180px;
    }

    /* Customize modal touch targets */
    .customize-opt,
    .customize-check {
        min-height: 44px;
        padding: 10px 14px;
    }
}
