/* ===================================================
   Royal Navigate – Mobile Responsive Stylesheet
   Covers: index.html, about.html,
           demo-decor-store-blog.html,
           demo-decor-store-contact.html
   =================================================== */

/* ---- 1. Global base fixes ---- */
html, body {
    overflow-x: hidden;
}
img {
    max-width: 100%;
    height: auto;
}

/* ---- 2. Header / Navigation ---- */

/* Top announcement bar – let it wrap on xs */
@media (max-width: 575px) {
    .header-top-bar .row.h-45px {
        height: auto !important;
        padding: 8px 0;
    }
    .header-top-bar .fs-13 {
        font-size: 11px !important;
        line-height: 1.5;
        padding: 4px 0;
    }
}

/* Logo size on mobile */
@media (max-width: 767px) {
    header .navbar-brand img {
        max-height: 28px !important;
    }
}

/* Mega menu (Colors dropdown) – scrollable on mobile */
@media (max-width: 991px) {
    .dropdown-menu.submenu-content {
        max-height: 75vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Ensure mega-menu color grid uses 2 cols on xs */
    .dropdown-menu .row-cols-2 {
        row-gap: 12px;
    }
}

/* Header icon area – prevent icon overflow on small screens */
@media (max-width: 575px) {
    .header-icon {
        gap: 8px;
    }
    .widget-text.ms-25px {
        margin-left: 10px !important;
    }
}

/* ---- 3. Revolution Slider (index.html) ---- */
@media (max-width: 575px) {
    #decor-store-slider_forcefullwidth,
    #decor-store-slider_wrapper {
        height: 580px !important;
    }
}

/* ---- 4. Page-title sections (about / blog / contact) ---- */
@media (max-width: 767px) {
    .page-title-center-alignment.top-space-padding {
        padding-top: 70px !important;
        padding-bottom: 50px !important;
    }
    .page-title-extra-large h1 {
        font-size: clamp(1.8rem, 6vw, 2.4rem) !important;
    }
}

/* ---- 5. INDEX PAGE ---- */

/* 5a. Collection-banner text overlays
        xs-w-300px / xs-w-230px / xs-w-200px can overflow on 320 px screens */
@media (max-width: 400px) {
    .shop-box .position-absolute > div[class*="xs-w-"] {
        width: 85% !important;
        max-width: calc(100% - 24px) !important;
    }
    .shop-box h3 {
        font-size: 1.15rem !important;
        margin-bottom: 14px !important;
    }
    .shop-box h5 {
        font-size: 1rem !important;
        margin-bottom: 12px !important;
    }
}

/* 5b. Category icon labels */
@media (max-width: 400px) {
    .categories-style-01 a.alt-font.fs-17 {
        font-size: 12px !important;
    }
}

/* 5c. "Best sellers / New arrivals" tab nav – prevent overflow */
@media (max-width: 767px) {
    .tab-style-04 .nav-tabs.fs-32 {
        font-size: clamp(1.2rem, 5vw, 1.6rem) !important;
        flex-wrap: wrap;
        gap: 6px;
    }
    .tab-style-04 .nav-tabs .nav-item {
        padding: 0 8px !important;
    }
}

/* 5d. Testimonial / features section general spacing */
@media (max-width: 767px) {
    .feature-box.ps-30px { padding-left: 15px !important; }
    .feature-box.pe-30px { padding-right: 15px !important; }
}

/* 5e. Features row – remove stagger offset on mobile so items
        don't create unwanted gaps */
@media (max-width: 575px) {
    .row-cols-auto.row-cols-xl-4 > .col.align-self-end,
    .row-cols-auto.row-cols-xl-4 > .col.mt-30px,
    .row-cols-auto.row-cols-xl-4 > .col.lg-mt-30px {
        margin-top: 0 !important;
        align-self: unset !important;
    }
}

/* ---- 6. ABOUT PAGE ---- */

/* 6a. Marquee text – hide huge decorative text to prevent
        horizontal scroll on small screens */
@media (max-width: 767px) {
    .marquees-text {
        display: none !important;
    }
}

/* 6b. Rotating about-logo circle */
@media (max-width: 575px) {
    .w-165px { width: 110px !important; }
    .h-165px { height: 110px !important; }
}

/* 6c. About image strip – reduce gap/padding */
@media (max-width: 575px) {
    .container-fluid .col-md-3,
    .container-fluid .col-md-6 {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
}

/* 6d. Parallax section inner white box */
@media (max-width: 767px) {
    .bg-white.p-70px {
        padding: 36px 24px !important;
    }
}

/* 6e. Stats trust bar – already has sm-border-radius-6px,
        just ensure text wraps gracefully */
@media (max-width: 575px) {
    .border-radius-100px.sm-border-radius-6px .col-md-6 {
        padding: 14px 10px !important;
    }
    .border-radius-100px.sm-border-radius-6px .fs-18 {
        font-size: 15px !important;
    }
}

/* 6f. Team section – 2-col on xs */
@media (max-width: 400px) {
    .row-cols-1.row-cols-lg-4.row-cols-sm-2 > .col {
        width: 100% !important;
    }
}

/* ---- 7. BLOG PAGE ---- */

/* 7a. Filter bar + search – allow wrapping and full-width search */
@media (max-width: 767px) {
    .cat-filter-wrap {
        justify-content: flex-start;
    }
    .blog-search-wrap {
        max-width: 100% !important;
        width: 100%;
    }
    .blog-search-wrap input {
        width: 100% !important;
    }
    /* Make the filter-row items stack on mobile */
    .d-flex.align-items-center.justify-content-between.flex-wrap {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 14px;
    }
}

/* 7b. Featured post image height */
@media (max-width: 480px) {
    .featured-post-wrap img {
        height: 260px !important;
    }
    .featured-overlay {
        padding: 20px 16px 18px !important;
    }
    .featured-overlay h2 {
        font-size: 18px !important;
        margin-bottom: 8px;
    }
}

/* 7c. Blog card body text */
@media (max-width: 400px) {
    .blog-card-body {
        padding: 18px 16px 12px !important;
    }
    .blog-card-body h5 {
        font-size: 16px !important;
    }
    .blog-card-foot {
        padding: 12px 16px !important;
    }
}

/* 7d. Newsletter CTA */
@media (max-width: 575px) {
    .blog-newsletter {
        padding: 32px 18px !important;
        border-radius: 12px !important;
    }
    .blog-newsletter h3 {
        font-size: 1.3rem !important;
    }
    .newsletter-input-group {
        flex-direction: column !important;
        max-width: 100% !important;
    }
    .newsletter-input-group input,
    .newsletter-input-group button {
        width: 100% !important;
        border-radius: 8px !important;
    }
}

/* ---- 8. CONTACT PAGE ---- */

/* 8a. Contact info cards – equal height on mobile not needed */
@media (max-width: 575px) {
    .contact-info-card {
        padding: 22px 16px !important;
        margin-bottom: 16px;
    }
    .cic-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 17px !important;
        border-radius: 11px !important;
    }
    .contact-info-card .cic-value {
        font-size: 15px !important;
    }
}

/* 8b. Contact form */
@media (max-width: 575px) {
    .contact-form-wrap {
        padding: 24px 16px 20px !important;
        border-radius: 14px !important;
    }
    .subject-pills label {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
}

/* 8c. Social strip */
@media (max-width: 767px) {
    .social-strip {
        flex-direction: column !important;
        text-align: center !important;
        padding: 28px 20px !important;
    }
    .social-strip-icons {
        justify-content: center !important;
        flex-wrap: wrap;
    }
}

/* 8d. Map iframe */
@media (max-width: 575px) {
    .map-wrap iframe {
        height: 280px !important;
    }
    .map-overlay-card {
        bottom: 12px !important;
        left: 12px !important;
        right: 12px !important;
        max-width: 100% !important;
        padding: 14px 16px !important;
    }
}

/* ---- 9. FOOTER (all pages) ---- */

/* 9a. Footer columns – ensure proper spacing on xs */
@media (max-width: 575px) {
    footer.footer-dark .col-6 {
        margin-bottom: 24px;
    }
    /* Newsletter form */
    footer .newsletter-style-02 input {
        font-size: 13px !important;
    }
}

/* 9b. Footer bottom bar */
@media (max-width: 575px) {
    footer .border-top .col-6 {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        margin-bottom: 10px;
    }
    footer .border-top p { font-size: 12px !important; }
}

/* ---- 10. Cookie banner ---- */
@media (max-width: 575px) {
    #cookies-model.cookie-message {
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        max-width: calc(100% - 20px);
    }
}

/* ---- 11. General section spacing ---- */
/* Already handled for ≤991px and ≤767px in decor-store.css,
   this just adds an extra tier for xs */
@media (max-width: 400px) {
    section, footer {
        padding-top: 36px !important;
        padding-bottom: 36px !important;
    }
}

/* ---- 12. Utility – prevent any element causing horizontal scroll ---- */
@media (max-width: 767px) {
    .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}
