/* Shopping Cart Drawer & Mobile Sticky Bar - Redesign Premium */
.cart-drawer {
    background-color: #ffffff;
    width: 0;
    position: fixed;
    top: 72px;
    right: 0;
    bottom: 0;
    z-index: 95;
    transition: width var(--transition-smooth);
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.35);
    border-left: 1px solid var(--color-border);
}

.cart-drawer.active {
    width: 400px;
}

.cart-content {
    padding: 1.75rem 1.5rem;
    min-width: 360px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.cart-header h2 {
    font-size: 1.4rem;
    color: var(--color-text-primary);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-close-btn {
    cursor: pointer;
    background: #f1f5f9;
    border-radius: var(--radius-full);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.cart-close-btn:hover {
    background: #e2e8f0;
    color: var(--color-text-primary);
    transform: rotate(90deg);
}

/* Barra de Progresso de Frete Grátis */
.free-shipping-tracker {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--radius-md);
    padding: 0.75rem 0.85rem;
    margin-bottom: 1rem;
    transition: all var(--transition-smooth);
}

.free-shipping-tracker.eligible {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.free-shipping-msg {
    font-size: 0.85rem;
    color: #9a3412;
    font-weight: 600;
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.free-shipping-tracker.eligible .free-shipping-msg {
    color: #166534;
}

.free-shipping-bar {
    width: 100%;
    height: 6px;
    background: #fed7aa;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.free-shipping-tracker.eligible .free-shipping-bar {
    background: #bbf7d0;
}

.free-shipping-fill {
    height: 100%;
    background: var(--color-primary-gradient);
    border-radius: var(--radius-full);
    transition: width 0.4s ease-out;
}

.free-shipping-tracker.eligible .free-shipping-fill {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.cart-items-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1.25rem;
    padding-right: 0.25rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #f8fafc;
    border: 1px solid var(--color-border);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.85rem;
    box-shadow: var(--shadow-subtle);
    transition: transform var(--transition-fast);
}

.cart-item:hover {
    transform: translateX(2px);
    border-color: var(--color-primary-light);
}

.cart-item-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background-color: #ffffff;
    padding: 4px;
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}

.cart-item-customizations {
    font-size: 0.72rem;
    line-height: 1.25;
    margin-bottom: 0.3rem;
}

.cart-custom-add {
    color: #16a34a;
    font-weight: 700;
}

.cart-custom-rem {
    color: #dc2626;
    font-weight: 600;
}

.cart-custom-notes {
    color: #64748b;
    font-style: italic;
}

.cart-item-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--color-primary);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #ffffff;
    border: 1px solid var(--color-border);
    padding: 0.2rem 0.35rem;
    border-radius: var(--radius-full);
}

.cart-qty-btn {
    cursor: pointer;
    background: transparent;
    border-radius: var(--radius-full);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
    transition: all var(--transition-fast);
}

.cart-qty-btn:hover {
    background-color: var(--color-primary-light);
    color: #ffffff;
}

.cart-qty-btn.btn-remove:hover {
    background-color: #fee2e2;
    color: var(--color-danger);
}

.cart-qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.cart-summary {
    border-top: 2px solid var(--color-border);
    padding-top: 1.25rem;
    margin-top: auto;
    background: #ffffff;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.45rem;
}

.cart-summary-row.total {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-primary-dark);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--color-border);
}

.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: var(--color-primary-gradient);
    color: #ffffff;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-weight: 800;
    font-size: 1.05rem;
    text-align: center;
    margin-top: 1.25rem;
    box-shadow: 0 4px 15px rgba(234, 88, 12, 0.35);
    transition: all var(--transition-fast);
}

.btn-checkout:hover {
    background: var(--color-primary-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45);
}

/* Coupon UI in Checkout */
.coupon-input-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.coupon-input-group input {
    flex: 1;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.coupon-input-group input:focus {
    border-color: var(--color-primary);
}

.coupon-input-group button {
    padding: 0.65rem 1.1rem;
    background: #0f172a;
    color: #ffffff;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.coupon-input-group button:hover {
    background: var(--color-primary);
}

.coupon-feedback {
    font-size: 0.8rem;
    margin-top: 0.35rem;
    font-weight: 600;
    display: none;
}

.coupon-feedback.success {
    display: block;
    color: #16a34a;
}

.coupon-feedback.info {
    display: block;
    color: #0284c7;
}

.coupon-feedback.error {
    display: block;
    color: #dc2626;
}

.checkout-discount-row {
    color: #16a34a !important;
    font-weight: 700;
}

/* Mobile Sticky Bottom Cart Bar */
.mobile-sticky-cart {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    background: var(--color-primary-gradient);
    color: #ffffff;
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 30px rgba(234, 88, 12, 0.45), 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 85;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    animation: slideUpBottom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUpBottom {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.mobile-sticky-cart-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.mobile-sticky-cart-action {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 800;
}

@media (max-width: 768px) {
    .cart-drawer {
        top: 64px;
    }

    .cart-drawer.active {
        width: 100vw;
    }

    .mobile-sticky-cart.active {
        display: flex;
    }
}
