/* ============================================================
   FarmersBD — Responsive Overrides
   Flat Design Palette Fixes
   ============================================================ */

/* ── Large (1200px+) ─────────────────────────────────────── */
@media (min-width: 1200px) {
    #heroCarousel .carousel-item {
        height: 80vh;
        min-height: 520px;
        max-height: 720px;
    }

    #heroCarousel img {
        height: 100%;
        min-height: 520px;
    }
}

/* ── Medium (768px – 1199px) ─────────────────────────────── */
@media (max-width: 1199px) {
    :root {
        --font-size-h1: 2rem;
        --font-size-h2: 1.5rem;
        --section-padding: 3.5rem 0;
    }

    #heroCarousel .carousel-item {
        height: 75vh;
        min-height: 460px;
        max-height: 600px;
    }

    #heroCarousel img {
        height: 100%;
        min-height: 460px;
    }

    .hero-text {
        padding: 2rem 2.5rem;
        max-width: 560px;
    }
}

/* ── Tablet (576px – 767px) ──────────────────────────────── */
@media (max-width: 767px) {
    :root {
        --font-size-h1: 1.65rem;
        --font-size-h2: 1.35rem;
        --font-size-h3: 1.15rem;
        --section-padding: 3rem 0;
    }

    .hero-text {
        padding: 1.5rem 1.75rem;
        border-radius: 16px;
    }

    .hero-content h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: 1.45rem;
    }

    .service-card {
        padding: 1.25rem 1rem;
    }

    .service-icon {
        width: 48px;
        height: 48px;
        font-size: 1.35rem;
    }
}

/* ── Mobile (< 576px) ─────────────────────────────────────── */
@media (max-width: 575px) {
    :root {
        --font-size-h1: 1.4rem;
        --font-size-h2: 1.25rem;
        --font-size-body: 0.875rem;
        --section-padding: 2.25rem 0;
    }

    .hero-text {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .hero-content h1 {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
    }

    .hero-content p {
        font-size: 0.85rem;
        margin-bottom: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .auth-body {
        padding: 1rem;
    }

    .page-header {
        padding: 1.75rem 0;
    }

    .page-header h1 {
        font-size: 1.3rem;
    }

    .table-responsive td {
        min-width: 90px;
    }

    .cart-item-img {
        width: 50px;
        height: 50px;
    }

    .stat-number {
        font-size: 1.35rem;
    }

    .hero-stat-number {
        font-size: 1.2rem;
    }

    .hero-stat-label {
        font-size: 0.75rem;
    }

    /* ── Mobile 2-Column Card Grid Overrides (< 576px) ───────── */
    .row.g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    .row.g-3 {
        --bs-gutter-x: 0.6rem;
        --bs-gutter-y: 0.6rem;
    }

    /* Service Card */
    .service-card {
        padding: 1rem 0.75rem !important;
        border-radius: 16px !important;
    }

    .srv-svg-icon {
        width: 38px !important;
        height: 38px !important;
    }

    .service-badge {
        font-size: 0.65rem !important;
        padding: 0.25rem 0.5rem !important;
    }

    .service-card h3 {
        font-size: 0.95rem !important;
        margin-bottom: 0.35rem !important;
    }

    .service-card p {
        font-size: 0.78rem !important;
        margin-bottom: 0.85rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .btn-service-action {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.65rem !important;
        width: 100%;
        justify-content: center !important;
    }

    /* Fish Card */
    .fish-card {
        border-radius: 12px !important;
        overflow: hidden;
        max-width: 100% !important;
    }

    .fish-img-wrapper {
        height: 100px !important;
        padding: 4px !important;
    }

    .fish-img {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }

    .fish-badge {
        font-size: 0.6rem !important;
        padding: 0.18rem 0.4rem !important;
        margin: 0.35rem !important;
    }

    .fish-card .card-body {
        padding: 0.6rem !important;
    }

    .fish-card .card-title {
        font-size: 0.88rem !important;
        margin-bottom: 0.2rem !important;
    }

    .fish-card .card-text {
        font-size: 0.72rem !important;
        margin-bottom: 0.5rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .btn-fish-action {
        font-size: 0.72rem !important;
        padding: 0.3rem 0.45rem !important;
    }

    /* Product Card */
    .product-card {
        border-radius: 14px !important;
    }

    .product-card .card-img-wrapper {
        height: 120px !important;
    }

    .product-card img {
        height: 120px !important;
        object-fit: cover;
    }

    .badge-featured,
    .badge-discount {
        font-size: 0.625rem !important;
        padding: 0.2rem 0.45rem !important;
        top: 6px !important;
    }

    .product-card .card-body {
        padding: 0.75rem !important;
    }

    .product-card .card-title {
        font-size: 0.9rem !important;
        margin-bottom: 0.25rem !important;
    }

    .product-card .card-text {
        font-size: 0.75rem !important;
        margin-bottom: 0.5rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .price-current {
        font-size: 0.95rem !important;
    }

    .price-old {
        font-size: 0.75rem !important;
    }

    /* Blog Card */
    .blog-card {
        border-radius: 14px !important;
    }

    .blog-card .card-img-wrapper,
    .blog-card .card-img-top {
        height: 110px !important;
        object-fit: cover;
    }

    .blog-card .card-body {
        padding: 0.75rem !important;
    }

    .blog-card .card-title {
        font-size: 0.9rem !important;
        margin-bottom: 0.35rem !important;
    }

    .blog-card .card-text {
        font-size: 0.75rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .blog-meta {
        font-size: 0.7rem !important;
    }

    .blog-category-badge {
        font-size: 0.65rem !important;
        padding: 0.15rem 0.45rem !important;
    }

    /* Why Choose Us Card */
    .why-us-card {
        padding: 0.85rem 0.65rem !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        border-radius: 14px !important;
    }

    .why-us-icon-wrapper {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .why-us-title {
        font-size: 0.88rem !important;
        margin-bottom: 0.25rem !important;
    }

    .why-us-desc {
        font-size: 0.75rem !important;
        line-height: 1.3 !important;
    }

    /* AI Workflow Steps on Mobile */
    .ai-step-card {
        padding: 0.65rem 0.35rem !important;
        min-height: 88px !important;
        border-radius: 12px !important;
    }

    .ai-step-icon {
        font-size: 1.35rem !important;
        margin-bottom: 0.15rem !important;
    }

    .ai-step-text {
        font-size: 0.72rem !important;
        line-height: 1.25 !important;
    }

    /* Footer Mobile Compact */
    .footer-exact-wrap {
        margin-top: 2.5rem !important;
    }

    .footer-wave-top svg {
        height: 35px !important;
    }

    .footer-main-body {
        padding: 1.8rem 0 1.2rem !important;
    }

    .footer-brand-name {
        font-size: 1.3rem !important;
    }

    .footer-bio-text {
        font-size: 0.82rem !important;
        margin-bottom: 1rem !important;
    }

    .footer-column-heading {
        font-size: 0.95rem !important;
        margin-bottom: 0.8rem !important;
    }

    .footer-link-list li {
        margin-bottom: 0.5rem !important;
    }

    .footer-link-list li a {
        font-size: 0.82rem !important;
    }

    .footer-contact-list li {
        font-size: 0.82rem !important;
        margin-bottom: 0.6rem !important;
    }

    .footer-subscribe-box {
        padding: 1.1rem !important;
        margin-top: 0.5rem;
    }

    .footer-bottom-row {
        margin-top: 1.8rem !important;
        padding-top: 1rem !important;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        font-size: 0.78rem !important;
    }
}

/* ── Small mobile (< 375px) ──────────────────────────────── */
@media (max-width: 374px) {
    :root {
        --font-size-body: 0.825rem;
    }
}

/* ── Navbar mobile fixes ─────────────────────────────────── */
@media (max-width: 991px) {
    #navbarContent {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
        padding: 1.25rem;
        margin-top: 0.75rem;
        border-radius: 12px;
    }

    #mainNavbar .nav-link {
        padding: 0.65rem 1rem !important;
        color: #1e293b !important;
        border-radius: 8px;
        margin-bottom: 0.25rem;
    }

    #mainNavbar .nav-link:hover,
    #mainNavbar .nav-link.active {
        color: #0284c7 !important;
        background: rgba(2, 132, 199, 0.06) !important;
    }

    #mainNavbar .navbar-nav .btn {
        margin-top: 0.5rem;
        width: 100%;
    }
}

/* ── Dashboard responsive ────────────────────────────────── */
@media (max-width: 767px) {
    .dashboard-sidebar {
        margin-bottom: 1.5rem;
    }

    .dashboard-sidebar .nav-link {
        padding: 0.6rem 1rem;
    }
}

/* ── Admin responsive ────────────────────────────────────── */
@media (max-width: 991px) {
    .admin-sidebar {
        display: none;
    }

    .admin-sidebar.show {
        display: block;
    }

    .admin-main {
        margin-left: 0 !important;
    }
}

/* ── No horizontal overflow ──────────────────────────────── */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

.container {
    max-width: 100%;
}

/* ── Print ───────────────────────────────────────────────── */
@media print {

    #mainNavbar,
    .footer,
    .btn,
    .breadcrumb-section {
        display: none !important;
    }
}