:root {
    --ink: #1a1d24;
    --blue: #278df2;
    --green: #16a34a;
    --orange: #f59e0b;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

li{
    list-style: none;
}

.container {
    max-width: 1376px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Brand hero ---------- */
.brand-hero {
    padding: 48px 0 32px;
}

.brand-hero .inner {
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 36px;
    align-items: start;
}

/* No logo: brand info takes all the space left of the stat card */
.brand-hero .inner.no-logo {
    grid-template-columns: 1fr 260px;
}

.brand-logo {
    border: 1px solid #0d0d0d;
    border-radius: 10px;
    padding: 36px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1/1;
}

.brand-logo img {
    max-width: 100%;
}

.brand-info {
    min-width: 0;
}

.brand-info h1 {
    font-size: 32px;
    margin: 0 0 15px;
}

.brand-info .description{
    position: relative;
}

.brand-info .description .info{
    max-height: 210px;
    overflow: hidden;
}

.brand-info .description p {
    line-height: 1.6;
    font-size: 15px;
}

.brand-info .description .show-more{
    display: none;
    width: 100%;
    height: 44px;
    margin: 0;
    position: absolute;
    background: rgba(255, 255, 255, .8);
    color: #278DF0;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    line-height: 42px;
    bottom: 0;
    left: 0;
}

.brand-info .description.active .info{
    max-height: fit-content;
}

.brand-info .description.active{
    padding-bottom: 44px;
}

.no-logo .brand-info p {
    max-width: none;
}

.meta-row {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item .item-icon {
    font-size: 20px;
}

.meta-item .label {
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-card {
    border: 1px solid #e8e8e8;
    border-radius: 5px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0px 0px 2px rgba(232, 232, 232, 0.5);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid #e8e8e8;
}

.stat-item:first-child{
    border-top: none;
}

.stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #278df2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-item .num {
    font-weight: 800;
    font-size: 16px;
}

.stat-item .sub {
    font-size: 13px;
}

/* ---------- Filters ---------- */
.product-section {
    border-top: 1px solid #e8e8e8;
    padding: 24px 0;
}

.filters {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    flex-wrap: wrap;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-field label {
    font-size: 13px;
    font-weight: 700;
}

.filter-field select {
    padding: 9px 14px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
    background: #fff;
}

.reset-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e8e8e8;
    background: #fff;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.view-toggle {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.view-toggle button {
    border: 1px solid #e8e8e8;
    background: #fff;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-toggle button.active {
    border-color: #278df2;
    color: #278df2;
}

/* ---------- Card view ---------- */
.card-view ul{
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    padding: 28px 0;
}

.product-item {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 20px 10px;
    position: relative;
}

.badge-new {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #278df2;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
}

.product-item .inner{
    margin-bottom: 10px;
}

.product-item .img-wrap {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-item .img-wrap img {
    height: 100%;
    object-fit: contain;
}

.product-item .info{
    flex: 1;
}

.product-item h2 {
    font-size: 16px;
    margin-bottom: 8px;
}

.product-item .specs {
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 10px;
}

.product-item .rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 14px;
}

.product-item .rating-icon {
    color: #278df2;
    font-size: 24px;
}

.product-item .stars span{
    font-weight: bold;
    margin-right: 5px;
}

.product-item .rating {
    font-size: 12px;
}

.product-item .btn-row {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    text-align: center;
    padding: 9px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    border: 1.5px solid #278df2;
}

.btn-outline {
    color: #278df2;
    background: #fff;
}

.btn-fill {
    color: #fff;
    background: #278df2;
}

/* ---------- Table view ---------- */
.table-view .inner{
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

thead th {
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    padding: 14px 16px;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
}

tbody td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
}

tbody tr:last-child td {
    border-bottom: none;
}

.prod-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prod-cell .thumb {
    width: 60px;
    height: 60px;
    border-radius: 2px;
}

.prod-cell a{
    font-size: 16px;
    color: #111111;
    font-weight: 700;
}

.status-available {
    color: var(--green);
    font-weight: 700;
}

.status-discontinued {
    color: #9ca3af;
    font-weight: 600;
}

.status-backorder {
    color: var(--orange);
    font-weight: 700;
}

.table-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.table-foot .count {
    font-size: 13px;
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px 0 8px;
    flex-wrap: wrap;
}

.pagination a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.pagination a.active {
    background: #278df2;
    border-color: #278df2;
    color: #fff;
}

.pagination a.wide {
    width: auto;
    padding: 0 12px;
}

/* ---------- Trust badges ---------- */
.trust-section {
    padding: 36px 0;
}

.trust-section ul {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.trust-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: #278df2;
}

.trust-item h4 {
    font-size: 15px;
    margin-bottom: 2px;
}

.trust-item p {
    font-size: 13px;
}

@media (max-width: 1400px) {
    .card-view ul {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width:991px) {
    .brand-hero .inner {
        grid-template-columns: 220px 1fr;
    }

    /* No logo: single column, brand info full width, stat card below */
    .brand-hero .inner.no-logo {
        grid-template-columns: 1fr;
    }

    .stat-card {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
    }

    .stat-item {
        flex: 1;
    }

    .trust-section ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width:767px) {
    .container {
        padding: 0 16px;
    }

    .brand-hero {
        padding: 28px 0 20px;
    }

    .brand-hero .inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .brand-logo {
        max-width: 200px;
    }

    .brand-logo-box {
        max-width: 200px;
        aspect-ratio: 1/1;
    }

    .brand-info h1 {
        font-size: 24px;
    }

    .meta-row {
        gap: 20px;
    }

    .stat-card {
        flex-direction: column;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-field select {
        width: 100%;
    }

    .reset-btn {
        width: 100%;
        justify-content: center;
    }

    .view-toggle {
        margin-left: 0;
        width: 100%;
    }

    .view-toggle button {
        flex: 1;
        justify-content: center;
    }

    .card-view ul {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 14px;
        padding: 20px 0;
    }

    .product-item {
        padding: 12px;
    }

    .product-item h2 {
        font-size: 14px;
    }

    .product-item .specs {
        font-size: 11.5px;
    }

    .btn {
        font-size: 12px;
        padding: 8px 4px;
    }

    .pagination a {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .table-foot {
        flex-direction: column;
        align-items: flex-start;
    }

    .trust-section ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width:400px) {
    .card-view ul {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 992px) {
    .product-item h2 a{
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        max-height: 64px;
    }
    .product-item .inner{
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .product-item .img-wrap {
        width: 120px;
    }
}