/* ==================== CHECKOUT PAGE STYLES ==================== */

.checkout-page {
    background: #f5f5f5;
    min-height: 100vh;
}

/* Header */
.checkout-header {
    background: #fff;
    padding: 2rem var(--content-padding);
    display: flex;
    align-items: center;
    gap: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-link {
    color: var(--ink);
    text-decoration: none;
    font-size: 1.4rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 1;
}

.checkout-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
}

/* Main Content */
.checkout-main {
    max-width: 72rem;
    margin: 0 auto;
    padding: 2.4rem var(--content-padding);
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Sections */
.checkout-section {
    background: #fff;
    border-radius: 0.8rem;
    padding: 2.4rem;
    box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.05);
}

.checkout-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 2rem 0;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Order Summary */
.order-items {
    margin-bottom: 2rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.order-item-name {
    font-weight: 600;
    font-size: 1.6rem;
}

.order-item-qty {
    font-size: 1.4rem;
    color: rgba(0, 0, 0, 0.5);
}

.order-item-price {
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--hero-red);
}

.order-empty {
    text-align: center;
    color: rgba(0, 0, 0, 0.4);
    font-size: 1.4rem;
    padding: 1rem 0;
}

.order-totals {
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    padding-top: 1.6rem;
}

.order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    font-size: 1.6rem;
}

.order-row.shipping-note {
    font-size: 1.4rem;
    color: rgba(0, 0, 0, 0.5);
    justify-content: flex-start;
}

.order-row.total {
    font-size: 2rem;
    font-weight: 700;
    color: var(--hero-red);
    padding-top: 1.2rem;
    margin-top: 0.8rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.6rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    color: var(--ink);
}

.form-group label .icon {
    margin-right: 0.4rem;
}

.form-group label .required {
    color: var(--hero-red);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1.2rem 1.6rem;
    font-size: 1.6rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.6rem;
    background: #fff;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--hero-red);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 10rem;
}

.form-row {
    display: flex;
    gap: 1.6rem;
}

.form-row .form-group {
    flex: 1;
}

.form-row .form-group.flex-2 {
    flex: 2;
}

/* Radio Options */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.6rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.6rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.radio-option:hover {
    border-color: rgba(0, 0, 0, 0.2);
}

.radio-option input[type="radio"] {
    width: 2rem;
    height: 2rem;
    margin-top: 0.2rem;
    accent-color: var(--hero-red);
}

.radio-option input[type="radio"]:checked+.radio-label strong {
    color: var(--hero-red);
}

.radio-label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.radio-label strong {
    font-size: 1.6rem;
    font-weight: 600;
}

.radio-label small {
    font-size: 1.4rem;
    color: rgba(0, 0, 0, 0.5);
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Payment Info */
.payment-info {
    padding: 1.6rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 0.6rem;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    font-size: 1.6rem;
}

.payment-icon {
    font-size: 2rem;
}

/* Turnstile */
.turnstile-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.turnstile-widget {
    display: flex;
    justify-content: center;
}

.turnstile-note {
    font-size: 1.3rem;
    color: rgba(0, 0, 0, 0.6);
}

/* Submit Button */
.checkout-actions {
    margin-top: 1rem;
}

.submit-btn {
    width: 100%;
    padding: 1.8rem 2rem;
    font-size: 1.8rem;
    font-weight: 600;
    background: var(--hero-red);
    color: #fff;
    border: none;
    border-radius: 0.6rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background: #8a0a07;
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background: rgba(0, 0, 0, 0.3);
    cursor: not-allowed;
    transform: none;
}

/* Success Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 2000;
    overflow-y: auto;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 1.2rem;
    padding: 3.2rem;
    max-width: 48rem;
    width: 100%;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-2rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    width: 6rem;
    height: 6rem;
    background: #4CAF50;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 2rem;
}

.modal-content h2 {
    font-size: 2.4rem;
    margin: 0 0 2rem 0;
}

.order-info {
    margin-bottom: 2rem;
}

.order-info .order-id {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
}

.order-info .order-id strong {
    color: var(--hero-red);
}

.bank-info {
    background: #f9f9f9;
    border-radius: 0.8rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.bank-info h3 {
    font-size: 1.6rem;
    margin: 0 0 1.2rem 0;
}

.bank-info table {
    width: 100%;
    border-collapse: collapse;
}

.bank-info td {
    padding: 0.8rem 0;
    font-size: 1.6rem;
    text-align: left;
}

.bank-info td:first-child {
    color: rgba(0, 0, 0, 0.5);
    width: 40%;
}

.modal-order-summary {
    background: #f9f9f9;
    border-radius: 0.8rem;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.modal-order-summary h3 {
    font-size: 1.6rem;
    margin: 0 0 1.2rem 0;
}

.modal-order-summary .order-items {
    margin-bottom: 0;
}

.modal-order-items .order-item {
    padding: 0.8rem 0;
}

.modal-order-totals {
    margin-top: 1.2rem;
}

.reminder {
    font-size: 1.4rem;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.reminder.reminder-compact {
    margin-bottom: 1rem;
}

.modal-content .btn.outline {
    display: block;
    color: var(--ink);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Empty Cart */
.empty-cart-message {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-cart-message h2 {
    border: none;
    margin-bottom: 1rem;
}

.empty-cart-message p {
    color: rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 600px) {
    .checkout-header {
        padding: 1.6rem;
    }

    .checkout-main {
        padding: 1.6rem;
    }

    .checkout-section {
        padding: 2rem 1.6rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .modal-content {
        padding: 2.4rem 2rem;
    }
}

/* ==================== POLICY SECTION ==================== */
.policy-section {
    background: #fff;
}

.policy-intro {
    font-size: 1.4rem;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 2rem;
}

.policy-accordion {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.6rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.policy-accordion summary {
    padding: 1.6rem;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    background: #fafafa;
    transition: background 0.2s ease;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.policy-accordion summary::-webkit-details-marker {
    display: none;
}

.policy-accordion summary::after {
    content: '▼';
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
}

.policy-accordion[open] summary::after {
    transform: rotate(180deg);
}

.policy-accordion summary:hover {
    background: #f0f0f0;
}

.policy-content {
    padding: 1.6rem;
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--ink);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.policy-content p {
    margin-bottom: 1.2rem;
}

.policy-content h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.6rem 0 0.8rem 0;
    color: var(--ink);
}

.policy-content h4:first-of-type {
    margin-top: 0;
}

.policy-content ul {
    margin: 0.8rem 0 1.2rem 2rem;
    padding: 0;
}

.policy-content li {
    margin-bottom: 0.6rem;
}

.policy-warning {
    background: #fff3cd;
    color: #856404;
    padding: 1.2rem;
    border-radius: 0.4rem;
    font-weight: 500;
}

.policy-note {
    background: #e8f4fd;
    color: #0c5460;
    padding: 1.2rem;
    border-radius: 0.4rem;
    font-size: 1.3rem;
}

/* Policy Agreement Checkbox */
.policy-agreement {
    margin-top: 2rem;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.checkbox-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1.6;
}

.checkbox-option input[type="checkbox"] {
    width: 2rem;
    height: 2rem;
    margin-top: 0.2rem;
    accent-color: var(--hero-red);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-option span {
    color: var(--ink);
}

@media (max-width: 600px) {
    .policy-content {
        padding: 1.2rem;
    }

    .policy-accordion summary {
        padding: 1.2rem;
        font-size: 1.5rem;
    }

}

/* ==================== ANIMATIONS ==================== */
@keyframes highlight-attention {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
        border-color: #e74c3c;
    }

    50% {
        box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.3);
        border-color: #e74c3c;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
        border-color: rgba(0, 0, 0, 0.1);
    }
}

.highlight-attention {
    animation: highlight-attention 0.6s ease;
}

/* ==================== TOAST NOTIFICATION ==================== */
.toast-message {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: rgba(50, 50, 50, 0.95);
    color: #fff;
    padding: 1.2rem 2.4rem;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 10000;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 300px;
    justify-content: center;
}

.toast-message.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-message.warning {
    background: #e74c3c;
    /* Hero Red */
}


/* ==================== INVOICE SECTION ==================== */
.invoice-content {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    background: #f8f9fa;
    padding: 1.6rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.invoice-icon {
    font-size: 2rem;
    line-height: 1;
}

.invoice-content p {
    margin: 0;
    line-height: 1.5;
    color: var(--ink);
    font-size: 1.5rem;
}

/* ==================== LINE BUTTON OVERRIDES ==================== */
.btn.primary.line-btn {
    background: #06C755;
    border: none;
    color: #fff;
    text-decoration: none;
    margin-bottom: 1.2rem;
    display: flex;
    /* Override block */
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
    transition: all 0.2s ease;
}

.btn.primary.line-btn:hover {
    background: #05B54B;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(6, 199, 85, 0.4);
    color: #fff;
}

.btn.primary.line-btn:active {
    transform: translateY(0);
}

.line-icon {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.line-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}
