/**
 * Renew Unisex Salon - Comprehensive Responsive & Cross-Device Engine
 * Covers: Ultra-Wide (>=1400px), Desktop (1200px-1399px), Tablet (768px-991px), Mobile (576px-767px), Compact (<576px)
 */

/* ==========================================================================
   1. TABLET BREAKPOINTS (max-width: 991.98px)
   ========================================================================== */
@media (max-width: 991.98px) {
    /* Navbar & Header */
    .topbar {
        display: none !important;
    }
    .main-navbar {
        padding: 10px 0;
    }
    .navbar-brand-img {
        height: 46px !important;
        max-width: 190px !important;
    }

    /* Hero Section */
    .hero-slider-section {
        min-height: 520px;
    }
    .hero-content {
        padding: 40px 0;
    }
    .hero-title {
        font-size: clamp(32px, 5.5vw, 46px) !important;
        line-height: 1.2;
    }
    .hero-subtitle {
        font-size: 13px !important;
        letter-spacing: 3px !important;
    }
    .hero-desc {
        font-size: 15px !important;
    }

    /* Category Strip */
    .category-strip {
        padding: 20px 0;
    }
    .category-block {
        border-bottom: 1px solid rgba(196, 154, 86, 0.15);
        padding: 14px;
    }
    .category-block:not(:last-child)::after {
        display: none !important;
    }

    /* Service & Package Cards */
    .renew-card {
        margin-bottom: 20px;
    }

    /* Price Table */
    .price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 12px 0;
    }
    .price-dots {
        display: none !important;
    }

    /* Admin Panel Sidebar Collapse */
    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1050;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    }
    .admin-sidebar.mobile-open {
        left: 0;
    }
    .admin-main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* ==========================================================================
   2. MOBILE LANDSCAPE & LARGE PHONES (max-width: 767.98px)
   ========================================================================== */
@media (max-width: 767.98px) {
    /* Global Typography & Spacing */
    .section-title {
        font-size: clamp(24px, 5vw, 32px) !important;
        line-height: 1.25;
        margin-bottom: 10px;
    }
    .section-subtitle {
        font-size: 11px !important;
        letter-spacing: 2px !important;
    }
    .section-desc {
        font-size: 14px !important;
        margin-bottom: 28px !important;
        padding: 0 10px;
    }
    .gold-divider-center {
        margin: 10px auto 20px auto;
    }

    /* Top Announcement Bar */
    .topbar {
        padding: 6px 0;
        font-size: 11.5px;
    }
    .topbar .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }
    .topbar .d-flex {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    /* Hero Buttons */
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px !important;
    }
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Infinite Marquee Track on Mobile */
    .marquee-card {
        flex: 0 0 200px !important;
        height: 280px !important;
        border-radius: 12px !important;
        margin: 0 6px !important;
    }
    .marquee-card-overlay h5 {
        font-size: 13px !important;
    }
    .marquee-card-overlay small {
        font-size: 10px !important;
    }

    /* Instagram Reels Horizontal Snap */
    .reels-scroll-container {
        gap: 12px;
        padding-bottom: 12px;
    }
    .reel-card {
        flex: 0 0 190px !important;
        height: 320px !important;
        border-radius: 12px !important;
    }

    /* Branch Switcher Tabs */
    .branch-tab-btn {
        width: 100% !important;
        margin-bottom: 8px;
    }

    /* Booking Engine Page */
    .booking-container {
        padding: 20px 14px !important;
        border-radius: 14px;
    }
    .time-slot-btn {
        font-size: 11px !important;
        padding: 8px 2px !important;
    }
    .time-slot-btn span {
        font-size: 11.5px;
    }
    .slot-tag {
        font-size: 8px !important;
    }



    /* Cinematic Video Brand Section Mobile */
    .cinematic-video-section {
        min-height: auto !important;
        padding-top: 36px !important;
        padding-bottom: 36px !important;
    }
    .cinematic-video-section .display-5 {
        font-size: 26px !important;
    }
    .cinematic-video-section .lead {
        font-size: 14.5px !important;
    }

    /* Testimonial Section */
    .testimonial-section {
        padding: 40px 16px !important;
    }
    .testimonial-text {
        font-size: 15px !important;
        line-height: 1.6;
    }
    .testimonial-quote-icon {
        font-size: 48px !important;
        top: -15px !important;
    }

    /* Modals Full-Width on Mobile */
    .modal-dialog {
        margin: 12px;
    }
    .modal-content-custom {
        border-radius: 14px !important;
    }
    .modal-body {
        padding: 16px !important;
    }

    /* Admin Panel Responsive Tweaks */
    .admin-stat-card,
    .blog-stat-card,
    .settings-stat-card {
        padding: 12px 14px !important;
        gap: 12px !important;
    }
    .admin-topbar {
        padding: 10px 14px !important;
    }
}

/* ==========================================================================
   3. COMPACT PHONES & SMALL SCREENS (max-width: 575.98px)
   ========================================================================== */
@media (max-width: 575.98px) {
    /* Navbar */
    .navbar-brand-img {
        height: 40px !important;
        max-width: 165px !important;
    }

    /* Hero */
    .hero-title {
        font-size: 28px !important;
    }
    .hero-desc {
        font-size: 13.5px !important;
        line-height: 1.5;
    }
    .hero-slider-section {
        min-height: 460px;
    }

    /* Marquee on compact screens */
    .marquee-card {
        flex: 0 0 160px !important;
        height: 230px !important;
        border-radius: 10px !important;
        margin: 0 4px !important;
    }

    /* Reels on compact screens */
    .reel-card {
        flex: 0 0 165px !important;
        height: 280px !important;
    }

    /* Time Slots in 3 Columns on small screens */
    #timeSlotsContainer .col-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    /* Footer adjustments */
    footer {
        padding-top: 40px !important;
    }
    .footer-col {
        margin-bottom: 24px;
    }

    /* Buttons */
    .btn-renew-gold,
    .btn-renew-outline,
    .btn-renew-dark {
        min-height: 42px;
        padding: 10px 18px;
        font-size: 13.5px;
    }

    /* Admin Grid Adjustments */
    .settings-tab-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* ==========================================================================
   4. TOUCH DEVICE OPTIMIZATIONS
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {
    /* Touch target sizes */
    .nav-link,
    .dropdown-item,
    .btn,
    .time-slot-btn,
    .accordion-button {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Prevent accidental sticky hover effects */
    .marquee-card:hover .marquee-card-overlay {
        opacity: 1;
    }
}

/* ==========================================================================
   5. MOBILE STICKY CONVERSION BAR
   ========================================================================== */
.mobile-sticky-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: rgba(19, 17, 17, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(196, 154, 86, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1040;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
    padding: 0 12px;
}
.mobile-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #e5dec9;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none !important;
    gap: 2px;
    transition: all 0.2s ease;
}
.mobile-bar-item i {
    font-size: 17px;
}
.mobile-bar-item.active-book {
    background: linear-gradient(135deg, #dec18d 0%, #c49a56 100%);
    color: #151313 !important;
    border-radius: 20px;
    padding: 6px 14px;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(196, 154, 86, 0.4);
    transform: translateY(-2px);
}
@media (max-width: 991.98px) {
    body {
        padding-bottom: 56px !important;
    }
    .btn-whatsapp-float {
        display: none !important;
    }
}

/* ==========================================================================
   6. STICKY HEADER & PREVENT HORIZONTAL SCROLL OVERFLOW
   ========================================================================== */
.app-sticky-header {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1030 !important;
    width: 100% !important;
}

html, body {
    overflow-x: clip !important;
    width: 100%;
    position: relative;
}
