/* ================================================
   CART OVERLAY (SIDEBAR) STYLES
   ================================================ */

.filter-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    visibility: hidden;
}

.filter-overlay.active {
    right: 0;
    visibility: visible;
}

.filter-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: #fff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.filter-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 25px 20px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #111;
    font-weight: 800;
}

#close-cart {
    background: #f5f5f5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

#close-cart:hover {
    background: #eee;
    transform: rotate(90deg);
}

.filter-body {
    padding: 40px;
    overflow-y: auto;
    flex-grow: 1;
    min-height: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior: contain;
}

.filter-body::-webkit-scrollbar {
    display: none;
}

.cart-footer {
    padding: 30px 40px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

.cart-summary {
    margin-bottom: 24px;
}

.cart-summary h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 800;
}

.cart-summary p {
    margin: 0;
    opacity: 0.6;
    font-size: 0.95rem;
}

.cart-actions {
    display: flex;
    gap: 15px;
    width: 100%;
}

.cart-actions .btn {
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cart-actions .btn-secondary {
    flex: 1;
    border: 1px solid #111;
    color: #111;
}

.cart-actions .btn-primary {
    flex: 1.5;
    background: black;
    color: white;
    border: none;
}

.cart-actions .btn:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

/* SIDEBAR CART ITEM */
.filter-body .cart-item {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-body .cart-item-img {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.filter-body .cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.filter-body .cart-item-info {
    flex-grow: 1;
}

.filter-body .cart-item-info .item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.filter-body .cart-item-info h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
}

.filter-body .cart-item-info .item-price {
    font-weight: 700;
    color: #111;
    font-size: 1rem;
}

.filter-body .cart-item-info p {
    margin: 5px 0 15px;
    font-size: 0.85rem;
    opacity: 0.6;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.filter-body .cart-item-info .item-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.filter-body .qty-input {
    width: 30px;
    text-align: center;
    border: none;
    font-weight: 700;
    background: transparent;
}

.filter-body .remove-item {
    background: none;
    border: none;
    cursor: pointer;
}

.filter-body .remove-item img {
    width: 18px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.filter-body .remove-item:hover img {
    opacity: 1;
}

.empty-cart-message {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-message p {
    font-size: 1.2rem;
    opacity: 0.6;
}

/* MAIN CART PAGE REFINEMENTS */
.cart-page .item-unit-price {
    font-weight: 600;
    opacity: 0.5;
    font-size: 0.95rem;
}

.empty-main-cart {
    text-align: center;
    padding: 100px 20px;
    border: 2px dashed #eee;
    border-radius: 20px;
}

.empty-main-cart h2 {
    font-weight: 800;
    margin-bottom: 10px;
}

.empty-main-cart p {
    opacity: 0.6;
    margin-bottom: 30px;
}

/* FLEX UTILITIES FOR MAIN CART */
.item-header-flex {
    display: flex;
    justify-content: space-between;
    /* align-items: center; */
    flex-direction: column;
    margin-bottom: 8px;
}

.item-controls-flex {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
}