/* Shopify SSR Integration – cart-drawer.css
   Organized + deduplicated (keeps winning rules)
*/

/* Overlay */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999998;
}
.cart-overlay.visible {
    display: block;
}

/* Drawer shell */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 420px;
    max-width: 90vw;
    height: 95vh;
    background: #fff;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,0.2);
    transition: right .3s ease;
}
.cart-drawer.open {
    right: 0;
}
body.cart-open {
    overflow: hidden;
}

/* Header */
.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-title {
    margin: 0;
}
.cart-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #999;
}

/* Items */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    font-size: 1.125rem;
}
.cart-line {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}
.cart-line-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}
.cart-line-content {
    flex: 1;
    min-width: 0;
}
.cart-line-title {
    font-size: var(--cf-title-m);

    margin-bottom: 4px;
}
.cart-line-variant {
    font-size: var(--cf-text-m);

    margin-bottom: 8px;
}
.cart-line-price {
    font-size: var(--cf-title-m);

    margin-bottom: 10px;
}

/* Quantity controls */
.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px;
    width: fit-content;
    font-size: var(--cf-text-m);
}
.cart-qty-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    font-size: var(--cf-text-xl);
    color: rgb(33,35,38);
    line-height: 1;
}
.cart-qty-btn:disabled {
    opacity: .3;
}
.cart-qty-value {
    min-width: 30px;
    text-align: center;
}

/* Remove button */
.cart-remove-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    text-decoration: underline;
    font-size: var(--cf-text-m);
    margin-top: 8px;
}

/* Footer */
.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: none;
}
.cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: var(--cf-title-m);
}
.cart-checkout-btn {
    width: 100%;
    padding: 16px;
    background: rgb(33,35,38);
    color: #fff;
    border: none;
    font-size: var(--cf-title-l);
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 10px;
}
.cart-continue-btn {
    width: 100%;
    padding: 16px;
    background: #fff;
    color: rgb(33,35,38);
    border: 1px solid rgb(33,35,38);
    font-size: var(--cf-title-m);
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 4px;
}

/* Empty state */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.cart-empty svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: .3;
}
.cart-empty-title {
    margin-bottom: 8px;
}

/* Other */
.cart-qty-btn:hover:not(:disabled) {
    background: #f5f5f5;
}
