/* =========================================================
   SEARCH RESULTS — BASED ON LIST PAGE (COMPACT VERSION)
   ========================================================= */

/* =========================================================
   PAGINATION (UNCHANGED)
   ========================================================= */

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 20px;
    font-family: "PT Sans", Arial, Helvetica, sans-serif;
    font-size: 12px;
}

.pagination a,
.pagination span.current,
.pagination .dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 32px;
    padding: 0 14px;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    text-decoration: none;
    box-sizing: border-box;
}

.pagination span.current {
    background: #000;
    color: #fff;
}

/* =========================================================
   BREADCRUMBS (SEARCH)
   ========================================================= */

.catalog-breadcrumbs {
    margin: 15px 0;
    padding-left: 0;
    font-family: "PT Sans", Helvetica Neue, Arial, sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    color: #a3a3a3;
}

.catalog-breadcrumbs .breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.catalog-breadcrumbs .breadcrumbs a,
.catalog-breadcrumbs .breadcrumbs span {
    display: inline-flex;
    align-items: center;
}

/* Magento-style breadcrumb arrow (stem + solid triangle) */
.catalog-breadcrumbs .breadcrumbs .crumb-sep {
    position: relative;
    width: 14px;
    height: 10px;
    margin: 0 8px;
    flex-shrink: 0;
}

/* stem */
.catalog-breadcrumbs .breadcrumbs .crumb-sep::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 9px;
    height: 2px;
    background-color: #b5b5b5;
    transform: translateY(-50%);
}

/* solid triangle head */
.catalog-breadcrumbs .breadcrumbs .crumb-sep::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 9px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid #b5b5b5;
    transform: translateY(-50%);
}

.catalog-breadcrumbs .breadcrumbs a {
    color: #a3a3a3;
    text-decoration: none;
}

.catalog-breadcrumbs .breadcrumbs a:hover {
    color: #000;
    text-decoration: underline;
}

/* =========================================================
   LAYOUT
   ========================================================= */

.catalog-columns {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.catalog-sidebar {
    width: 260px;
    flex-shrink: 0;
    font-family: "PT Sans", Helvetica Neue, Arial, sans-serif;
    font-size: 13px;
    color: #555;
}

.catalog-main {
    flex: 1 1 auto;
    min-width: 0;
}

/* =========================================================
   TOOLBAR (RESTORED — IDENTICAL TO LIST PAGE)
   ========================================================= */

.catalog-toolbar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    margin-bottom: 10px;
    font-family: "PT Sans", Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #111;
}

.toolbar-items {
    white-space: nowrap;
}

.toolbar-limit,
.toolbar-sort {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    margin-left: auto;
}

/* =========================================================
   TOOLBAR SELECT + CHEVRON (VERBATIM FROM LIST.CSS)
   ========================================================= */

/* Toolbar select wrapper */
.toolbar-select {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Native select */
.toolbar-select select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    padding-left: 8px;
    padding-right: 22px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    border-bottom: 1px solid #d6d6d6;
}

/* Arrow container */
.toolbar-select-arrow {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: -14px;
    margin-right: 8px;
    pointer-events: none;
    position: relative;
    top: -1px;
}

.toolbar-select-arrow::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-right: 2px solid #777;
    border-bottom: 2px solid #777;
    top: 1px;
    left: 1px;
    transform: rotate(45deg);
}

/* =========================================================
   SEARCH RESULTS LIST (COMPACT)
   ========================================================= */

.catalog-list {
    display: flex;
    flex-direction: column;
    gap: 20px; /* tighter spacing */
}

.catalog-list-item {
    display: grid;
    grid-template-columns: 200px 200px minmax(360px, 1fr);
    column-gap: 24px;
    align-items: center; /* vertical centering of ALL cells */
}


/* IMAGE — SMALLER THAN LIST PAGE */
.catalog-list-image {
    width: 200px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #fff;
}

.catalog-list-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* INFO — MORE COMPACT */
.catalog-list-info {
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertical centering inside cell */
    text-align: center;
    padding: 12px 16px;
    flex: 1 1 auto;
    padding: 8px 12px;
    text-align: center;
    font-family: "PT Sans", Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.25;
    color: #555;
}

.catalog-list-info div {
    margin-bottom: 3px;
}

/* =========================================================
   SIDEBAR CATEGORY TITLE (MATCH LIST PAGE)
   ========================================================= */

.catalog-sidebar .category-block h3 {
    margin: 0 0 13px;
    font-size: 23px;
    font-weight: 200;
    text-transform: uppercase;
    color: #000;
    font-family: "PT Sans", Helvetica Neue, Arial, sans-serif;
}

/* Match list page category spacing */
.catalog-sidebar .filter-list li {
    margin: 2px 0;              /* vertical spacing between rows */
}

.catalog-sidebar .filter-list li a {
    font-size: 14px;
    line-height: 1.6;           /* IMPORTANT: increases row height */
    color: #555;
    padding-left: 2px;
}

/* ===== SIDEBAR CATEGORY TREE ===== */

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin: 5px 0;
}

.filter-list li a {
    font-size: 14px;
    color: #555;
    text-decoration: none;
    padding-left: 2px;
}

.filter-list li a:hover {
    text-decoration: underline;
}

.category-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-item {
    position: relative;
}

.category-count {
    display: inline-block;
    margin-left: 6px;
    padding: 0 4px;
    font-size: 11px;
    line-height: 16px;
    color: #b5b5b5;
    border: 1px solid #cfcfcf;
    border-radius: 3px;
    vertical-align: middle;
}

/* =========================================================
   SEARCH SIDEBAR — TOP CATEGORY GROUPING
   ========================================================= */

/* Top category labels (Coins / Banknotes / etc.) */
.catalog-sidebar .category-item.category-root strong {
    display: block;
    font-size: 14px;          /* slightly larger than children */
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #000;
    margin: 12px 0 6px;
}

/* Indent result categories under top category */
.catalog-sidebar .category-item:not(.category-root) {
    padding-left: 6px;
}

/* =========================================================
   PAGINATION — COPY FROM LIST.CSS (REQUIRED)
   ========================================================= */

.pagination .nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 32px;
    height: 32px;
    padding: 0;

    border: 1px solid #000;
    background: #fff;
    text-decoration: none;

    position: relative;
}

.pagination .nav::before {
    content: "";
    width: 8px;
    height: 8px;

    border-top: 1.5px solid #000;
    border-right: 1.5px solid #000;

    display: block;
}

.pagination .nav.prev::before {
    transform: rotate(-135deg) translateX(-2px) translateY(1px);
}

.pagination .nav.next::before {
    transform: rotate(45deg) translateX(-1px) translateY(1px);
}

/* Shift GO TO PAGE block to the right */
.pagination .goto {
    margin-left: 30px;
}

/* Go-to-page input */
.pagination .goto input {
    height: 30px;
    min-width: 32px;
    padding: 0 8px;
    border: 1px solid #000;
    background: #fff;
    font-size: 12px;
    color: #000;
    line-height: 28px;
}

/* Go-to-page button */
.pagination .goto button {
    height: 32px;
    min-width: 32px;
    padding: 0 8px;
    border: 1px solid #000;
    background: #000;
    font-size: 12px;
    color: #fff;
    line-height: 28px;
}

/* Remove number input spinners */
.pagination .goto input[type="number"]::-webkit-inner-spin-button,
.pagination .goto input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pagination .goto input[type="number"] {
    -moz-appearance: textfield;
}

/* Restore horizontal layout for search result list items */
.catalog-list-item > a.catalog-list-link {
	display: contents;
}

/* Ensure images remain block-level and sized correctly */
.catalog-list-item img {
    max-width: 100%;
    height: auto;
    display: block;
}

.catalog-list-image img[src$="/media/no_image.png"] {
    transform: scale(0.6);
    transform-origin: center center;
    opacity: 0.75;
}

.catalog-grid-image img[src$="/media/no_image.png"] {
    transform: scale(0.7);
    transform-origin: center center;
    opacity: 0.75;
}

.category-item a.active-filter {
    font-weight: 600;
    color: #000;
}

.category-item a.active-filter .category-count {
    background: #000;
    color: #fff;
}

/* =========================
   Search – Clear filter
   ========================= */

.clear-filter {
    text-align: right;
    margin-bottom: 8px;
}

.clear-filter a {
    color: #c00000;
    text-decoration: none;
    font-weight: normal;
}

.clear-filter a:hover {
    text-decoration: underline;
}
