:root {
    --main-red: #bf0000;
    --soft-red: #fff3f3;
    --border: #e5e5e5;
    --text-muted: #777;
}

body {
    background: #f7f7f7;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", sans-serif;
    color: #222;
}

.shop-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.shop-header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
}

.shop-logo-wrap {
    min-width: 0;
}

.brand-logo {
    color: var(--main-red);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    white-space: nowrap;
}

.shop-search-wrap {
    min-width: 0;
}

.search-wrap {
    border: 2px solid var(--main-red);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.search-wrap input {
    border: 0;
    box-shadow: none !important;
}

.search-wrap button {
    background: var(--main-red);
    color: #fff;
    border: 0;
    width: 58px;
    flex: 0 0 58px;
}

.shop-cart-wrap {
    display: flex;
    justify-content: flex-end;
}

.mobile-cart-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #333;
    border-radius: 50%;
    transition: .2s;
    text-decoration: none;
    position: relative;
    background: #fff;
    border: 1px solid #eee;
}

.mobile-cart-button:hover {
    background: #f1f1f1;
    color: var(--main-red);
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    background: var(--main-red);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 800;
}

.hero-card {
    background: linear-gradient(135deg, #1d1d1f, #4a0000);
    color: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    overflow: hidden;
    position: relative;
}

.hero-card::after {
    content: "";
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    position: absolute;
    right: -60px;
    top: -80px;
}

.hero-card h1 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
}

.sidebar-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 14px;
}

.sidebar-title {
    background: #f6f6f6;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list a {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 14px;
    color: #444;
    text-decoration: none;
    border-bottom: 1px solid #f1f1f1;
}

.filter-list a:hover,
.filter-list a.active {
    color: var(--main-red);
    font-weight: 700;
    background: var(--soft-red);
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 14px;
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 14px;
}

.category-tab {
    border: 1px solid var(--border);
    background: #fff;
    color: #333;
    border-radius: 999px;
    padding: 8px 16px;
    white-space: nowrap;
    font-size: 14px;
    text-decoration: none;
}

.category-tab.active {
    background: var(--main-red);
    border-color: var(--main-red);
    color: #fff;
    font-weight: 700;
}

.sort-bar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    gap: 0;
    overflow-x: auto;
    margin-bottom: 14px;
}

.sort-item {
    padding: 12px 22px;
    border-right: 1px solid var(--border);
    white-space: nowrap;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.sort-item.active {
    color: var(--main-red);
    font-weight: 700;
}

.product-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    transition: .2s;
    position: relative;
}

.product-card:hover {
    border-color: var(--main-red);
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

.product-image-wrap {
    position: relative;
    background: #fafafa;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.badge-category {
    position: absolute;
    left: 8px;
    bottom: 8px;
    background: var(--main-red);
    color: #fff;
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 3px;
    font-weight: 700;
}

.quick-cart {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(191,0,0,.95);
    color: #fff;
    border: 0;
    padding: 10px;
    transform: translateY(100%);
    transition: .2s;
}

.product-card:hover .quick-cart {
    transform: translateY(0);
}

.product-body {
    padding: 10px;
}

.product-name {
    font-size: 14px;
    line-height: 1.4;
    min-height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
    color: #222;
    text-decoration: none;
}

.product-price {
    color: var(--main-red);
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 4px;
}

.points {
    font-size: 13px;
    color: #d60000;
}

.stars {
    color: #ffb300;
    font-size: 12px;
}

.shipping-badge {
    display: inline-block;
    border: 1px solid #ff8f8f;
    color: #e60000;
    border-radius: 4px;
    padding: 2px 5px;
    font-size: 12px;
    margin-top: 6px;
}

.store-name {
    color: #888;
    font-size: 13px;
    margin-top: 8px;
}

.detail-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.detail-image-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f5f5f5;
}

.site-footer {
    background: #1f1f1f;
    color: #fff;
    padding: 28px 0 16px;
}

.footer-brand {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.footer-desc {
    color: #ccc;
    font-size: 14px;
}

.footer-info {
    color: #ddd;
    font-size: 14px;
}

.footer-info a {
    color: #fff;
    text-decoration: none;
}

.footer-info a:hover {
    color: #ffb3b3;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    color: #aaa;
    font-size: 13px;
    margin-top: 20px;
    padding-top: 14px;
    text-align: center;
}

.floating-mobile-cart {
    position: fixed;
    right: 14px;
    bottom: 16px;
    z-index: 1200;
    background: var(--main-red);
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.floating-mobile-cart:hover {
    color: #fff;
}

.floating-mobile-cart span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-left: 4px;
    border-radius: 99px;
    background: #fff;
    color: var(--main-red);
    font-size: 12px;
}

@media (max-width: 991.98px) {
    .shop-header-inner {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    .shop-logo-wrap {
        grid-column: 1 / 2;
    }

    .shop-cart-wrap {
        grid-column: 2 / 3;
        grid-row: 1;
    }

    .shop-search-wrap {
        grid-column: 1 / 3;
        grid-row: 2;
    }

    .brand-logo {
        font-size: 22px;
    }

    .search-wrap button {
        width: 50px;
        flex-basis: 50px;
    }

    .hero-card {
        padding: 18px;
    }

    .hero-card h1 {
        font-size: 22px;
    }
}

@media (max-width: 575.98px) {
    body {
        padding-bottom: 64px;
    }

    .shop-header {
        padding-top: 6px !important;
        padding-bottom: 8px !important;
    }

    .shop-header .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    .brand-logo {
        font-size: 20px;
    }

    .mobile-cart-button {
        width: 40px;
        height: 40px;
    }

    .search-wrap input {
        font-size: 14px;
    }

    .search-wrap button {
        width: 46px;
        flex-basis: 46px;
    }

    .hero-card {
        padding: 16px;
        border-radius: 10px;
    }

    .hero-card h1 {
        font-size: 20px;
    }

    .hero-card p {
        font-size: 14px;
    }

    .section-title {
        font-size: 17px;
    }

    .category-tabs {
        padding-bottom: 4px;
    }

    .category-tab {
        font-size: 13px;
        padding: 7px 13px;
    }

    .sort-bar {
        border-radius: 8px;
    }

    .sort-item {
        padding: 10px 14px;
        font-size: 13px;
    }

    .product-body {
        padding: 8px;
    }

    .product-name {
        font-size: 13px;
        min-height: 38px;
    }

    .product-price {
        font-size: 18px;
    }

    .points,
    .store-name {
        font-size: 12px;
    }

    .quick-cart {
        position: static;
        transform: none;
        margin-top: 8px;
        border-radius: 6px;
        padding: 8px;
        font-size: 13px;
    }

    .product-card:hover .quick-cart {
        transform: none;
    }

    .badge-category {
        font-size: 11px;
        left: 6px;
        bottom: 6px;
    }

    .site-footer {
        padding: 22px 0 14px;
    }

    .footer-brand {
        font-size: 19px;
    }

    .footer-info {
        font-size: 13px;
    }
}