/* styles.css */

:root {
    --page-bg: #f4f4f4;
    --text-color: #333333;
    --header-bg: #6f4e37;
    --hero-overlay: rgba(0, 0, 0, 0.4);
    --item-bg: #f4f4f4;
    --section-bg: #ffffff;
    --footer-bg: #6f4e37;
    --nav-link: #ffffff;
    --dropdown-bg: #ffffff;
    --dropdown-text: #6f4e37;
    --accent-color: #6f4e37;
    --dropdown-hover: rgba(0, 0, 0, 0.05);
    --pagination-border: rgba(0, 0, 0, 0.2);
    --pagination-bg: rgba(255, 255, 255, 0.65);
    --pagination-text: #333333;
}

[data-theme="dark"] {
    --page-bg: #131313;
    --text-color: #f5f5f5;
    --header-bg: #2a1b14;
    --hero-overlay: rgba(0, 0, 0, 0.6);
    --item-bg: #1f1f1f;
    --section-bg: #1b1b1b;
    --footer-bg: #2a1b14;
    --nav-link: #f5f5f5;
    --dropdown-bg: #1f1f1f;
    --dropdown-text: #f5f5f5;
    --accent-color: #f1a559;
    --dropdown-hover: rgba(255, 255, 255, 0.08);
    --pagination-border: rgba(255, 255, 255, 0.4);
    --pagination-bg: rgba(255, 255, 255, 0.1);
    --pagination-text: #f5f5f5;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--page-bg);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--header-bg);
    color: var(--nav-link);
    padding: 20px 0;
}

header h1 {
    margin: 0;
    font-size: 2em;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

header nav li {
    margin: 0 15px;
    position: relative;
}   

header nav a {
    color: var(--nav-link);
    text-decoration: none;
    font-weight: bold;
}

/* .has-dropdown .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: var(--dropdown-bg);
    color: var(--dropdown-text);
    padding: 0;
    margin: 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    list-style: none;
    z-index: 10;
}

.has-dropdown:hover .dropdown {
    display: block;
}

.has-dropdown .dropdown li {
    margin: 0;
}

.has-dropdown .dropdown a {
    display: block;
    padding: 10px 15px;
    color: var(--dropdown-text);
    font-weight: normal;
}

.has-dropdown .dropdown a:hover {
    background-color: var(--dropdown-hover);
} */

.nav-search {
    float: none;
    margin-left: auto;
}

.nav-search-form {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 6px 10px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    min-height: 40px;
}

.nav-search-form input {
    background: transparent;
    border: 1px solid transparent;
    width: 120px;
    font-size: 0.9rem;
    color: var(--nav-link);
    transition: border 0.3s ease;
    height: 28px;
    line-height: 1;
}

.nav-search-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.nav-search-form input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
}

.nav-search-form button {
    background: var(--header-bg);
    color: var(--nav-link);
    border-radius: 999px;
    border: none;
    padding: 4px 10px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
}

.hero {
    background-color: #A67B5B;

    background-image:
        linear-gradient(var(--hero-overlay), var(--hero-overlay)),
        url('https://images.unsplash.com/photo-1509042239860-f550ce710b93?auto=format&fit=crop&w=1600&q=80');

    background-size: cover;      /* QUAN TRỌNG */
    background-position: center; /* Căn giữa */
    background-repeat: no-repeat;
    /* background-size: auto 500%; */
    color: white;
    text-align: center;

    padding: 100px 10px;
    min-height: 50px;  /* nên tăng lên */
}

.hero h2 {
    font-size: 3em;
    margin: 0;
}

.hero p {
    font-size: 1.5em;
}
#menu {
    padding: 50px 0;
    background-color: var(--section-bg);
}

#menu h2 {
    text-align: center;
    margin-bottom: 30px;
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.item {
    background-color: var(--item-bg);
    padding: 20px;
    text-align: left;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
    min-height: 200px;
}

.item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-color: var(--accent-color);
}

.item-detail {
    margin-top: 20px;
    background-color: var(--section-bg);
    color: var(--text-color);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    text-align: left;
}

.item-detail h3 {
    margin-top: 0;
    font-size: 1.5rem;
}

.item-detail a {
    color: var(--accent-color);
    font-weight: bold;
    text-decoration: none;
}

.item-price {
    display: inline-block;
    margin-top: 12px;
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1rem;
}

.item-detail-notes {
    font-style: italic;
    opacity: 0.85;
    margin-bottom: 0.75rem;
}

.item-detail-price {
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.menu-pagination {
    margin: 25px auto 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.menu-pagination button {
    border: 1px solid var(--pagination-border);
    background-color: var(--pagination-bg);
    color: var(--pagination-text);
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    min-width: 120px;
}

.menu-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: rgba(255, 255, 255, 0.05);
}

.menu-pagination span {
    font-weight: bold;
    color: var(--text-color);
}

.error {
    color: #ff9a9a;
}

.item h3 {
    margin: 0 0 10px;
}

.item span {
    display: block;
    font-weight: bold;
    color: var(--accent-color);
}

#about {
    padding: 50px 0;
    background-color: var(--section-bg);
    text-align: center;
}

#contact {
    padding: 50px 0;
    background-color: var(--section-bg);
}

#contact form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
}

#contact input, #contact textarea {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#contact button {
    background-color: var(--header-bg);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
}

#search {
    padding: 60px 0;
    background-color: var(--section-bg);
    text-align: center;
}

.search-bar {
    margin: 20px auto 0;
    max-width: 600px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.search-bar input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid #ccc;
    font-size: 1rem;
    background-color: var(--item-bg);
    color: var(--text-color);
    transition: border-color 0.2s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.search-bar button {
    padding: 12px 24px;
    border-radius: 999px;
    border: none;
    background-color: var(--header-bg);
    color: white;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

footer {
    background-color: var(--footer-bg);
    color: white;
    text-align: center;
    padding: 20px 0;
}

#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--section-bg);
    color: var(--text-color);
    border: 1px solid var(--dropdown-text);
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, background-color 0.3s ease, color 0.3s ease;
    z-index: 20;
}

#theme-toggle:hover {
    transform: translateY(-2px);
}

#theme-toggle:focus-visible {
    outline: 3px solid #ffc107;
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header nav ul {
        flex-direction: column;
    }

    header nav li {
        margin: 10px 0;
    }

    .menu-items {
        flex-direction: column;
        align-items: center;
    }

    .item {
        width: 80%;
    }

    .hero {
        padding: 50px 0;
    }

    .hero h2 {
        font-size: 2em;
    }

    .hero p {
        font-size: 1.2em;
    }
}
