:root {
    --theme-main: #E70012;
    --theme-main-hover: #c4000f;
    --text-dark: #111111;
    --text-main: #333333;
    --text-sub: #666666;
    --text-muted: #999999;
    --topbar-bg: #1a1a1a;
    --theme-bg: #f6f6f6;
    --border-color: #e4e7ed;
    --border-color-light: #f0f2f5;
    --container-width: 1560px;
}

.motoparts-portal-layout-wrapper {
    width: 100%;
    position: relative;
    background-color: var(--theme-bg);
}

.container {
    max-width: var(--container-width);
    width: 100%;
    margin: 0 auto;
}

.top-banner {
    width: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)),
        url('https://img.starterstock.com/202605/26/0913367234.jpg') center/cover no-repeat;
    padding: 80px 0;
    display: flex;
    align-items: center;
    min-height: 400px;
}

.banner-text-center {
    text-align: center;
    margin-bottom: 35px;
}

.banner-title {
    color: #ffffff;
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-subtitle {
    color: #e0e0e0;
    font-size: 16px;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.flat-filter-bar {
    display: flex;
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    width: 100%;
}

.filter-col {
    flex: 1 1 0%;
    min-width: 0;
    padding: 14px 20px;
    border-right: 1px solid var(--border-color-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.filter-col:hover:not(.disabled) {
    background-color: #fafafa;
}

.filter-col.open {
    background-color: #ffffff;
    box-shadow: inset 0 -3px 0 var(--theme-main);
    z-index: 101;
}

.filter-col.disabled {
    opacity: 0.5;
    background-color: #f9f9f9;
    cursor: not-allowed;
}

.filter-col.disabled * {
    pointer-events: none;
}

.f-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
    pointer-events: none;
}

.custom-dropdown {
    position: static;
    width: 100%;
    pointer-events: none;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    width: 100%;
    padding: 0;
    line-height: 1.5;
    min-width: 0;
}

.dropdown-header .selected-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    margin-right: 8px;
}

.dropdown-header i {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.filter-col.open .dropdown-header i {
    transform: rotate(180deg);
}

.dropdown-list {
    position: absolute;
    /* top: 100%; */
    left: 0;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color-light);
    border-top: none;
    z-index: 100;
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    max-height: 380px;
    width: max-content;
    gap: 4px 12px;
    opacity: 0;
    visibility: hidden;
    pointer-events: auto;
    transition: opacity 0.15s, visibility 0.15s;
}

.filter-col:nth-last-child(2) .dropdown-list,
.filter-col:nth-last-child(3) .dropdown-list {
    left: auto;
    right: 0;
    border-radius: 0 0 8px 8px;
}

.filter-col.open .dropdown-list {
    opacity: 1;
    visibility: visible;
}

.dropdown-item {
    padding: 8px 10px;
    font-size: 13px;
    color: var(--text-main);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 4px;
    width: 200px;
    flex-shrink: 0;
    overflow: hidden;
    min-width: 0;
    cursor: pointer;
}

.dropdown-item::before {
    content: '\f0c8';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    color: var(--text-muted);
    font-size: 13px;
    flex-shrink: 0;
}

.dropdown-item.active::before {
    content: '\f14a';
    font-weight: 900;
    color: var(--theme-main);
}

.dropdown-item:hover {
    background-color: #f7f8fa;
    color: var(--theme-main);
}

.dropdown-item.active {
    font-weight: 600;
    color: var(--theme-main);
    background-color: #fff4f4;
}

.dropdown-item span {
    color: inherit;
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.keyword-input-wrap {
    width: 100%;
}

.keyword-input-wrap input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    padding: 0;
    background: transparent;
}

.keyword-input-wrap input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.filter-col:has(#filter-kw):focus-within {
    background-color: #ffffff;
    box-shadow: inset 0 -3px 0 var(--theme-main) !important;
    z-index: 101;
}

.filter-col:has(#filter-kw) {
    cursor: text;
}

.filter-btn-col {
    display: flex;
    border-radius: 0 6px 6px 0;
    overflow: hidden;
    flex: 0 0 auto;
}

.btn-clear {
    background-color: #f5f5f5;
    color: var(--text-sub);
    border: none;
    padding: 0 20px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-clear:hover {
    background-color: #e8e8e8;
    color: var(--text-dark);
}

.btn-search {
    background-color: var(--theme-main);
    color: #ffffff;
    border: none;
    padding: 0 35px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-search:hover {
    background-color: var(--theme-main-hover);
}

.breadcrumb-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 15px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb i {
    color: var(--text-muted);
}

.breadcrumb-arrow {
    color: var(--text-muted);
    margin: 0 4px;
}

.breadcrumb .tag {
    font-weight: 500;
    color: var(--text-main);
}

.result-count {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: bold;
}

.result-count span {
    color: var(--theme-main);
    font-size: 20px;
    margin: 0 4px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid transparent;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.card-img-wrapper {
    height: 260px;
    background-color: #ffffff;
    position: relative;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color-light);
}

.card-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.06);
}

.card-badge-stock {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    color: #2e8b57;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    z-index: 10;
}

.card-badge-stock::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background-color: #2e8b57;
    border-radius: 50%;
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
    font-weight: 500;
}

.card-meta .meta-item {
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta .dot {
    width: 3px;
    height: 3px;
    background: #d1d1d1;
    border-radius: 50%;
    flex-shrink: 0;
    margin: 0 8px;
}

.card-oem {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    width: 100%;
}

.oem-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    flex-shrink: 0;
    text-transform: uppercase;
}

.oem-value {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 12px;
    color: var(--text-dark);
    font-weight: 600;
    border: 1px solid #E8EAEF;
    background-color: #fafafa;
    padding: 3px 8px;
    border-radius: 4px;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-title {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    transition: color 0.2s;
}

.product-card:hover .card-title {
    color: var(--theme-main);
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.price-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-main .num {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
}

.price-main .unit {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.moq-text {
    font-size: 12px;
    color: var(--text-sub);
    font-weight: 500;
    margin-top: 8px;
}

.card-btn {
    padding: 8px 18px;
    border-radius: 30px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    gap: 8px;
    transition: all 0.3s ease;
}

.card-btn i {
    display: inline-block;
    line-height: 1;
    transition: transform 0.3s ease;
}

.product-card:hover .card-btn {
    background-color: var(--theme-main);
    border-color: var(--theme-main);
    color: #fff;
}

.product-card:hover .card-btn i {
    transform: translateX(4px);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    padding-bottom: 80px;
    flex-wrap: wrap;
}

.page-btn {
    height: 40px;
    min-width: 40px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-main);
    font-size: 14px;
    transition: all 0.2s;
    font-weight: 500;
}

.page-btn:hover:not(.disabled) {
    border-color: var(--theme-main);
    color: var(--theme-main);
}

.page-btn.active {
    background: var(--theme-main);
    color: #fff;
    border-color: var(--theme-main);
}

.page-btn.disabled {
    background: #f7f8fa;
    color: #c0c4cc;
    cursor: not-allowed;
    border-color: var(--border-color-light);
}

@media (max-width: 1200px) {
    .flat-filter-bar {
        flex-wrap: wrap;
    }

    .filter-col {
        flex: 1 1 33.33%;
        border-bottom: 1px solid var(--border-color-light);
    }

    .filter-col:nth-child(3n) {
        border-right: none;
    }

    .filter-col:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .filter-btn-col {
        flex: 1 1 100%;
        height: 56px;
        border-radius: 0 0 6px 6px;
    }

    .btn-search {
        flex: 1;
        justify-content: center;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .filter-col {
        flex: 1 1 50%;
    }

    .filter-col:nth-child(3n) {
        border-right: 1px solid var(--border-color-light);
    }

    .filter-col:nth-child(2n) {
        border-right: none;
    }

    .filter-col:nth-last-child(-n+2) {
        border-bottom: 1px solid var(--border-color-light);
    }

    .top-banner {
        padding: 50px 0;
    }

    .banner-title {
        font-size: 28px;
    }

    .dropdown-list {
        grid-auto-flow: row !important;
        grid-template-rows: none !important;
        grid-template-columns: 1fr !important;
        max-height: 280px;
        overflow-y: auto;
        width: 100% !important;
        min-width: unset !important;
    }
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1201px) {
    .flat-filter-bar> :nth-child(-n+3) {
        flex: 1 1 0%;
    }

    .flat-filter-bar> :nth-child(n+4):not(.filter-btn-col) {
        flex: 1.4 1 0%;
    }
}

.year-picker-dropdown {
    width: 320px !important;
    padding: 15px !important;
    display: block !important;
    flex-direction: unset !important;
    max-height: none !important;
}

.year-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 15px;
}

.year-picker-header span {
    font-weight: 700;
    color: #333;
    font-size: 15px;
}

.year-picker-header button {
    color: #999;
    padding: 5px 10px;
}

.year-picker-header button:hover {
    color: var(--theme-main);
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.year-item {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    color: #666;
    font-weight: 500;
}

.year-item:hover {
    color: var(--theme-main);
    background: #fff1f0;
}

.year-item.active {
    background: var(--theme-main) !important;
    color: #fff !important;
}

.year-item.in-range {
    background: #fff1f0;
    color: var(--theme-main);
}

.year-picker-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.btn-year-clear {
    font-size: 13px;
    color: #999;
    padding: 6px 15px;

    &:hover {
        color: var(--theme-main);
    }
}

.btn-year-confirm {
    background: var(--theme-main);
    color: #fff;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 13px;
}

.year-picker-tabs {
    display: flex;
    background: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 15px;
    padding: 2px;
}

.year-tab {
    flex: 1;
    text-align: center;
    padding: 6px 0;
    font-size: 12px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
    border-radius: 3px;
}

.year-tab.active {
    background: #fff;
    color: var(--theme-main);
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.year-item.range-edge {
    background: var(--theme-main) !important;
    color: #fff !important;
}

.year-item.range-mid {
    background: #fff1f0 !important;
    color: var(--theme-main) !important;
}