/* ==========================================================================
   JEEMA CLOTHING BRAND — COMPREHENSIVE MOBILE-FIRST RESPONSIVE STYLESHEET
   Breakpoints:
     Mobile S  : 320px
     Mobile L  : 480px
     Tablet    : 768px
     Laptop    : 1024px
     Desktop   : 1280px+
   ========================================================================== */

/* ── 0. GLOBAL RESET & SAFETY RULES ──────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
video,
iframe,
embed {
    max-width: 100%;
    height: auto;
}

/* ── 1. REVIEW / TESTIMONIAL SLIDER ─────────────────────────────────────── */
.reviews-carousel-section {
    overflow: hidden;
    padding: 4.5rem 0;
    background-color: var(--white);
    position: relative;
}

.reviews-slider-container {
    position: relative;
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 3rem;
}

.reviews-track-wrapper {
    overflow: hidden;
    padding: 0.5rem 0;
    width: 100%;
}

.reviews-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.review-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--white);
    border: 1.5px solid var(--border-color);
    color: var(--dark-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.05rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.review-nav-btn.prev-btn {
    left: 0.5rem;
}

.review-nav-btn.next-btn {
    right: 0.5rem;
}

.review-nav-btn:hover {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
}

.review-slide-card {
    background: var(--white);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    min-width: 320px;
    max-width: 340px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.review-slide-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.review-stars {
    display: flex;
    gap: 0.2rem;
    color: #F59E0B;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.review-text {
    font-size: 0.92rem;
    color: #444;
    font-style: italic;
    margin-bottom: 1.25rem;
    line-height: 1.65;
}

.review-card-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.review-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-red) 0%, #880911 100%);
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.review-card-author strong {
    font-size: 0.92rem;
    font-weight: 700;
    display: block;
}

.review-card-author span {
    font-size: 0.78rem;
    color: var(--muted-text);
}

/* ── 2. DESKTOP — 1280px+ (nothing to override; base is desktop) ─────────── */
@media (max-width: 1280px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ── 3. LAPTOP (max-width: 1100px) ───────────────────────────────────────── */
@media (max-width: 1100px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 2rem;
    }

    .about-values-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ── 4. TABLET (max-width: 992px) ────────────────────────────────────────── */
@media (max-width: 992px) {

    /* ── Navigation ── */
    .main-navigation,
    .nav-menu,
    .nav-cta {
        display: none !important;
    }

    .mobile-toggle-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .d-none-mobile {
        display: none !important;
    }

    /* ── Hero (full-bg style) ── */
    .hero-bg-slide {
        min-height: 360px !important;
    }

    .hero-bg-content {
        max-width: 100% !important;
        padding: 3rem 0 !important;
    }

    .hero-bg-title {
        font-size: 2.4rem !important;
    }

    .hero-btn-group {
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
    }

    /* ── Grids ── */
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .quality-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }

    /* ── Footer ── */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    /* ── Contact ── */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* ── Quick View ── */
    .quick-view-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
        padding: 1.25rem !important;
    }

    .qv-main-img-box {
        height: 220px !important;
    }

    .quick-view-modal-dialog {
        width: 94% !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* ── Admin Panel ── */
    .admin-sidebar {
        transform: translateX(-100%);
        z-index: 1001;
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0 !important;
    }

    .admin-toggle-btn {
        display: block !important;
    }

    .admin-header {
        padding: 0 1rem;
        height: 64px;
    }

    .header-left-title {
        font-size: 0.95rem;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .admin-content {
        padding: 1.25rem;
    }

    .page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
}

/* ── 5. TABLET/LARGE-PHONE (max-width: 768px) ────────────────────────────── */
@media (max-width: 768px) {

    /* ── Container ── */
    .container {
        padding: 0 1.25rem !important;
    }

    /* ── Top bar ── */
    .top-bar {
        display: none;
    }

    /* ── Header wraps search below logo on mobile ── */
    body {
        padding-bottom: 68px !important;
    }

    .header-inner {
        height: auto !important;
        padding: 0.75rem 0.25rem !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        align-items: center !important;
    }

    .mobile-toggle-btn {
        margin-right: 0.25rem !important;
        padding: 0.35rem 0.5rem !important;
        font-size: 1.6rem !important;
    }

    .header-search-wrapper {
        order: 3 !important;
        width: 100% !important;
        flex: 1 0 100% !important;
        max-width: 100% !important;
        margin-top: 0.1rem !important;
    }

    .search-input {
        padding: 0.5rem 0.9rem !important;
        font-size: 0.85rem !important;
    }

    .search-submit-btn {
        width: 38px !important;
        height: 38px !important;
        font-size: 0.85rem !important;
    }

    /* ── Hero ── */
    .hero-bg-slide {
        min-height: 320px !important;
    }

    .hero-bg-content {
        max-width: 100% !important;
        padding: 2.5rem 0.5rem !important;
    }

    .hero-bg-title {
        font-size: 1.85rem !important;
        line-height: 1.2 !important;
    }

    .hero-bg-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 1.25rem !important;
    }

    /* ── Category circles ── */
    .category-circles-row {
        gap: 1.25rem !important;
    }

    .cat-circle-img-wrap {
        width: 90px !important;
        height: 90px !important;
    }

    .cat-circle-label {
        font-size: 0.85rem !important;
    }

    .hero-btn-group .btn-hero-shop {
        padding: 0.65rem 1.4rem !important;
        font-size: 0.88rem !important;
    }

    /* ── Section typography ── */
    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* ── Catalog filter tabs → horizontal touch scroll ── */
    .filter-tabs-wrapper {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        padding-bottom: 0.5rem !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    .filter-tabs-wrapper::-webkit-scrollbar {
        display: none !important;
    }

    .filter-tab-btn {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        font-size: 0.82rem !important;
        padding: 0.45rem 1rem !important;
    }

    /* ── Features ── */
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* ── Testimonials ── */
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    /* ── Gallery ── */
    .gallery-main {
        height: 350px;
    }

    /* ── Hero actions ── */
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.85rem;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    /* ── Mobile Drawer ── */
    .mobile-nav-drawer {
        width: 100%;
        max-width: 320px;
        padding: 1.5rem 1.25rem;
        box-sizing: border-box;
    }

    .mobile-nav-link {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 1rem;
        font-weight: 600;
        padding: 0.85rem 1rem;
    }

    .mobile-nav-drawer .btn-block {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.6rem;
        white-space: nowrap;
    }

    /* ── About ── */
    .about-tirupur-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* ── Contact ── */
    .info-item p,
    .contact-info-box p {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* ── Footer ── */
    .footer-col p {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* ── Modal — responsive ── */
    .modal-dialog-card,
    .modal-card,
    .quick-view-modal-dialog {
        width: 94% !important;
        max-width: 480px !important;
        margin: 1rem auto !important;
        border-radius: 16px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .form-row-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    /* ── Admin tables scroll ── */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table td,
    .admin-table th {
        white-space: nowrap;
    }

    /* ── Dashboard two-col panels → stack ── */
    div[style*="grid-template-columns: 2fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
    }
}

/* ── 6. MOBILE PHONES (max-width: 576px) ─────────────────────────────────── */
@media (max-width: 576px) {

    /* ── Global ── */
    .container {
        padding: 0 1.1rem !important;
    }

    /* ── Section spacing ── */
    .category-section,
    .products-section,
    .features-section,
    .quality-section,
    .testimonials-section,
    .reviews-carousel-section {
        padding: 3rem 0;
    }

    /* ── Hero ── */
    .hero-bg-slide {
        min-height: 280px !important;
    }

    .hero-bg-title {
        font-size: clamp(1.45rem, 6.5vw, 1.85rem) !important;
    }

    .hero-bg-subtitle {
        font-size: 0.88rem !important;
        margin-bottom: 1.1rem !important;
    }

    .hero-badge-tag {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }

    .hero-btn-group {
        flex-wrap: wrap !important;
    }

    .btn-hero-shop {
        font-size: 0.82rem !important;
        padding: 0.6rem 1.25rem !important;
    }

    /* ── Category circles ── */
    .category-circles-row {
        gap: 1rem !important;
    }

    .cat-circle-img-wrap {
        width: 78px !important;
        height: 78px !important;
    }

    .cat-circle-label {
        font-size: 0.8rem !important;
    }

    /* ── Nav height ── */
    .nav-container {
        height: 65px;
    }

    .brand-logo img {
        height: 36px;
    }

    /* ── Section typography ── */
    .section-title {
        font-size: 1.65rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.75rem;
    }

    .section-tag {
        font-size: 0.78rem;
    }

    /* ── Category Grid — 2 col ── */
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .category-img-box {
        height: 140px;
    }

    .category-info {
        padding: 0.75rem;
    }

    .category-name {
        font-size: 0.9rem;
    }

    /* ── Product Grid — 2 col ── */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .product-card {
        border-radius: 10px !important;
    }

    .product-media-wrapper {
        height: 175px !important;
    }

    .product-details-body {
        padding: 0.65rem 0.5rem !important;
    }

    .product-title-link a {
        font-size: 0.82rem !important;
        line-height: 1.25 !important;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .product-price-box {
        margin: 0.25rem 0 !important;
    }

    .current-price {
        font-size: 0.92rem !important;
    }

    .old-price {
        font-size: 0.75rem !important;
    }

    .sizes-badge-row {
        gap: 0.2rem !important;
        margin-bottom: 0.35rem !important;
    }

    .size-pill {
        font-size: 0.68rem !important;
        padding: 0.1rem 0.35rem !important;
    }

    .btn-whatsapp {
        font-size: 0.78rem !important;
        padding: 0.5rem 0.4rem !important;
        gap: 0.25rem !important;
        border-radius: 8px !important;
    }

    /* ── Features single col ── */
    .features-grid {
        grid-template-columns: 1fr !important;
    }

    .feature-card {
        padding: 1.75rem 1.5rem;
    }

    /* ── About ── */
    .about-tirupur-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* ── Contact ── */
    .contact-form-row {
        display: block !important;
    }

    .contact-info-box {
        padding: 1.25rem;
    }

    .info-item {
        gap: 0.75rem;
    }

    .info-item p,
    .info-item h4 {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* ── Gallery ── */
    .gallery-main {
        height: 280px;
    }

    .thumb-item {
        width: 68px;
        height: 68px;
    }

    /* ── Product detail ── */
    .detail-title {
        font-size: 1.6rem;
    }

    .detail-short {
        font-size: 0.95rem;
    }

    .size-btn {
        padding: 0.45rem 0.8rem;
        font-size: 0.88rem;
    }

    /* ── Reviews slider ── */
    .reviews-slider-container {
        padding: 0 1.25rem;
    }

    .review-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .review-nav-btn.prev-btn {
        left: 0.15rem;
    }

    .review-nav-btn.next-btn {
        right: 0.15rem;
    }

    .review-slide-card {
        min-width: 270px;
        padding: 1.25rem 1.4rem;
    }

    /* ── Footer ── */
    .site-footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .footer-col p,
    .footer-col span {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    /* ── CTA Banner ── */
    .cta-banner {
        padding: 3rem 0;
    }

    .cta-banner h2 {
        font-size: 1.8rem;
    }

    .cta-banner p {
        font-size: 0.95rem;
    }

    /* ── Floating WhatsApp ── */
    .floating-whatsapp-btn,
    .floating-whatsapp {
        width: 52px;
        height: 52px;
        font-size: 1.55rem;
        bottom: 5rem;
        right: 1rem;
    }

    /* ── Mobile Nav Drawer (small) ── */
    .mobile-nav-drawer {
        width: 88%;
        max-width: 310px;
        padding: 1.25rem 1rem;
    }

    .mobile-nav-link {
        font-size: 0.95rem;
        padding: 0.75rem 0.85rem;
    }

    .mobile-nav-drawer .btn {
        font-size: 0.88rem;
        padding: 0.78rem 0.85rem;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
        box-sizing: border-box;
    }

    /* ── Modals — bottom-sheet on mobile ── */
    .modal-card,
    .modal-dialog-card {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: 16px 16px 0 0 !important;
        max-height: 92vh !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .modal-overlay,
    #whatsappModal {
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .modal-body,
    .modal-body-container {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex: 1 !important;
        padding: 1.1rem !important;
        gap: 0.9rem !important;
    }

    /* ── Collapse modal grids ── */
    #whatsappModal .form-row-grid,
    #bulkEnquiryModal .form-row-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.85rem !important;
    }

    .modal-btn-group {
        flex-direction: column-reverse !important;
        gap: 0.6rem !important;
    }

    #whatsappSubmitBtn,
    #modalCancel,
    #bulkEnquirySubmitBtn,
    #bulkModalCancel {
        width: 100% !important;
    }

    .modal-header,
    .modal-header-banner {
        padding: 1rem 1.1rem !important;
    }

    .modal-header h3,
    .modal-title-text {
        font-size: 1.05rem !important;
    }

    /* ── Admin ── */
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1.1rem;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .admin-content {
        padding: 1rem;
    }

    .card-body {
        padding: 1.1rem;
    }

    .card-header {
        padding: 1rem 1.1rem;
    }

    .page-title {
        font-size: 1.35rem;
    }

    /* ── Admin forms single-col on mobile ── */
    div[style*="grid-template-columns: 2fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns: 1fr 2fr"] {
        display: block !important;
    }

    div[style*="grid-template-columns: 2fr 1fr"]>*,
    div[style*="grid-template-columns: 1fr 1fr"]>*,
    div[style*="grid-template-columns: 1fr 2fr"]>* {
        margin-bottom: 1rem;
    }

    .user-badge span {
        display: none;
    }
}

/* ── 7. SMALL PHONES (max-width: 480px) ──────────────────────────────────── */
@media (max-width: 480px) {

    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
    }

    .product-media-wrapper {
        height: 160px !important;
    }

    .btn-whatsapp {
        font-size: 0.74rem !important;
        padding: 0.45rem 0.3rem !important;
    }

    .admin-header {
        height: 58px;
        padding: 0 0.75rem;
    }

    .btn-admin {
        padding: 0.5rem 0.9rem;
        font-size: 0.82rem;
    }
}

/* ── 8. EXTRA-SMALL PHONES (max-width: 375px) ────────────────────────────── */
@media (max-width: 375px) {

    .hero-title {
        font-size: 1.55rem !important;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.45rem !important;
    }

    .product-media-wrapper {
        height: 145px !important;
    }

    .btn-whatsapp {
        font-size: 0.7rem !important;
        padding: 0.42rem 0.25rem !important;
    }

    .nav-container {
        height: 60px;
    }

    .brand-logo img {
        height: 32px;
    }
}

/* ── 9. ADMIN SIDEBAR OVERLAY ────────────────────────────────────────────── */
.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 1000;
}

.admin-sidebar-overlay.active {
    display: block;
}

/* ── 10. ADMIN PANEL — ADDITIONAL MOBILE TWEAKS ──────────────────────────── */
@media (max-width: 640px) {

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table td,
    .admin-table th {
        white-space: nowrap;
    }

    .header-left-title span {
        display: none;
    }

    .page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
}

/* ── 11. MOBILE BOTTOM NAVIGATION BAR ───────────────────────────────────── */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: var(--white);
    border-top: 1.5px solid var(--border-color);
    z-index: 999;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.07);
    align-items: center;
    justify-content: space-around;
}

@media (max-width: 992px) {
    .mobile-bottom-nav {
        display: flex;
    }
}

/* ── 12. ADMIN LOGIN PAGE MOBILE ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 12px;
        width: 95%;
        max-width: 100%;
    }
}

/* ── 13. PRODUCT CARD HOVER SAFETY (NO TRANSFORM OVERFLOW) ─────────────────── */
@media (max-width: 768px) {
    .product-card:hover {
        transform: none !important;
    }

    .category-card:hover {
        transform: none !important;
    }
}