/* =====================================================
   MEDICINES PAGE
===================================================== */

.medicines-page {
    background: #f5f7f9;
    min-height: 100vh;
    padding-bottom: 50px;
}


/* Breadcrumb */

.medicine-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 0;
    font-size: 12px;
    color: #7d8792;
}

.medicine-breadcrumb a {
    text-decoration: none;
    color: #07876b;
}

.medicine-breadcrumb i {
    font-size: 9px;
}


/* =====================================================
   HEADER
===================================================== */

.medicine-heading {
    margin-bottom: 15px;
}

.medicine-heading-inner {
    background: #fff;
    border: 1px solid #e6eaed;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.medicine-heading h1 {
    margin: 0 0 5px;
    font-size: 25px;
    font-weight: 750;
    color: #18212f;
}

.medicine-heading p {
    margin: 0;
    font-size: 13px;
    color: #7b8590;
}

.medicine-count {
    font-size: 13px;
    color: #7d8791;
}

.medicine-count strong {
    color: #17202e;
}


/* =====================================================
   CATEGORY
===================================================== */

.medicine-categories {
    margin-bottom: 15px;
}

.category-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    flex: 0 0 auto;
    background: #fff;
    border: 1px solid #e1e6e9;
    border-radius: 30px;
    padding: 9px 16px;
    color: #56616e;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
}

.category-chip i {
    font-size: 15px;
}

.category-chip:hover,
.category-chip.active {
    background: #07876b;
    border-color: #07876b;
    color: #fff;
}


/* =====================================================
   FILTER
===================================================== */

.medicine-filter {
    background: #fff;
    border: 1px solid #e5e9ed;
    border-radius: 11px;
    position: sticky;
    top: 85px;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #edf0f2;
}

.filter-header h5 {
    margin: 0;
    font-size: 15px;
}

.filter-header button {
    border: 0;
    background: transparent;
    color: #07876b;
    font-size: 10px;
    font-weight: 700;
}

.filter-group {
    padding: 16px;
    border-bottom: 1px solid #edf0f2;
}

.filter-group:last-child {
    border-bottom: 0;
}

.filter-group h6 {
    font-size: 12px;
    margin: 0 0 13px;
    font-weight: 700;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #596572;
    margin-bottom: 10px;
    cursor: pointer;
}

.filter-group label:last-child {
    margin-bottom: 0;
}

.filter-group input {
    accent-color: #07876b;
}

.filter-group label span {
    margin-left: auto;
    color: #a0a8b0;
}


/* =====================================================
   TOOLBAR
===================================================== */

.medicine-toolbar {
    background: #fff;
    border: 1px solid #e5e9ed;
    border-radius: 10px;
    padding: 11px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 11px;
    color: #7d8792;
}

.products-found strong {
    color: #273140;
}

.sort-area {
    display: flex;
    align-items: center;
    gap: 7px;
}

.sort-area select {
    border: 1px solid #dfe4e8;
    border-radius: 6px;
    padding: 7px 28px 7px 9px;
    font-size: 11px;
    outline: none;
    background: #fff;
}


/* =====================================================
   PRODUCT GRID
===================================================== */

.medicine-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 13px;
}


/* Card */

.medicine-product-card {
    position: relative;
    display: block;
    background: #fff;
    border: 1px solid #e4e8eb;
    border-radius: 11px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: .2s ease;
}

.medicine-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(30, 40, 50, .08);
}


/* Wishlist */

.medicine-wishlist {
    position: absolute;
    right: 8px;
    top: 8px;
    z-index: 5;
    width: 30px;
    height: 30px;
    border: 1px solid #e2e6e9;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    color: #626c77;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}


/* =====================================================
   PRODUCT IMAGE
===================================================== */

.product-image {
    position: relative;
    width: 100%;
    height: 185px;
    background: #f8fafb;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.product-image span {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: #e7f7f2;
    color: #087a62;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 8px;
    font-weight: 700;
}


/* =====================================================
   CONTENT
===================================================== */

.product-content {
    padding: 11px;
}

.product-content > small {
    font-size: 9px;
    color: #89929d;
    font-weight: 600;
}

.product-content h3 {
    font-size: 12px;
    line-height: 1.4;
    min-height: 34px;
    margin: 4px 0;
    font-weight: 700;
    color: #202a38;
}

.pack {
    margin: 0 0 7px;
    color: #8b949e;
    font-size: 9px;
}


/* Rating */

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
}

.rating strong {
    background: #07876b;
    color: #fff;
    padding: 3px 5px;
    border-radius: 4px;
    font-size: 8px;
}

.rating span {
    color: #8a939d;
    font-size: 8px;
}


/* Price */

.price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.price b {
    font-size: 15px;
    color: #18212f;
}

.price del {
    color: #99a1a9;
    font-size: 9px;
}

.price em {
    color: #07876b;
    font-size: 8px;
    font-style: normal;
    font-weight: 700;
}


/* Delivery */

.delivery {
    margin: 7px 0 9px;
    font-size: 8px;
    color: #77828e;
}

.delivery i {
    color: #07876b;
    margin-right: 3px;
}


/* Buttons */

.product-buttons {
    display: flex;
    gap: 5px;
}

.product-buttons button {
    flex: 1;
    height: 32px;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 700;
    cursor: pointer;
}

.add-cart {
    border: 1px solid #07876b;
    background: #fff;
    color: #07876b;
}

.buy-now {
    border: 1px solid #07876b;
    background: #07876b;
    color: #fff;
}


/* =====================================================
   PAGINATION
===================================================== */

.medicine-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 25px;
}

.medicine-pagination button {
    width: 34px;
    height: 34px;
    border: 1px solid #dfe4e8;
    background: #fff;
    border-radius: 6px;
    font-size: 10px;
    color: #5e6874;
}

.medicine-pagination button.active,
.medicine-pagination button:hover {
    background: #07876b;
    border-color: #07876b;
    color: #fff;
}

.medicine-pagination button:disabled {
    opacity: .4;
}

.medicine-pagination span {
    font-size: 11px;
    color: #8a939d;
}


/* Mobile Controls */

.mobile-controls {
    display: none;
}


/* =====================================================
   1400px
===================================================== */

@media (max-width: 1400px) {

    .medicine-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

}


/* =====================================================
   1100px
===================================================== */

@media (max-width: 1100px) {

    .medicine-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 767px) {

    .medicines-page {
        padding-bottom: 30px;
    }

    .medicine-breadcrumb {
        padding: 10px 0;
        font-size: 10px;
    }


    /* Heading */

    .medicine-heading-inner {
        padding: 13px;
        border-radius: 8px;
    }

    .medicine-heading h1 {
        font-size: 19px;
    }

    .medicine-heading p {
        font-size: 9px;
    }

    .medicine-count {
        font-size: 9px;
    }


    /* Categories */

    .category-chip {
        padding: 8px 12px;
        font-size: 10px;
    }


    /* Hide sidebar */

    .medicine-filter {
        display: none;
    }


    /* Toolbar */

    .medicine-toolbar {
        display: none;
    }


    /* Mobile controls */

    .mobile-controls {
        display: flex;
        gap: 7px;
        margin-bottom: 10px;
    }

    .mobile-controls button {
        flex: 1;
        height: 36px;
        background: #fff;
        border: 1px solid #e0e5e8;
        border-radius: 6px;
        color: #485361;
        font-size: 10px;
        font-weight: 600;
    }


    /* Grid */

    .medicine-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }


    /* Product Image */

    .product-image {
        width: 100%;
        height: 140px;
    }

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }


    /* Product content */

    .product-content {
        padding: 8px;
    }

    .product-content > small {
        font-size: 7px;
    }

    .product-content h3 {
        font-size: 10px;
        line-height: 1.35;
        min-height: 27px;
    }

    .pack {
        font-size: 7px;
        margin-bottom: 5px;
    }


    /* Rating */

    .rating {
        gap: 3px;
        margin-bottom: 5px;
    }

    .rating strong {
        font-size: 7px;
        padding: 2px 4px;
    }

    .rating span {
        font-size: 6px;
    }


    /* Price */

    .price {
        gap: 4px;
    }

    .price b {
        font-size: 13px;
    }

    .price del {
        font-size: 7px;
    }

    .price em {
        font-size: 6px;
    }


    /* Delivery */

    .delivery {
        font-size: 6px;
        margin: 5px 0 7px;
    }


    /* Buttons */

    .product-buttons {
        gap: 3px;
    }

    .product-buttons button {
        height: 29px;
        font-size: 7px;
    }


    /* Wishlist */

    .medicine-wishlist {
        width: 27px;
        height: 27px;
        font-size: 11px;
        top: 6px;
        right: 6px;
    }


    /* Discount */

    .product-image span {
        font-size: 6px;
        padding: 3px 5px;
        left: 6px;
        bottom: 6px;
    }


    /* Pagination */

    .medicine-pagination {
        margin-top: 18px;
    }

    .medicine-pagination button {
        width: 30px;
        height: 30px;
        font-size: 9px;
    }

}
/* =====================================================
   MOBILE FILTER - FIXED ABOVE HEADER
===================================================== */

.mobile-filter-offcanvas {
    width: 310px !important;
    max-width: 88%;
    
    /* Must appear above existing header */
    z-index: 99999 !important;

    border: 0;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.12);
}


/* Bootstrap backdrop */

.offcanvas-backdrop {
    z-index: 99998 !important;
}


/* Filter Header */

.mobile-filter-offcanvas .offcanvas-header {
    position: relative;
    z-index: 2;

    min-height: 70px;
    padding: 16px 18px;

    background: #ffffff;
    border-bottom: 1px solid #e8ecef;
}


/* Title */

.mobile-filter-offcanvas .offcanvas-header h5 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #18212f;
}

.mobile-filter-offcanvas .offcanvas-header small {
    display: block;
    margin-top: 3px;
    color: #89929c;
    font-size: 10px;
}


/* Close button */

.mobile-filter-offcanvas .btn-close {
    opacity: .7;
    box-shadow: none;
}


/* Body */

.mobile-filter-offcanvas .offcanvas-body {
    position: relative;
    z-index: 1;

    padding: 0;
    overflow-y: auto;
    background: #ffffff;
}


/* Filter groups */

.mobile-filter-group {
    padding: 17px;
    border-bottom: 1px solid #edf0f2;
}

.mobile-filter-group h6 {
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 700;
    color: #202936;
}

.mobile-filter-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;

    cursor: pointer;

    color: #596572;
    font-size: 12px;
}

.mobile-filter-group label:last-child {
    margin-bottom: 0;
}

.mobile-filter-group input {
    width: 17px;
    height: 17px;

    flex-shrink: 0;

    accent-color: #07876b;
}

.mobile-filter-group label span {
    flex: 1;
}

.mobile-filter-group label small {
    color: #9aa2aa;
    font-size: 10px;
}


/* =====================================================
   FILTER FOOTER
===================================================== */

.mobile-filter-footer {
    position: relative;
    z-index: 3;

    display: flex;
    gap: 8px;

    padding: 12px 15px;

    background: #ffffff;
    border-top: 1px solid #e6eaed;
}

.mobile-filter-footer button {
    flex: 1;

    height: 42px;

    border-radius: 7px;

    font-size: 11px;
    font-weight: 700;
}

.clear-filter {
    border: 1px solid #07876b;
    background: #ffffff;
    color: #07876b;
}

.apply-filter {
    border: 1px solid #07876b;
    background: #07876b;
    color: #ffffff;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 767px) {

    .mobile-filter-offcanvas {
        display: flex !important;

        /*
         * Don't allow the offcanvas to start underneath
         * the existing website header.
         */
        top: 0 !important;
        bottom: 0 !important;

        height: 100vh !important;

        z-index: 99999 !important;
    }

}