body {
    background-image: linear-gradient(0deg,
            rgba(23, 23, 23, 0.99) 0%,
            rgba(21, 21, 21, 0.9) 50%,
            rgba(11, 11, 11, 0.8) 80%,
            rgba(11, 11, 11, 0.7) 100%), url(/images/city/348.png);
}

.main {
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
    margin: 120px 10%;
    gap: 10px;

    width: 60%;
}

#heading {
    position: fixed;
}

.tabbar {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    column-gap: 20px;

    width: 100%;
}

.tab {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: center;
    height: max-content;
    color: white;
    font-size: 17px;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    letter-spacing: 3px;
}

.tab:hover {
    text-shadow: 0 0 5px white;
}

.itemContainer {
    padding: 10px;

    background-color: rgba(15, 15, 15, 0.8);
    border-radius: 9px;
    width: 100%;
    min-width: 330px;
}

.itemContainer p {
    color: grey;
}

.shopList {
    min-width: 500px;
}

.boxshopContainer {
    display: flex;
    flex-flow: column nowrap;
    gap: 5px;

    max-height: 600px;
    overflow-y: scroll;
    scrollbar-color: rgb(73, 73, 73) rgb(28, 28, 28);
    scrollbar-width: thin;
}

.boxshop {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
    background-color: rgb(22, 22, 22);
    padding: 5px;
}

.boxshop:hover {
    background-color: rgb(33, 33, 33);
}

.boxshop div {
    color: white;
}

.boxshop img {
    width: 50px;
    padding: 10px;
}

.boxshop h3 {
    margin: 0;
    font-size: 15px;
}

.boxshop .price {
    display: flex;
    flex-flow: row nowrap;
    align-items: baseline;
    color: rgb(255, 110, 110);
    text-align: end;
}

.boxshop .price p {
    font-size: 15px;
    color: rgb(255, 110, 110);
    margin-right: 5px;
}

.boxshop .price span {
    font-size: 12px;
    color: rgb(255, 110, 110);
}

.boxshop p {
    color: rgb(182, 182, 182);
    font-size: 13px;
}

.boxshop p.currentPrice {
    font-size: 17px;
}

.boxshop p.originalPrice {
    font-weight: normal;
    text-decoration: line-through;
}

.green {
    color: rgb(0, 203, 61)
}

.red {
    color: rgb(183, 0, 0)
}

.locator {
    color: lightskyblue;
}

/* ===== 篩選欄樣式 ===== */
.filter-bar {
    display: flex;
    flex-flow: row wrap;
    align-items: flex-end;
    gap: 16px 20px;
    padding: 16px 12px 14px 12px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    border: 1px solid rgba(128, 128, 128, 0.15);
}

.filter-group {
    display: flex;
    flex-flow: column nowrap;
    gap: 3px;
    flex: 0 0 auto;
}

.filter-group label {
    font-size: 10px;
    color: #c9c9c9;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.filter-group input,
.filter-group select {
    background: #0d0d0d;
    color: grey;
    border: 1px solid grey;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    min-width: 90px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: #4a7a9a;
    box-shadow: 0 0 0 2px rgba(74, 122, 154, 0.2);
    outline: none;
}

.filter-group input::placeholder {
    color: grey;
    font-size: 12px;
}

.filter-group input[type="number"] {
    width: 100px;
    min-width: 70px;
    -moz-appearance: textfield;
}

.filter-group input[type="number"]::-webkit-outer-spin-button,
.filter-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 價格範圍組合 */
.filter-group.price-range {
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
}

.filter-group.price-range .range-input {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.filter-group.price-range .range-input label {
    font-size: 10px;
    color: grey;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group.price-range .range-input input {
    width: 80px;
    min-width: 60px;
}

.filter-group.price-range .range-separator {
    color: grey;
    font-size: 14px;
    padding-bottom: 4px;
    user-select: none;
}

/* 複選框群組 */
.filter-group.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding-top: 14px;
    margin: auto 0;
}

.filter-group.checkbox-group label {
    font-size: 12px;
    color: #888;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0.3px;
    font-weight: 400;
}

.filter-group.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    accent-color: #4a7a9a;
    cursor: pointer;
    background: #0d0d0d;
    border: 1px solid #606060;
    border-radius: 3px;
    padding: 0;
    flex-shrink: 0;
}

/* 按鈕樣式 */
.filter-actions {
    display: flex;
    flex-flow: row nowrap;
    gap: 8px;
    align-items: flex-end;
    padding-top: 14px;
    flex: 0 0 auto;
}

.btn-filter {
    padding: 6px 18px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #2a4a6a;
    color: #fff;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-filter:hover {
    background: #3a5a7a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 74, 106, 0.3);
}

.btn-filter:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-filter.btn-reset {
    background: transparent;
    color: grey;
    border: 1px solid #2a2a2a;
}

.btn-filter.btn-reset:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #aaa;
    border-color: #3a3a3a;
    box-shadow: none;
    transform: none;
}

.btn-filter.btn-reset:active {
    background: rgba(255, 255, 255, 0.1);
}

/* 統計資訊 */
.filter-stats {
    font-size: 13px;
    color: #555;
    padding: 6px 4px 10px 4px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
    margin-bottom: 4px;
}

.filter-stats strong {
    color: #aaa;
    font-weight: 600;
}

.filter-stats .stat-separator {
    color: #333;
    margin: 0 6px;
}

.filter-stats .stat-label {
    color: #555;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* 商品標籤 */
.badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 6px;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

.badge-discount {
    background: rgba(255, 110, 110, 0.2);
    color: rgb(255, 110, 110);
    border: 1px solid rgba(255, 110, 110, 0.15);
}

.badge-soldout {
    background: rgba(128, 128, 128, 0.15);
    color: grey;
    border: 1px solid rgba(128, 128, 128, 0.1);
}

/* 已售罄商品淡化 */
.boxshop.sold-out {
    opacity: 0.55;
}

.boxshop.sold-out:hover {
    opacity: 0.75;
}

.boxshop .price .sold-out-price {
    color: #555;
}

.boxshop p.currentPrice.sold-out-price {
    color: #555;
}

/* ===== 響應式設計 ===== */
@media screen and (max-width: 1300px) {
    .shopList {
        width: 100%;
    }

    #heading #search form {
        max-width: 100%;
    }

    .itemContainer.menuContainer {
        overflow-x: scroll;
        scrollbar-color: rgb(73, 73, 73) rgb(28, 28, 28);
        scrollbar-width: thin;
    }

    .filter-bar {
        gap: 12px 16px;
        padding: 14px 10px 12px 10px;
    }

    .filter-group input[type="number"] {
        width: 80px;
        min-width: 55px;
    }

    .filter-group.price-range .range-input input {
        width: 65px;
        min-width: 50px;
    }
}

@media screen and (max-width: 1100px) {
    .main {
        margin: 200px 20px;
        width: auto;
    }

    #heading #search {
        width: 70%;
    }

    #heading #navbar a {
        flex-flow: row wrap;
        font-size: 12px;
    }

    .shopList {
        min-width: 330px;
    }
}

@media screen and (max-width: 820px) {
    .filter-bar {
        flex-flow: column nowrap;
        align-items: stretch;
        gap: 10px;
        padding: 14px 12px;
    }

    .filter-group {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 12px;
    }

    .filter-group label {
        min-width: 50px;
    }

    .filter-group input,
    .filter-group select {
        flex: 1;
        min-width: 80px;
        width: auto;
    }

    .filter-group input[type="number"] {
        width: auto;
        flex: 1;
        min-width: 60px;
    }

    .filter-group.price-range {
        flex-wrap: nowrap;
        align-items: center;
    }

    .filter-group.price-range .range-input {
        flex: 1;
    }

    .filter-group.price-range .range-input input {
        width: 100%;
        min-width: 50px;
    }

    .filter-group.checkbox-group {
        padding-top: 0;
        gap: 6px;
    }

    .filter-actions {
        padding-top: 6px;
        flex-wrap: wrap;
    }

    .btn-filter {
        flex: 1;
        min-width: 80px;
    }

    .filter-stats {
        font-size: 12px;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .filter-bar {
        padding: 10px 8px;
        gap: 8px;
    }

    .filter-group {
        gap: 4px 8px;
    }

    .filter-group label {
        font-size: 9px;
        min-width: 40px;
    }

    .filter-group input,
    .filter-group select {
        font-size: 12px;
        height: 30px;
        padding: 4px 8px;
        min-width: 60px;
    }

    .filter-group input[type="number"] {
        min-width: 50px;
    }

    .btn-filter {
        height: 30px;
        font-size: 12px;
        padding: 4px 12px;
        min-width: 60px;
    }

    .filter-stats {
        font-size: 11px;
        padding: 4px 2px 8px 2px;
    }
}