/**
 * Cart Drawer Styles
 */

/* Drawer Container */
.cart-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    visibility: hidden;
    pointer-events: none;
}

.cart-drawer.open {
    visibility: visible;
    pointer-events: auto;
}

/* Backdrop */
.cart-drawer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-drawer.open .cart-drawer-backdrop {
    opacity: 1;
}

/* Drawer Content */
.cart-drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.cart-drawer.open .cart-drawer-content {
    transform: translateX(0);
}

/* Header */
.cart-drawer-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.cart-drawer-header h3 {
    font-family: 'ITC Garamond', Georgia, serif;
    font-size: 22px;
    font-weight: 300;
    margin: 0;
    color: #2d1f1f;
}

.cart-drawer-count {
    font-size: 14px;
    color: #666;
    margin-left: 5px;
}

.cart-drawer-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #2d1f1f;
    transition: opacity 0.2s;
}

.cart-drawer-close:hover {
    opacity: 0.7;
}

/* Items Container */
.cart-drawer-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Empty State */
.cart-drawer-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.cart-drawer-empty svg {
    margin-bottom: 20px;
}

.cart-drawer-empty p {
    font-size: 16px;
    margin: 0 0 20px;
}

.cart-drawer-continue {
    padding: 12px 30px;
    background: #2d1f1f;
    color: #fff;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.cart-drawer-continue:hover {
    background: #1a1212;
}

/* Cart Item */
.cart-drawer-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.cart-drawer-item:last-child {
    border-bottom: none;
}

/* Item Image */
.drawer-item-image {
    width: 80px;
    flex-shrink: 0;
}

.drawer-item-image img {
    width: 100%;
    height: auto;
}

/* Item Details */
.drawer-item-details {
    flex: 1;
    min-width: 0;
}

.drawer-item-vendor {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 3px;
}

.drawer-item-title {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 5px;
}

.drawer-item-title a {
    color: #2d1f1f;
    text-decoration: none;
}

.drawer-item-title a:hover {
    text-decoration: underline;
}

.drawer-item-variant {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.drawer-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #2d1f1f;
    margin-bottom: 10px;
}

/* Quantity Controls */
.drawer-item-quantity {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e5e5e5;
    width: fit-content;
}

.drawer-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    color: #2d1f1f;
    transition: background 0.2s;
}

.drawer-qty-btn:hover {
    background: #f5f5f5;
}

.drawer-qty-value {
    width: 30px;
    text-align: center;
    font-size: 13px;
    border-left: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    line-height: 28px;
}

/* Remove Button */
.drawer-item-remove {
    position: absolute;
    top: 15px;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #999;
    transition: color 0.2s;
}

.drawer-item-remove:hover {
    color: #f25c5e;
}

/* Footer */
.cart-drawer-footer {
    padding: 20px;
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
    flex-shrink: 0;
}

.cart-drawer-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    margin-bottom: 5px;
}

.cart-drawer-subtotal span:last-child {
    font-weight: 600;
    font-size: 18px;
}

.cart-drawer-shipping-note {
    font-size: 12px;
    color: #666;
    margin: 0 0 15px;
}

/* Checkout Button */
.cart-drawer-checkout {
    width: 100%;
    padding: 16px;
    background: #2d1f1f;
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.cart-drawer-checkout:hover {
    background: #1a1212;
}

/* View Cart Link */
.cart-drawer-view-cart {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: #666;
    text-decoration: underline;
}

.cart-drawer-view-cart:hover {
    color: #2d1f1f;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .cart-drawer-content {
        max-width: 100%;
    }

    .cart-drawer-header {
        padding: 15px;
    }

    .cart-drawer-header h3 {
        font-size: 18px;
    }

    .cart-drawer-items {
        padding: 15px;
    }

    .drawer-item-image {
        width: 70px;
    }

    .drawer-item-title {
        font-size: 13px;
    }

    .drawer-item-price {
        font-size: 13px;
    }

    .cart-drawer-footer {
        padding: 15px;
    }

    .cart-drawer-checkout {
        padding: 14px;
        font-size: 13px;
    }
}

/* Smooth scrollbar for items */
.cart-drawer-items::-webkit-scrollbar {
    width: 6px;
}

.cart-drawer-items::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.cart-drawer-items::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.cart-drawer-items::-webkit-scrollbar-thumb:hover {
    background: #999;
}
