/* Hamburger Menu & Shared Layout */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", sans-serif;
    background: #E3F2FD;
    color: #212121;
    font-size: 17px;
    line-height: 1.6;
    padding-bottom: 56px;
}
a { text-decoration: none; color: inherit; }

/* Header */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; }
.header { background: #E3F2FD; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.header-top { display: flex; align-items: center; justify-content: space-between; padding: 7px 16px; max-width: 1200px; margin: 0 auto; }
.logo { font-size: 20px; font-weight: 700; color: #00695C; display: flex; align-items: center; gap: 8px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.nav-link { font-size: 16px; color: #666; display: flex; align-items: center; gap: 6px; cursor: pointer; min-height: 44px; }
.nav-link.active { color: #00695C; font-weight: 600; }
.cart-badge { background: #E53935; color: white; font-size: 13px; padding: 4px 8px; border-radius: 12px; min-width: 22px; text-align: center; font-weight: 600; }
.user-menu { display: flex; align-items: center; gap: 18px; }
.user-menu .nav-link { font-size: 26px; }
.user-dropdown { position: relative; }
.user-dropdown-trigger { cursor: pointer; display: flex; align-items: center; gap: 6px; }
.dropdown-menu { display: none; position: absolute; right: 0; top: 100%; background: white; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,0.15); min-width: 200px; z-index: 200; overflow: hidden; margin-top: 10px; }
.dropdown-menu.show { display: block; }
.dropdown-item { display: block; padding: 16px 22px; font-size: 17px; color: #333; transition: background 0.2s; text-decoration: none; min-height: 48px; align-items: center; }
.dropdown-item:hover { background: #F0FAF9; color: #00695C; }
.dropdown-divider { height: 1px; background: #E0E0E0; }

/* Hamburger Button */
.hamburger-btn { font-size: 26px; cursor: pointer; padding: 4px 8px; }

/* Search Bar */
.search-section { background: #E3F2FD; padding: 0 16px 14px 16px; border-bottom: 2px solid #80CBC4; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.search-bar { max-width: 1200px; margin: 0 auto; display: flex; gap: 10px; }
.search-input { flex: 1; padding: 14px 16px; border: 1.5px solid #B2DFDB; border-radius: 10px; font-size: 17px; outline: none; }
.search-input:focus { border-color: #00695C; background: #F0FAF9; }
.search-btn { padding: 14px 24px; background: #00695C; color: white; border: none; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 17px; min-height: 48px; }

/* Search Modal */
.search-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: flex-start; justify-content: center; padding-top: 80px; }
.search-overlay.show { display: flex; }
.search-modal { background: white; border-radius: 16px; padding: 24px; width: 90%; max-width: 500px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.search-modal-input { width: 100%; padding: 14px 16px; border: 2px solid #B2DFDB; border-radius: 10px; font-size: 17px; outline: none; }
.search-modal-input:focus { border-color: #00695C; }
.search-modal-btn { width: 100%; padding: 14px; background: #00695C; color: white; border: none; border-radius: 10px; font-size: 17px; font-weight: 600; cursor: pointer; margin-top: 12px; }
.search-modal-close { position: absolute; top: 20px; right: 20px; font-size: 28px; color: white; cursor: pointer; }

/* Hamburger Drawer */
.hamburger-drawer { position: fixed; top: 0; left: 0; width: 280px; height: 100%; background: white; z-index: 300; transform: translateX(-100%); transition: transform 0.3s ease; box-shadow: 2px 0 16px rgba(0,0,0,0.15); overflow-y: auto; }
.hamburger-drawer.show { transform: translateX(0); }
.hamburger-drawer-header { background: #00695C; color: white; padding: 20px 16px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1; }
.hamburger-drawer-header h3 { font-size: 18px; margin: 0; }
.hamburger-drawer-close { background: none; border: none; color: white; font-size: 28px; cursor: pointer; line-height: 1; }
.hamburger-drawer-content { padding: 8px 0; }
.hamburger-section { margin-bottom: 16px; }
.hamburger-section h4 { font-size: 13px; color: #00695C; margin-bottom: 8px; padding: 0 16px; padding-bottom: 6px; border-bottom: 1px solid #B2DFDB; }
.hamburger-items { display: flex; flex-direction: column; gap: 2px; }
.hamburger-item { display: flex; align-items: center; padding: 8px 16px; text-decoration: none; color: inherit; transition: all 0.2s; border-radius: 6px; }
.hamburger-item:hover { background: #E0F2F1; }
.hamburger-item-name { font-size: 15px; color: #333; font-weight: 500; }
.hamburger-empty { text-align: center; color: #999; padding: 20px; font-size: 14px; }

/* Delivery Strip */
.delivery-strip { background: #00695C; padding: 3px 16px; text-align: center; font-size: 12px; color: white; border-bottom: 1px solid #004D40; display: flex; align-items: center; justify-content: center; gap: 8px; }
.delivery-info { font-weight: 600; }

/* Bottom Navigation */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 48px; background: white; border-top: 1px solid #B2DFDB; display: flex; align-items: center; justify-content: space-around; z-index: 200; box-shadow: 0 -2px 8px rgba(0,0,0,0.08); }
.bottom-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: #666; font-size: 10px; flex: 1; height: 100%; transition: color 0.2s; gap: 2px; }
.bottom-nav-item:hover, .bottom-nav-item.active { color: #00695C; }
.bottom-nav-icon { font-size: 22px; line-height: 1; }
.bottom-cart-badge { position: absolute; top: 2px; right: 50%; margin-right: -16px; background: #E53935; color: white; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 8px; padding: 0 4px; }
.bottom-nav-account { position: relative; flex: 1; height: 100%; }
.bottom-nav-account-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: #666; font-size: 12px; flex: 1; height: 100%; background: none; border: none; padding: 0; cursor: pointer; gap: 2px; }
.bottom-nav-account-btn:hover, .bottom-nav-account-btn.active { color: #00695C; }
.bottom-nav-dropdown { display: none; position: absolute; bottom: 100%; left: 0; right: 0; background: white; border-radius: 16px 16px 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,0.15); min-width: 200px; z-index: 500; overflow: hidden; margin-bottom: 1px; }
.bottom-nav-dropdown .dropdown-item { display: block; padding: 14px 20px; font-size: 15px; color: #333; text-decoration: none; transition: background 0.2s; }
.bottom-nav-dropdown .dropdown-item:hover { background: #F0FAF9; color: #00695C; }
.bottom-nav-dropdown .dropdown-divider { height: 1px; background: #E0E0E0; }

/* Categories */
.category-scroll { display: flex; gap: 18px; padding: 16px 16px; overflow-x: auto; max-width: 1200px; margin: 0 auto; -webkit-overflow-scrolling: touch; }
.cat-pill { background: transparent; border: none; font-size: 19px; white-space: nowrap; color: #00695C; font-weight: 600; cursor: pointer; transition: all 0.2s; padding: 6px 0; }
.cat-pill:hover, .cat-pill.active { color: #004D40; border-bottom: 2px solid #00695C; }

/* Section Title */
.section-title { padding: 0 16px; font-size: 19px; font-weight: 700; color: #00695C; margin: 20px 0 14px 0; display: flex; align-items: center; gap: 10px; }

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; padding: 0 16px 20px 16px; max-width: 1200px; margin: 0 auto; }
.product-card { background: white; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border: 1px solid #E0E0E0; transition: all 0.2s; cursor: pointer; }
.product-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.product-img { height: 160px; display: flex; align-items: center; justify-content: center; font-size: 56px; background: #E0F2F1; }
.product-info { padding: 14px; }
.product-name { font-size: 17px; font-weight: 600; margin-bottom: 6px; line-height: 1.4; }
.product-unit { font-size: 15px; color: #999; margin-bottom: 10px; }
.product-bottom { display: flex; justify-content: space-between; align-items: center; }
.product-price { font-size: 21px; font-weight: 700; color: #E53935; }
.product-price-original { font-size: 14px; color: #999; text-decoration: line-through; margin-left: 6px; }
.add-btn { width: 40px; height: 40px; border-radius: 10px; background: #00695C; color: white; border: none; font-size: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.add-btn:hover { background: #004D40; }

/* Main Content Spacing */
.main-content { padding: 135px 0 56px !important; }
.page-title { margin-top: 20px; }

/* Mobile Optimizations */
@media (max-width: 768px) {
    body { font-size: 16px; }
    .header-top { padding: 7px 14px; }
    .logo { font-size: 20px; }
    .search-section { padding: 0 14px 12px 14px; }
    .search-input { padding: 12px 14px; font-size: 16px; }
    .search-btn { padding: 12px 20px; font-size: 16px; }
    .delivery-strip { font-size: 11px; padding: 3px 12px; }
    .category-scroll { padding: 14px 14px; gap: 16px; }
    .cat-pill { font-size: 17px; }
    .section-title { font-size: 18px; padding: 0 14px; margin: 18px 0 12px 0; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 14px 16px 14px; }
    .product-img { height: 140px; font-size: 48px; }
    .product-info { padding: 12px; }
    .product-name { font-size: 16px; }
    .product-unit { font-size: 14px; }
    .product-price { font-size: 19px; }
    .add-btn { width: 36px; height: 36px; font-size: 22px; }
    .dropdown-menu { min-width: 180px; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 10px 14px 10px; }
    .product-img { height: 120px; font-size: 40px; }
    .product-info { padding: 10px; }
    .product-name { font-size: 15px; }
    .product-price { font-size: 18px; }
    .add-btn { width: 32px; height: 32px; font-size: 20px; }
}
