/* 購物車樣式：背景改由 HTML 上的 Tailwind .bg-white 提供，
   讓後台動態主題（_style_.css_snippet 的 .bg-white 覆寫）能同步套用，
   避免暗色主題下文字被換成淺色、卻疊在這裡硬寫的白底上看不見 */
.cart {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    width: 300px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 100;
}

/* 拖曳後改用 left/top 定位：清掉原本的置中位移，避免拖曳起點跳位 */
.cart.dragged {
    transform: none;
    right: auto;
}

/* 標題列為拖曳把手，提示可移動 */
#cart-header {
    cursor: move;
    user-select: none;
}

/* 縮小狀態：藏掉內容、只留標題列 */
.cart.minimized {
    overflow: visible;
}
.cart.minimized #cart-body {
    display: none;
}
.cart.minimized #cart-header {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* 可以把之後其他的通用美化代碼也都寫在這裡 */
.scroll-smooth {
    scroll-behavior: smooth;
}