/* ===================================================
   PHÚC TÂM AN - STYLESHEET GIỎ HÀNG & ĐẶT HÀNG (cart.index)
   Thiết kế chuẩn 100% theo giao diện mẫu
   =================================================== */

/* BANNER HEADER ĐẶT HÀNG */
.cart-banner {
    position: relative;
    height: 230px;
    background: #0f3d26 url('../assets/product-banner.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    overflow: hidden;
}

.cart-banner-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(10, 48, 30, 0.45) 0%, rgba(5, 32, 20, 0.72) 100%);
}

.cart-banner-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.cart-banner-title {
    font-family: "Be Vietnam Pro", Arial, sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px;
    letter-spacing: 0.8px;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

.cart-banner-subtitle {
    font-family: "Be Vietnam Pro", Arial, sans-serif;
    font-style: italic;
    font-size: 18px;
    color: #f7f3dc;
    margin: 0;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* KHUNG NỘI DUNG CHÍNH */
.cart-page-wrapper {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 4% 50px;
}

/* LƯỚI 2 CỘT: FORM ĐẶT HÀNG & TỔNG KẾT ĐƠN HÀNG */
.cart-checkout-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 26px;
    align-items: start;
    margin-bottom: 28px;
}

/* CỘT TRÁI: FORM THÔNG TIN ĐẶT HÀNG */
.checkout-form-card {
    background: #ffffff;
    border: 1px solid #dce8db;
    border-radius: 16px;
    padding: 26px 24px;
    box-shadow: 0 3px 12px rgba(22, 65, 36, 0.04);
}

.card-title-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #164627;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e7efe4;
}

.card-title-header .icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #256637;
    color: #ffffff;
    font-size: 13px;
    flex-shrink: 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1f482d;
    margin-bottom: 6px;
}

.form-group label .required {
    color: #d32020;
    margin-left: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.form-row-address {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
    margin-bottom: 12px;
}

.sub-label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: #385e43;
    margin-bottom: 4px;
}

@media (max-width: 640px) {
    .form-row-address {
        grid-template-columns: 1fr;
    }
}

.form-control, .form-select {
    width: 100%;
    background: #ffffff;
    border: 1px solid #c9d8c9;
    border-radius: 8px;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 13px;
    color: #183e28;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s;
}

.form-control::placeholder {
    color: #9cb0a1;
}

.form-control:focus, .form-select:focus {
    border-color: #27723e;
    box-shadow: 0 0 0 3px rgba(39, 114, 62, 0.12);
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23336644'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    appearance: none;
    -webkit-appearance: none;
}

/* PHƯƠNG THỨC THANH TOÁN */
.payment-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed #dbe6da;
}

.payment-title-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #164627;
    margin-bottom: 14px;
}

.payment-title-header .icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #256637;
    color: #ffffff;
    font-size: 12px;
}

.payment-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid #e1ece0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fbfdfa;
}

.payment-option-item:hover {
    border-color: #2e7a44;
    background: #f4f9f2;
}

.payment-option-item.active {
    border-color: #246a36;
    background: #f0f7ee;
}

.payment-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #1a422a;
    cursor: pointer;
    user-select: none;
}

.payment-radio-input {
    accent-color: #256637;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.payment-logos {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pay-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 9.5px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.pay-badge.momo {
    background: #a50064;
}

.pay-badge.zalopay {
    background: #008fe5;
}

.pay-badge.visa {
    background: #1a1f71;
    font-style: italic;
    font-size: 10px;
}

.pay-badge.mastercard {
    background: #222222;
    display: flex;
    gap: 2px;
    padding: 0 4px;
}

.mc-c1 {
    width: 8px;
    height: 8px;
    background: #eb001b;
    border-radius: 50%;
}

.mc-c2 {
    width: 8px;
    height: 8px;
    background: #f79e1b;
    border-radius: 50%;
    margin-left: -4px;
}

/* CỘT PHẢI: ĐƠN HÀNG CỦA BẠN */
.order-summary-card {
    background: #fbfdf9;
    border: 1px solid #dce8db;
    border-radius: 16px;
    padding: 24px 22px;
    box-shadow: 0 3px 12px rgba(22, 65, 36, 0.04);
}

.cart-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0 16px;
    border-bottom: 1px solid #e5eee2;
    margin-bottom: 14px;
}

.cart-item-thumb {
    width: 58px;
    height: 58px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dbe6da;
    background: #ffffff;
    flex-shrink: 0;
}

.cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #173d27;
    margin: 0 0 2px;
    line-height: 1.35;
}

.cart-item-sub {
    font-size: 11.5px;
    color: #6a7e70;
    margin: 0 0 6px;
}

.cart-item-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ccdacc;
    border-radius: 16px;
    background: #ffffff;
    overflow: hidden;
    height: 26px;
}

.cart-stepper-btn {
    width: 24px;
    height: 100%;
    border: none;
    background: transparent;
    color: #214e31;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-stepper-btn:hover {
    background: #edf5eb;
}

.cart-stepper-val {
    width: 28px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #173e27;
    border-left: 1px solid #e1ece0;
    border-right: 1px solid #e1ece0;
}

.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    min-height: 52px;
}

.btn-remove-item {
    background: transparent;
    border: none;
    color: #94a697;
    padding: 3px 5px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.btn-remove-item:hover {
    color: #dc2626;
    background: #fee2e2;
    transform: scale(1.1);
}

.cart-item-price {
    font-size: 14.5px;
    font-weight: 800;
    color: #cc1818;
    white-space: nowrap;
}

.empty-cart-state {
    text-align: center;
    padding: 36px 16px;
    color: #5d7564;
}

.empty-cart-state .empty-icon {
    font-size: 46px;
    margin-bottom: 8px;
    display: block;
    opacity: 0.65;
}

.empty-cart-state p {
    font-size: 14px;
    margin: 0 0 16px;
    font-weight: 500;
}

.empty-cart-state .btn-back-shop {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #256637;
    color: #ffffff;
    font-weight: 600;
    font-size: 12.5px;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}

.empty-cart-state .btn-back-shop:hover {
    background: #174523;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(23, 69, 35, 0.25);
}

/* BẢNG TÍNH TIỀN TỔNG KẾT */
.price-summary-table {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    color: #2c4d37;
}

.summary-line .amount {
    font-weight: 600;
    color: #1a3e28;
}

.summary-line.total-line {
    border-top: 1px dashed #c9d8c8;
    padding-top: 14px;
    margin-top: 6px;
}

.summary-line.total-line .label {
    font-size: 15px;
    font-weight: 800;
    color: #123922;
}

.summary-line.total-line .amount {
    font-size: 22px;
    font-weight: 800;
    color: #cc1818;
}

/* NÚT ĐẶT HÀNG NGAY */
.btn-submit-order {
    background: #0f4c2e;
    color: #ffffff;
    border: none;
    border-radius: 26px;
    padding: 13px 20px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    box-shadow: 0 4px 14px rgba(15, 76, 46, 0.3);
    transition: all 0.25s ease;
}

.btn-submit-order:hover {
    background: #083720;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 76, 46, 0.4);
}

.btn-submit-order span.arrow {
    font-size: 17px;
    transition: transform 0.2s;
}

.btn-submit-order:hover span.arrow {
    transform: translateX(3px);
}

/* GHI CHÚ BẢO MẬT */
.order-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #617768;
    margin-top: 14px;
}

.order-security-note .lock-icon {
    font-size: 12px;
    color: #2b733f;
}

/* THANH CAM KẾT & SLOGAN DƯỚI CÙNG */
.cart-bottom-trust-bar {
    background: #ffffff;
    border: 1px solid #dce8db;
    border-radius: 16px;
    padding: 16px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(22, 65, 36, 0.03);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trust-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eef6ec;
    border: 1px solid #d3e5cf;
    color: #205c33;
    font-size: 17px;
}

.trust-text b {
    display: block;
    font-size: 13px;
    color: #173d27;
}

.trust-text small {
    font-size: 11px;
    color: #637768;
}

.trust-slogan-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trust-leaf-icon {
    font-size: 28px;
    color: #2d7741;
}

.trust-brand-script {
    font-family: "Be Vietnam Pro", Arial, sans-serif;
    font-style: italic;
    font-size: 19px;
    color: #143e26;
    margin: 0;
    font-weight: 700;
}

.trust-brand-sub {
    font-family: "Be Vietnam Pro", Arial, sans-serif;
    font-style: italic;
    font-size: 12px;
    color: #4f6857;
    margin: 0;
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
    .cart-checkout-grid {
        grid-template-columns: 1fr;
    }

    .cart-bottom-trust-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}

@media (max-width: 600px) {
    .cart-banner {
        height: 180px;
    }

    .cart-banner-title {
        font-size: 30px;
    }

    .cart-banner-subtitle {
        font-size: 14px;
    }

    .form-row, .form-row-3 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .checkout-form-card, .order-summary-card {
        padding: 20px 16px;
    }
}
