/* gearshop — catalog: hero, category tiles, product cards, pagination, sidebar tree, search */

/* Home hero */
.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(120deg, #173f73 0%, #1f5fae 60%, #2b74c9 100%);
    color: #fff; border-radius: var(--radius); padding: 32px 32px 28px; margin-bottom: 24px;
}
.hero::after {
    content: ""; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px; border-radius: 50%;
    border: 36px dashed rgba(255, 255, 255, .08);
}
.hero h1 { color: #fff; font-size: 30px; margin-bottom: 8px; max-width: 760px; position: relative; }
.hero p { color: #d6e4f5; max-width: 700px; margin-bottom: 20px; position: relative; }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; position: relative; }
.hero-stat { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius-sm); padding: 12px 14px; }
.hero-stat b { display: block; font-size: 24px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hero-stat span { font-size: 13px; color: #d6e4f5; }

/* Category header */
.cat-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 6px; }
.cat-head h1 { margin: 0; }
.cat-count { color: var(--ink-3); font-size: 15px; }
.cat-desc { color: var(--ink-2); max-width: 900px; margin-bottom: 18px; }
.cat-desc p:last-child { margin-bottom: 0; }

/* Category tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 16px 0 28px; }
.tile {
    display: flex; align-items: center; gap: 12px; min-width: 0;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: #b9cde8; text-decoration: none; color: var(--ink); transform: translateY(-1px); }
.tile-img { flex: 0 0 64px; width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--line-2); overflow: hidden; }
.tile-img img { width: 64px; height: 64px; object-fit: cover; }
.tile-name { display: block; font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.tile-count { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; }
.tiles-lg { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tiles-lg .tile { padding: 16px; }
.tiles-lg .tile-img, .tiles-lg .tile-img img { flex-basis: 88px; width: 88px; height: 88px; }
.tiles-lg .tile-name { font-size: 16px; }

/* Toolbar above the grid */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; font-size: 13.5px; color: var(--ink-3); }
.section-title { font-size: 19px; margin: 0; color: var(--ink); }

/* Product grid & card */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card {
    display: flex; flex-direction: column; min-width: 0;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; transition: box-shadow .15s, border-color .15s;
}
.card:hover { border-color: #b9cde8; box-shadow: 0 6px 24px rgba(20, 32, 48, .12); }
.card-img { display: block; aspect-ratio: 1 / 1; background: #eef2f6; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.card:hover .card-img img { transform: scale(1.03); }
.card-img-empty { display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 13px; }
.card-body { flex: 1 1 auto; padding: 12px 14px 4px; }
.card-sku { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-bottom: 4px; }
.card-title { font-size: 14.5px; line-height: 1.35; font-weight: 600; margin: 0 0 8px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); }
.card-specs { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.card-specs li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-top: 1px dashed var(--line-2); }
.card-specs span { color: var(--ink-3); }
.card-specs b { font-weight: 600; color: var(--ink-2); text-align: right; white-space: nowrap; }
.card-foot { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px 14px; }
.card-price { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.card-price.is-request { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.card-brand { font-size: 12.5px; color: var(--ink-3); }

/* Pagination (html/pagination.php) */
.pagination-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 28px 0 8px; }
.pager ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pager a, .pager span {
    display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 600;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pager .is-current span { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager-counter { font-size: 13px; color: var(--ink-3); }

/* Sidebar catalog tree (mod_k2_tools categories override) */
.cat-tree ul { list-style: none; margin: 0; padding: 0; }
.cat-tree > ul > li { margin-bottom: 10px; }
.cat-tree > ul > li > a { display: block; font-weight: 800; color: var(--ink); font-size: 14.5px; padding: 4px 0; }
.cat-tree ul ul a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; border-radius: var(--radius-sm); color: var(--ink-2); font-size: 14px; }
.cat-tree ul ul a:hover { background: var(--line-2); text-decoration: none; color: var(--ink); }
.cat-tree ul ul ul { margin: 2px 0 4px 10px; border-left: 2px solid var(--line-2); padding-left: 6px; }
.cat-tree ul ul ul a { font-size: 13.5px; }
.cat-tree .n { flex: 0 0 auto; white-space: nowrap; color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.cat-tree .is-active > a { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.cat-tree .is-open > a { color: var(--ink); font-weight: 600; }

/* Search results (K2 generic view) */
.search-page .search-form { max-width: 640px; margin: 0 0 16px; }
.empty-state { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--ink-2); }

@media (max-width: 900px) {
    .hero { padding: 24px 20px; }
    .hero h1 { font-size: 24px; }
    .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .card-body { padding: 10px 10px 2px; }
    .card-foot { padding: 8px 10px 12px; }
    .card-specs li:nth-child(n+3) { display: none; }
    .card-title { font-size: 13.5px; }
    .card-price { font-size: 16px; }
    .tiles, .tiles-lg { grid-template-columns: minmax(0, 1fr); }
    .hero-stat b { font-size: 20px; }
}
@media (max-width: 380px) {
    .products { grid-template-columns: minmax(0, 1fr); }
}
