.mow-offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    transition: opacity 0.3s ease;
    z-index: 1000;
    pointer-events: none;
    opacity: 0; /* hidden visually */
}

/* Show overlay when aria-hidden is false */
.mow-offcanvas-overlay[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
}

.mow-offcanvas-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 436px;
    height: 100%;
    background: #fff;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: -2px 0 8px rgba(0,0,0,0.2);
    transition: right 0.3s ease;
    z-index: 1001;
}
.mow-offcanvas-panel.active { right: 0; }

.mow-content {
    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.mow-toggle {
    display: flex;
    border: none;
    gap:4px;
    cursor: pointer;
}

.mow-text-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mow-button-icon {
    width: 20px;
    height: 20px;
}

.mow-buttons .button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    background-color: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    margin-bottom: 10px; /* Хооронд зай гаргах */
}

.mow-buttons .button:last-child {
    margin-bottom: 0; /* Сүүлчийн товчоос зай авахгүй */
}

.mow-close-wrapper {
    display: flex;
    justify-content: flex-end;
}

.mow-close {
    width: fit-content;
    background-color: #fff;
    color: #333;
    border: none;
    padding: 8px 10px;
    cursor: pointer;
}

.mow-header-wrapper {
    display: flex;
    flex-direction: row;
    align-items: end;
    gap: 10px;
    margin-bottom: 26px;
}

.mow-header-wrapper .mow-title {
    margin: 0;
}

/* Cart List */
.cart_list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 360px;
}

.item-detail-wrapper {
    width: 100%;
    max-width: 294px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.cart_item {
    display: flex;
    align-items: start;
    gap: 10px;
    padding-block: 10px;
    border-bottom: 1px solid #eee;
}

/* Image */
.cart_item img {
    width: 68px;
    min-width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px !important;
}

.product-name {
    font-size: 14px;
    font-weight: 700;
    flex: 1;

    white-space: nowrap;       /* Мөр таслахгүй */
    overflow: hidden;          /* Хэтрэх текстийг нуух */
    text-overflow: ellipsis;   /* … тэмдэгтээр тайлбарлах */
    max-width: 280px;          /* Энд хүссэн өргөнийг тохируулна */
    display: inline-block;
}

.quantity {
    display: flex;
    align-items: center;
}

.quantity input[type=number] {
    text-align: center;
    border-radius: 4px;
    padding: 8px;
    border: solid 1px rgba(34, 34, 34, 0.1);
}

.quantity button {
    padding: 8px;
    cursor: pointer;
    border: none;
}

.quantity .qty-minus {
    background-color:transparent;
    border-top: solid 1px rgba(34, 34, 34, 0.1);
    border-left: solid 1px rgba(34, 34, 34, 0.1);
    border-bottom: solid 1px rgba(34, 34, 34, 0.1);
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.quantity .qty-plus {
    background-color:transparent;
    border-top: solid 1px rgba(34, 34, 34, 0.1);
    border-right: solid 1px rgba(34, 34, 34, 0.1);
    border-bottom: solid 1px rgba(34, 34, 34, 0.1);
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.remove-item {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: rgba(34, 34, 34, 0.5);
}

.cart-total {
    margin-top: 15px;
    font-weight: 700;
    text-align: right;
}

.product-variantion {
    font-size: 12px;
    font-weight: 500;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 16px;
    font-weight: 700;
}

.regular-price {
    font-size: 14px;
}

.mow-buttons .button {
    height: auto;
    text-align: center;
    padding: 16px;
    background-color: #1987C7;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 32px;
    text-transform: capitalize;
}

.cart-empty {
    font-size: 24px;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    color: rgba(34, 34, 34, 0.1);
    text-align: center;
    vertical-align: middle;
}

.cart_item {
    position: relative; /* absolute overlay ажиллахад шаардлагатай */
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-block: 10px;
    border-bottom: 1px solid #eee;
}

.cart_item .loader-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.7);
    display: none; /* анх нуугдсан */
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.cart_item .loader {
    position: absolute;
    top: 40%;
    left: 40%;
    width: 24px; /* бага биш хэмжээгээр */
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


@media (max-width: 767px) {
    .mow-offcanvas-panel {
        width: 80%;
        padding: 20px;
    }

    .cart_list {
        min-height: 160px;
    }

    .quantity .qty-minus, .quantity .qty-plus {
        padding: 9px 8px;
    }

}