/* =========================================================
   1. GLOBAL & RESET
   ========================================================= */
* {
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    margin: 0;
    padding: 0;
    /* Cấu hình Flexbox để Footer luôn ở dưới cùng */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html {
    height: 100%;
}

/* Đảm bảo Main Content chiếm hết không gian giữa Header và Footer */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

/* =========================================================
   2. HEADER (ĐÃ ĐỒNG BỘ HOÀN TOÀN VỚI STYLE1.CSS VÀ LOGIN.CSS)
   ========================================================= */
#header {
    background-color: #fff;
    padding: 5px 0;
    border-top: 30px solid #0B3D2E;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    position: relative;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.logo img {
    height: 60px;
    width: auto;
}

.navbar-menu,
.user-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.navbar-nav .nav-link {
    text-decoration: none;
    color: #388e3c !important;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: #e8f5e9;
    color: #388e3c !important;
}

/* Search bar */
.search-bar input {
    padding: 6px;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 200px;
}

.search-bar button {
    /* FIX: Màu nút 'Tìm' theo style1.css (Màu solid) */
    background-color: #388e3c;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 6px 10px;
    cursor: pointer;
}

.search-bar button:hover {
    background-color: #2c6f3b; /* Màu hover theo style1.css */
}

/* Tùy chọn người dùng (Giỏ hàng, Đăng nhập, Đăng ký) */
.user-options {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-options .nav-item {
    list-style-type: none;
    padding: 5px;
}

/* Styles cho Đăng nhập / Đăng ký (Nền tối) */
.user-options .nav-link {
    text-decoration: none;
    color: white;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 5px;
    background-color: #0b3d2e; /* Xanh đậm solid */
    transition: all 0.3s ease;
}

/* FIX: Sửa hover cho nút Đăng nhập/Đăng ký */
.user-options .nav-link:hover {
    background-color: #0b3d2e;
    opacity: 0.9;
    color: white !important; /* Đảm bảo chữ vẫn là màu trắng */
}

/* FIX: Style cho nút Giỏ hàng (Viền xanh, nền trắng) - Giả định class là .cart-button */
.user-options .cart-button {
    background-color: #fff;
    border: 1px solid #388e3c;
    color: #388e3c; /* Màu icon/chữ xanh lá */
    padding: 6px 10px;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-options .cart-button:hover {
    background-color: #e8f5e9;
}

/* Dropdown User */
.user-dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.user-name {
    color: #0b3d2e;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.user-name:hover {
    background-color: #e8f5e9;
}

/* Menu xổ xuống */
.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    width: 180px;
    display: none;
    padding: 8px 0;
    z-index: 999;
    border: 1px solid #eee;
    margin-top: 5px;
}

.user-menu a,
.user-menu button {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    font-size: 14px;
    color: #0b3d2e;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.user-menu a:hover,
.user-menu button:hover {
    background-color: #e8f5e9;
}

/* Hiển thị menu khi hover */
.user-dropdown:hover .user-menu {
    display: block;
}


/* =========================================================
   3. REGISTER FORM CORE STYLES (Phần này được giữ nguyên)
   ========================================================= */
.register-form-container {
    width: 100%;
    max-width: 550px;
    background: #ffffff;
    padding: 40px 50px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(11, 61, 46, 0.1);
    border: 1px solid rgba(11, 61, 46, 0.05);
}

.form-main-title {
    text-align: center;
    font-size: 30px;
    font-weight: 700;
    color: #0b3d2e;
    margin: 0 0 5px 0;
    letter-spacing: -0.5px;
}

.form-subtitle {
    text-align: center;
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 25px;
    padding-bottom: 10px;
}

/* Alert/Error Message */
.alert.alert-danger {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    display: block;
    text-align: center;
}

/* Form Section */
.form-section {
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.section-heading {
    font-size: 18px;
    font-weight: 700;
    color: #0b3d2e;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-heading::before {
    content: "";
    width: 5px;
    height: 20px;
    background: linear-gradient(180deg, #0b3d2e 0%, #388e3c 100%);
    border-radius: 3px;
}

/* Input Group */
.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.input-group input {
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background-color: #fafbfc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    color: #333;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #388e3c;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(56, 142, 60, 0.1);
}


/* =========================================================
   4. BUTTONS & ACTIONS
   ========================================================= */
.button-group {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.button-group a,
.button-group button {
    flex: 1;
}

/* Base button style */
.btn {
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    box-sizing: border-box;
}

/* Nút chính (Đăng ký/Tiếp theo) - Tăng kích thước và độ nổi bật */
.btn-primary {
    color: white;
    background: linear-gradient(135deg, #0b3d2e 0%, #388e3c 100%);
    padding: 16px 25px;
    font-size: 18px;
    box-shadow: 0 4px 18px rgba(11, 61, 46, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(11, 61, 46, 0.4);
}

/* Tăng kích thước và áp dụng phong cách đồng bộ cho lớp Submit-btn (dùng cho form 1 cột) */
.submit-btn {
    width: 100%;
    color: white;
    background: linear-gradient(135deg, #0b3d2e 0%, #388e3c 100%);
    box-shadow: 0 4px 18px rgba(11, 61, 46, 0.3);
    padding: 16px 25px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(11, 61, 46, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Nút phụ */
.btn-secondary {
    color: #0b3d2e;
    background-color: #e8f5e9;
    border: 2px solid #0b3d2e;
}

.btn-secondary:hover {
    background-color: #c8e6c9;
    transform: translateY(-2px);
}

/* Login Link */
.login-prompt {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.login-link {
    color: #388e3c;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-link:hover {
    color: #0b3d2e;
    text-decoration: underline;
}


/* =========================================================
   5. FOOTER (ĐÃ ĐỒNG BỘ HOÀN TOÀN VỚI STYLE1.CSS VÀ LOGIN.CSS)
   ========================================================= */
#footer {
    background: linear-gradient(135deg, #0B3D2E 0%, seagreen 100%);
    color: #fff;
    padding: 15px 10px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1300px;
    margin: 0 auto 20px auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 120px;
}

.footer-about-text {
    text-align: justify;
}


.footer-column {
    text-align: left;
}

.footer-column h4 {
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column p,
.footer-column ul li a {
    font-size: 0.75rem;
    line-height: 1.4;
    color: #fff;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 6px;
}

.footer-column ul li a:hover {
    color: #ffd700 !important;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    font-size: 0.75rem;
}

.contact-info i {
    font-size: 1rem;
    color: #ffd700;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 10px;
    text-align: center;
    font-size: 0.7rem;
    opacity: 0.8;
}


/*Cột 2&3*/
.footer-contact {
    display: flex;
    flex-direction: column;
    height: 130px; /* điều chỉnh để các dòng cách đều */
    justify-content: space-between;
}

.footer-contact .contact-hours {
    margin: 0;
    color: #ccc;
    font-size: 14px;
}

.footer-contact .contact-info,
.footer-contact .contact-info a {
    display: flex;
    align-items: center;  /* căn icon + text theo chiều dọc */
    gap: 6px;             /* khoảng cách icon và text */
    color: #ccc;
    font-size: 14px;
    text-decoration: none;
}

.footer-contact .contact-info a:hover {
    color: #ccc;
}


.footer-contact .contact-icon {
    width: 30px; /* kích thước icon */
    height: 30px;
    margin-right: 6px; /* khoảng cách giữa icon và text */
}

.footer-contact .contact-info,
.footer-contact .contact-info a {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 14px;
    color: #ccc;           /* màu giống các dòng khác */
    text-decoration: none;  /* bỏ gạch chân */
}

.footer-contact .contact-info a:hover {
    color: #ccc;           /* hover cũng giữ màu đồng bộ */
}


/* =========================================================
   6. RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    /* Form */
    .register-form-container {
        max-width: 100%;
        padding: 30px 20px;
    }

    .button-group {
        flex-direction: column;
    }

    /* Footer */
    #footer {
        padding: 20px 10px;
    }

    .footer-content {
        grid-template-columns: 1fr; /* Chuyển footer thành 1 cột */
        gap: 30px;
        text-align: center;
    }

    .footer-column {
        text-align: center;
    }

    .footer-about-text {
        text-align: center;
    }

    .contact-info {
        justify-content: center; /* Căn giữa các mục liên hệ */
    }
}