/* ===== Products category grid ===== */
@media only screen and (min-width: 0rem) {
    #products-1863 {
        padding: var(--sectionPadding);
        position: relative;
        z-index: 1;
    }

    #products-1863 .cs-container {
        width: 100%;
        max-width: 80rem;
        margin: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: clamp(2.5rem, 5vw, 3.5rem);
    }

    #products-1863 .cs-content {
        text-align: center;
        width: 100%;
        max-width: 46rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #products-1863 .cs-title {
        max-width: 24ch;
    }

    #products-1863 .cs-text {
        margin-top: 0.5rem;
    }

    #products-1863 .cs-card-group {
        width: 100%;
        margin: 0;
        padding: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    /* Card: text block, then a placeholder photo panel below on mobile */
    #products-1863 .cs-item {
        list-style: none;
        background-color: #fff;
        border: 1px solid #e8e8e8;
        border-radius: 0.75rem;
        overflow: hidden;
        display: flex;
        flex-direction: column-reverse;
    }

    #products-1863 .cs-flex {
        padding: clamp(1.25rem, 3vw, 1.75rem);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    #products-1863 .cs-h3 {
        font-size: 1.25rem;
        line-height: 1.2em;
        font-weight: 700;
        margin: 0 0 0.75rem 0;
        color: var(--headerColor);
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    #products-1863 .cs-icon-wrapper {
        width: 3rem;
        height: 3rem;
        flex: none;
        border-radius: 50%;
        background-color: var(--primary);
        color: #fff;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #products-1863 .cs-item-text {
        font-size: 0.875rem;
        line-height: 1.5em;
        margin: 0 0 1rem 0;
        color: var(--bodyTextColor);
    }

    #products-1863 .cs-ul {
        width: 100%;
        margin: 0 0 1.25rem 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    #products-1863 .cs-li {
        position: relative;
        list-style: none;
        font-size: 0.875rem;
        line-height: 1.4em;
        padding-left: 1.25rem;
        color: var(--bodyTextColor);
    }

    #products-1863 .cs-li:before {
        content: "";
        position: absolute;
        top: 0.5em;
        left: 0;
        width: 0.375rem;
        height: 0.375rem;
        border-radius: 50%;
        background-color: var(--primary);
    }

    #products-1863 .cs-product-link {
        margin-top: auto;
        font-family: "Oswald", Arial, sans-serif;
        font-size: 0.875rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        text-decoration: none;
        color: var(--primary);
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        transition: gap 0.2s, color 0.2s;
    }

    #products-1863 .cs-product-link:hover {
        gap: 0.75rem;
        color: var(--secondary);
    }

    /* Placeholder photo panel — swap for a real product image later */
    #products-1863 .cs-picture {
        width: 100%;
        min-height: 11rem;
        background-color: var(--secondaryShade);
        border-bottom: 1px solid #e8e8e8;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #products-1863 .cs-picture img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    #products-1863 .cs-picture-hint {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.8125rem;
        color: #9aa8a3;
    }

    /* Whole card is a single link (display:contents keeps the flex layout intact) */
    #products-1863 .cs-item-link {
        display: contents;
    }

    #products-1863 .cs-item {
        cursor: pointer;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    #products-1863 .cs-item:hover {
        border-color: var(--primary);
        box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08);
    }

    #products-1863 .cs-item:hover .cs-product-link {
        gap: 0.75rem;
        color: var(--secondary);
    }
}

@media only screen and (min-width: 48rem) {
    #products-1863 .cs-card-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* On wider cards the photo sits beside the text, like the reference */
    #products-1863 .cs-item {
        flex-direction: row;
    }

    #products-1863 .cs-flex {
        flex: 1;
        order: -1;
    }

    #products-1863 .cs-picture {
        width: 40%;
        max-width: 13rem;
        min-height: 0;
        border-bottom: none;
        border-left: 1px solid #e8e8e8;
    }
}

/* ===== Category catalog (product listing) ===== */
@media only screen and (min-width: 0rem) {
    #catalog-1901 {
        padding: var(--sectionPadding);
        position: relative;
        z-index: 1;
    }

    #catalog-1901 .cs-container {
        width: 100%;
        max-width: 80rem;
        margin: auto;
    }

    #catalog-1901 .cs-layout {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
    }

    #catalog-1901 .cs-main {
        min-width: 0;
    }

    #catalog-1901 .cs-toolbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #e8e8e8;
        padding-bottom: 0.75rem;
        margin-bottom: 1.5rem;
    }

    #catalog-1901 .cs-count {
        font-size: 0.875rem;
        color: var(--bodyTextColor);
    }

    #catalog-1901 .cs-view-toggle {
        display: inline-flex;
        gap: 0.5rem;
        color: #b7b7b7;
    }

    #catalog-1901 .cs-view-toggle .cs-on {
        color: var(--primary);
    }

    #catalog-1901 .cs-card-group {
        margin: 0;
        padding: 0;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
        gap: 1.25rem;
    }

    #catalog-1901 .cs-item {
        list-style: none;
        background-color: #fff;
        border: 1px solid #e8e8e8;
        border-radius: 0.5rem;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: box-shadow 0.2s, transform 0.2s;
    }

    #catalog-1901 .cs-item:hover {
        transform: translateY(-3px);
        box-shadow: rgba(149, 157, 165, 0.2) 0 8px 24px;
    }

    /* Whole card is one link (display:contents keeps the card's flex layout) */
    #catalog-1901 .cs-item-link-wrap {
        display: contents;
    }

    #catalog-1901 .cs-item {
        cursor: pointer;
    }

    #catalog-1901 .cs-picture {
        width: 100%;
        aspect-ratio: 1 / 1;
        background-color: #fff;
        display: flex;
        justify-content: center;
        align-items: center;
        color: #9aa8a3;
    }

    #catalog-1901 .cs-picture img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    #catalog-1901 .cs-item-flex {
        padding: 1rem 1.1rem 1.2rem;
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    #catalog-1901 .cs-item-name {
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.3;
        margin: 0;
        color: var(--headerColor);
    }

    #catalog-1901 .cs-item-desc {
        font-size: 0.8125rem;
        line-height: 1.45;
        margin: 0.35rem 0 1rem;
        color: var(--bodyTextColor);
    }

    #catalog-1901 .cs-item-link {
        margin-top: auto;
        font-family: "Oswald", Arial, sans-serif;
        font-size: 0.8125rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        text-decoration: none;
        color: var(--primary);
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        transition: gap 0.2s;
    }

    #catalog-1901 .cs-item:hover .cs-item-link {
        gap: 0.75rem;
    }

    #catalog-1901 .cs-sidebar {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    #catalog-1901 .cs-widget {
        background-color: #fff;
        border: 1px solid #e8e8e8;
        border-radius: 0.5rem;
        padding: 1.25rem 1.5rem;
    }

    #catalog-1901 .cs-widget-title {
        font-size: 1.0625rem;
        font-weight: 700;
        color: var(--headerColor);
        margin: 0 0 0.75rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    #catalog-1901 .cs-widget-title:before {
        content: "";
        width: 1rem;
        height: 2px;
        background-color: var(--primary);
    }

    #catalog-1901 .cs-cat-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        padding: 0.6rem 0;
        border-bottom: 1px solid #eee;
        font-size: 0.875rem;
        font-weight: 700;
        color: var(--headerColor);
        text-decoration: none;
        transition: color 0.2s;
    }

    #catalog-1901 .cs-cat-link:last-child {
        border-bottom: none;
    }

    #catalog-1901 .cs-cat-link:hover,
    #catalog-1901 .cs-cat-link.cs-active {
        color: var(--primary);
    }

    #catalog-1901 .cs-help {
        background-color: var(--secondary);
        border-radius: 0.5rem;
        padding: 1.5rem;
    }

    #catalog-1901 .cs-help-title {
        font-family: "Archivo", Arial, sans-serif;
        font-size: 1.125rem;
        font-weight: 700;
        color: #fff;
        margin: 0 0 0.5rem;
    }

    #catalog-1901 .cs-help-text {
        font-size: 0.8125rem;
        line-height: 1.5;
        color: #fff;
        opacity: 0.8;
        margin: 0 0 1.25rem;
    }

    #catalog-1901 .cs-help-btn {
        display: inline-block;
        font-family: "Oswald", Arial, sans-serif;
        font-size: 0.8125rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        text-decoration: none;
        color: #fff;
        background-color: var(--primary);
        padding: 0.6rem 1.25rem;
        border-radius: 0.25rem;
    }
}

@media only screen and (min-width: 64rem) {
    #catalog-1901 .cs-layout {
        flex-direction: row;
        align-items: flex-start;
    }

    #catalog-1901 .cs-main {
        flex: 1;
    }

    /* Fixed 4 columns on desktop (base rule auto-fills ~5) */
    #catalog-1901 .cs-card-group {
        grid-template-columns: repeat(4, 1fr);
    }

    #catalog-1901 .cs-sidebar {
        width: 18rem;
        flex: none;
        order: 2;
    }
}