/* =============================================================================
   CATEGORY / LISTING PAGE
   =============================================================================
   Breadcrumbs, page header, subcategory cards, toolbar, pagination, help block.

   The product grid and card live in css/product-card.css - the single shared
   component. Nothing here redeclares .dc-pgrid or .dc-pcard.
============================================================================= */

.dc-listing {
    display: block;
    overflow-x: clip;
    padding-bottom: var(--space-8);
}

.dc-listing img {
    max-width: 100%;
}


/* =============================================================================
   PAGE HEADER
============================================================================= */

.dc-listing-head {
    padding-block: var(--space-3) var(--space-6);
    max-width: 820px;
}

.dc-listing-eyebrow {
    margin: 0 0 var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--brand-text);
}

.dc-listing-h1 {
    margin: 0 0 var(--space-3);
    font-family: var(--font-heading);
    font-size: var(--text-5xl);
    font-weight: var(--fw-black);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text);
}

.dc-listing-intro {
    margin: 0 0 var(--space-2);
    font-size: var(--text-md);
    line-height: var(--leading-body);
    color: var(--text-muted);
}


/* =============================================================================
   TOOLBAR
============================================================================= */

.dc-listing-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.dc-listing-count {
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    color: var(--text);
}

.dc-listing-sortwrap {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.dc-listing-sortwrap select {
    padding: 6px var(--space-3);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text);
    background-color: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    cursor: pointer;
}

.dc-listing-searchnote {
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
    color: var(--text);
    background-color: var(--brand-tint);
    border: 1px solid var(--border-brand);
    border-radius: var(--radius-lg);
}

.dc-listing-searchnote[hidden] {
    display: none;
}

.dc-listing-searchnote a {
    color: var(--brand-text);
    font-weight: var(--fw-semibold);
}


/* =============================================================================
   EMPTY STATE
============================================================================= */

.dc-listing-empty {
    padding: var(--space-8) var(--space-4);
    text-align: center;
    background-color: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-xl);
}

.dc-listing-empty[hidden] {
    display: none;
}

.dc-listing-empty .material-symbols-outlined {
    font-size: 44px;
    color: var(--border-strong);
}

.dc-listing-empty h2 {
    margin: var(--space-2) 0;
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--fw-semibold);
    color: var(--text);
}

.dc-listing-empty p {
    margin: 0 auto var(--space-4);
    max-width: 52ch;
    font-size: var(--text-sm);
    line-height: var(--leading-body);
    color: var(--text-muted);
}


/* =============================================================================
   PAGINATION
============================================================================= */

.dc-listing-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-1);
    margin-top: var(--space-6);
}

.dc-listing-pager:empty {
    display: none;
}

.dc-pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding-inline: var(--space-2);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    color: var(--text);
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background-color var(--duration-base) var(--ease),
                color var(--duration-base) var(--ease),
                border-color var(--duration-base) var(--ease);
}

.dc-pag-btn:hover:not([disabled]):not(.is-active) {
    border-color: var(--border-brand);
    color: var(--brand-text);
}

.dc-pag-btn.is-active {
    background-color: var(--brand-text);
    border-color: var(--brand-text);
    color: var(--text-on-brand);
}

.dc-pag-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}


/* =============================================================================
   SEO / LONG-FORM TEXT BELOW THE GRID
   Rendered only on pages that actually carry such copy.
============================================================================= */

.dc-listing-seo {
    max-width: 820px;
    margin-top: var(--space-8);
}

.dc-listing-seo h2 {
    margin: 0 0 var(--space-3);
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: var(--fw-regular);
    line-height: var(--leading-heading);
    letter-spacing: var(--tracking-tight);
    color: var(--text);
}

.dc-listing-seo h3 {
    margin: var(--space-5) 0 var(--space-2);
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--fw-bold);
    color: var(--text);
}

.dc-listing-seo p {
    margin: 0 0 var(--space-3);
    font-size: var(--text-sm);
    line-height: var(--leading-body);
    color: var(--text-muted);
}


/* =============================================================================
   HELP / CONTACT BLOCK
   Carries over the copy from the old sidebar "Treba Vam pomoć?" widget.
============================================================================= */

.dc-listing-help {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-8);
    padding: var(--space-5);
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}

.dc-listing-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    color: var(--brand-text);
    background-color: var(--brand-tint);
    border-radius: var(--radius-circle);
}

.dc-listing-help-icon .material-symbols-outlined {
    font-size: 28px;
}

.dc-listing-help-text {
    flex: 1 1 260px;
    min-width: 0;
}

.dc-listing-help-text h2 {
    margin: 0 0 var(--space-1);
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--fw-bold);
    color: var(--text);
}

.dc-listing-help-text p {
    margin: 0;
    font-size: var(--text-sm);
    line-height: var(--leading-body);
    color: var(--text-muted);
}

.dc-listing-help-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}


/* =============================================================================
   RESPONSIVE
============================================================================= */

@media (max-width: 1023px) {
    .dc-listing-h1 {
        font-size: var(--text-4xl);
    }

}

@media (max-width: 767px) {
    .dc-listing-h1 {
        font-size: var(--text-3xl);
        letter-spacing: normal;
    }

    .dc-listing-head {
        padding-block: var(--space-2) var(--space-5);
    }


    .dc-listing-toolbar {
        padding: var(--space-3);
    }

    .dc-listing-help {
        padding: var(--space-4);
    }

    .dc-listing-help-actions .dc-btn {
        flex: 1 1 100%;
    }
}
