/* ==========================================================================
   Side Cart Slide-Out Drawer Styles
   ========================================================================== */

.bms-side-cart {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    visibility: hidden;
    transition: visibility 0.3s ease;
    box-sizing: border-box;
}

.bms-side-cart.is-open {
    visibility: visible;
}

/* Dark Backdrop Overlay */
.bms-cart-overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 18, 18, 0.55);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bms-side-cart.is-open .bms-cart-overlay {
    opacity: 1;
}

/* Sliding Drawer Panel */
.bms-cart-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
    box-sizing: border-box;
    font-family: inherit;
    color: #222;
}

.bms-side-cart.is-open .bms-cart-drawer {
    transform: translateX(0);
}

/* Header */
.bms-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #ebebeb;
    background: #ffffff;
}

.bms-cart-header-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.bms-cart-title {
    font-size: 19px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.bms-cart-count-bubble {
    font-size: 15px;
    font-weight: 600;
    color: #777;
}

.bms-cart-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.bms-cart-close-btn:hover {
    color: #000;
}

/* Scrollable Inner Container */
.bms-side-cart-contents {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
}

/* Empty State */
.bms-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 30px;
    text-align: center;
    flex: 1;
}

.bms-cart-empty-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #ccc;
    margin-bottom: 16px;
}

.bms-cart-empty-text {
    font-size: 15px;
    color: #666;
    margin: 0 0 24px 0;
}

/* Items List */
.bms-cart-items-list {
    flex: 1;
    padding: 16px 24px;
    overflow-y: auto;
}

.bms-cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.bms-cart-item:last-child {
    border-bottom: none;
}

.bms-cart-item-thumb {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 4px;
    overflow: hidden;
    background: #f7f7f7;
}

.bms-cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bms-cart-item-details {
    flex: 1;
    min-width: 0;
}

.bms-cart-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.bms-cart-item-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
}

.bms-cart-item-name a {
    color: #1a1a1a;
    text-decoration: none;
}

.bms-cart-item-name a:hover {
    text-decoration: underline;
}

.bms-cart-remove-btn {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.15s ease;
}

.bms-cart-remove-btn:hover {
    color: #dc2626;
}

.bms-cart-item-maker {
    font-size: 12px;
    color: #777;
    margin: 3px 0 6px 0;
}

.bms-cart-fulfillment-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.bms-cart-f-detail {
    font-size: 11px;
    color: #64748b;
}

.bms-cart-addons-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.bms-cart-addons-meta dt,
.bms-cart-addons-meta dd {
    display: inline;
    margin: 0;
}

.bms-cart-addons-meta dd:after {
    content: ', ';
}

.bms-cart-addons-meta dd:last-child:after {
    content: '';
}

.bms-cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 13px;
}

.bms-cart-item-qty {
    color: #666;
}

.bms-cart-item-price {
    font-weight: 700;
    color: #111;
}

/* Sticky Footer */
.bms-cart-footer {
    padding: 20px 24px 24px 24px;
    border-top: 1px solid #ebebeb;
    background: #fafafa;
}

.bms-cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.bms-cart-subtotal-label {
    font-size: 15px;
    font-weight: 600;
    color: #444;
}

.bms-cart-subtotal-val {
    font-size: 19px;
    font-weight: 700;
    color: #111;
}

.bms-cart-shipping-notice {
    font-size: 12px;
    color: #777;
    margin: 0 0 16px 0;
}

.bms-cart-actions-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bms-btn-block {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* --------------------------------------------------------------------------
   Side Cart Quantity Controls
   -------------------------------------------------------------------------- */
.bms-cart-qty-wrap {
    display: flex;
    align-items: center;
}

.bms-qty-input {
    width: 60px;
    padding: 6px 4px 6px 12px;
    border: 1px solid #d4cebe;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #111;
    background: #faf9f6;
    outline: none;
    transition: all 0.2s ease;
}

.bms-qty-input:focus,
.bms-qty-input:hover {
    background: #ffffff;
    border-color: #1a1a1a;
}