/* کاور مات پشت دراور */
.tw-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}
.tw-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* دراور سمت چپ */
.tw-drawer {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100%;
    background: #fff;
    z-index: 9999;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    font-family: inherit;
}
.tw-drawer.open {
    left: 0;
}

/* هدر دراور */
.tw-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}
.tw-drawer-header h3 {
    margin: 0;
    font-size: 1.3rem;
}
.tw-drawer-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: #666;
}
.tw-drawer-close:hover {
    color: #000;
}

/* محتوای اصلی (محصولات) */
.tw-drawer-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 15px;
}
.tw-cart-items {
    flex: 1;
}
.tw-empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

/* هر آیتم محصول */
.tw-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 0;
    position: relative;
}
.tw-item-image img {
    width: 60px;
    height: auto;
    border-radius: 8px;
}
.tw-item-details {
    flex: 1;
}
.tw-item-title {
    font-weight: 500;
    margin-bottom: 5px;
}
.tw-item-price {
    font-size: 0.85rem;
    color: #2c7da0;
}
.tw-remove-item {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #ccc;
    transition: 0.2s;
}
.tw-remove-item:hover {
    color: #e74c3c;
}

/* فوتر دراور (جمع کل و دکمه‌ها) */
.tw-cart-footer {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}
.tw-cart-total {
    font-size: 19px;
    margin-bottom: 15px;
    padding: 0 5px;
}
.tw-cart-buttons {
    display: flex;
    gap: 10px;
}
.tw-btn {width: 100%;
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}
.tw-btn-shop {
    background-color: #f0f0f0;
    color: #333;
}
.tw-btn-shop:hover {
    background-color: #e0e0e0;
}
.tw-btn-checkout {
    background-color: var(--gradient);
    color: #fff;
}
.tw-btn-checkout:hover {
    background-color: #1f5e7a;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 480px) {
    .tw-drawer {
        width: 85%;
        left: -85%;
    }
}