/* === Reset & Base === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #333; background: #fafafa; line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { color: #6b4226; text-decoration: none; }
a:hover { color: #d4a574; }

/* === Header === */
.header { background: #2c1810; color: #fff; padding: 15px 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { width: 40px; height: 40px; }
.logo-text { font-size: 1.4em; font-weight: 700; color: #d4a574; }
.nav { display: flex; gap: 20px; align-items: center; }
.nav a { color: #ccc; font-size: 0.95em; transition: color 0.2s; }
.nav a:hover { color: #d4a574; }
.admin-link { background: #d4a574; color: #2c1810 !important; padding: 6px 14px; border-radius: 20px; font-weight: 600; }

/* === Banner === */
.banner { background: linear-gradient(135deg, #2c1810 0%, #4a2c1a 50%, #6b4226 100%); min-height: 400px; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.banner::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(212,165,116,0.1) 0%, transparent 70%); animation: pulse 4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.banner-content { position: relative; z-index: 2; color: #fff; }
.banner-content h1 { font-size: 3.5em; margin-bottom: 15px; text-shadow: 0 2px 20px rgba(0,0,0,0.5); }
.banner-content p { font-size: 1.3em; color: #d4a574; margin-bottom: 30px; }
.btn-primary { display: inline-block; background: #d4a574; color: #2c1810; padding: 14px 36px; border-radius: 30px; font-size: 1.1em; font-weight: 700; border: none; cursor: pointer; transition: all 0.3s; text-decoration: none; }
.btn-primary:hover { background: #e8c49a; transform: translateY(-2px); box-shadow: 0 5px 20px rgba(212,165,116,0.4); }

/* === Sections === */
.section { padding: 60px 0; }
.section-title { text-align: center; font-size: 2em; margin-bottom: 40px; color: #2c1810; }

/* === Category Tabs === */
.category-tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.tab { padding: 8px 20px; border: 2px solid #d4a574; border-radius: 25px; background: transparent; color: #6b4226; cursor: pointer; font-size: 0.95em; transition: all 0.2s; }
.tab.active, .tab:hover { background: #d4a574; color: #2c1810; font-weight: 600; }

/* === Product Grid === */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; }
.product-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(0,0,0,0.15); }
.product-img { width: 100%; height: 180px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f5e6d3, #e8d5c0); }
.product-img img { width: 100px; height: 100px; }
.product-info { padding: 20px; }
.product-name { font-size: 1.2em; font-weight: 700; color: #2c1810; }
.product-name-en { font-size: 0.8em; color: #999; margin-bottom: 8px; }
.product-desc { font-size: 0.9em; color: #666; margin-bottom: 12px; }
.product-bottom { display: flex; justify-content: space-between; align-items: center; }
.product-price { font-size: 1.3em; font-weight: 700; color: #d4a574; }
.btn-add { background: #2c1810; color: #d4a574; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-weight: 600; transition: all 0.2s; }
.btn-add:hover { background: #4a2c1a; transform: scale(1.05); }

/* === Cart === */
.cart-section { background: #f0e6dc; padding: 40px 0; }
.cart-items { margin-bottom: 20px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 15px 20px; border-radius: 10px; margin-bottom: 10px; }
.cart-item-name { font-weight: 600; }
.cart-item-qty { display: flex; align-items: center; gap: 10px; }
.cart-item-qty button { width: 30px; height: 30px; border-radius: 50%; border: none; background: #d4a574; color: #2c1810; font-size: 1.2em; cursor: pointer; font-weight: 700; }
.cart-total { text-align: right; font-size: 1.4em; font-weight: 700; color: #2c1810; margin-bottom: 20px; }
.order-form { max-width: 600px; margin: 0 auto; }
.form-row { display: flex; gap: 15px; margin-bottom: 15px; }
.form-row input { flex: 1; padding: 12px 16px; border: 2px solid #ddd; border-radius: 10px; font-size: 1em; }
.form-row input:focus { outline: none; border-color: #d4a574; }
.btn-submit { width: 100%; padding: 16px; font-size: 1.1em; }

/* === About === */
.about-section { background: #fff; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.about-card { text-align: center; padding: 30px; border-radius: 16px; background: #faf5f0; transition: transform 0.3s; }
.about-card:hover { transform: translateY(-5px); }
.about-icon { font-size: 3em; margin-bottom: 15px; }
.about-card h3 { color: #2c1810; margin-bottom: 10px; }
.about-card p { color: #666; }

/* === Contact === */
.contact-section { background: #f0e6dc; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.contact-card { background: #fff; padding: 30px; border-radius: 16px; text-align: center; }
.contact-card h3 { margin-bottom: 10px; color: #2c1810; }
.external-links { display: flex; flex-direction: column; gap: 8px; }
.external-links a { color: #6b4226; font-weight: 500; }
.external-links a:hover { color: #d4a574; }

/* === Footer === */
.footer { background: #2c1810; color: #999; text-align: center; padding: 30px 0; }
.footer-links { margin-top: 10px; }
.footer-links a { color: #d4a574; }

/* === Modal === */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: #fff; padding: 40px; border-radius: 20px; text-align: center; max-width: 400px; }
.modal-icon { font-size: 4em; margin-bottom: 15px; }
.modal-content h2 { color: #2c1810; margin-bottom: 10px; }
.modal-content p { color: #666; margin-bottom: 10px; }
.modal-content .btn-primary { margin-top: 20px; }

/* === Admin Styles === */
.admin-body { background: #f5f5f5; }
.admin-header { background: #2c1810; color: #fff; padding: 15px 0; }
.admin-header .container { display: flex; justify-content: space-between; align-items: center; }
.admin-main { padding: 30px 0; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: #fff; padding: 25px; border-radius: 12px; display: flex; align-items: center; gap: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.stat-icon { font-size: 2.5em; }
.stat-value { font-size: 1.8em; font-weight: 700; color: #2c1810; }
.stat-label { color: #999; font-size: 0.9em; }

.table-section { background: #fff; border-radius: 12px; padding: 25px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.table-header h2 { color: #2c1810; }
.table-actions { display: flex; gap: 10px; align-items: center; }
.table-actions select { padding: 8px 12px; border: 2px solid #ddd; border-radius: 8px; }
.btn-refresh { padding: 8px 16px; background: #d4a574; color: #2c1810; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; }
.btn-refresh:hover { background: #e8c49a; }

.table-wrapper { overflow-x: auto; }
.orders-table { width: 100%; border-collapse: collapse; }
.orders-table th { background: #f5f0eb; padding: 12px 15px; text-align: left; font-weight: 600; color: #2c1810; border-bottom: 2px solid #e0d5ca; }
.orders-table td { padding: 12px 15px; border-bottom: 1px solid #eee; }
.orders-table tr:hover { background: #faf5f0; }

.status-badge { padding: 4px 12px; border-radius: 15px; font-size: 0.85em; font-weight: 600; }
.status-pending { background: #fff3cd; color: #856404; }
.status-processing { background: #cce5ff; color: #004085; }
.status-completed { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }

.action-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.action-btns button { padding: 4px 10px; border: none; border-radius: 6px; cursor: pointer; font-size: 0.8em; font-weight: 600; }
.btn-process { background: #cce5ff; color: #004085; }
.btn-complete { background: #d4edda; color: #155724; }
.btn-cancel { background: #f8d7da; color: #721c24; }

.no-data { text-align: center; padding: 40px; color: #999; font-size: 1.1em; }

/* === Responsive === */
@media (max-width: 768px) {
    .banner-content h1 { font-size: 2em; }
    .form-row { flex-direction: column; }
    .nav { gap: 10px; font-size: 0.85em; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .orders-table { font-size: 0.85em; }
}

/* === Login Page === */
.login-body { background: linear-gradient(135deg, #2c1810 0%, #4a2c1a 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-container { width: 100%; max-width: 400px; padding: 20px; }
.login-box { background: #fff; border-radius: 20px; padding: 40px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.login-header { text-align: center; margin-bottom: 30px; }
.login-logo { width: 60px; height: 60px; margin-bottom: 15px; }
.login-header h1 { color: #2c1810; font-size: 1.5em; margin-bottom: 5px; }
.login-header p { color: #999; font-size: 0.9em; }
.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: block; margin-bottom: 8px; color: #2c1810; font-weight: 600; }
.login-form input { width: 100%; padding: 12px 16px; border: 2px solid #ddd; border-radius: 10px; font-size: 1em; }
.login-form input:focus { outline: none; border-color: #d4a574; }
.error-msg { background: #f8d7da; color: #721c24; padding: 10px; border-radius: 8px; margin-bottom: 15px; font-size: 0.9em; }
.btn-login { width: 100%; padding: 14px; background: #d4a574; color: #2c1810; border: none; border-radius: 10px; font-size: 1.1em; font-weight: 700; cursor: pointer; transition: all 0.3s; }
.btn-login:hover { background: #e8c49a; }
.login-footer { text-align: center; margin-top: 20px; }
.login-footer a { color: #6b4226; }
.logout-link { color: #ff6b6b !important; }

/* === Order Status Page === */
.order-status-page { padding: 40px 0; min-height: 60vh; }
.order-header { text-align: center; margin-bottom: 40px; }
.order-header h1 { color: #2c1810; font-size: 2em; margin-bottom: 10px; }
.order-number { font-size: 1.5em; font-weight: 700; color: #d4a574; }
.order-time { color: #999; margin-top: 5px; }

.progress-section { background: #fff; border-radius: 16px; padding: 40px 30px; margin-bottom: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); text-align: center; }
.progress-bar { display: flex; align-items: center; justify-content: center; margin-bottom: 30px; }
.progress-step { display: flex; flex-direction: column; align-items: center; }
.step-circle { width: 50px; height: 50px; border-radius: 50%; background: #e0e0e0; color: #999; display: flex; align-items: center; justify-content: center; font-size: 1.2em; font-weight: 700; transition: all 0.3s; }
.step-label { margin-top: 10px; color: #999; font-size: 0.9em; }
.progress-step.active .step-circle { background: #d4a574; color: #2c1810; box-shadow: 0 0 20px rgba(212,165,116,0.5); animation: pulse-step 2s infinite; }
.progress-step.active .step-label { color: #2c1810; font-weight: 600; }
.progress-step.done .step-circle { background: #28a745; color: #fff; }
.progress-step.done .step-label { color: #28a745; }
.progress-line { width: 80px; height: 4px; background: #e0e0e0; margin: 0 10px; margin-bottom: 30px; transition: all 0.3s; }
.progress-line.active { background: #d4a574; }
@keyframes pulse-step { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }

.status-message { font-size: 1.3em; font-weight: 600; color: #2c1810; margin-bottom: 10px; }
.status-message.processing { color: #d4a574; }
.status-message.completed { color: #28a745; }
.status-message.cancelled { color: #dc3545; }
.eta { color: #666; font-size: 1em; }

.order-detail-card { background: #fff; border-radius: 16px; padding: 30px; margin-bottom: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.order-detail-card h2 { color: #2c1810; margin-bottom: 20px; }
.order-items { margin-bottom: 20px; }
.order-item-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.item-name { flex: 1; }
.item-qty { color: #999; margin: 0 20px; }
.item-price { font-weight: 600; }
.order-total { display: flex; justify-content: space-between; font-size: 1.3em; font-weight: 700; color: #2c1810; padding-top: 15px; border-top: 2px solid #d4a574; }
.order-note { margin-top: 15px; padding: 10px; background: #faf5f0; border-radius: 8px; color: #666; }

.tips-card { background: #faf5f0; border-radius: 16px; padding: 25px; margin-bottom: 30px; }
.tips-card h3 { color: #2c1810; margin-bottom: 15px; }
.tips-card ul { list-style: none; }
.tips-card li { padding: 8px 0; color: #666; }
.tips-card li:before { content: "•"; color: #d4a574; font-weight: bold; margin-right: 10px; }

.order-actions { text-align: center; }
.btn-secondary { display: inline-block; padding: 12px 30px; background: #f0e6dc; color: #2c1810; border-radius: 25px; font-weight: 600; margin: 0 10px; transition: all 0.3s; }
.btn-secondary:hover { background: #d4a574; }

/* === Order Query Page === */
.query-page { padding: 40px 0; min-height: 60vh; }
.query-box { background: #fff; border-radius: 16px; padding: 40px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.08); margin-bottom: 30px; }
.query-box h1 { color: #2c1810; margin-bottom: 10px; }
.query-subtitle { color: #999; margin-bottom: 30px; }
.query-form { display: flex; gap: 15px; max-width: 500px; margin: 0 auto; }
.query-form input { flex: 1; padding: 14px 20px; border: 2px solid #ddd; border-radius: 25px; font-size: 1em; }
.query-form input:focus { outline: none; border-color: #d4a574; }
.query-form .btn-primary { padding: 14px 30px; border-radius: 25px; white-space: nowrap; }

.query-result { margin-bottom: 30px; }
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.result-header h2 { color: #2c1810; }
.result-header span { color: #999; }

.orders-list { display: flex; flex-direction: column; gap: 15px; }
.order-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.06); cursor: pointer; transition: all 0.3s; }
.order-card:hover { transform: translateY(-3px); box-shadow: 0 5px 20px rgba(0,0,0,0.12); }
.order-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.order-card-id { font-weight: 700; color: #2c1810; }
.order-card-items { color: #666; margin-bottom: 10px; font-size: 0.95em; }
.order-card-footer { display: flex; justify-content: space-between; align-items: center; }
.order-card-time { color: #999; font-size: 0.85em; }
.order-card-total { font-weight: 700; color: #d4a574; font-size: 1.1em; }
.order-card-note { margin-top: 10px; padding: 8px; background: #faf5f0; border-radius: 6px; font-size: 0.85em; color: #666; }

.no-result { text-align: center; padding: 60px 20px; }
.no-result-icon { font-size: 4em; margin-bottom: 20px; }
.no-result p { color: #666; font-size: 1.2em; margin-bottom: 10px; }
.no-result-hint { color: #999; font-size: 0.9em; }

@media (max-width: 768px) {
    .progress-bar { flex-wrap: wrap; }
    .progress-line { width: 40px; }
    .query-form { flex-direction: column; }
    .query-form .btn-primary { width: 100%; }
}
