/* Cart sidebar - off-canvas panel */
.cartsidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    z-index: 1040;
}

.cartsidebar-overlay.cartsidebar-open {
    opacity: 1;
    visibility: visible;
}

.cartsidebar-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease;
}

.cartsidebar-panel--right {
    right: 0;
    transform: translateX(100%);
}

.cartsidebar-panel--right.cartsidebar-open {
    transform: translateX(0);
}

.cartsidebar-panel--left {
    left: 0;
    transform: translateX(-100%);
}

.cartsidebar-panel--left.cartsidebar-open {
    transform: translateX(0);
}

.cartsidebar-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.cartsidebar-panel-title {
    font-size: 18px;
    font-weight: 600;
}

.cartsidebar-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
}

.cartsidebar-close:hover {
    color: #333;
}

.cartsidebar-panel-content {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.cartsidebar-count {
    margin: 0 0 12px;
    color: #555;
}

.cartsidebar-products {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.cartsidebar-product {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cartsidebar-product-image,
.cartsidebar-product-image--placeholder {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    background: #f5f5f5;
    flex-shrink: 0;
}

.cartsidebar-product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.cartsidebar-product-name {
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cartsidebar-product-qty {
    font-size: 12px;
    color: #888;
}

.cartsidebar-product-price {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.cartsidebar-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid #eee;
    font-size: 16px;
    margin-bottom: 16px;
}

.cartsidebar-go-to-cart {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--cartsidebar-accent, #dd1f5b);
    color: #fff;
    padding: 14px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

.cartsidebar-go-to-cart:hover {
    opacity: 0.9;
    color: #fff;
}

.cartsidebar-empty {
    color: #888;
    text-align: center;
    padding: 24px 0;
}

/* Quick add-to-cart button injected on product listing miniatures */
.cartsidebar-quick-add {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 5;
    background: var(--cartsidebar-accent, #dd1f5b);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}

.cartsidebar-quick-add:hover {
    opacity: 0.9;
}

.cartsidebar-quick-add[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}
