/* สไตล์สำหรับหน้าข้อมูลส่วนตัว */
.profile-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

/* สไตล์สำหรับแท็บเมนู */
.profile-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    background-color: #f8f8f8;
}

.tab-button {
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    color: #FF8C00;
}

.tab-button.active {
    color: #FF8C00;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #FF8C00;
}

/* สไตล์สำหรับเนื้อหาแท็บ */
.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* สไตล์สำหรับฟอร์ม */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border 0.3s ease;
}

.form-group input:focus {
    border-color: #FF8C00;
    outline: none;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input {
    width: auto;
    margin-right: 10px;
}

.checkbox-group label {
    margin-bottom: 0;
}

.btn {
    background-color: #FF8C00;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #8B4513;
}

/* สไตล์สำหรับส่วนเปลี่ยนรหัสผ่าน */
.password-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* สไตล์สำหรับที่อยู่ */
#address-list {
    margin-bottom: 20px;
}

.address-card {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.address-card.default {
    border: 2px solid #FF8C00;
}

.default-badge {
    background-color: #FF8C00;
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    position: absolute;
    top: 10px;
    right: 10px;
}

.address-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.edit-address, .delete-address {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.edit-address {
    color: #3498db;
}

.delete-address {
    color: #e74c3c;
}

/* สไตล์สำหรับโมดัล */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

/* สไตล์สำหรับประวัติการสั่งซื้อ */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.order-number {
    font-weight: bold;
    font-size: 18px;
}

.order-status {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.status-pending {
    background-color: #f1c40f;
    color: #7d6608;
}

.status-processing {
    background-color: #3498db;
    color: white;
}

.status-shipped {
    background-color: #2ecc71;
    color: white;
}

.status-delivered {
    background-color: #27ae60;
    color: white;
}

.status-cancelled {
    background-color: #e74c3c;
    color: white;
}

.order-detail {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
}

.order-detail-label {
    color: #666;
}

.order-items {
    font-size: 14px;
    color: #333;
}

/* สไตล์สำหรับข้อความแจ้งเตือน */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    display: none;
}

.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

/* สไตล์สำหรับการแสดงผลบนมือถือ */
@media screen and (max-width: 768px) {
    .profile-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #eee;
    }
    
    .tab-button.active::after {
        display: none;
    }
    
    .tab-button.active {
        background-color: #fff3e6;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .order-header {
        flex-direction: column;
        gap: 10px;
    }
}
/* แก้ไขสไตล์สำหรับโมดัล */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh; /* จำกัดความสูงไม่เกิน 90% ของจอภาพ */
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow-y: auto; /* เพิ่ม scroll bar ในแนวตั้งเมื่อเนื้อหายาวเกินไป */
}

/* ทำให้ปุ่ม "บันทึกที่อยู่" เด่นชัดและอยู่ด้านล่างเสมอ */
#save-address {
    margin-top: 15px;
    display: block;
    width: 100%;
    background-color: #FF8C00;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

/* แก้ไขการแสดงผลบนมือถือ */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 85vh;
        padding: 15px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    .form-group input {
        padding: 10px;
    }
}
/* จัดการกับแถวของฟอร์ม */
.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.form-row .form-group {
    flex: 1;
}

/* แสดงเครื่องหมายบังคับ (*) ให้ชัดเจน */
label[for] {
    display: inline-block;
    margin-bottom: 5px;
}

/* เพิ่มสไตล์สำหรับปุ่มปิด */
.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #888;
}

.close-modal:hover {
    color: #333;
}
/* ปรับปรุงโมดัลให้มีความกระชับมากขึ้น */
.modal-content {
    padding: 15px;
    margin: 0;
    max-height: 80vh; /* ลดความสูงลงเล็กน้อย */
    overflow-y: auto;
    position: relative;
}

/* ปรับปรุงขนาดฟอนต์และระยะห่างให้กระชับขึ้น */
.modal-content h3 {
    font-size: 18px;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-content .form-group {
    margin-bottom: 10px; /* ลดระยะห่างระหว่างฟิลด์ */
}

.modal-content label {
    font-size: 14px;
    margin-bottom: 4px;
}

.modal-content input {
    padding: 8px 10px;
    font-size: 14px;
}

/* ปรับปรุงขนาดปุ่มบันทึก */
#save-address {
    margin-top: 12px;
    padding: 10px;
}

/* ควบคุมการเลื่อนของหน้าจอ */
.modal {
    overflow-y: hidden; /* ป้องกันการเลื่อนหน้าหลัก */
    display: flex;
    align-items: flex-start; /* เปลี่ยนจาก center เป็น flex-start */
    padding-top: 5vh; /* เพิ่มระยะห่างด้านบน */
}

/* แก้ไขการแสดงผลบนมือถือให้เหมาะสมมากขึ้น */
@media screen and (max-width: 768px) {
    .modal {
        padding-top: 2vh; /* ลดระยะห่างด้านบนบนมือถือ */
    }
    
    .modal-content {
        max-height: 88vh; /* เพิ่มความสูงเล็กน้อยบนมือถือ */
        width: 92%;
    }
    
    .form-row {
        flex-direction: column; /* บนมือถือให้แสดงฟิลด์เป็นแนวตั้ง */
        gap: 5px;
    }
    
    .modal-content .form-group {
        margin-bottom: 8px; /* ลดระยะห่างให้มากขึ้นบนมือถือ */
    }
}
/* ปรับขนาดความสูงของฟิลด์ให้พอดี */
.modal-content .form-group input {
    height: 36px; /* กำหนดความสูงที่แน่นอน */
    box-sizing: border-box; /* รวมขอบและ padding เข้าไปในความสูง */
}

/* กำหนดความสูงของโมดัลให้ชัดเจน */
.modal .modal-content {
    max-height: 550px; /* ความสูงสูงสุดที่แน่นอน (อาจต้องปรับตามขนาดจอ) */
    overflow-y: auto;
}

/* เพิ่มพื้นที่ว่างด้านล่าง */
.modal .address-form {
    padding-bottom: 10px;
}
/* สไตล์สำหรับการ์ดที่อยู่ */
.address-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    border: 1px solid #eee;
    transition: transform 0.2s, box-shadow 0.2s;
}

.address-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.address-card h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
}

.address-card p {
    margin: 6px 0;
    color: #555;
    line-height: 1.5;
}

.default-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #2ecc71;
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}
/* สไตล์สำหรับปุ่มในการ์ดที่อยู่ */
.address-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.edit-address-btn, .delete-address-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.edit-address-btn {
    background-color: #3498db;
    color: white;
}

.edit-address-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.delete-address-btn {
    background-color: #e74c3c;
    color: white;
}

.delete-address-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ปรับขนาดไอคอน */
.edit-address-btn i, .delete-address-btn i {
    margin-right: 6px;
    font-size: 14px;
}

/* สไตล์สำหรับโทรศัพท์มือถือ */
@media (max-width: 768px) {
    .address-actions {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    
    .edit-address-btn, .delete-address-btn {
        flex: 1;
    }
}
/* สไตล์สำหรับหน้าข้อมูลส่วนตัว */
.profile-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

/* สไตล์สำหรับแท็บเมนู */
.profile-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    background-color: #f8f8f8;
}

.tab-button {
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:hover {
    color: #FF8C00;
}

.tab-button.active {
    color: #FF8C00;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #FF8C00;
}

/* สไตล์สำหรับเนื้อหาแท็บ */
.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* สไตล์สำหรับฟอร์ม */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border 0.3s ease;
}

.form-group input:focus {
    border-color: #FF8C00;
    outline: none;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input {
    width: auto;
    margin-right: 10px;
}

.checkbox-group label {
    margin-bottom: 0;
}

.btn {
    background-color: #FF8C00;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #8B4513;
}

/* สไตล์สำหรับส่วนเปลี่ยนรหัสผ่าน */
.password-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* สไตล์สำหรับที่อยู่ */
#address-list {
    margin-bottom: 20px;
}

.address-card {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.address-card.default {
    border: 2px solid #FF8C00;
}

.default-badge {
    background-color: #FF8C00;
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    position: absolute;
    top: 10px;
    right: 10px;
}

.address-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.edit-address, .delete-address {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.edit-address {
    color: #3498db;
}

.delete-address {
    color: #e74c3c;
}

/* สไตล์สำหรับโมดัล */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

/* สไตล์สำหรับประวัติการสั่งซื้อ */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.order-number {
    font-weight: bold;
    font-size: 18px;
}

.order-status {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.status-pending {
    background-color: #f1c40f;
    color: #7d6608;
}

.status-processing {
    background-color: #3498db;
    color: white;
}

.status-shipped {
    background-color: #2ecc71;
    color: white;
}

.status-delivered {
    background-color: #27ae60;
    color: white;
}

.status-cancelled {
    background-color: #e74c3c;
    color: white;
}

.order-detail {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
}

.order-detail-label {
    color: #666;
}

.order-items {
    font-size: 14px;
    color: #333;
}

/* สไตล์สำหรับข้อความแจ้งเตือน */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    display: none;
}

.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

/* สไตล์สำหรับการแสดงผลบนมือถือ */
@media screen and (max-width: 768px) {
    .profile-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #eee;
    }
    
    .tab-button.active::after {
        display: none;
    }
    
    .tab-button.active {
        background-color: #fff3e6;
    }
    
    .tab-content {
        padding: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .order-header {
        flex-direction: column;
        gap: 10px;
    }
}
/* แก้ไขสไตล์สำหรับโมดัล */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh; /* จำกัดความสูงไม่เกิน 90% ของจอภาพ */
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow-y: auto; /* เพิ่ม scroll bar ในแนวตั้งเมื่อเนื้อหายาวเกินไป */
}

/* ทำให้ปุ่ม "บันทึกที่อยู่" เด่นชัดและอยู่ด้านล่างเสมอ */
#save-address {
    margin-top: 15px;
    display: block;
    width: 100%;
    background-color: #FF8C00;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

/* แก้ไขการแสดงผลบนมือถือ */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 85vh;
        padding: 15px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    .form-group input {
        padding: 10px;
    }
}
/* จัดการกับแถวของฟอร์ม */
.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.form-row .form-group {
    flex: 1;
}

/* แสดงเครื่องหมายบังคับ (*) ให้ชัดเจน */
label[for] {
    display: inline-block;
    margin-bottom: 5px;
}

/* เพิ่มสไตล์สำหรับปุ่มปิด */
.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #888;
}

.close-modal:hover {
    color: #333;
}
/* ปรับปรุงโมดัลให้มีความกระชับมากขึ้น */
.modal-content {
    padding: 15px;
    margin: 0;
    max-height: 80vh; /* ลดความสูงลงเล็กน้อย */
    overflow-y: auto;
    position: relative;
}

/* ปรับปรุงขนาดฟอนต์และระยะห่างให้กระชับขึ้น */
.modal-content h3 {
    font-size: 18px;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-content .form-group {
    margin-bottom: 10px; /* ลดระยะห่างระหว่างฟิลด์ */
}

.modal-content label {
    font-size: 14px;
    margin-bottom: 4px;
}

.modal-content input {
    padding: 8px 10px;
    font-size: 14px;
}

/* ปรับปรุงขนาดปุ่มบันทึก */
#save-address {
    margin-top: 12px;
    padding: 10px;
}

/* ควบคุมการเลื่อนของหน้าจอ */
.modal {
    overflow-y: hidden; /* ป้องกันการเลื่อนหน้าหลัก */
    display: flex;
    align-items: flex-start; /* เปลี่ยนจาก center เป็น flex-start */
    padding-top: 5vh; /* เพิ่มระยะห่างด้านบน */
}

/* แก้ไขการแสดงผลบนมือถือให้เหมาะสมมากขึ้น */
@media screen and (max-width: 768px) {
    .modal {
        padding-top: 2vh; /* ลดระยะห่างด้านบนบนมือถือ */
    }
    
    .modal-content {
        max-height: 88vh; /* เพิ่มความสูงเล็กน้อยบนมือถือ */
        width: 92%;
    }
    
    .form-row {
        flex-direction: column; /* บนมือถือให้แสดงฟิลด์เป็นแนวตั้ง */
        gap: 5px;
    }
    
    .modal-content .form-group {
        margin-bottom: 8px; /* ลดระยะห่างให้มากขึ้นบนมือถือ */
    }
}
/* ปรับขนาดความสูงของฟิลด์ให้พอดี */
.modal-content .form-group input {
    height: 36px; /* กำหนดความสูงที่แน่นอน */
    box-sizing: border-box; /* รวมขอบและ padding เข้าไปในความสูง */
}

/* กำหนดความสูงของโมดัลให้ชัดเจน */
.modal .modal-content {
    max-height: 550px; /* ความสูงสูงสุดที่แน่นอน (อาจต้องปรับตามขนาดจอ) */
    overflow-y: auto;
}

/* เพิ่มพื้นที่ว่างด้านล่าง */
.modal .address-form {
    padding-bottom: 10px;
}
/* สไตล์สำหรับการ์ดที่อยู่ */
.address-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    border: 1px solid #eee;
    transition: transform 0.2s, box-shadow 0.2s;
}

.address-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.address-card h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
}

.address-card p {
    margin: 6px 0;
    color: #555;
    line-height: 1.5;
}

.default-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #2ecc71;
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}
/* สไตล์สำหรับปุ่มในการ์ดที่อยู่ */
.address-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.edit-address-btn, .delete-address-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.edit-address-btn {
    background-color: #3498db;
    color: white;
}

.edit-address-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.delete-address-btn {
    background-color: #e74c3c;
    color: white;
}

.delete-address-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ปรับขนาดไอคอน */
.edit-address-btn i, .delete-address-btn i {
    margin-right: 6px;
    font-size: 14px;
}

/* สไตล์สำหรับโทรศัพท์มือถือ */
@media (max-width: 768px) {
    .address-actions {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    
    .edit-address-btn, .delete-address-btn {
        flex: 1;
    }
}

/* สไตล์สำหรับโมดัลยืนยันการลบ */
.confirm-modal {
    max-width: 450px;
    border-radius: 8px;
    border-top: 5px solid #e74c3c;
}

.confirm-title {
    color: #e74c3c;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    font-size: 1.3rem;
}

.confirm-title i {
    color: #e74c3c;
}

.confirm-message {
    margin: 20px 0;
    line-height: 1.5;
}

.confirm-message p {
    margin: 5px 0;
}

.confirm-address-details {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 3px solid #e74c3c;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.close-confirm-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #888;
    cursor: pointer;
}

.close-confirm-modal:hover {
    color: #333;
}

/* สไตล์สำหรับข้อความเตือน */
.warning-text {
    color: #e74c3c;
    font-weight: 500;
}
/* สไตล์สำหรับโมดัล - กำหนดให้ซ่อนไว้เป็นค่าเริ่มต้น */
.modal {
    display: none; /* เปลี่ยนจาก flex เป็น none */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

/* เพิ่มคลาสใหม่สำหรับควบคุมการแสดงโมดัล */
.modal.show {
    display: flex; /* แสดงเป็น flex เมื่อมีคลาส show */
    justify-content: center;
    align-items: flex-start;
    padding-top: 5vh;
    overflow-y: hidden;
}
