/**
 * Cart Offcanvas Styles
 * Offcanvas lateral para el carrito de compras
 */

/* Overlay */
.lcd-cart-offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: -1;
    pointer-events: none;
}

.lcd-cart-offcanvas-overlay.active {
    opacity: 1;
    visibility: visible;
    z-index: 9999999998;
    pointer-events: auto;
}

/* Offcanvas Container */
.lcd-cart-offcanvas {
    position: fixed;
    top: 20px;
    right: -450px;
    bottom: 20px;
    width: 420px;
    max-width: calc(100vw - 40px);
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: -1;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    margin-right: 20px;
    pointer-events: none;
}

.lcd-cart-offcanvas.active {
    right: 0;
    z-index: 9999999999;
    pointer-events: auto;
}

/* Header */
.lcd-cart-offcanvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.lcd-cart-offcanvas-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.lcd-close-cart-offcanvas {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lcd-close-cart-offcanvas svg {
    width: 24px;
    height: 24px;
}

.lcd-close-cart-offcanvas:hover {
    color: #111827;
}

/* Content */
.lcd-cart-offcanvas-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.lcd-cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Cart Item */
.lcd-cart-item {
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

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

.lcd-cart-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

.lcd-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lcd-cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lcd-cart-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin: 0;
    line-height: 1.4;
}

.lcd-cart-item-name a {
    color: #111827;
    text-decoration: none;
}

.lcd-cart-item-name a:hover {
    color: #d97706;
}

.lcd-cart-item-meta {
    font-size: 13px;
    color: #6b7280;
}

.lcd-cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.lcd-cart-item-quantity-label {
    font-size: 13px;
    color: #6b7280;
}

.lcd-cart-item-quantity-value {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
}

.lcd-cart-item-price {
    font-size: 15px;
    font-weight: 600;
    color: #d97706;
    margin-top: auto;
}

.lcd-cart-item-remove {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    margin-top: 4px;
    align-self: flex-start;
    transition: opacity 0.2s ease;
}

.lcd-cart-item-remove:hover {
    opacity: 0.7;
}

/* Empty Cart */
.lcd-cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.lcd-cart-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: #d1d5db;
}

.lcd-cart-empty p {
    margin: 0;
    font-size: 15px;
}

/* Footer */
.lcd-cart-offcanvas-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

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

.lcd-cart-subtotal span:first-child {
    color: #6b7280;
    font-weight: 500;
}

.lcd-cart-subtotal-amount {
    color: #111827;
    font-weight: 700;
    font-size: 18px;
}

.lcd-cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lcd-cart-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
}

.lcd-cart-btn-checkout {
    background: #1f2937;
    color: #ffffff;
}

.lcd-cart-btn-checkout:hover {
    background: #111827;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(31, 41, 55, 0.3);
}

.lcd-cart-btn-view {
    background: #1f2937;
    color: #ffffff;
    border: none;
}

.lcd-cart-btn-view:hover {
    background: #111827;
    color: #ffffff;
    transform: translateY(-1px);
}

.lcd-cart-btn-continue {
    background: #d1d5db;
    color: #1f2937;
}

.lcd-cart-btn-continue:hover {
    background: #9ca3af;
}

/* Responsive */
@media (max-width: 640px) {
    .lcd-cart-offcanvas {
        top: 10px;
        bottom: 10px;
        width: 100%;
        max-width: calc(100vw - 20px);
        margin-right: 10px;
    }

    .lcd-cart-offcanvas-header,
    .lcd-cart-offcanvas-content,
    .lcd-cart-offcanvas-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Fix for button styles to match */
.lcd-open-cart-offcanvas {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    font: inherit;
    padding: 0;
}
