.cart-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    margin: 0 auto;

    height: 100%;
    width: 100%;
    max-width: 1410px;

    margin-top: 3rem;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
    margin-left: 9rem;
}

.back-link i,
.back-link span {
    color: var(--blue);
}

.cart-header {
    width: 80%;
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-top: 1rem;
}

.qtd-itens span {
    color: var(--blue);
}

.qtd-itens h1 {
    font-size: 1.8rem;
}

.freight-title {
    text-align: left;
    width: 100%;
    padding-left: 16px;
}

.row.w-100 {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.row.w-100 > [class*="col-"] {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

.free {
    padding: 1.25rem 1.5rem;
    min-height: 130px;
    display: flex;
    justify-content: space-between;
}

#select-btn {
    margin-top: 2rem;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--blue);
    border: none;
    color: white;
    font-size: 1rem;
    padding-inline: 4rem;
    padding-block: 0.8rem;
    border-radius: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#select-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#select-btn:hover::before {
    left: 100%;
}

#select-btn:hover {
    background-color: color-mix(in srgb, var(--blue) 90%, black);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.modal-checkout {
    border-radius: 20px;
    overflow: hidden;
    border: none;
}

.modal-checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.modal-checkout-header h5 {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.modal-close-btn {
    background: #f7fafc;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #718096;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.checkout-section {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f7fafc;
}

.checkout-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.checkout-table {
    width: 100%;
    font-size: 0.875rem;
    color: #2d3748;
}

.checkout-table thead th {
    font-weight: 600;
    color: #a0aec0;
    font-size: 0.8rem;
    text-transform: uppercase;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.checkout-table tbody td {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f7fafc;
}

.checkout-summary {
    background: #fafafa;
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #4a5568;
}

.checkout-summary-total {
    padding-top: 0.75rem;
    margin-top: 0.25rem;
    border-top: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 1rem;
    color: #2d3748;
}

.checkout-price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

.checkout-old-price {
    font-size: 0.8rem;
    color: #a0aec0;
}

.checkout-coupon {
    display: flex;
    gap: 0.75rem;
}

.checkout-coupon-input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.checkout-coupon-input:focus {
    border-color: var(--blue);
}

.checkout-coupon-btn {
    background: var(--blue);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.checkout-coupon-btn:hover {
    background-color: color-mix(in srgb, var(--blue) 90%, black);
}

.checkout-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkout-pix-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #32bcad;
    color: white;
    padding: 0.8rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.checkout-pix-btn:hover {
    background: #2aa99b;
    color: white;
}

.checkout-payment-note {
    font-size: 0.8rem;
    color: #a0aec0;
    text-align: center;
    margin: 0;
}

.checkout-close-btn {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkout-close-btn:hover {
    background: #e2e8f0;
}

#address {
    appearance: none;
    -webkit-appearance: none;
    background-color: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    font-size: 0.875rem;
    color: #2d3748;
    cursor: pointer;
    width: 97.5%;
    display: block;
    margin: 0 auto;
    transition: border-color 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

#address:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.swal-minimal {
    border-radius: 16px !important;
    padding: 2rem !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

.swal-minimal .swal2-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #2d3748 !important;
}

.swal-minimal .swal2-html-container {
    font-size: 1rem !important;
    color: #718096 !important;
}

.swal-minimal .swal2-icon {
    width: 3rem !important;
    height: 3rem !important;
    margin-bottom: 1rem !important;
}

.swal-cancel-minimal {
    color: #718096 !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 0.875rem !important;
}

.swal-cancel-minimal:hover {
    background-color: #f7fafc !important;
}

.btn-remove-item {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    color: #94a3b8; 
    font-size: 1.2rem;
    border-radius: 50%; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.btn-remove-item:hover {
    color: #e53e3e; 
    background-color: #fff5f5; 
    transform: scale(1.15) rotate(-10deg); 
    box-shadow: 0 4px 6px -1px rgba(229, 62, 62, 0.1), 0 2px 4px -1px rgba(229, 62, 62, 0.06); 
}

.btn-remove-item:active {
    transform: scale(0.95); 
    background-color: #fed7d7;
}

@media (max-width: 768px) {
    .back-link {
        margin-left: 10%;
        font-size: 0.8rem;
    }

    .cart-header {
        margin-top: 0.5rem;
    }

    .cart-page {
        margin-top: 2rem;
    }
}