/* ============================================
   TechBridge B2B Platform - Main Stylesheet
   ============================================ */
@import url('variables.css');

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--tb-font-family);
    font-size: var(--tb-font-size-base);
    line-height: var(--tb-line-height);
    color: var(--tb-gray-900);
    background: var(--tb-body-bg);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--tb-primary); text-decoration: none; transition: var(--tb-transition); }
a:hover { color: var(--tb-primary-light); }

h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--tb-primary-dark); line-height: 1.3; margin-top: 0; }
h1 { font-size: var(--tb-font-size-h1); }
h2 { font-size: var(--tb-font-size-h2); }
h3 { font-size: var(--tb-font-size-h3); }

img { max-width: 100%; height: auto; }

.tb-container {
    max-width: var(--tb-container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* === Header === */
.tb-header {
    background: var(--tb-header-bg);
    box-shadow: var(--tb-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--tb-accent);
}

.tb-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--tb-header-height);
    gap: 24px;
}

.tb-logo img {
    height: 42px;
    width: auto;
}

.tb-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tb-nav a {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    color: var(--tb-gray-700);
    font-weight: 500;
    font-size: var(--tb-font-size-sm);
    border-radius: var(--tb-border-radius);
    transition: var(--tb-transition);
    white-space: nowrap;
}

.tb-nav a:hover,
.tb-nav a.active {
    color: var(--tb-primary);
    background: var(--tb-gray-100);
}

.tb-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tb-header-search {
    position: relative;
}

.tb-header-search input {
    width: 220px;
    padding: 8px 36px 8px 14px;
    border: 1px solid var(--tb-gray-300);
    border-radius: 20px;
    font-size: var(--tb-font-size-sm);
    background: var(--tb-gray-100);
    transition: var(--tb-transition);
    outline: none;
}

.tb-header-search input:focus {
    width: 280px;
    border-color: var(--tb-primary-light);
    background: var(--tb-white);
    box-shadow: 0 0 0 3px rgba(26,58,92,0.1);
}

.tb-header-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tb-gray-500);
}

.tb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: var(--tb-font-size-sm);
    font-weight: 600;
    border-radius: var(--tb-border-radius);
    border: none;
    cursor: pointer;
    transition: var(--tb-transition);
    text-decoration: none;
    white-space: nowrap;
}

.tb-btn-primary {
    background: var(--tb-primary);
    color: var(--tb-white);
}

.tb-btn-primary:hover {
    background: var(--tb-primary-light);
    color: var(--tb-white);
    transform: translateY(-1px);
    box-shadow: var(--tb-shadow);
}

.tb-btn-accent {
    background: var(--tb-accent);
    color: var(--tb-white);
}

.tb-btn-accent:hover {
    background: var(--tb-accent-hover);
    color: var(--tb-white);
    transform: translateY(-1px);
    box-shadow: var(--tb-shadow);
}

.tb-btn-outline {
    background: transparent;
    color: var(--tb-primary);
    border: 2px solid var(--tb-primary);
}

.tb-btn-outline:hover {
    background: var(--tb-primary);
    color: var(--tb-white);
}

.tb-btn-lg {
    padding: 14px 32px;
    font-size: var(--tb-font-size-base);
}

/* === Mobile Menu Toggle === */
.tb-mobile-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.tb-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--tb-gray-700);
    margin: 6px 0;
    transition: var(--tb-transition);
}

/* === Hero Section === */
.tb-hero {
    background: linear-gradient(135deg, var(--tb-primary-dark) 0%, var(--tb-primary) 50%, var(--tb-primary-light) 100%);
    color: var(--tb-white);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.tb-hero::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 40%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><circle cx="100" cy="100" r="80" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="2"/><circle cx="100" cy="100" r="120" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="2"/></svg>') center/contain no-repeat;
}

.tb-hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
}

.tb-hero h1 {
    font-size: 2.75rem;
    color: var(--tb-white);
    margin-bottom: 20px;
    font-weight: 800;
}

.tb-hero p {
    font-size: var(--tb-font-size-lg);
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.7;
}

.tb-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* === Section === */
.tb-section {
    padding: var(--tb-section-padding);
}

.tb-section-header {
    text-align: center;
    margin-bottom: 48px;
}

.tb-section-header h2 {
    margin-bottom: 12px;
}

.tb-section-header p {
    color: var(--tb-gray-700);
    font-size: var(--tb-font-size-lg);
    max-width: 600px;
    margin: 0 auto;
}

.tb-section-light { background: var(--tb-white); }
.tb-section-gray { background: var(--tb-gray-100); }

/* === Brand Grid === */
.tb-brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.tb-brand-card {
    background: var(--tb-white);
    border: 1px solid var(--tb-gray-200);
    border-radius: var(--tb-border-radius-lg);
    padding: 24px 16px;
    text-align: center;
    transition: var(--tb-transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.tb-brand-card:hover {
    border-color: var(--tb-primary-light);
    box-shadow: var(--tb-shadow-hover);
    transform: translateY(-4px);
    color: inherit;
}

.tb-brand-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 12px;
}

.tb-brand-card-name {
    font-weight: 600;
    font-size: var(--tb-font-size-sm);
    color: var(--tb-gray-700);
}

.tb-brand-card-count {
    font-size: 12px;
    color: var(--tb-gray-500);
    margin-top: 4px;
}

/* === Category Cards === */
.tb-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.tb-category-card {
    background: var(--tb-white);
    border-radius: var(--tb-border-radius-lg);
    padding: var(--tb-card-padding);
    box-shadow: var(--tb-shadow-sm);
    transition: var(--tb-transition);
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 20px;
}

.tb-category-card:hover {
    box-shadow: var(--tb-shadow-hover);
    transform: translateY(-2px);
    color: inherit;
}

.tb-category-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--tb-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.tb-category-card h3 {
    font-size: var(--tb-font-size-base);
    margin-bottom: 4px;
}

.tb-category-card p {
    font-size: var(--tb-font-size-sm);
    color: var(--tb-gray-500);
    margin: 0;
}

/* === Product Cards === */
.tb-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.tb-product-card {
    background: var(--tb-white);
    border-radius: var(--tb-border-radius-lg);
    overflow: hidden;
    box-shadow: var(--tb-shadow-sm);
    transition: var(--tb-transition);
}

.tb-product-card:hover {
    box-shadow: var(--tb-shadow-hover);
    transform: translateY(-2px);
}

.tb-product-card-img {
    height: 200px;
    background: var(--tb-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tb-product-card-img img {
    max-height: 180px;
    object-fit: contain;
}

.tb-product-card-body {
    padding: 16px 20px 20px;
}

.tb-product-card-title {
    font-size: var(--tb-font-size-sm);
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tb-product-card-title a {
    color: var(--tb-gray-900);
}

.tb-product-card-title a:hover {
    color: var(--tb-primary);
}

.tb-product-card-price {
    font-size: var(--tb-font-size-lg);
    font-weight: 700;
    color: var(--tb-primary);
}

.tb-product-card-price-login {
    font-size: var(--tb-font-size-sm);
    color: var(--tb-accent);
    font-weight: 600;
}

/* === CTA Block === */
.tb-cta {
    background: linear-gradient(135deg, var(--tb-primary) 0%, var(--tb-primary-dark) 100%);
    color: var(--tb-white);
    padding: 60px 0;
    text-align: center;
}

.tb-cta h2 { color: var(--tb-white); margin-bottom: 16px; }
.tb-cta p { opacity: 0.9; margin-bottom: 32px; font-size: var(--tb-font-size-lg); }

/* === Tabs (for brand categories) === */
.tb-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.tb-tab {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: var(--tb-font-size-sm);
    font-weight: 500;
    color: var(--tb-gray-700);
    background: var(--tb-white);
    border: 1px solid var(--tb-gray-300);
    cursor: pointer;
    transition: var(--tb-transition);
}

.tb-tab:hover,
.tb-tab.active {
    background: var(--tb-primary);
    color: var(--tb-white);
    border-color: var(--tb-primary);
}

/* === Footer === */
.tb-footer {
    background: var(--tb-primary-dark);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 0;
}

.tb-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tb-footer-brand p {
    font-size: var(--tb-font-size-sm);
    margin-top: 16px;
    line-height: 1.7;
}

.tb-footer h4 {
    color: var(--tb-white);
    font-size: var(--tb-font-size-base);
    margin-bottom: 20px;
    font-weight: 600;
}

.tb-footer-links { list-style: none; padding: 0; margin: 0; }
.tb-footer-links li { margin-bottom: 10px; }
.tb-footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: var(--tb-font-size-sm);
    transition: var(--tb-transition);
}
.tb-footer-links a:hover { color: var(--tb-accent); }

.tb-footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tb-footer-contact li {
    margin-bottom: 12px;
    font-size: var(--tb-font-size-sm);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.tb-footer-bottom {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* === Breadcrumbs === */
.tb-breadcrumbs {
    padding: 8px 0 4px;
    font-size: var(--tb-font-size-sm);
    color: var(--tb-gray-500);
}

.tb-breadcrumbs a { color: var(--tb-gray-500); }
.tb-breadcrumbs a:hover { color: var(--tb-primary); }

/* === Workarea === */
.tb-workarea {
    min-height: 60vh;
}

.tb-content {
    padding: 16px 0 40px;
}

/* === Responsive === */
@media (max-width: 991px) {
    .tb-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .tb-hero h1 { font-size: 2rem; }
    .tb-hero { padding: 60px 0; }
    .tb-nav { display: none; }
    .tb-mobile-toggle { display: block; }
    .tb-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--tb-header-height);
        left: 0;
        right: 0;
        background: var(--tb-white);
        box-shadow: var(--tb-shadow-lg);
        padding: 16px;
        z-index: 999;
    }
    .tb-header-search input { width: 160px; }
    .tb-header-search input:focus { width: 200px; }
}

@media (max-width: 767px) {
    .tb-footer-grid {
        grid-template-columns: 1fr;
    }
    .tb-footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .tb-hero h1 { font-size: 1.75rem; }
    .tb-hero-actions { flex-direction: column; }
    .tb-brand-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    .tb-section { padding: 40px 0; }
    .tb-header-search { display: none; }
}

/* === Bitrix Panel Override === */
#panel { margin-bottom: 0 !important; }

/* =========================================================
   Catalog (custom minimal template)
   ========================================================= */
.tb-catalog { max-width: 1320px; margin: 0 auto; padding: 20px; }

.tb-catalog__header {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 8px 0 12px;
    border-bottom: 1px solid var(--tb-gray-200);
    margin-bottom: 16px;
}
.tb-catalog__logo {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: var(--tb-white);
    border-radius: var(--tb-border-radius);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--tb-shadow-sm);
}
.tb-catalog__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tb-catalog__title-block { flex: 1; min-width: 0; }
.tb-catalog__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tb-gray-900);
    margin: 0;
    line-height: 1.2;
    display: inline-block;
}
.tb-catalog__desc { color: var(--tb-gray-700); margin: 4px 0 0; font-size: 13px; }
.tb-catalog__count {
    color: var(--tb-gray-500);
    font-size: 13px;
    display: inline-block;
    margin-left: 12px;
    font-weight: 400;
}

/* Toolbar */
.tb-catalog__toolbar {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    background: var(--tb-white);
    padding: 12px 16px;
    border-radius: var(--tb-border-radius);
    box-shadow: var(--tb-shadow-sm);
    margin-bottom: 20px;
}
.tb-catalog__sort,
.tb-catalog__perpage {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.tb-catalog__label {
    font-size: 13px;
    color: var(--tb-gray-500);
    margin-right: 4px;
}
.tb-chip {
    display: inline-block;
    padding: 5px 12px;
    font-size: 13px;
    color: var(--tb-gray-700);
    background: var(--tb-gray-100);
    border-radius: 6px;
    text-decoration: none;
    transition: var(--tb-transition);
}
.tb-chip:hover { background: var(--tb-gray-200); color: var(--tb-primary); }
.tb-chip--active { background: var(--tb-primary); color: var(--tb-white); }
.tb-chip--active:hover { background: var(--tb-primary-light); color: var(--tb-white); }

/* List */
.tb-items { display: flex; flex-direction: column; gap: 6px; }

.tb-item {
    display: grid;
    grid-template-columns: 70px 1fr 220px;
    gap: 14px;
    align-items: center;
    background: var(--tb-white);
    border: 1px solid var(--tb-gray-200);
    border-radius: var(--tb-border-radius);
    padding: 8px 12px;
    transition: var(--tb-transition);
}
.tb-item:hover {
    border-color: var(--tb-primary-light);
    box-shadow: var(--tb-shadow-sm);
}
.tb-item__img {
    width: 70px;
    height: 70px;
    background: var(--tb-gray-100);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-decoration: none;
}
.tb-item__img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--tb-transition);
}
.tb-item:hover .tb-item__img img { transform: scale(1.04); }
.tb-item__no-img { color: var(--tb-gray-300); }

.tb-item__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tb-item__article { font-size: 11px; color: var(--tb-gray-500); text-transform: uppercase; letter-spacing: 0.03em; }
.tb-item__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--tb-gray-900);
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tb-item__title:hover { color: var(--tb-primary); }
.tb-item__desc { display: none; }
.tb-item__stock { margin-top: 2px; }

.tb-item__actions {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 8px;
    align-items: center;
}
.tb-item__price {
    font-size: 15px;
    font-weight: 700;
    color: var(--tb-primary);
    text-align: right;
    line-height: 1;
    white-space: nowrap;
}
.tb-item__price--req {
    color: var(--tb-accent);
    font-size: 12px;
    font-weight: 600;
}

/* Badge */
.tb-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.tb-badge--ok { background: #e6f4ea; color: #1e7b34; }
.tb-badge--warn { background: #fff3e0; color: #b75d0a; }

/* Quantity */
.tb-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--tb-gray-300);
    border-radius: var(--tb-border-radius);
    overflow: hidden;
    background: var(--tb-white);
}
.tb-qty__btn {
    width: 28px;
    height: 30px;
    border: none;
    background: var(--tb-gray-100);
    color: var(--tb-gray-700);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tb-transition);
    padding: 0;
    line-height: 1;
}
.tb-qty__btn:hover { background: var(--tb-gray-200); color: var(--tb-primary); }
.tb-qty__input {
    width: 48px;
    min-width: 48px;
    height: 30px;
    padding: 0 4px;
    border: none;
    outline: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--tb-gray-900);
    background: var(--tb-white);
    -moz-appearance: textfield;
}
.tb-qty__input::-webkit-outer-spin-button,
.tb-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Pagination */
.tb-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.tb-pagination__link {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 34px;
    text-align: center;
    padding: 0 10px;
    color: var(--tb-gray-700);
    text-decoration: none;
    background: var(--tb-white);
    border: 1px solid var(--tb-gray-200);
    border-radius: 6px;
    transition: var(--tb-transition);
    font-size: 14px;
}
.tb-pagination__link:hover { background: var(--tb-gray-100); color: var(--tb-primary); border-color: var(--tb-gray-300); }
.tb-pagination__link--active {
    background: var(--tb-primary);
    color: var(--tb-white);
    border-color: var(--tb-primary);
}
.tb-pagination__link--active:hover { background: var(--tb-primary-light); color: var(--tb-white); }

/* Empty state */
.tb-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--tb-white);
    border-radius: var(--tb-border-radius-lg);
    color: var(--tb-gray-700);
}

/* Brand grid (catalog root) */
.tb-brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.tb-brand-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--tb-white);
    border: 1px solid var(--tb-gray-200);
    border-radius: var(--tb-border-radius-lg);
    padding: 20px 16px;
    min-height: 140px;
    text-decoration: none;
    transition: var(--tb-transition);
    position: relative;
}
.tb-brand-card:hover {
    border-color: var(--tb-primary-light);
    box-shadow: var(--tb-shadow-hover);
    transform: translateY(-2px);
}
.tb-brand-card img {
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
    margin-bottom: 8px;
}
.tb-brand-card__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--tb-gray-700);
    text-align: center;
}
.tb-brand-card__count {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 11px;
    color: var(--tb-gray-500);
    background: var(--tb-gray-100);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Detail page */
.tb-detail {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    padding: 20px 0;
}
.tb-detail__gallery {
    background: var(--tb-white);
    border-radius: var(--tb-border-radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    box-shadow: var(--tb-shadow-sm);
}
.tb-detail__gallery img { max-width: 100%; max-height: 400px; object-fit: contain; }
.tb-detail__no-image { color: var(--tb-gray-500); }
.tb-detail__title { font-size: 2rem; margin: 0 0 12px; color: var(--tb-gray-900); }
.tb-detail__meta { color: var(--tb-gray-500); font-size: 13px; margin-bottom: 16px; }
.tb-detail__price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--tb-primary);
    margin-bottom: 20px;
}
.tb-detail__price--request {
    color: var(--tb-accent);
    font-size: 1.5rem;
}
.tb-detail__buy {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.tb-detail__description {
    background: var(--tb-white);
    padding: 20px;
    border-radius: var(--tb-border-radius);
    color: var(--tb-gray-700);
    line-height: 1.6;
}
.tb-detail__specs {
    background: var(--tb-white);
    padding: 20px;
    border-radius: var(--tb-border-radius);
    margin-top: 16px;
}
.tb-detail__specs h3 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
    color: var(--tb-gray-900);
}
.tb-detail__specs table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.tb-detail__specs table td,
.tb-detail__specs table th {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--tb-gray-200);
    vertical-align: top;
}
.tb-detail__specs table tr:last-child td,
.tb-detail__specs table tr:last-child th {
    border-bottom: none;
}
.tb-detail__specs table td:first-child,
.tb-detail__specs table th:first-child {
    color: var(--tb-gray-500);
    width: 45%;
    font-weight: 500;
}
.tb-detail__specs table td:last-child {
    color: var(--tb-gray-900);
    font-weight: 500;
}

/* Buttons */
.tb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border: none;
    border-radius: var(--tb-border-radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--tb-transition);
    font-family: inherit;
    line-height: 1.2;
}
.tb-btn--primary { background: var(--tb-primary); color: var(--tb-white); }
.tb-btn--primary:hover { background: var(--tb-primary-light); color: var(--tb-white); }
.tb-btn--lg { padding: 12px 24px; font-size: 15px; }

/* Responsive */
@media (max-width: 992px) {
    .tb-item { grid-template-columns: 120px 1fr 220px; gap: 16px; }
    .tb-item__img { width: 120px; height: 120px; }
    .tb-detail { grid-template-columns: 300px 1fr; gap: 24px; }
}
@media (max-width: 767px) {
    .tb-catalog__header { flex-direction: column; text-align: center; gap: 16px; }
    .tb-item {
        grid-template-columns: 100px 1fr;
        grid-template-rows: auto auto;
    }
    .tb-item__img { width: 100px; height: 100px; }
    .tb-item__actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        padding-top: 12px;
        border-top: 1px solid var(--tb-gray-200);
        flex-wrap: wrap;
    }
    .tb-item__price { text-align: left; }
    .tb-detail { grid-template-columns: 1fr; }
    .tb-catalog__toolbar { flex-direction: column; align-items: stretch; }
}
@media (max-width: 480px) {
    .tb-catalog__title { font-size: 1.5rem; }
    .tb-item { grid-template-columns: 80px 1fr; }
    .tb-item__img { width: 80px; height: 80px; }
}

/* Add to cart JS */
.tb-btn.is-loading { opacity: 0.7; cursor: wait; }
.tb-btn.is-success { background: #28a745; }

/* =========================================================
   Filter Drawer (left slide-out)
   ========================================================= */
.tb-chip--filter {
    display: inline-flex;
    align-items: center;
    border: none;
    font: inherit;
    cursor: pointer;
    position: relative;
}
.tb-chip__badge {
    display: inline-block;
    background: var(--tb-accent);
    color: var(--tb-white);
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.tb-filter {
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
    visibility: hidden;
}
.tb-filter.is-open {
    pointer-events: auto;
    visibility: visible;
}
.tb-filter__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.tb-filter.is-open .tb-filter__backdrop { opacity: 1; }

.tb-filter__panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 340px;
    max-width: 85vw;
    background: var(--tb-white);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}
.tb-filter.is-open .tb-filter__panel { transform: translateX(0); }

.tb-filter__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--tb-gray-200);
}
.tb-filter__head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--tb-gray-900);
}
.tb-filter__close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--tb-gray-100);
    border-radius: 8px;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: var(--tb-gray-700);
    transition: var(--tb-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.tb-filter__close:hover { background: var(--tb-gray-200); color: var(--tb-primary); }

.tb-filter__body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}
.tb-filter__group {
    margin-bottom: 20px;
}
.tb-filter__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--tb-gray-700);
    margin-bottom: 8px;
}
.tb-filter__input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--tb-gray-300);
    border-radius: var(--tb-border-radius);
    font-size: 14px;
    outline: none;
    transition: var(--tb-transition);
    background: var(--tb-white);
    font-family: inherit;
}
.tb-filter__input:focus {
    border-color: var(--tb-primary);
    box-shadow: 0 0 0 3px rgba(26,58,92,0.08);
}
.tb-filter__range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.tb-filter__check {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--tb-gray-900);
}
.tb-filter__check input {
    width: 18px;
    height: 18px;
    accent-color: var(--tb-primary);
}

.tb-filter__foot {
    padding: 16px 20px;
    border-top: 1px solid var(--tb-gray-200);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tb-filter__reset {
    text-align: center;
    color: var(--tb-gray-500);
    font-size: 13px;
    text-decoration: none;
    transition: var(--tb-transition);
}
.tb-filter__reset:hover { color: var(--tb-danger); }
