#pharmacyContent {
    width: 90%;
    margin: 0 auto;
    text-align: center;
}
.pharmacy-product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    /* margin-top: 20px; */
    /* margin-bottom: 20px; */
    padding: 20px;
}

.pharmacy-product {
    width: 23%;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 6px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.01);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;

}

@media (max-width: 1250px) {
    .pharmacy-product {
        width: 30%;
    }
}

.pharmacy-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.pharmacy-product img.product-image {
    max-width: 100%;
    height: 150px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.add-to-cart-form input[type="number"] {
    width: 60px;
    padding: 4px;
    margin-right: 10px;
}

.add-to-cart-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
}

.add-to-cart-button:hover {
    background: #005d8f;
}

.searchBarIcons {
    display: flex;
    align-items: center;
}
#product-autocomplete {
    padding: 8px;
    border-radius: 4px;
    width: 200px;
    border: none;
    outline: none;
    transition: width 0.4s ease-in-out;
}
#product-autocomplete:focus {
    width: 250px;
}

.pharmacy-cart-icon {
    position: relative;
    display: inline-block;
    margin-left: 10px;
}

.pharmacy-cart-icon .cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: red;
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    line-height: 1;
    z-index: 99;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: red;
    color: white;
    padding: 5px 10px;
    border-radius: 50%;
    font-size: 14px;
}

.checkout-button {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
}

.checkout-button:hover {
    background-color: #218838;
}

/* Cart Page Styles */
.pharmacy-cart-page {
    margin: 20px;
    padding: 20px;
}

.cart-page-title {
    font-size: 24px;
    margin-bottom: 20px;
}

.cart-item-name {
    text-align: left;
}


.cart-item-price,
.cart-item-total {
    text-align: center;
}

.cart-item-remove {
    text-align: center;
}

.cart-total {
    font-size: 18px;
    margin-bottom: 20px;
}

/* Basic styling for the navigation menu */
.pharmacy-product-nav {
    background-color: #f4f4f4;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: inline-block;
    width: 100%;
}

/* Styling for the category list */
.pharmacy-product-nav .category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    /* Allow items to wrap when necessary */
}

/* Styling for individual categories */
.pharmacy-product-nav .category-item {
    position: relative;
    /* Needed for subcategory dropdown */
    padding: 10px 15px;
    background-color: #ffffff;
    border-radius: 6px;
    margin-right: 10px;
    margin-bottom: 10px;
    /* Space between items vertically */
    transition: background-color 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.pharmacy-product-nav .category-item:hover {
    background-color: #e0e0e0;
}

/* Styling for the category name */
.pharmacy-product-nav .category-name {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
}

/* Styling for the subcategory name */
.pharmacy-product-nav .subcategory-name {
    font-size: 14px;
    color: #555555;
}

/* Optional: Add a little spacing around the entire nav */
.pharmacy-product-nav {
    margin-top: 20px;
}

/* Mobile responsiveness: Stack categories and subcategories */
@media (max-width: 768px) {
    .pharmacy-product-nav .category-list {
        flex-direction: column;
        align-items: flex-start;
    }

    .pharmacy-product-nav .category-item {
        margin-right: 0;
        width: 100%;
    }
}

/* Each subcategory section */
.subcategory {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-right: 10px;
    display: inline-block;
}

/* Pagination styling */
.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 12px;
    background-color: #eee;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.pagination a:hover {
    background-color: #ddd;
}

.pagination a.active {
    background-color: #0073aa;
    color: #fff;
    font-weight: bold;
}

.pharmacy-cart-columns {
    display: flex;
}

.pharmacy-cart-right {
    width: 100%;
    max-width: 800px;
}

.pharmacy-cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pharmacy-cart-item {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    flex: 2;
}

.cart-item-name h4 {
    font-size: 18px;
    margin: 0;
    color: #333;
}

.cart-item-price {
    margin-top: 5px;
    font-size: 16px;
    color: #27ae60;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: 1;
}

.cart-item-quantity {
    margin-bottom: 10px;
}

.cart-item-qty {
    width: 60px;
    padding: 8px;
    font-size: 16px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.cart-item-total {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.cart-item-remove a {
    color: #e74c3c;
    text-decoration: none;
    font-weight: bold;
}

.cart-item-remove a:hover {
    text-decoration: underline;
}

.cart-total {
    background-color: #f9f9f9;
    padding: 20px;
    margin-top: 30px;
    text-align: right;
    font-size: 18px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.cart-total strong {
    font-weight: bold;
    font-size: 20px;
    margin-right: 10px;
}

.totalPayableAmount {
    color: #27ae60;
    font-size: 22px;
}

.place-order-btn {
    display: inline-block;
    margin-top: 15px;
    background: #27ae60;
    color: #fff;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.place-order-btn:hover {
    background: #219150;
    color: #fff;
}

.extra-buttons {
    margin-top: 20px;
    display: block;
    text-align: center;
    margin-bottom: 10px;
}

.extra-buttons a {
    text-decoration: none;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 4px;
    display: inline-block;
}

.view-cart-btn {
    background: #2980b9;
    color: #fff;
}

.checkout-btn {
    background: #e67e22;
    color: #fff;
}

.view-cart-btn:hover,
.checkout-btn:hover {
    opacity: 0.9;
    color: #fff;
}

.linkDisabled {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
}

article.hentry,
#comments {
    margin-bottom: 1.5em;
}


.slider-wrapper {
    position: relative;
    padding: 1rem;
}

.slider-title {
    font-size: 22px;
    font-weight: 600;
}

.slider {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 1rem;
    /* Ensure this matches the JS getComputedStyle */
    scrollbar-width: none;
    padding-top: 20px;
    margin-top: -20px;
    /* Firefox */
}

.slider::-webkit-scrollbar {
    display: none;
    /* Chrome */
}

.slide {
    flex: 0 0 200px;
    /* item width */
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.01);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.slide .ribbon {
    font-size: 13px;
}

.slide a {
    color: #000;
}

.slide:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.slide img {
    max-width: 100%;
    height: 200px;
    object-fit: contain;
}

.slide-title {
    margin-top: 0.75rem;
    font-size: 13px;
    margin-bottom: 0
}

/* ————— ARROW BUTTONS ————— */
.arrow {
    position: absolute;
    top: 55%;
    transform: translateY(-50%);
    width: 4.5rem;
    height: 4.5rem;
    border: none;
    border-radius: 55%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 1;
    transition: transform 0.2s ease;
}

.arrow:hover {
    transform: translateY(-60%);
}

.arrow svg {
    width: 2rem;
    height: 2rem;
}

.arrow.left {
    left: -1rem;
}

.arrow.right {
    right: -1rem;
}

.slider a:hover {
    text-decoration: none;
}

@media (max-width: 500px) {
    .desktopText {
        display: none;
    }

    .place-order-button,
    .backToCartButton {
        font-size: 15px;
    }
}

@media (max-width: 484px) {
    .slide {
        flex: 0 0 100%;
    }
}

@media (max-width: 768px) {
    .arrow {
        width: 3.5rem;
        height: 3.5rem;
    }

    .arrow.left {
        left: -0.5rem;
    }

    .arrow.right {
        right: -0.5rem;
    }

    .pharmacy-product-nav,
    .pharmacy-product {
        width: 100%;
    }

    .pharmacy-cart-page {
        margin: 0px;
        padding: 0px;
        width: 100%;
    }

    div.checkout-left,
    div.checkout-right {
        flex: 1 1 100%;
    }

    div.cart-row {
        flex-direction: unset;
    }

    .checkout-submit-wrap .place-order-button,
    .checkout-submit-wrap .backToCartButton {
        padding: 10px 15px;
        display: inline-block;
    }

    .custInfoLabel {
        font-size: 26px;
    }
    .pharmacy-cart-icon {
        margin-left: unset;
    }

}

.pharmacy-product a,
.slide a img {
    display: inline-block;
    margin: 0 auto;
}

.go-to-place-order {
    text-align: center;
}

.shipping-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    margin: 15px 0;
    border-radius: 5px;
    color: #721c24;
    font-size: 14px;
}

.shipping-message p {
    margin: 0;
}

.ribbon {
    --f: .5em;
    position: absolute;
    top: 0;
    right: 0;
    line-height: 1.8;
    padding-inline: 1lh;
    padding-bottom: var(--f);
    border-image: conic-gradient(#0008 0 0) 51%/var(--f);
    clip-path: polygon(100% calc(100% - var(--f)), 100% 100%, calc(100% - var(--f)) calc(100% - var(--f)), var(--f) calc(100% - var(--f)), 0 100%, 0 calc(100% - var(--f)),
            999px calc(100% - var(--f) - 999px), calc(100% - 999px) calc(100% - var(--f) - 999px));
    transform: translate(calc((1 - cos(45deg))*100%), -100%) rotate(45deg);
    transform-origin: 0% 100%;
    background-color: red;
    font-size: 16px;
    color: #fff;
    font-weight: bold;
}

.pharmacy-product {
    position: relative;
}
#error-modal {
    width: auto;
    height: auto;
    background-color: #fff;
}
#error-modal a.close-modal {
    right: 0;
    top: 0;
    width: 25px;
    height: 25px;
}
#close-modal {
    padding: 10px 20px;
    background-color: #4CAF50; /* Green */
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

#close-modal:hover {
    background-color: #45a049;
}

#close-modal:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.4);
}


.item-trash {
    text-align: center;
    color: red;
    font-size: 16px;
}

.item-trash .fa-x {
    cursor: pointer;
}

.emptyCart {
    display: none;
}

.original-price {
    text-decoration: line-through;
    color: #888;
}

.sale-price {
    color: #d00;
}

/* Container styling */
.box-container {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 20px;
    margin: 20px 0;
}

@media (min-width: 600px) {
    .box-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .box-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Box styling */
.box {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.download-button:hover .btn-icon i {
    color: #fff;
}

/* Only apply hover slide-up effect on devices that support hover */
@media (hover: hover) and (pointer: fine) {
    .box:hover {
        transform: translateY(-10px);
    }
}

.box-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.box-title i {
    margin-right: 10px;
}

.box-description {
    flex-grow: 1;
    margin-bottom: 20px;
}

/* Download wrapper for button and tooltip */
.download-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Download button styling for anchor tags */
.download-button {
    position: relative;
    background-color: #007BFF;
    text-decoration: none;
    /* remove underline */
    color: #fff;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    display: block;
    width: 100%;
    height: 40px;
    /* fixed height */
    overflow: hidden;
    /* to clip sliding content */
    border-radius: 5px;
}

.download-button:hover {
    background-color: #0056b3;
}

/* Button text and icon positioning */
.btn-text,
.btn-icon {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    top: 50%;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Default state: text centered, icon off-screen (below) */
.btn-text {
    transform: translateY(-50%);
    opacity: 1;
}

.btn-icon {
    transform: translateY(calc(-50% + 40px));
    opacity: 0;
}

/* Hover state: text slides upward (off-screen), icon slides into center */
.download-button:hover .btn-text {
    transform: translateY(calc(-50% - 40px));
    opacity: 0;
}

.download-button:hover .btn-icon {
    transform: translateY(-50%);
    opacity: 1;
}

/* Tooltip styling for desktop/tablet */
.download-wrapper .tooltip {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 110%;
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    z-index: 10;
}

.download-wrapper .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.75) transparent transparent transparent;
}

/* Show tooltip on hover for devices that support hover */
@media (hover: hover) and (pointer: fine) {
    .download-wrapper:hover .tooltip {
        opacity: 1;
    }
}

/* Mobile devices: Always show file size as plain text below the button */
@media (hover: none) and (pointer: coarse) {
    .download-wrapper .tooltip {
        position: static;
        /* Normal document flow */
        opacity: 1 !important;
        /* Always visible */
        transform: none;
        margin-top: 8px;
        background: none;
        /* Remove background */
        color: inherit;
        /* Use default text color */
        padding: 0;
        /* Remove padding */
        border-radius: 0;
        /* No rounded corners */
        font-size: inherit;
        /* Inherit font-size */
    }

    .download-wrapper .tooltip::after {
        display: none;
        /* Remove tooltip tail */
    }
}

.fa-cart-shopping::before, .fa-shopping-cart::before {
    color: white;
}
#preloader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent overlay */
    z-index: 1000;
}

.corners {
    width: 60px;
    height: 60px;
    position: relative;
    transform-origin: center;
    animation: spin 3s infinite linear;
}

.corner {
    width: 100%;
    height: 100%;
    position: absolute;
}

.corner::before {
    display: block;
    width: 48%;
    height: 48%;
    border-radius: 0 40% 0 40%;
    background-color: #62b143;
    content: '';
}
#pharmacy-checkout-form {
    position: relative;
}