.cartButton {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cartButton .cartCount {
    position: absolute;
    top: -5px;
    right: -10px;
    font-size: 0.85rem;
    padding: 3px 6px;
    border-radius: 50%;
    background-color: #092e6e;
    color: #fff;
}

.cartButton .cartCountMobile {
    position: absolute;
    top: -5px;
    right: -10px;
    font-size: 0.85rem;
    padding: 3px 6px;
    border-radius: 50%;
    background-color: #fff;
    color: #092e6e;
}

/* Cart Slider */
.cart-slider {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 8px rgba(0,0,0,0.2);
    z-index: 1050;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-slider.open {
    right: 0;
}

/* Cart Header */
.cart-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Cart Body */
.cart-body {
    overflow-y: auto;
    padding: 15px;
    /* Hide scrollbar */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}

/* Chrome, Edge, Safari (Hide Scrollbar) */
.cart-body::-webkit-scrollbar {
    width: 0;
    background: transparent;
}
.flex-1 { flex: 1; }

/* Cart Footer */
.cart-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 15px;
    border-top: 1px solid #ddd;
    z-index: 50;
}

.cart-checkout {
    background-color: #092e6e;
    color: #ffffff;
    max-width: 320px;
}

/* Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
}
.cart-overlay.show {
    display: block;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    margin-left: 8px;
}

.cart-item-details {
    flex: 1;
}

.qty-controls button {
    width: 25px;
    height: 25px;
    padding: 0;
    font-size: 14px;
}

.no-spinner::-webkit-inner-spin-button,
.no-spinner::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* CART FILE UPLOAD */
.prescription-input {
    max-width: 180px;
}

.prescription-upload {
    border: 2px dashed #092e6e;
    background: #eaf2ff;
    padding: 6px;
    border-radius: 6px;
    margin-top: 1rem;
}

.prescription-uploaded {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 4px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: inline-block;
}

/* Order Notes (Start) */
.order-notes-section {
    position: relative;
}

.add-order-notes-link {
    cursor: pointer;
    font-weight: 500;
    font-size: 1.3rem;
    display: inline-block;
    margin-left: 1.6rem;
    width: 100%;
    max-width: 320px;
    padding: 8px 20px;
    border-radius: 6px;
    background-color: #fff;
}

.order-notes-input-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 0;
}

.order-notes-input-wrapper.show {
    max-height: 500px;
    padding: 10px 0;
}

.order-notes-input textarea {
    width: 100%;
    border: 1px solid #092e6e;
    border-radius: 6px !important;
    padding: 8px;
    font-size: 1.2rem;
    resize: vertical;
    margin-left: 1.6rem;
    width: 100%;
    max-width: 320px;
}

.order-notes-input textarea:focus {
    outline: none;
    border-color: #092e6e;
    box-shadow: 0 0 5px rgba(0, 86, 179, 0.5);
}
/* Order Notes (End) */

.terms-conditions-warning {
    display:none;
    margin-left:1.6rem;
    font-size:1.2rem;
    color: #e90d0dff;
    margin-bottom: 0.5rem;
}

.terms-and-conditions-wrapper {
    margin-left:1.6rem;
    margin-top:1.6rem;
    font-size: 1.5rem;
    cursor:pointer;
}

/* For alert messages */
.custom-alert {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    margin-bottom: 16px;
    font-size: 1.1rem;
    color: #e90d0d;
    background-color: rgba(233, 13, 13, 0.1);
    border: 1px solid #e90d0d;
    border-radius: 8px;
    gap: 8px;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    margin-top: 1.5rem;
}

/* For shipping text */
.shipping-text {
    font-size:1.3rem;
    text-align: center;
    padding: 10px 0 0 0;
}

.edit-prescription {
    margin-left: 10px;
    font-size: 0.9rem;
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
}

.edit-prescription:hover {
    color: #0056b3;
}

/* SUB-TOTAL */
.summary-box {
    border-top: 1px solid #ddd;
    padding-top: 10px;

    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 6px;
    column-gap: 20px;
    font-size: 14px;
    margin-top: 10px;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}


.summary-box div:last-child {
    text-align: right;
}

/* Floating Cart */
.floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.floating-cart .cart-btn {
    background-color: #092e6e;
    color: #fff;
    border: none;
    border-radius: 50px;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    position: relative;
}

.floating-cart .cart-btn svg {
    width: 28px;
    height: 28px;
}

.floating-cart .cartCountFloating {
    position: absolute;
    top: -5px;
    right: 4px;
    background: #cf0404;
    color: white;
    font-size: 12px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
    box-sizing: border-box;
}

.profile-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #092e6e;
    text-decoration: none;
}

.cart-discount-label {
    display: inline-block;
    margin-top: 4px;
    margin-bottom: 4px;
    background-color: #ef6333;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: 2px 6px;
    border-radius: 1rem;
}

#cartLoadingBar {
    position: relative;
    width: 100%;
    height: 4px;
    background-color: #f0f0f0;
    overflow: hidden;
    margin-bottom: 10px;
    display: none;
}

#cartLoadingBar::before {
    content: '';
    position: absolute;
    left: -50%;
    width: 50%;
    height: 100%;
    background-color: #092e6e;
    animation: loadingAnim 1s linear infinite;
}

@keyframes loadingAnim {
    0% { left: -50%; }
    50% { left: 50%; }
    100% { left: 100%; }
}