.cart-offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    width: min(100vw, 430px);
    height: 100dvh;
    background: #fcfbf8;
    border-left: 1px solid #e7e1d6;
    box-shadow: -12px 0 40px rgba(19, 25, 35, 0.16);
    transform: translateX(105%);
    transition: transform 0.32s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.cart-offcanvas.is-open {
    transform: translateX(0);
}

.cart-offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #e7e1d6;
    background: rgba(252, 251, 248, 0.95);
    backdrop-filter: blur(10px);
}

.cart-offcanvas-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-offcanvas-header h5 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: #1f2937;
}

.cart-offcanvas-count {
    font-size: 0.82rem;
    color: #6b7280;
    font-weight: 500;
}

.cart-offcanvas-close {
    width: 40px;
    height: 40px;
    border: 1px solid #e7e1d6;
    border-radius: 999px;
    background: #fff;
    color: #1f2937;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-offcanvas-close:hover {
    background: #1f2937;
    color: #fff;
    border-color: #1f2937;
}

.free-shipping-progress-bar {
    padding: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e7e1d6;
    background: #fcfbf8;
}

.progress-circle {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    order: 2;
}

.progressbar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: bold;
    color: #1f2937;
}

.progressbar-text .progress-percentage {
    font-size: 1.1em;
    font-weight: 800;
}

.progress-circle .progressbar-text {
    font-size: 1.1em; /* Adjust as needed */
    font-weight: 800;
}

.free-shipping-message {
    margin: 0;
    font-size: 0.95rem;
    color: #6b7280;
    text-align: left;
    order: 1;
    flex: 1;
}

.cart-offcanvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.woocommerce-mini-cart {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.woocommerce-mini-cart-item {
    margin: 0;
    padding: 0;
    border: none;
}

.mini-cart-item-inner {
    display: grid;
    grid-template-columns: 82px 1fr auto;
    gap: 14px;
    align-items: start;
    padding: 14px;
    background: #fff;
    border: 1px solid #e7e1d6;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
}

.mini-cart-thumb {
    display: block;
    width: 82px;
    height: 82px;
    border-radius: 14px;
    overflow: hidden;
    background: #f5f5f5;
    text-decoration: none;
}

.cart-offcanvas .woocommerce-mini-cart-item .mini-cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    margin: 0;
    border: none;
}

.mini-cart-thumb-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='%23dcdcdc' stroke-width='1' stroke-dasharray='6' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0a0a0;
    font-size: 14px;
    text-align: center;
    border-radius: 14px;
}

.product-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    color: #1f2937;
    font-size: 0.96rem;
    line-height: 1.35;
    font-weight: 700;
}

.product-title:hover {
    color: #7f632f;
}

.mini-cart-meta {
    font-size: 0.82rem;
    color: #6b7280;
}

.mini-cart-meta dl.variation {
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: #faf7f1;
    border: 1px solid #efe6d6;
}

.mini-cart-meta dl.variation dt,
.mini-cart-meta dl.variation dd {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
}

.mini-cart-meta dl.variation dd p {
    margin: 0;
}

.product-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.quantity-selector {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border-radius: 999px;
    background: #f7f5ef;
    border: 1px solid #e7e1d6;
    width: fit-content;
    margin: 0;
}

.quantity-selector .qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 999px;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.18s ease;
}

.quantity-selector .qty-btn:hover {
    background: #1f2937;
    color: #fff;
    transform: scale(1.04);
}

.quantity-selector .qty {
    width: 28px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 800;
    color: #1f2937;
    appearance: textfield;
    -moz-appearance: textfield;
    padding: 0;
}

.quantity-selector .qty::-webkit-outer-spin-button,
.quantity-selector .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.line-price {
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
    white-space: nowrap;
}

.quantity-summary {
    font-size: 0.82rem;
    color: #6b7280;
    font-weight: 500;
}

.woocommerce-mini-cart-item .remove {
    width: 32px;
    height: 32px;
    margin: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #f8f8f8;
    color: #9ca3af;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.woocommerce-mini-cart-item .remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

.cart-offcanvas-footer {
    position: sticky;
    bottom: 0;
    padding: 18px 16px 16px;
    background: rgba(252, 251, 248, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid #e7e1d6;
    box-shadow: 0 -8px 24px rgba(16, 24, 40, 0.06);
    margin-top: 16px;
}

.woocommerce-mini-cart__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 1rem;
    color: #1f2937;
}

.woocommerce-mini-cart__total strong {
    font-weight: 700;
}

.woocommerce-mini-cart__total .amount {
    font-size: 1.15rem;
    font-weight: 800;
}

.woocommerce-mini-cart__buttons {
    display: grid;
    gap: 10px;
    margin: 0;
}

.woocommerce-mini-cart__buttons .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    width: 100%;
    padding: 0 16px;
    border-radius: 14px;
    text-decoration: none;
    font-size: 0.96rem;
    font-weight: 800;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.woocommerce-mini-cart__buttons .button.checkout {
    order: 1;
    background: linear-gradient(135deg, #7f632f, #9b7b3f);
    color: #fff;
    box-shadow: 0 12px 24px rgba(155, 123, 63, 0.22);
    margin: 0;
}

.woocommerce-mini-cart__buttons .button.checkout:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(155, 123, 63, 0.28);
}

.woocommerce-mini-cart__buttons .button.wc-forward:not(.checkout) {
    order: 2;
    background: #fff;
    color: #1f2937;
    border: 1px solid #e7e1d6;
}

.woocommerce-mini-cart__buttons .button.wc-forward:not(.checkout):hover {
    background: #fafafa;
}

.cart-offcanvas-empty {
    padding: 32px 16px;
    text-align: center;
}

.woocommerce-mini-cart__empty-message {
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 0.95rem;
}

.cart-offcanvas-empty .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    background: #fff;
    color: #1f2937;
    border: 1px solid #e7e1d6;
}

.cart-offcanvas-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.42);
    backdrop-filter: blur(3px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cart-offcanvas-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.cart-offcanvas.is-loading {
    pointer-events: none;
}

.cart-offcanvas.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(1px);
    z-index: 2;
}

@media (max-width: 480px) {
    .cart-offcanvas {
        width: 100%;
    }

    .cart-offcanvas-header {
        padding: 16px 14px 14px;
    }

    .cart-offcanvas-body,
    .cart-offcanvas-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .mini-cart-item-inner {
        grid-template-columns: 72px 1fr auto;
        gap: 12px;
        padding: 12px;
    }

    .mini-cart-thumb {
        width: 72px;
        height: 72px;
    }

    .product-title {
        font-size: 0.92rem;
    }
}