* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f5f0;
    color: #333;
    line-height: 1.6;
    max-width: 414px;
    margin: 0 auto;
}

.top-nav {
    background: #1a1a2e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    max-width: 414px;
    margin: 0 auto;
}

.nav-left, .nav-right {
    width: 60px;
}

.back-btn {
    color: #d4af37;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.logo-center {
    font-size: 18px;
    font-weight: bold;
    color: #d4af37;
    white-space: nowrap;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: none;
    border: none;
    color: #d4af37;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #fff;
    min-width: 120px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1000;
    margin-top: 5px;
    overflow: hidden;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    display: block;
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item.active {
    color: #d4af37;
    font-weight: bold;
    background-color: #fff9e6;
}

.dropdown-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 5px 0;
}

.container {
    width: 100%;
    max-width: 414px;
    margin: 0 auto;
    padding: 4px;
}

.category-list {
    display: flex;
    gap: 3px;
    overflow-x: auto;
    padding: 10px 0;
    padding-bottom: 14px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 5px;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.category-item {
    text-align: center;
    min-width: 60px;
    padding: 8px 6px;
    background: linear-gradient(135deg, #fff, #faf8f5);
    border-radius: 8px;
    border: 1px solid #f0e6d3;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0;
}

.category-item span {
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

.category-item.active {
    border-color: #d4af37;
    background: linear-gradient(135deg, #fff9e6, #fff5d6);
}

.category-item.active span {
    color: #d4af37;
    font-weight: bold;
}

.sort-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.stall-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.stall-list::-webkit-scrollbar {
    display: none;
}

.stall-item {
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 16px;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid #e0e0e0;
}

.stall-item.active {
    background: #d4af37;
    color: #fff;
    border-color: #d4af37;
}

.sort-label {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

.sort-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sort-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    background: #fff;
}

.sort-btn.active {
    background-color: #d4af37;
    border-color: #d4af37;
    color: #fff;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.product-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 10px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.product-title {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 8px;
}

.product-price {
    font-size: 15px;
    color: #d4af37;
    font-weight: bold;
    white-space: nowrap;
}

.product-sponsor {
    font-size: 12px;
    color: #666;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 8px;
    padding: 12px;
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font-size: 13px;
}

.page-btn.active {
    background-color: #d4af37;
    border-color: #d4af37;
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#float1_appraisal_btn {
    position: fixed;
    right: 15px;
    bottom: 80px;
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: #fff;
    padding: 12px 15px;
    border-radius: 25px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
    cursor: pointer;
    z-index: 99;
}
