/* ============================================================
   GLOBAL RESET OF LEFT SPACING
============================================================ */
html, body,
.wrapper,
#layout-wrapper,
.main-content,
.content,
.page-content,
.container,
.container-fluid,
.row {
    margin: 0 !important;
    padding: 0 !important;
}



/* Remove body padding added by theme */
body {
    padding: 0 !important;
}

/* Increase sidebar width and adjust product grid spacing */
.col-md-3 {
    flex: 0 0 28% !important;
    max-width: 28% !important;
}

.col-md-9 {
    flex: 0 0 72% !important;
    max-width: 72% !important;
    padding-left: 80px !important;
    padding-right: 0 !important;
}

/* Product grid layout - force 4 products per row */
.product-grid .col-md-3,
.product-grid .col-xl-3 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
}

/* Product card size */
.product-grid .card {
    min-height: 320px !important;
}

/* ============================================================
   RESPONSIVE DESIGN
============================================================ */

/* Mobile styles (< 768px) */
@media (max-width: 767.98px) {
    /* Make main content full width on mobile */
    .col-md-9 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding-left: 30px !important;
        padding-right: 15px !important;
    }

    /* Product grid - 1 product per row on mobile */
    .product-grid .col-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        display: flex;
        justify-content: center;
    }

    .product-grid .card {
        margin-left: 40px;
        margin-right: auto;
        max-width: 500px;
        background-color: white !important;
    }

    /* Make mobile sidebar full width when shown */
    #mobile-sidebar.show {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* White background for components on mobile */
    .card {
        background-color: white !important;
    }

    .card-body {
        background-color: white !important;
    }

    .bg-light-subtle {
        background-color: white !important;
    }

    /* Adjust topbar for mobile */
    .topbar {
        background: white !important;
        color: black !important;
    }

    .topbar .navbar-header {
        padding: 5px 10px;
    }

    .topbar .logo-container {
        margin-left: 15px;
    }

    .topbar .login-container .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Tablet styles (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Product grid - 3 products per row on tablet */
    .product-grid .col-md-4 {
        flex: 0 0 33.333% !important;
        max-width: 33.333% !important;
    }
}

/* Desktop styles (≥ 768px) - Remove blue background from topbar */
@media (min-width: 768px) {
    .topbar {
        background: white !important;
        color: black !important;
    }

    .topbar .login-container .btn {
        /* Keep original white text and border */
    }
}

/* ============================================================
   TOPBAR — TITLE WITH CONTROLLED LEFT PADDING
============================================================ */
.topbar {
    padding: 0 !important;
    margin: 0 0 40px 0;
    width: 100%;
    background: #1e6ab5 !important;
    border-bottom: 1px solid #ddd;
    min-height: 70px !important;
    position: relative;
    display: flex;
    align-items: center;
}

.topbar .container-fluid {
    padding: 0;
}

.topbar .navbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 15px 5px 0;
}

.topbar .logo-container {
    order: 1;
    margin-left: 60px;
}

.topbar .login-container {
    order: 2;
    margin-left: auto;
}

.topbar .login-container .btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
}

.topbar-title {
    padding-left: 80px !important; /* Adjust left space here */
    margin: 0;
    display: block;
}
