/* Payment Options Styling */
.payment-options.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .payment-options.grid-2 {
        grid-template-columns: 1fr;
    }
}

.card-radio {
    cursor: pointer;
    position: relative;
}

.card-radio input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.card-radio .option-content {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.card-radio .option-content:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.card-radio input:checked+.option-content {
    border-color: #009ee3;
    background: #f0f9ff;
    box-shadow: 0 4px 16px rgba(0, 158, 227, 0.15);
}

/* Mercado Pago Logo Styling */
.card-radio .mp-logo {
    width: 100%;
    max-width: 140px;
    height: auto;
    object-fit: contain;
    margin-bottom: 8px;
}

/* Bank Transfer Icon Styling */
.card-radio .icon-wrapper {
    width: 48px;
    height: 48px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.card-radio .icon-wrapper i {
    font-size: 24px;
    color: #6b7280;
}

.card-radio input:checked+.option-content .icon-wrapper {
    background: #009ee3;
}

.card-radio input:checked+.option-content .icon-wrapper i {
    color: #fff;
}

.card-radio .label-text {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    text-align: center;
}

/* Check Icon Styling */
.card-radio .check-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 24px;
    color: #009ee3;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-radio input:checked+.option-content .check-icon {
    opacity: 1;
    transform: scale(1);
}

/* --- New Payment Details Views Styling --- */
.payment-details-view {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mercado Pago Details */
.mp-card-details h4 {
    color: #009ee3;
    font-size: 18px;
    margin: 0 0 16px 0;
    font-weight: 700;
}

.mp-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.4;
}

.mp-feature i {
    color: #009ee3;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.mp-icons {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.mp-icons img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.mp-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6b7280;
    font-size: 13px;
    border-top: 1px solid #f3f4f6;
    padding-top: 16px;
    margin-top: 8px;
}

.mp-footer i {
    color: #10b981;
    font-size: 16px;
}

/* Credit Card Details */
.cc-info-card {
    text-align: center;
    padding: 10px;
}

.cc-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.cc-header i {
    font-size: 32px;
    color: #2563eb;
}

.cc-header h4 {
    margin: 0;
    font-size: 20px;
    color: #1f2937;
}

.cc-promo {
    background: #eff6ff;
    color: #1e40af;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 16px;
    border: 1px dashed #bfdbfe;
    flex: 1;
}

.cc-tuya-promo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    text-align: left;
}

.tuya-card-img {
    width: 80px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cc-whatsapp-note {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: left;
}

.cc-whatsapp-note i {
    font-size: 20px;
    color: #22c55e;
}

.cc-whatsapp-note p {
    margin: 0;
    line-height: 1.4;
}


/* Modal Overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-overlay .modal-content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    /* Important for fixed header/footer */
    padding: 0;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

/* Modal Header */
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    /* Center content */
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #111827;
    text-align: center;
    width: 100%;
}

/* Modal Body */
.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    /* Takes available space */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center content vertically */
}

.modal-body p {
    text-align: center;
    margin: 0 0 12px 0;
    color: #4b5563;
    width: 100%;
}

#transferPriceContainer {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

/* Bank Details Card */
.bank-details {
    background: #f9fafb;
    padding: 0;
    /* Remove padding from container, use on items */
    border-radius: 12px;
    margin: 16px 0;
    border: 1px solid #e5e7eb;
    width: 100%;
    /* Full width */
    overflow: hidden;
}

.bank-details p {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
}

.bank-details p:last-child {
    border-bottom: none;
}

.bank-details p:nth-child(even) {
    background: #f9fafb;
}

.bank-details strong {
    color: #111827;
    font-weight: 600;
    margin-right: 10px;
}

/* Custom File Upload Styling */
.upload-section {
    margin-top: 24px;
    text-align: center;
    width: 100%;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.file-upload-label:hover {
    border-color: #009ee3;
    background: #f0f9ff;
}

/* Ensure input is hidden but accessible if needed (though label triggers it) */
.upload-section input[type="file"] {
    display: none !important;
}

.file-upload-label .upload-icon {
    font-size: 32px;
    color: #9ca3af;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.file-upload-label:hover .upload-icon {
    color: #009ee3;
}

.file-upload-label .upload-text {
    font-size: 15px;
    font-weight: 500;
    color: #4b5563;
}

/* Modal Footer */
.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    gap: 12px;
    flex-direction: column;
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .modal-footer {
        flex-direction: row;
    }

    .modal-footer button {
        flex: 1;
    }
}

/* Shipping Toggle Switch - Improved Design */
.shipping-toggle {
    display: flex;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 24px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.shipping-toggle input[type="radio"] {
    display: none;
}

.shipping-toggle label {
    flex: 1;
    text-align: center;
    padding: 14px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #6b7280;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.shipping-toggle label i {
    font-size: 16px;
}

.shipping-toggle input[type="radio"]:checked+label {
    background: #fff;
    color: #c86a7a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.shipping-toggle label:hover {
    color: #374151;
}

.shipping-toggle input[type="radio"]:checked+label:hover {
    color: #c86a7a;
}

@media (max-width: 600px) {
    .shipping-toggle label {
        padding: 12px 16px;
        font-size: 14px;
        flex-direction: column;
        gap: 4px;
    }

    .shipping-toggle label i {
        font-size: 18px;
    }
}

/* New Price Styles for Transfer Modal */
.price-original {
    text-decoration: line-through;
    color: #9ca3af;
    margin: 0;
    font-size: 14px;
}

.price-discount {
    color: #10b981;
    font-weight: 700;
    margin: 4px 0;
    font-size: 15px;
}

.price-final {
    margin: 8px 0 0;
    font-size: 16px;
    color: #1f2937;
}

.price-final strong {
    font-size: 1.3em;
    color: #111827;
}

.instruction-text {
    margin-bottom: 12px;
    color: #4b5563;
    font-size: 14px;
    text-align: center;
    width: 100%;
}

.file-name-display {
    margin-top: 8px;
    font-size: 13px;
    color: #009ee3;
    font-weight: 500;
}

.cc-selection-img {
    width: 48px;
    height: 32px;
    object-fit: contain;
    margin-bottom: 12px;
    border-radius: 4px;
}

.cc-header-img {
    width: 40px;
    height: auto;
    border-radius: 4px;
}