/* Match the Magia navigation panel; scope product styling to this cart. */
.magia-cart-panel.offcanvas {
    --bs-offcanvas-width: 450px;
    padding: 65px 50px 50px;
    border: 0;
    background: #fff;
    color: #666;
}
.magia-cart-panel [hidden] { display: none !important; }
.magia-cart-panel .offcanvas-header {
    flex: 0 0 auto;
    padding: 0 0 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #ccc;
}
.magia-cart-panel .offcanvas-title {
    margin: 0;
    color: #000;
    font-size: 32px;
    font-weight: 300;
    line-height: 1.2;
}
.magia-cart-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #666;
    cursor: pointer;
}
.magia-cart-panel__close:hover { color: #d9ad53; }
.magia-cart-panel .offcanvas-body {
    min-height: 0;
    padding: 0;
    margin-right: -12px;
    padding-right: 12px;
}
.magia-cart-panel [data-cart-products] { display: grid; gap: 20px; }
.magia-cart-panel [data-wt-jshop-module-cart-product-number] {
    display: grid !important;
    grid-template-columns: 64px minmax(0, 1fr) auto 24px;
    grid-template-areas: 'image name name remove' 'quantity quantity price price';
    align-items: center !important;
    gap: 24px 14px;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    background: #fff;
    color: #999;
}
.magia-cart-panel [data-wt-jshop-module-cart-product-number] > a,
.magia-cart-panel [data-wt-jshop-module-cart-product-number] > a > div:not(.wt_jshop_module_cart_product_image),
.magia-cart-panel [data-wt-jshop-module-cart-product-number] > div {
    display: contents !important;
}
.magia-cart-panel .wt_jshop_module_cart_product_image { grid-area: image; }
.magia-cart-panel .wt_jshop_module_cart_product_image img {
    display: block;
    width: 64px;
    height: 72px;
    object-fit: contain;
}
.magia-cart-panel [data-wt-jshop-module-cart-product-number] .fw-bold {
    grid-area: name;
    color: #999;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.magia-cart-panel [data-wt-jshop-module-cart-product-number] a:hover .fw-bold { color: #d9ad53; }
/* The row total already includes quantity; omit the duplicate unit-price line. */
.magia-cart-panel [data-wt-jshop-module-cart-product-number] small:first-of-type { display: none !important; }
.magia-cart-panel [data-wt-jshop-module-cart-product-number] small + small {
    grid-column: 1 / -1;
    font-size: 12px;
}
.magia-cart-panel [data-wt-jshop-module-cart-product-number] .badge {
    grid-area: price;
    justify-self: end;
    padding: 0;
    border-radius: 0;
    background: transparent !important;
    color: #666;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}
.magia-cart-panel [data-cart-action="delete"] {
    grid-area: remove;
    align-self: start;
    width: 24px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #999;
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
}
.magia-cart-panel [data-cart-action="delete"]:hover { color: #d9ad53; }
.magia-cart-panel .input-group {
    grid-area: quantity;
    display: flex;
    width: 128px;
    height: 42px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
}
.magia-cart-panel .input-group .btn,
.magia-cart-panel .input-group input {
    flex: 1 1 0;
    min-width: 0;
    width: 0 !important;
    height: 40px;
    margin: 0 !important;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #999;
    font-size: 14px;
    text-align: center;
    box-shadow: none;
}
.magia-cart-panel .input-group input {
    border-right: 1px solid #e5e5e5;
    border-left: 1px solid #e5e5e5;
    appearance: textfield;
    -moz-appearance: textfield;
}
.magia-cart-panel .input-group input::-webkit-inner-spin-button,
.magia-cart-panel .input-group input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.magia-cart-panel .input-group .btn:hover { background: #fff6e9; color: #666; }
.magia-cart-panel button:disabled { opacity: .5; cursor: wait; }
.magia-cart-panel button:focus-visible,
.magia-cart-panel input:focus-visible { outline: 2px solid #d9ad53; outline-offset: -3px; }
.magia-cart-panel [data-cart-empty] {
    padding: 20px 0;
    border: 0;
    background: transparent;
    color: #999;
}
.magia-cart-panel__footer {
    flex: 0 0 auto;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #ccc;
}
.magia-cart-panel__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 25px;
    color: #000;
    font-size: 20px;
    font-weight: 300;
}
.magia-cart-panel__total [data-cart-total] { white-space: nowrap; }
.magia-cart-panel__links { display: grid; gap: 12px; }
.magia-cart-panel__links .btn { display: block; width: 100%; padding: 15px 20px; border-radius: 10px; }
.magia-cart-panel__links .btn-primary { grid-row: 1; }
@media (max-width: 767px) {
    .magia-cart-panel.offcanvas { --bs-offcanvas-width: 100%; padding: 20px; }
}
@media (max-width: 359px) {
    .magia-cart-panel [data-wt-jshop-module-cart-product-number] { padding: 14px; gap: 18px 10px; }
    .magia-cart-panel .input-group { width: 112px; }
    .magia-cart-panel__total { font-size: 18px; }
}
@media (max-height: 550px) {
    .magia-cart-panel.offcanvas { padding-top: 20px; padding-bottom: 20px; }
    .magia-cart-panel .offcanvas-header { padding-bottom: 15px; margin-bottom: 15px; }
    .magia-cart-panel__footer { padding-top: 15px; margin-top: 15px; }
    .magia-cart-panel__links { grid-template-columns: 1fr 1fr; }
}
