.layout-container,
.sidebar {
    background-color: var(--bg-primary);
    min-height: 100vh
}

.brand-reviews {
    margin-left: 10px;
}

.brand-reviews .review-title,
.breadcrumb-top {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, .8);
    color: #fff
}

.brand-reviews-title,
.breadcrumb-action-btn,
.breadcrumb-top,
.compare-btn {
    text-transform: uppercase
}

body {
    margin-top: 40px
}

.layout-container {
    display: flex;
    gap: 10px
}

.sidebar {
    width: min(40%, max(31%, calc(31% + 9 * (1150px - 100vw) / 382)));
    height: auto;
    overflow-y: auto
}

.brand-reviews-title {
    font-weight: 700;
    letter-spacing: .02em;
    text-align: center;
    padding: 14px 0;
    margin: 0;
    border-bottom: 1px solid var(--com-border-color);
    background: #7c7c7c;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-primary)
}

.brand-review-card {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    overflow: hidden;
    background: var(--bg-secondary);
    text-decoration: none;
    color: var(--text-primary);
    transition: .3s
}

.brand-review-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--bg-primary);
    transition: transform .3s
}

.brand-reviews .review-caption-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10%;
    display: flex;
    justify-content: center;
    align-items: center
}

.brand-reviews .review-caption {
    position: static;
    margin-bottom: 20px;
    padding: 4px 0px;
    background-image: url('https://cdn.phonehubpic.fun/svg/back.png');
    background-repeat: repeat;
    background-size: auto;
    color: var(--text-primary);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center
}

.brand-reviews .review-title {
    font-size: clamp(.8rem, 2.2vw, 1rem);
    font-weight: 600;
    line-height: 1.3;
    transition: color .3s
}

.brand-review-card:hover .brand-review-image {
    transform: scale(1.05)
}

.brand-review-card:hover .review-title {
    color: red !important
}

.main-content {
    padding: 0 5px;
    width: min(69%, max(60%, calc(69% - 9 * (1150px - 100vw) / 382)));
    border-left: 1px solid var(--color-card-shadow)
}

.breadcrumb-filter-container {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    margin-bottom: 5px;
    padding: 3px;
    flex-wrap: wrap;
    gap: 6px
}

.breadcrumb-left {
    display: flex;
    align-items: center;
    justify-content: center
}

.breadcrumb-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap-reverse;
    justify-content: center;
    gap: 8px;
    height: 100%
}

.breadcrumb-actions a[href^="/brandnews.php"] {
    display: none
}

body.has-brand-news .breadcrumb-actions a[href^="/brandnews.php"] {
    display: inline-flex
}

.breadcrumb-top {
    border-bottom: 1px solid hsla(0, 0%, 100%, .2);
    z-index: 1;
    background-color: rgba(0, 0, 0, .2);
    height: clamp(20px, calc(20px + (100vw - 250px) * .0333333333), 60px);
    max-height: 45px;
    top: 0;
    left: 100%;
    right: 0;
    display: flex;
    justify-content: start;
    align-items: center
}

.breadcrumb-right {
    height: 100%;
    background: url('https://i.ibb.co/chM6Qfnr/review-mdoel-back.png') center center/cover no-repeat;
    display: flex;
    align-items: center;
    padding: 0 8px;
    justify-content: flex-end;
    font-weight: 600
}

.breadcrumb-right:hover {
    background-color: red
}

.breadcrumb-bottom {
    height: clamp(20px, calc(20px + (100vw - 250px) * .0333333333), 60px);
    border-top: 1px solid hsla(0, 0%, 100%, .2);
    position: absolute;
    z-index: 1;
    background-color: rgba(0, 0, 0, .2);
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-height: 45px
}

.breadcrumb-section {
    position: relative;
    background: var(--bg-secondary);
    margin-bottom: 10px;
    min-height: clamp(250px, calc(11.440476vw + 203.857143px), 324px);
    overflow: hidden
}

.breadcrumb-section .breadcrumb-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.65);
    z-index: 0;
    pointer-events: none
}

.card-image,
.compare-mode .card,
.filter-button {
    position: relative
}

.breadcrumb-action-btn,
.breadcrumb-actions-right .filter-button {
    max-width: 160px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, .8);
    width: clamp(60px, calc(60px + (100vw - 240px) * .1583333333), 250px);
    font-size: clamp(11px, 1.6vw, 15px);
    display: inline-flex;
    line-height: 1;
    box-sizing: border-box;
    min-height: 100%;
    text-align: center;
    color: #fff
}

.breadcrumb-action-btn {
    flex-wrap: wrap-reverse;
    text-decoration: none;
    align-items: center;
    justify-content: center
}

.breadcrumb-action-btn:hover {
    background-color: var(--hover-color)
}

.breadcrumb-actions-right .filter-button {
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    padding: 0
}

.arrow-down::after,
.arrow-up::after,
.card-title {
    font-weight: 700
}

.filter-button.active {
    font-weight: 700;
    border-bottom: 2px solid red !important;
}

.card-specs {
    display: flex;
    gap: 4px;
    justify-content: center;
    padding-bottom: 5px;
}

.spec-badge {
    font-size: 10px;
    background: #eee;
    padding: 1px 4px;
    border-radius: 3px;
    color: #666;
    border: 1px solid #ddd;
}

.card:hover .spec-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.breadcrumb-actions-right .filter-button:hover {
    background-color: var(--hover-color);
    color: #fff
}

.breadcrumb-actions-right {
    height: 100%
}

.breadcrumb-filter-container .breadcrumb {
    flex: 0 0 auto
}

.breadcrumb-filter-container .filter-bar {
    justify-content: center;
    margin-bottom: 0;
    border-bottom: none;
    background: 0 0
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.filter-button {
    padding: 2px 6px;
    border: none;
    background: 0 0;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 0;
    font-size: 14px;
    transition: .2s;
    min-width: auto;
    display: inline;
    gap: 0
}

.filter-button:hover {
    color: var(--hover-color)
}

.arrow-up::after {
    content: ' ↑'
}

.arrow-down::after {
    content: ' ↓'
}

.no-arrow::after {
    content: ''
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr)
}

.card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    width: 100%;
    height: clamp(160px, 30vw, 260px);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.card-image {
    height: 70%;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    position: relative;
    overflow: hidden;
}

.card-image img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.card:hover .card-image img {
    transform: scale(1.01);
}

.card-content {
    height: 30%;
    padding: 8px 5px;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
    flex-direction: column;
    justify-content: space-between;
    min-height: auto;
}

.card:hover .card-content {
    background: var(--accent-color) !important;
}

.card-title {
    font-size: clamp(10px, 2vw, 14px);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
    text-align: center;
    transition: color 0.3s;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card:hover .card-title {
    color: #fff !important;
}

.card-specs {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 4px;
}

.spec-badge {
    font-size: 9px;
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
    border: 1px solid rgba(0,0,0,0.1);
    font-weight: 500;
    transition: all 0.3s ease;
}

.card:hover .spec-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.no-data {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: var(--text-secondary);
}

.heart-icon {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 16px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
    color: #666;
    border: 1px solid rgba(0,0,0,0.05);
}

.heart-icon:hover {
    background: #fff;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--accent-color);
}

.heart-icon.active {
    color: #ff4757;
    background: #fff;
}

.heart-icon:active {
    transform: scale(0.9);
}

.compare-mode .heart-icon {
    display: none
}

.pagination {
    padding: 10px 0;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    display: flex;
}

.pagination-wrap {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 15px 10px;
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px var(--color-card-shadow);
    position: relative;
    z-index: 5;
}

.pagination button,
.page-link {
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    transition: all 0.3s ease;
}

.pagination button:hover,
.page-link:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pagination button:disabled,
.page-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--bg-secondary);
}

.pagination button.active,
.page-link.active {
    background-color: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.pagination-info {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.goto-page {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.goto-page label {
    font-size: 14px;
    color: var(--text-secondary);
}

.goto-page input {
    width: 50px;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
}

.goto-page button {
    padding: 4px 12px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.3s;
}

.goto-page button:hover {
    background: var(--hover-color);
}

@media (max-width:768px) {
    .container {
        flex-direction: column
    }
    .sidebar {
        display: none !important
    }
    .breadcrumb-filter-container .filter-bar,
    .main-content {
        width: 100%
    }
    .filter-bar {
        gap: 5px
    }
    .filter-button {
        padding: 1px 4px;
        font-size: 11px
    }
    .breadcrumb-bottom {
        height: clamp(38px, calc(20px + (100vw - 250px) * .0333333333), 60px)
    }
    .main-content {
        width: 100%;
        padding-left: 5px;
        padding-right: 5px;
        margin-bottom: 50px
    }
    .card-image {
        height: 70%
    }
    .cards-container {
        grid-template-columns: repeat(4, 1fr)
    }
    .card {
        height: clamp(105px, 34vw, 240px)
    }
    .card-content {
        height: 30%
    }
    .card-title {
        font-size: clamp(8px, 3vw, 16px);
        line-height: 1.3;
        max-height: 2.6em;
        color: var(--text-primary)
    }
    .pagination {
        gap: 6px;
        margin: 15px 0;
    }
    .pagination button, .page-link {
        padding: 3px 8px;
        font-size: 12px;
        min-width: 28px;
    }
    .pagination-info {
        margin-bottom: 8px;
        font-size: 13px;
    }
    .goto-page {
        font-size: 13px;
    }
    .goto-page input {
        padding: 4px 8px !important;
        font-size: 13px !important;
    }
    .goto-page button {
        padding: 4px 12px !important;
        font-size: 13px !important;
    }
}

@media (max-width:900px) {
    .card-title {
        padding: 0
    }
}

@media (max-width:550px) {
    .cards-container {
        grid-template-columns: repeat(3, 1fr)
    }
    .card-title {
        font-size: clamp(6px, 3.5vw, 14px);
        line-height: 1.3;
        max-height: 2.6em
    }
}

@media (max-width:480px) {
    .card-specs {
        justify-content: flex-start;
        padding-left: 2px;
        margin-top: 6px;
    }
    .filter-bar {
        flex-direction: row;
        gap: 3px;
        padding: 2px
    }
    .filter-button {
        padding: 1px 3px;
        font-size: clamp(13px, 1.5vw, 14px)
    }
    .cards-container {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 5px;
    }
    .card {
        flex-direction: row;
        height: 110px;
        background: var(--bg-secondary);
        border-radius: 12px;
        padding: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    .card-image {
        width: 100px;
        height: 100%;
        padding: 0px;
        background: var(--bg-primary);
        flex-shrink: 0;
    }
    .card-content {
        width: 100%;
        height: 100%;
        padding: 12px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        text-align: left;
    }
    .card-title {
        font-size: 15px;
        text-align: left;
        -webkit-line-clamp: 2;
        margin-bottom: 4px;
    }
    .spec-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    .heart-icon {
        bottom: 5px;
        right: 5px;
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
    .no-data {
        padding: 30px 20px;
        font-size: 16px
    }
    .pagination {
        gap: 4px;
        row-gap: 8px;
        margin: 10px 0;
        width: 100%;
        justify-content: center;
    }
    .pagination button, .page-link {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 32px;
        min-height: 32px;
    }
    .pagination-info {
        margin-bottom: 8px;
        font-size: 12px;
        font-weight: 600;
    }
    .goto-page {
        flex-direction: column;
        gap: 5px !important;
    }
    .goto-page label {
        display: none;
    }
}

@media (max-width:350px) {
    .pagination {
        gap: 3px;
        row-gap: 6px;
    }
    .pagination button, .page-link {
        padding: 1px 4px;
        font-size: 10px;
        min-width: 20px;
    }
    .pagination-wrap {
        padding: 8px;
    }
}

@media (max-width:300px) {
    .cards-container {
        grid-template-columns: repeat(1, 1fr)
    }
}

.compare-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, .9);
    border: 2px solid var(--accent-color);
    border-radius: 4px;
    display: none;
    justify-content: center;
    z-index: 10;
}

.compare-checkbox.checked,
.compare-checkbox:hover,
.compare-mode .card:hover .compare-checkbox {
    background: var(--accent-color);
    color: #fff;
    display: flex;
}

.compare-checkbox.checked::after {
    content: '✓';
    font-size: 14px;
    font-weight: 700
}

.compare-selected {
    border: 2px solid var(--accent-color) !important;
    box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb), .3)
}

.compare-actions {
    display: none;
    gap: 10px;
    align-items: center
}

.compare-actions.show {
    height: 100%;
    display: flex
}

.compare-btn {
    height: 100%;
    color: #fff;
    border: none;
    background: 0 0;
    padding: 8px 16px;
    font-size: clamp(10px, 1.6vw, 15px)
}

.compare-btn.cancel-btn:hover,
.compare-btn:hover {
    background: #c82333
}

.compare-btn:disabled {
    cursor: not-allowed
}

.brand-review-card img {
    width: -webkit-fill-available;
    margin-bottom: -8px;
}
