/*
  PRODUCTS.CSS CONTENTS
  01. Base and layout
  02. Page header and breadcrumbs
  03. Shared headings and buttons
  04. Category cards
  05. Product groups and cards
  06. Category description
  07. Pagination and empty states
  08. Hover effects
  09. Responsive layout
  10. Reduced motion
*/

/* 01. Base and layout */

.catalog {
    --catalog-green: #27813b;
    --catalog-red: #a50022;
    direction: rtl;
    background: #fff;
    color: #293b36;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.9;
}

.catalog *,
.catalog *::before,
.catalog *::after {
    box-sizing: border-box;
}

.catalog h1,
.catalog h2,
.catalog h3,
.catalog p {
    margin: 0;
}

.catalog a {
    color: inherit;
    text-decoration: none;
}

.catalog a:focus-visible {
    outline: 3px solid #07512c;
    outline-offset: 4px;
}

.catalog .catalog-wrap {
    width: calc(100% - 64px);
    max-width: 1280px;
    margin: 0 auto;
}

.catalog .catalog-body {
    padding: 36px 0 56px;
}

/* 02. Page header and breadcrumbs */

.catalog .catalog-hero {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 230px;
    padding: 28px 0;
    overflow: hidden;
    isolation: isolate;
    background: #f5f1e8;
}

.catalog .catalog-cover {
    position: absolute;
    inset: 0;
    z-index: -2;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
    object-position: center 44%;
}

.catalog .catalog-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(249, 247, 240, 0.16), rgba(249, 247, 240, 0.95) 31%, #f9f7f0 50%, rgba(249, 247, 240, 0.95) 69%, rgba(249, 247, 240, 0.16));
}

.catalog .catalog-heading {
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
}

.catalog .catalog-heading h1 {
    color: #173831;
    font-size: clamp(32px, 3.4vw, 48px);
    font-weight: 900;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.catalog .catalog-heading p {
    color: #384c43;
    text-align: center;
}

.catalog .catalog-eyebrow {
    display: grid;
    justify-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
}

.catalog .catalog-crumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #47584c;
    font-size: 13px;
}

.catalog .catalog-crumbs li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.catalog .catalog-crumbs li + li::before {
    content: "/";
    color: #758174;
}

.catalog .catalog-crumbs a:hover {
    text-decoration: underline;
}

/* 03. Shared headings and buttons */

.catalog .catalog-title {
    margin: 0 0 32px;
    color: #07512c;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
}

.catalog .catalog-title::after {
    content: "";
    display: block;
    width: 52px;
    height: 4px;
    margin: 12px auto 0;
    border-radius: 4px;
    background: #528b24;
}

.catalog .catalog-title span,
.catalog .catalog-heading h1 span {
    color: var(--catalog-red);
}

.catalog .catalog-more {
    margin-top: 28px;
    text-align: center;
}

.catalog .catalog-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    padding: 10px 24px;
    border: 1px solid transparent;
    border-radius: 30px;
    background: #ffa628;
    color: #352610;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.7;
    transition: background-color 0.22s, box-shadow 0.22s;
}

.catalog .catalog-button:hover {
    background: #ffb749;
    box-shadow: 0 5px 14px rgba(116, 69, 0, 0.12);
}

.catalog .catalog-button svg,
.catalog .cat-arrow svg {
    display: block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 04. Category cards */

.catalog .catalog-categories {
    max-width: 1140px;
    margin: 0 auto 56px;
}

.catalog .cat-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 5), minmax(0, 1fr));
    align-items: start;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.catalog .cat-item {
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.catalog .cat-card {
    --tone: 173, 20, 27;
    position: relative;
    display: block;
    aspect-ratio: 0.6;
    overflow: hidden;
    border-radius: 16px;
    background: rgb(var(--tone));
    color: #fff;
    box-shadow: 0 10px 24px rgba(24, 39, 27, 0.09);
    transition: transform 0.25s;
}

.catalog .tone-green {
    --tone: 67, 112, 23;
}

.catalog .tone-orange {
    --tone: 220, 99, 5;
}

.catalog .tone-olive {
    --tone: 88, 103, 18;
}

.catalog .cat-card.is-current {
    outline: 3px solid #07512c;
    outline-offset: 5px;
}

.catalog .cat-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
    transition: transform 0.45s;
}

.catalog .cat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(var(--tone), 1), rgba(var(--tone), 0.95) 10%, rgba(var(--tone), 0.72) 22%, rgba(var(--tone), 0.22) 38%, rgba(var(--tone), 0) 55%);
    pointer-events: none;
}

.catalog .cat-info {
    position: absolute;
    z-index: 1;
    right: 10px;
    bottom: 16px;
    left: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.catalog .cat-name {
    color: #fff;
    font-size: clamp(18px, 1.8vw, 25px);
    font-weight: 900;
    line-height: 1.55;
    overflow-wrap: anywhere;
    text-wrap: balance;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.catalog .cat-arrow {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transition: transform 0.25s, background-color 0.25s;
}

/* 05. Product groups and cards */

.catalog .catalog-group + .catalog-group {
    margin-top: 56px;
}

.catalog .item-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 24px 22px;
}

.catalog .item-card {
    min-width: 0;
}

.catalog .item-link {
    position: relative;
    display: block;
    overflow: hidden;
    isolation: isolate;
    border-radius: 16px;
    background: #f8f9f6;
}

.catalog .item-media {
    position: relative;
}

.catalog .item-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 0;
}

.catalog .item-empty {
    display: grid;
    place-items: center;
    min-height: 240px;
    color: #68716e;
    font-size: 26px;
    font-weight: 800;
}

.catalog .item-caption {
    position: relative;
    z-index: 2;
    padding: 12px 20px 18px;
    background: var(--catalog-green);
    color: #fff;
}

.catalog .item-wave {
    position: absolute;
    top: -23px;
    right: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 24px;
    fill: var(--catalog-green);
    pointer-events: none;
}

.catalog .item-title {
    color: #fff;
    font-size: clamp(16px, 1.4vw, 20px);
    font-weight: 700;
    line-height: 1.8;
    text-align: right;
    overflow-wrap: anywhere;
}

/* 06. Category description */

.catalog .catalog-description {
    max-width: 900px;
    margin: 0 auto 36px;
    color: #435249;
    font-size: 16px;
    line-height: 2;
    overflow-wrap: anywhere;
}

.catalog .catalog-description > * + * {
    margin-top: 12px;
}

.catalog .catalog-description a {
    color: #07512c;
    text-decoration: underline;
}

.catalog .catalog-description ul,
.catalog .catalog-description ol {
    padding-right: 24px;
}

.catalog .catalog-description ul li {
    list-style: disc;
}

.catalog .catalog-description ol li {
    list-style: decimal;
}

/* 07. Pagination and empty states */

.catalog .catalog-count {
    margin: -16px 0 24px;
    color: #657368;
    font-size: 14px;
    text-align: center;
}

.catalog .catalog-empty {
    padding: 32px 0;
    color: #657368;
    text-align: center;
}

.catalog .catalog-pagination .navigation {
    display: block;
    margin: 32px 0 0;
    padding: 0;
}

.catalog .catalog-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.catalog .catalog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid #d8e3d4;
    border-radius: 12px;
    background: #fff;
    color: #07512c;
    font-weight: 700;
}

.catalog .catalog-pagination .current,
.catalog .catalog-pagination a:hover {
    border-color: #07512c;
    background: #07512c;
    color: #fff;
}

.catalog .catalog-pagination .dots {
    min-width: 20px;
    padding: 0;
    border: 0;
    background: transparent;
}

.catalog .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* 08. Hover effects */

@media (hover: hover) and (pointer: fine) {
    .catalog .cat-card:hover {
        transform: translateY(-4px);
    }

    .catalog .cat-card:hover .cat-image {
        transform: scale(1.035);
    }

    .catalog .cat-card:hover .cat-arrow {
        transform: translateX(-3px);
        background: rgba(255, 255, 255, 0.15);
    }
}

@media (hover: hover) and (pointer: fine) and (min-width: 992px) {
    .catalog .item-media {
        transition: transform 280ms ease;
    }

    .catalog .item-caption {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        transform: translateY(calc(100% + 24px));
        transition: transform 280ms ease;
    }

    .catalog .item-link:hover .item-caption,
    .catalog .item-link:focus-visible .item-caption {
        transform: translateY(0);
    }

    .catalog .item-link:hover .item-media,
    .catalog .item-link:focus-visible .item-media {
        transform: translateY(-12px);
    }
}

/* 09. Responsive layout */

@media (max-width: 991px) {
    .catalog .catalog-wrap {
        width: calc(100% - 44px);
    }

    .catalog .catalog-hero {
        min-height: 200px;
    }

    .catalog .catalog-categories {
        width: calc(100% - 4px);
        max-width: 760px;
    }

    .catalog .cat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .catalog .cat-card {
        aspect-ratio: 0.7;
    }

    .catalog .cat-name {
        font-size: 21px;
    }

    .catalog .item-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .catalog .catalog-title {
        font-size: clamp(26px, 7vw, 32px);
    }
}

@media (max-width: 599px) {
    .catalog .catalog-wrap {
        width: calc(100% - 32px);
    }

    .catalog .catalog-hero {
        min-height: 144px;
        padding: 20px 0;
    }

    .catalog .catalog-hero::after {
        background: rgba(249, 247, 240, 0.9);
    }

    .catalog .catalog-heading h1 {
        font-size: 32px;
    }

    .catalog .catalog-heading p {
        max-width: 290px;
        font-size: 13px;
    }

    .catalog .catalog-eyebrow {
        display: none;
    }

    .catalog .catalog-body {
        padding: 24px 0 36px;
    }

    .catalog .catalog-categories {
        width: calc(100% - 8px);
        max-width: 440px;
        margin-bottom: 40px;
    }

    .catalog .catalog-title {
        margin-bottom: 24px;
    }

    .catalog .cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .catalog .cat-item:first-child {
        grid-column: 1 / -1;
    }

    .catalog .cat-card {
        aspect-ratio: 0.72;
    }

    .catalog .cat-item:first-child .cat-card {
        aspect-ratio: 1.5;
    }

    .catalog .cat-item:first-child .cat-image {
        object-position: center 42%;
    }

    .catalog .cat-info {
        right: 8px;
        bottom: 12px;
        left: 8px;
        gap: 8px;
    }

    .catalog .cat-name {
        font-size: clamp(17px, 4.4vw, 22px);
    }

    .catalog .cat-item:first-child .cat-name {
        font-size: 27px;
    }

    .catalog .cat-arrow {
        width: 32px;
        height: 32px;
    }

    .catalog .catalog-group + .catalog-group {
        margin-top: 40px;
    }

    .catalog .item-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .catalog .item-caption {
        padding: 10px 16px 14px;
    }

    .catalog .item-title {
        font-size: 16px;
    }
}

/* 10. Reduced motion */

@media (prefers-reduced-motion: reduce) {
    .catalog .cat-card,
    .catalog .cat-image,
    .catalog .cat-arrow,
    .catalog .item-media,
    .catalog .item-caption,
    .catalog .catalog-button {
        transition: none;
    }

    .catalog .cat-card:hover,
    .catalog .cat-card:hover .cat-image,
    .catalog .cat-card:hover .cat-arrow,
    .catalog .item-link:hover .item-media,
    .catalog .item-link:focus-visible .item-media {
        transform: none;
    }

    .catalog .item-caption {
        position: relative;
        transform: none;
    }
}
