/* ============ Checkout Page ============ */

.p-checkout-page.checkout-container {
    max-width: 1100px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    align-items: stretch;
}

/* Sections */
.p-checkout-page .checkout-section {
    background: var(--white, #FFFFFF);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    border: 1px solid var(--border-color, #E5E7EB);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.p-checkout-page .checkout-section.active {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border-color: rgba(32, 33, 61, 0.1);
}

.p-checkout-page .section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.p-checkout-page .step-number {
    width: 32px;
    height: 32px;
    background: var(--secondary-color, #20213D);
    color: var(--white, #FFFFFF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-primary, 'Alata', sans-serif);
    font-size: 0.9rem;
}

.p-checkout-page .section-title {
    font-family: var(--font-primary, 'Alata', sans-serif);
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-color, #20213D);
    margin: 0;
}

/* Forms */
.p-checkout-page .form-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem 1rem;
}

.p-checkout-page .col-1 {
    grid-column: span 1;
}

.p-checkout-page .col-2 {
    grid-column: span 2;
}

.p-checkout-page .col-3 {
    grid-column: span 3;
}

.p-checkout-page .col-4 {
    grid-column: span 4;
}

.p-checkout-page .col-5 {
    grid-column: span 5;
}

.p-checkout-page .col-6 {
    grid-column: span 6;
}

.p-checkout-page .btn-outline {
    background: var(--secondary-color, #20213D);
    color: var(--white, #FFFFFF);
    border: none;
    padding: 1rem 1.5rem;
    font-family: var(--font-primary, 'Alata', sans-serif);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.p-checkout-page .btn-outline:hover {
    background: #2D2E4D;
}

.p-checkout-page .identificacao-extra {
    grid-column: 1 / -1;
    width: 100%;
}

.p-checkout-page .person-type-selector {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.p-checkout-page .radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color, #20213D);
}

.p-checkout-page .radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--secondary-color, #20213D);
    cursor: pointer;
}

.p-checkout-page .label-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.p-checkout-page .check-inline {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--secondary-color, #20213D);
    cursor: pointer;
    user-select: none;
}

.p-checkout-page .check-inline input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--secondary-color, #20213D);
}

.p-checkout-page .label-with-action label {
    margin-bottom: 0;
}

.p-checkout-page input:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

.p-checkout-page .btn-outline:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
}

/* Shipping Selected Card */
.p-checkout-page .shipping-selected-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    margin-top: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.p-checkout-page .shipping-selected-card.is-loading {
    opacity: 0.7;
}

.p-checkout-page .shipping-selected-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.p-checkout-page .shipping-selected-info i {
    font-size: 1.5rem;
    color: var(--secondary-color, #20213D);
    background: white;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.p-checkout-page .shipping-details {
    display: flex;
    flex-direction: column;
}

.p-checkout-page .method-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--secondary-color, #20213D);
}

.p-checkout-page .method-deadline {
    font-size: 0.8rem;
    color: #6B7280;
}

.p-checkout-page .shipping-selected-price-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.p-checkout-page .method-price {
    font-weight: 800;
    font-size: 1rem;
    color: var(--secondary-color, #20213D);
}

.p-checkout-page .method-price.free {
    color: #15803d;
}

.p-checkout-page .btn-change-shipping {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--secondary-color, #20213D);
    text-decoration: underline;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.p-checkout-page .shipping-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.25rem;
    color: var(--secondary-color, #20213D);
}

/* Payment Methods */
.p-checkout-page .payment-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.p-checkout-page .payment-tab {
    padding: 1.25rem;
    border: 2px solid #F3F4F6;
    background: var(--white, #FFFFFF);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
}

.p-checkout-page .payment-tab i {
    font-size: 1.5rem;
    color: #9CA3AF;
}

.p-checkout-page .payment-tab span {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #9CA3AF;
}

.p-checkout-page .payment-tab small {
    font-size: 0.7rem;
    color: #6B7280;
    margin-top: 4px;
}

.p-checkout-page .payment-tab.active small {
    color: var(--secondary-color, #20213D);
    opacity: 0.8;
}

.p-checkout-page .payment-tab.active {
    border-color: var(--secondary-color, #20213D);
    background: var(--white, #FFFFFF);
    box-shadow: 0 4px 6px -1px rgba(32, 33, 61, 0.1);
}

.p-checkout-page .payment-tab.active i,
.p-checkout-page .payment-tab.active span {
    color: var(--secondary-color, #20213D);
}

/* Ícone de check flutuante na aba ativa */
.p-checkout-page .payment-tab.active::after {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--cta-green, #15803d);
    font-size: 1rem;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* PIX Styles */
.p-checkout-page .pix-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.p-checkout-page .pix-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.p-checkout-page .pix-step {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.p-checkout-page .step-num {
    width: 24px;
    height: 24px;
    background: #E5E7EB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.p-checkout-page .qr-container-outer {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px dashed #ddd;
    margin: 1rem 0;
}

.p-checkout-page .qr-container img {
    width: 150px;
    margin-bottom: 10px;
}

.p-checkout-page .pix-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
}

.p-checkout-page .pix-copy-wrapper {
    position: relative;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #eee;
}

.p-checkout-page .pix-copy-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: monospace;
    font-size: 0.75rem;
    color: #4B5563;
    outline: none;
    cursor: pointer;
    padding: 0;
}

.p-checkout-page .btn-copy-pix {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    color: var(--secondary-color, #20213D);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.p-checkout-page .pix-status-waiting {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.p-checkout-page .status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.p-checkout-page .pulse-dot {
    width: 10px;
    height: 10px;
    background-color: #15803d;
    border-radius: 50%;
    position: relative;
}

.p-checkout-page .pulse-dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: inherit;
    border-radius: 50%;
    animation: pulse-ring 1.5s ease-out infinite;
}

.p-checkout-page .pix-benefit {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 8px;
    text-align: left;
}

.p-checkout-page .pix-benefit i {
    font-size: 1.25rem;
    color: #FBBF24;
}

.p-checkout-page .pix-benefit div {
    display: flex;
    flex-direction: column;
}

.p-checkout-page .pix-benefit strong {
    font-size: 0.9rem;
}

.p-checkout-page .pix-benefit span {
    font-size: 0.75rem;
    color: #6B7280;
}

.p-checkout-page .btn-finalize {
    width: 100%;
    background: var(--cta-green, #15803d);
    color: white;
    border: none;
    padding: 1.25rem;
    border-radius: 8px;
    font-family: var(--font-primary, 'Alata', sans-serif);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(21, 128, 61, 0.2);
}

.p-checkout-page .btn-finalize:hover {
    background: var(--cta-green-hover, #166534);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 128, 61, 0.3);
}

/* Sidebar Summary */
.p-checkout-page+.order-summary-sidebar,
.p-checkout-page .order-summary-sidebar {
    align-self: stretch;
}

.p-checkout-page .summary-card {
    background: var(--white, #FFFFFF);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color, #E5E7EB);
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.p-checkout-page .sticky-summary {
    position: sticky;
    top: 110px;
}

.p-checkout-page .summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #F3F4F6;
    padding-bottom: 1rem;
}

.p-checkout-page .summary-title {
    font-family: var(--font-primary, 'Alata', sans-serif);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.p-checkout-page .edit-cart {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary-color, #20213D);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border: 1px solid #E5E7EB;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.p-checkout-page .edit-cart:hover {
    background: var(--secondary-color, #20213D);
    color: var(--white, #FFFFFF);
    border-color: var(--secondary-color, #20213D);
}

.p-checkout-page .summary-items {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.p-checkout-page .summary-item {
    display: flex;
    gap: 1rem;
    text-align: left;
}

.p-checkout-page .summary-item-img {
    width: 50px;
    aspect-ratio: 9/16;
    background: #F3F4F6;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.p-checkout-page .summary-item-img picture {
    width: 100%;
    height: 100%;
    display: block;
}

.p-checkout-page .summary-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.p-checkout-page .summary-item-variants {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1;
}

.p-checkout-page .summary-item-variants .variant {
    font-size: 0.75rem;
    color: #6B7280;
}

.p-checkout-page .summary-item-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 6px;
    gap: 0.5rem;
}

.p-checkout-page .summary-item-price-row .qty-unit {
    font-size: 0.78rem;
    color: #9CA3AF;
    white-space: nowrap;
}

.p-checkout-page .summary-item-price-row .price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary-color, #20213D);
    margin-top: 0;
}

.p-checkout-page .summary-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.p-checkout-page .summary-item-info .name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color, #20213D);
}

.p-checkout-page .summary-item-info .variant {
    font-size: 0.75rem;
    color: #6B7280;
}

.p-checkout-page .summary-item-info .price {
    font-size: 0.9rem;
    font-weight: 700;
}

.p-checkout-page .summary-calculator {
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

.p-checkout-page .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: #555;
}

.p-checkout-page .summary-row.discount {
    color: var(--cta-green, #15803d);
    font-weight: 600;
}

.p-checkout-page .summary-row.total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--secondary-color, #20213D);
    margin-bottom: 0;
}

.p-checkout-page .price-pix {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
    color: var(--text-color, #333);
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

.p-checkout-page .price-pix strong {
    color: var(--cta-green, #15803d);
}

.p-checkout-page .price-pix span {
    font-weight: 700;
    color: var(--secondary-color, #20213D);
}

.p-checkout-page .installments-text {
    font-size: 0.85rem;
    color: #666;
    text-align: right;
    margin-bottom: 1rem;
    display: block;
}

.p-checkout-page .installments-text strong {
    color: var(--secondary-color, #20213D);
}

/* Trust Badge */
.p-checkout-page .cart-trust-badge {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6B7280;
    text-align: center;
}

.p-checkout-page .cart-trust-badge i {
    color: var(--cta-green, #15803d);
    font-size: 0.95rem;
}

/* ========== Skeleton Loading ========== */
@keyframes shimmer {
    0% {
        background-position: -400px 0;
    }

    100% {
        background-position: 400px 0;
    }
}

.p-checkout-page .sk {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: 4px;
    display: block;
}

.p-checkout-page .sk-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.p-checkout-page .sk-thumb {
    width: 50px;
    flex-shrink: 0;
    aspect-ratio: 9/16;
    border-radius: 4px;
}

.p-checkout-page .sk-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 4px;
}

.p-checkout-page .sk-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.p-checkout-page .sk-row .sk {
    height: 14px;
}

.p-checkout-page .sk-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 1rem 0;
}

/* Skeleton Payment Tabs */
.p-checkout-page .skeleton-tab {
    cursor: default;
    pointer-events: none;
    border-color: #f3f4f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.p-checkout-page .skeleton-tab .sk-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
}

.p-checkout-page .skeleton-tab .sk-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.p-checkout-page .skeleton-tab .sk-title {
    width: 60%;
    height: 12px;
}

.p-checkout-page .skeleton-tab .sk-small {
    width: 40%;
    height: 10px;
}



/* Error Card */
.p-checkout-page .error-card {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 12px;
    padding: 1.15rem;
    margin: 1.25rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.05);
    animation: errorAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.p-checkout-page .error-card i {
    color: #ef4444;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.p-checkout-page .error-card .error-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.p-checkout-page .error-card .error-title {
    color: #991b1b;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.p-checkout-page .error-card .error-message {
    color: #b91c1c;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.5;
}

@keyframes errorAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Mobile Adjustments */
@media (max-width: 992px) {
    .p-checkout-page.checkout-container {
        grid-template-columns: 1fr;
        margin: 1.5rem auto;
    }
}

@media (max-width: 768px) {
    .p-checkout-page.checkout-container {
        padding: 0 1rem;
        margin: 1.5rem auto;
        gap: 2rem;
    }

    .p-checkout-page .form-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    .p-checkout-page .col-1,
    .p-checkout-page .col-2,
    .p-checkout-page .col-3,
    .p-checkout-page .col-4,
    .p-checkout-page .col-5,
    .p-checkout-page .col-6,
    .p-checkout-page .input-group {
        grid-column: span 1 !important;
    }

    /* Ajuste para inputs com botão (ex: email) no mobile */
    .p-checkout-page .c-base-input--with-action .c-base-input__wrapper {
        flex-direction: column;
        border: none;
        background: transparent;
        overflow: visible;
        gap: 0.5rem;
    }

    .p-checkout-page .c-base-input--with-action .c-base-input__field {
        border: 1px solid #D1D5DB;
        border-radius: 6px;
        background: #F9FAFB;
    }

    .p-checkout-page .c-base-input--with-action button {
        width: 100%;
        border-radius: 6px !important;
    }


    .p-checkout-page .section-title {
        font-size: 1rem;
    }

    .p-checkout-page .payment-selector {
        grid-template-columns: 1fr;
    }

    .p-checkout-page .person-type-selector {
        flex-direction: row;
        gap: 1rem;
    }

}

/* Animations */
@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.p-checkout-page .c-base-input{
    margin-bottom: 0;
}