/* =========================================================
   UPman One Page Checkout — FULL WIDTH + DESIGN EMAS (v3.1)
   ========================================================= */

*, *:before, *:after {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

/* WRAPPER – FULL WIDTH */
.upman-checkout-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #263238;
    background: #ffffff;
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 18px 50px -12px rgba(2, 62, 76, 0.18);
    border: 1px solid #eef3f4;
    position: relative;
    overflow: hidden;
}

/* Jalur emas di atas */
.upman-checkout-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #c9a227, #e6c654, #b6932a);
}

/* GRID – 2 KOLUM */
.upman-grid-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    align-items: start;
}

/* TAJUK SEKSYEN – GAYA EMAS */
.upman-section-title {
    font-size: 18px; /* Saiz asal dikecilkan sedikit untuk desktop/umum */
    font-weight: 700;
    letter-spacing: -0.3px;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eef3f4;
    color: #023e4c;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upman-section-title::before {
    content: "";
    width: 5px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(180deg, #e6c654, #c9a227);
    display: inline-block;
}


/* Khas untuk skrin telefon mudah alih */
@media (max-width: 768px) {
    .upman-section-title {
        font-size: 19px !important; /* Saiz tajuk lebih kecil & selesa pada smartphone */
        margin-bottom: 12px !important;
        padding-bottom: 8px !important;
    }
}

/* ---------- PAKEJ KAD ---------- */
.upman-package-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.package-card {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1.5px solid #e2e8ea;
    padding: 14px 16px;
    border-radius: 14px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(2, 62, 76, 0.04);
    position: relative;
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.package-card:hover {
    border-color: #d8aa2f;
    box-shadow: 0 12px 28px -10px rgba(200, 162, 39, 0.35);
    transform: translateY(-2px);
}

.package-card input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #cbd6d9;
    border-radius: 50%;
    margin: 0;
    position: relative;
    transition: all 0.18s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.package-card input[type="radio"]:checked {
    border-color: #0c808f;
}

.package-card input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #13a2b4, #0c808f);
}

.package-card.package-selected {
    border-color: #0c808f;
    background: #f4fbfc;
    box-shadow: 0 12px 30px -10px rgba(12, 128, 143, 0.35);
}

.package-card.popular {
    background: linear-gradient(135deg, #fdf9ec, #fffbe8);
    border-color: #e0bd4a;
}

.package-card.popular.package-selected {
    border-color: #c9a227;
    background: linear-gradient(135deg, #fdf6df, #fcf1c9);
}

.badge-popular {
    position: absolute;
    top: -10px;
    right: 16px;
    background: linear-gradient(135deg, #e6c654, #b8932a);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(184, 147, 42, 0.4);
    z-index: 2;
}

/* IMEJ PRODUK */
.package-image {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #eef3f4;
    flex-shrink: 0;
}

.package-info .title {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: #023e4c;
    line-height: 1.3;
    word-break: keep-all; /* Elakkan perkataan terputus pelik */
}

.package-info {
    flex: 1;
    min-width: 120px; /* Lebarkan sedikit ruang untuk teks */
    display: flex;
    flex-direction: column;
}

.saving-text {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    margin-top: 3px;
    width: fit-content;
}

.price-box {
    flex: 0 0 auto;
    text-align: right;
    line-height: 1.2;
    white-space: nowrap;
}

.price-box del {
    display: block;
    font-size: 12px;
    color: #b0bec5;
    text-decoration: line-through;
}

.price-box strong {
    font-size: 18px;
    font-weight: 800;
    color: #b8932a;
    letter-spacing: -0.3px;
}

/* ---------- BORANG ALAMAT ---------- */
.upman-shipping-form .form-row {
    margin-bottom: 8px;
}

.upman-shipping-form label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 600;
    color: #455a64;
}

.upman-shipping-form .input-text {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e2e8ea;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    color: #263238;
    transition: all 0.2s ease;
    background: #ffffff;
}

.upman-shipping-form .input-text:focus {
    outline: none;
    border-color: #0c808f;
    box-shadow: 0 0 0 4px rgba(12, 128, 143, 0.12);
}

/* ---------- RINGKASAN ---------- */
.order-summary-box {
    background: #fbfcfd;
    border: 1px solid #eef3f4;
    padding: 22px;
    border-radius: 16px;
    box-shadow: inset 0 1px 0 #ffffff, 0 8px 24px -12px rgba(2, 62, 76, 0.12);
    width: 100%;
}

.review-row {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    font-size: 14px;
    color: #455a64;
    border-bottom: 1px dashed #e6eef0;
}

.review-row.total {
    font-weight: 800;
    font-size: 17px;
    border-bottom: none;
    color: #023e4c;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid #eef3f4;
}

.review-row.total .total-amount {
    color: #b8932a;
    font-size: 22px;
    letter-spacing: -0.5px;
}

/* ---------- BUTANG ---------- */
#place_order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(135deg, #e6c654, #b8932a);
    color: #ffffff;
    border: none;
    padding: 15px 16px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.2px;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 10px 24px -8px rgba(184, 147, 42, 0.55);
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

#place_order:hover {
    background: linear-gradient(135deg, #f0d467, #c9a227);
    box-shadow: 0 14px 30px -8px rgba(184, 147, 42, 0.6);
    transform: translateY(-1px);
}

/* ---------- PAYMENT OPTIONS ---------- */
.payment-option {
    flex: 1;
    border: 1.5px solid #e2e8ea;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.payment-option:hover {
    border-color: #d8aa2f;
    box-shadow: 0 4px 12px rgba(200, 162, 39, 0.15);
}

.payment-option:has(input:checked) {
    border-color: #0c808f;
    background: #f4fbfc;
}

.payment-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #cbd6d9;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    position: relative;
    cursor: pointer;
}

.payment-option input[type="radio"]:checked {
    border-color: #0c808f;
}

.payment-option input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #0c808f;
}

.upman-payment-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================================================
   RESPONSIVE MOBILE – FULL WIDTH (Buang Gap Kanan)
   ========================================================= */
@media (max-width: 768px) {
    .upman-checkout-wrapper {
        padding: 8px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
    .upman-checkout-wrapper::before {
        margin: -8px -8px 10px -8px !important;
        border-radius: 0 !important;
    }
    .upman-grid-container {
        display: block !important;
        width: 100% !important;
        gap: 0 !important;
    }
    .upman-col-left,
    .upman-col-right {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .upman-col-right {
        margin-top: 20px !important;
    }
}

/* =========================================================
   THANK YOU PAGE – PREMIUM
   ========================================================= */
.upman-thankyou {
    max-width: 560px;
    margin: 24px auto;
    padding: 40px 32px;
    background: #ffffff;
    border: 1px solid #eef3f4;
    border-radius: 18px;
    box-shadow: 0 18px 50px -12px rgba(2, 62, 76, 0.18);
    text-align: center;
    position: relative;
    overflow: hidden;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.upman-thankyou::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #c9a227, #e6c654, #b6932a);
}

.upman-thankyou-check {
    width: 84px;
    height: 84px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #2fd48b, #12a05e);
    box-shadow: 0 12px 28px -8px rgba(18, 160, 94, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upman-thankyou-title {
    color: #023e4c;
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 8px;
}

.upman-thankyou-sub {
    color: #78909c;
    font-size: 15px;
    margin: 0 0 24px;
}

.upman-thankyou-details {
    background: #fbfcfd;
    border: 1px solid #eef3f4;
    border-radius: 14px;
    padding: 6px 20px;
    margin-bottom: 24px;
    text-align: left;
}

.upman-thankyou-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #e6eef0;
    font-size: 14px;
}

.upman-thankyou-row:last-child {
    border-bottom: none;
}