
/* ============================================
   Checkout Page — Premium Redesign
   ============================================ */

/* --- Page Layout --- */
.section-checkout {
    padding: 40px 0 60px;
    background-color: #fafafa;
    min-height: 80vh;
}

.section-checkout .container {
    max-width: 1200px;
}

/* --- Form Container (Left Side) --- */
.tf-checkout-cart-main {
    background-color: #fff;
    padding: 36px 32px;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    max-width: 700px;
    margin: 0 auto;
}

/* --- Section Titles (Contact, Delivery, Payment) --- */
.tf-checkout-cart-main .box-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.tf-checkout-cart-main .box-title p,
.tf-checkout-cart-main .title,
.tf-checkout-cart-main .box-ip-delivery .title,
.tf-checkout-cart-main .box-ip-shipping .title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a1a;
    letter-spacing: 0.3px;
    margin-bottom: 16px;
}

.tf-checkout-cart-main .box-ip-contact,
.tf-checkout-cart-main .box-ip-delivery,
.tf-checkout-cart-main .box-ip-shipping {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.tf-checkout-cart-main .box-ip-shipping {
    border-bottom: none;
}

/* --- Input Fields --- */
.tf-checkout-cart-main .style-line-2,
.style-line-2 {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid #ebebeb;
    border-radius: 10px;
    background-color: #fafafa;
    font-size: 14px;
    color: #333;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    outline: none;
}

.style-line-2::placeholder {
    color: #aaa;
    font-size: 14px;
}

.style-line-2:focus {
    border-color: #4c6f68;
    box-shadow: 0 0 0 3px rgba(76, 111, 104, 0.1);
    background-color: #fff;
}

.style-line-2.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.08);
}

.style-line-2.is-valid {
    border-color: #4c6f68;
}

/* Unfocused inputs — light brand green border */
.section-checkout.type-2 fieldset input:not(:focus),
.section-checkout.type-2 fieldset select:not(:focus),
.section-checkout.type-2 .tf-select select:not(:focus),
.section-checkout.type-2 select.style-line-2:not(:focus) {
    border-color: #c5d5d2 !important;
}

/* --- Select Fields --- */
.tf-select select,
.tf-checkout-cart-main select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #ebebeb;
    background-color: #fafafa;
    font-size: 14px;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.tf-select select:focus,
.tf-checkout-cart-main select:focus {
    border-color: #4c6f68;
    box-shadow: 0 0 0 3px rgba(76, 111, 104, 0.1);
    outline: none;
    background-color: #fff;
}

/* --- Grid Layout --- */
.tf-grid-layout {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
}

.tf-grid-layout.sm-col-2 {
    grid-template-columns: 1fr 1fr;
}

/* --- Login Link --- */
#openLoginBtn {
    font-size: 14px !important;
    color: #4c6f68 !important;
    text-decoration: underline !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

#openLoginBtn:hover {
    color: #3d5b55 !important;
}

/* --- Place Order Button --- */
.tf-checkout-cart-main .action-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    background-color: #4c6f68;
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    margin-top: 24px;
}

.tf-checkout-cart-main .action-checkout:hover {
    background-color: #3d5b55;
    box-shadow: 0 6px 20px rgba(76, 111, 104, 0.3);
    transform: translateY(-1px);
}

.tf-checkout-cart-main .action-checkout:active {
    transform: translateY(0);
}

/* --- Order Summary (Right Side) --- */
.content-right {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    padding: 28px 24px;
}

.box-your-order {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* --- Order Product Items --- */
.list-order-product {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-order-product .order-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.list-order-product .order-item:last-child {
    border-bottom: none;
}

.list-order-product .img-prd {
    position: relative;
    flex-shrink: 0;
}

.list-order-product .img-prd .image {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    background-color: #f9f9f9;
}

.list-order-product .img-prd .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-order-product .img-prd .number-count {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    background-color: #4c6f68;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.info-and-price {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.info-prd .name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
}

.info-prd .type {
    font-size: 12px;
    color: #999;
    margin: 0;
}

.price-prd {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    white-space: nowrap;
}

/* --- Promo Code Box --- */
.promo-box {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.promo-box .form-control {
    flex: 1;
    min-width: 180px;
    padding: 12px 14px;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.promo-box .form-control:focus {
    border-color: #4c6f68;
    box-shadow: 0 0 0 3px rgba(76, 111, 104, 0.1);
    outline: none;
}

.promo-box #apply-promo {
    padding: 12px 20px;
    background-color: #4c6f68 !important;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 0 !important;
}

.promo-box #apply-promo:hover {
    background-color: #3d5b55 !important;
}

/* --- Totals Section --- */
.list-total {
    list-style: none;
    padding: 16px 0 0;
    margin: 0;
}

.list-total .total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
}

.list-total .total-item .total-sub {
    margin: 0;
}

.list-total .total-item .dot-square {
    display: inline-block;
    width: 4px;
    height: 4px;
    background-color: #ccc;
    border-radius: 50%;
    margin: 0 6px;
    vertical-align: middle;
}

.list-total .total-item.last-total {
    border-top: 1px solid #ebebeb;
    margin-top: 8px;
    padding-top: 16px;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
}

.list-total .total-item.last-total .price {
    color: #4c6f68;
    font-weight: 700;
    font-size: 18px;
}

#subtotal-old.discounted {
    text-decoration: line-through;
    color: #999;
}

/* --- Payment Method Select --- */
#payment-method {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #ebebeb;
    background-color: #fafafa;
    font-size: 14px;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.25s ease;
}

#payment-method:focus {
    border-color: #4c6f68;
    box-shadow: 0 0 0 3px rgba(76, 111, 104, 0.1);
    outline: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .tf-checkout-cart-main {
        padding: 24px 18px;
        border-radius: 12px;
    }

    .content-right {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .tf-grid-layout,
    .tf-grid-layout.sm-col-2 {
        grid-template-columns: 1fr;
    }

    .promo-box {
        flex-direction: column;
        align-items: stretch;
    }

    .promo-box .form-control {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .section-checkout {
        padding: 20px 0 40px;
    }

    .tf-checkout-cart-main {
        padding: 20px 14px;
    }

    .list-order-product .img-prd .image {
        width: 56px;
        height: 56px;
    }
}


/* ============================================
   Checkout Page Header & Step Indicators
   ============================================ */

.checkout-page-header {
    text-align: center;
    padding: 10px 0 24px;
}

.checkout-header-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.checkout-header-title h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Step Indicators */
.checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 480px;
    margin: 0 auto;
}

.checkout-steps .step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-steps .step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #999;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkout-steps .step.active .step-number {
    background-color: #4c6f68;
    color: #fff;
}

.checkout-steps .step-label {
    font-size: 14px;
    font-weight: 500;
    color: #999;
    transition: color 0.3s ease;
}

.checkout-steps .step.active .step-label {
    color: #1a1a1a;
}

.checkout-steps .step-line {
    width: 40px;
    height: 2px;
    background-color: #e0e0e0;
    margin: 0 12px;
}

.checkout-steps .step.active ~ .step-line,
.checkout-steps .step-line {
    background-color: #4c6f68;
}

/* ============================================
   Section Title with Icon
   ============================================ */

.section-title-with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-with-icon svg {
    flex-shrink: 0;
}

.section-title-with-icon p {
    margin-bottom: 0 !important;
}

/* ============================================
   Trust Badges
   ============================================ */

.checkout-trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-top: 24px;
    padding: 20px 0 8px;
    border-top: 1px solid #f0f0f0;
}

.trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.trust-badge svg {
    opacity: 0.8;
}

.trust-badge span {
    font-size: 12px;
    font-weight: 500;
    color: #888;
    white-space: nowrap;
}

/* ============================================
   Order Summary Header
   ============================================ */

.order-summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.order-summary-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: 0.3px;
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 768px) {
    .checkout-page-header {
        padding: 20px 0 28px;
    }

    .checkout-header-title h2 {
        font-size: 22px;
    }

    .checkout-steps .step-label {
        display: none;
    }

    .checkout-steps .step-line {
        width: 28px;
    }

    .checkout-trust-badges {
        gap: 16px;
    }

    .trust-badge span {
        font-size: 11px;
    }
}
