/* Professional storefront catalog. */

.catalog-page {
    padding-top: 1.25rem;
}

.catalog-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 2rem;
    align-items: stretch;
    padding: clamp(1.5rem, 4vw, 3.25rem);
    border: 1px solid var(--store-border);
    border-radius: 32px;
    background:
        radial-gradient(circle at 88% 12%, rgba(249, 115, 22, .15), transparent 28%),
        linear-gradient(135deg, var(--store-bg-soft), color-mix(in srgb, var(--store-card) 72%, var(--store-orange-soft)));
    overflow: hidden;
}

.catalog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    color: var(--store-muted);
    font-size: .75rem;
    font-weight: 650;
}

.catalog-breadcrumb a {
    transition: color .18s ease;
}

.catalog-breadcrumb a:hover {
    color: var(--store-orange);
}

.catalog-eyebrow {
    margin-top: 1.5rem;
    color: var(--store-orange);
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.catalog-hero h1 {
    max-width: 760px;
    margin-top: .7rem;
    color: var(--store-text);
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    font-weight: 780;
    letter-spacing: -.045em;
    line-height: 1.02;
}

.catalog-hero h1 span {
    color: var(--store-orange);
}

.catalog-hero-copy {
    max-width: 720px;
    margin-top: 1rem;
    color: var(--store-muted);
    font-size: clamp(.95rem, 1.2vw, 1.08rem);
    line-height: 1.7;
}

.catalog-hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    margin-top: 1.4rem;
}

.catalog-hero-trust span {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    color: var(--store-muted);
    font-size: .76rem;
    font-weight: 700;
}

.catalog-hero-trust svg {
    color: var(--store-orange);
}

.catalog-hero-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    align-content: center;
}

.catalog-summary-card {
    min-height: 122px;
    padding: 1.1rem;
    border: 1px solid color-mix(in srgb, var(--store-border) 82%, transparent);
    border-radius: 22px;
    background: color-mix(in srgb, var(--store-card) 94%, transparent);
    box-shadow: var(--store-card-shadow);
}

.catalog-summary-card:first-child {
    grid-column: 1 / -1;
}

.catalog-summary-card strong {
    display: block;
    color: var(--store-text);
    font-size: clamp(1.7rem, 4vw, 2.7rem);
    font-weight: 820;
    line-height: 1;
}

.catalog-summary-card span {
    display: block;
    margin-top: .55rem;
    color: var(--store-muted);
    font-size: .76rem;
    line-height: 1.45;
}

.catalog-shell {
    padding-block: clamp(2.5rem, 6vw, 5rem);
}

.catalog-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: clamp(1.4rem, 3vw, 2.35rem);
    align-items: start;
}

.catalog-sidebar {
    position: sticky;
    top: 160px;
    display: grid;
    gap: .9rem;
}

.catalog-panel {
    position: relative;
    overflow: hidden;
    padding: .85rem;
    border: 1px solid color-mix(in srgb, var(--store-border) 78%, transparent);
    border-radius: 28px;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, var(--store-card) 96%, transparent),
            color-mix(in srgb, var(--store-bg-soft) 90%, var(--store-card))
        ),
        var(--store-card);
    box-shadow: 0 24px 55px -38px rgba(28, 19, 12, .45);
}

.catalog-panel::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--store-orange), #16a34a, #0f172a);
}

.catalog-panel-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .25rem .35rem .8rem;
    color: var(--store-text);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.catalog-panel-title small {
    display: inline-grid;
    min-width: 1.85rem;
    min-height: 1.85rem;
    place-items: center;
    border-radius: 999px;
    color: var(--store-orange);
    background: var(--store-orange-soft);
    font-size: .68rem;
    font-weight: 850;
}

.catalog-category-list {
    position: relative;
    display: grid;
    gap: .18rem;
    margin-top: .15rem;
}

.catalog-category-button {
    position: relative;
    display: grid;
    grid-template-columns: .42rem minmax(0, 1fr) auto;
    width: 100%;
    align-items: center;
    column-gap: .65rem;
    row-gap: .25rem;
    min-height: 44px;
    padding: .74rem .72rem .74rem 1rem;
    border: 1px solid transparent;
    border-radius: 16px;
    color: color-mix(in srgb, var(--store-text) 68%, var(--store-muted));
    background: transparent;
    text-align: left;
    font-size: .78rem;
    font-weight: 730;
    transition: color .18s ease, border-color .18s ease, background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.catalog-category-button::before {
    content: '';
    width: .42rem;
    height: .42rem;
    flex: 0 0 auto;
    border: 1px solid currentColor;
    border-radius: 999px;
    opacity: .45;
    transition: background-color .18s ease, border-color .18s ease, opacity .18s ease;
}

.catalog-category-button > span:first-of-type {
    min-width: 0;
    overflow: visible;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.catalog-category-label {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    width: 100%;
}

.catalog-category-label img,
.catalog-mobile-category img,
.catalog-product-category img {
    width: 1.45rem;
    height: 1.45rem;
    flex: 0 0 auto;
    border-radius: .55rem;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .08);
}

.catalog-category-label span {
    min-width: 0;
    flex: 1;
    overflow: visible;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
}

.catalog-category-button:hover {
    color: var(--store-text);
    border-color: color-mix(in srgb, var(--store-orange) 26%, transparent);
    background: color-mix(in srgb, var(--store-card) 86%, transparent);
    box-shadow: 0 12px 28px -24px rgba(28, 19, 12, .5);
    transform: translateX(3px);
}

.catalog-category-button.is-active {
    color: var(--store-text);
    border-color: rgba(249, 115, 22, .2);
    background: linear-gradient(
        135deg,
        var(--store-card),
        color-mix(in srgb, var(--store-orange-soft) 58%, var(--store-card))
    );
    box-shadow: inset 4px 0 0 var(--store-orange), 0 16px 34px -24px rgba(249, 115, 22, .75);
}

.catalog-category-button.is-active::before {
    border-color: var(--store-orange);
    background: var(--store-orange);
    opacity: 1;
}

.catalog-category-button > .catalog-category-count {
    display: inline-grid;
    grid-column: 3;
    min-width: 1.8rem;
    height: 1.55rem;
    place-items: center;
    padding-inline: .35rem;
    border-radius: 999px;
    color: inherit;
    background: rgba(15, 23, 42, .06);
    font-size: .66rem;
    font-weight: 850;
    opacity: .82;
    white-space: nowrap;
}

.catalog-category-button.is-active > .catalog-category-count {
    color: #fff;
    background: var(--store-orange);
    opacity: 1;
}

.catalog-help-card {
    position: relative;
    overflow: hidden;
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--store-border) 72%, transparent);
    border-radius: 26px;
    color: var(--store-text);
    background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--store-bg-soft) 94%, transparent),
            color-mix(in srgb, var(--store-card) 94%, transparent)
        ),
        var(--store-card);
    box-shadow: 0 20px 42px -34px rgba(28, 19, 12, .5);
}

.catalog-help-card .catalog-help-icon {
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border-radius: 999px;
    color: var(--store-orange);
    background: var(--store-card);
    box-shadow: inset 0 0 0 1px rgba(249, 115, 22, .18), 0 12px 26px -20px rgba(249, 115, 22, .9);
}

.catalog-help-card strong {
    display: block;
    margin-top: .8rem;
    color: var(--store-text);
    font-size: .9rem;
}

.catalog-help-card p {
    margin-top: .35rem;
    color: var(--store-muted);
    font-size: .72rem;
    line-height: 1.55;
}

.catalog-help-card a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .9rem;
    color: var(--store-orange);
    font-size: .72rem;
    font-weight: 820;
}

.catalog-help-card a:hover {
    color: var(--store-orange-hover);
}

.catalog-main {
    min-width: 0;
}

.catalog-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--store-border);
    border-radius: 24px;
    background: var(--store-card);
    box-shadow: var(--store-card-shadow);
}

.catalog-search-wrap {
    position: relative;
}

.catalog-search-wrap > svg {
    position: absolute;
    top: 50%;
    left: 1rem;
    width: 1rem;
    height: 1rem;
    color: var(--store-orange);
    transform: translateY(-50%);
    pointer-events: none;
}

.catalog-search-input {
    width: 100%;
    min-height: 46px;
    padding: .75rem 2.8rem .75rem 2.65rem;
    border: 1px solid var(--store-border);
    border-radius: 16px;
    color: var(--store-text);
    background: var(--store-bg-soft);
    font-size: .82rem;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.catalog-search-input:focus {
    border-color: var(--store-orange);
    background: var(--store-card);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--store-orange) 12%, transparent);
}

.catalog-search-clear {
    position: absolute;
    top: 50%;
    right: .8rem;
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    place-items: center;
    border-radius: 999px;
    color: var(--store-muted);
    transform: translateY(-50%);
    transition: color .18s ease, background-color .18s ease;
}

.catalog-search-clear:hover {
    color: var(--store-orange);
    background: var(--store-orange-soft);
}

.catalog-sort-wrap {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.catalog-sort-label {
    color: var(--store-muted);
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}

.catalog-sort-select {
    min-height: 46px;
    min-width: 190px;
    padding: .7rem 2.3rem .7rem .9rem;
    border: 1px solid var(--store-border);
    border-radius: 16px;
    color: var(--store-text);
    background: var(--store-bg-soft);
    font-size: .78rem;
    font-weight: 720;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.catalog-sort-select:focus {
    border-color: var(--store-orange);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--store-orange) 12%, transparent);
}

.catalog-mobile-categories {
    display: none;
}

.catalog-results-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.4rem;
    margin-bottom: 1rem;
}

.catalog-results-title {
    color: var(--store-text);
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 790;
    letter-spacing: -.025em;
}

.catalog-results-copy {
    margin-top: .3rem;
    color: var(--store-muted);
    font-size: .75rem;
}

.catalog-active-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .45rem;
}

.catalog-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .65rem;
    border-radius: 999px;
    color: var(--store-orange);
    background: var(--store-orange-soft);
    font-size: .66rem;
    font-weight: 750;
}

.catalog-reset-button {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .65rem;
    border: 1px solid var(--store-border);
    border-radius: 999px;
    color: var(--store-muted);
    font-size: .66rem;
    font-weight: 750;
    transition: color .18s ease, border-color .18s ease;
}

.catalog-reset-button:hover {
    color: var(--store-orange);
    border-color: var(--store-orange);
}

.catalog-loading {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: 1rem;
    padding: .8rem 1rem;
    border: 1px solid var(--store-border);
    border-radius: 16px;
    color: var(--store-muted);
    background: var(--store-card);
    font-size: .76rem;
    font-weight: 700;
}

.catalog-loading-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid color-mix(in srgb, var(--store-orange) 22%, transparent);
    border-top-color: var(--store-orange);
    border-radius: 999px;
    animation: catalog-spin .7s linear infinite;
}

.catalog-error,
.catalog-empty {
    padding: 1.5rem;
    border: 1px solid var(--store-border);
    border-radius: 22px;
    color: var(--store-muted);
    background: var(--store-card);
    text-align: center;
    font-size: .82rem;
}

.catalog-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

.catalog-product-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--store-border);
    border-radius: 24px;
    background: var(--store-card);
    box-shadow: var(--store-card-shadow);
    transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.catalog-product-card:hover {
    border-color: var(--store-orange);
    box-shadow: 0 20px 36px -20px rgba(249, 115, 22, .45);
    transform: translateY(-4px);
}

.catalog-product-media {
    position: relative;
    display: block;
    aspect-ratio: 1 / .82;
    overflow: hidden;
    background: var(--store-bg-soft);
}

.catalog-product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.catalog-product-card:hover .catalog-product-media img {
    transform: scale(1.035);
}

.catalog-product-badges {
    position: absolute;
    top: .75rem;
    left: .75rem;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.catalog-product-badge {
    padding: .34rem .58rem;
    border-radius: 999px;
    color: #9a3412;
    background: rgba(255, 247, 237, .94);
    font-size: .61rem;
    font-weight: 820;
    letter-spacing: .045em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.catalog-product-badge.is-discount {
    color: #fff;
    background: var(--store-orange);
}

.catalog-product-stock {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .36rem .58rem;
    border-radius: 999px;
    color: #166534;
    background: rgba(240, 253, 244, .94);
    font-size: .62rem;
    font-weight: 780;
    backdrop-filter: blur(8px);
}

.catalog-product-stock.is-low {
    color: #9a3412;
    background: rgba(255, 247, 237, .94);
}

.catalog-product-stock.is-out {
    color: #991b1b;
    background: rgba(254, 242, 242, .94);
}

.catalog-product-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1rem;
}

.catalog-product-category {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--store-orange);
    font-size: .64rem;
    font-weight: 820;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.catalog-product-title {
    margin-top: .45rem;
    color: var(--store-text);
    font-size: 1.05rem;
    font-weight: 770;
    line-height: 1.3;
}

.catalog-product-description {
    display: -webkit-box;
    min-height: 2.6rem;
    margin-top: .45rem;
    overflow: hidden;
    color: var(--store-muted);
    font-size: .76rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.catalog-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .65rem;
    margin-top: .75rem;
    color: var(--store-muted);
    font-size: .66rem;
    font-weight: 650;
}

.catalog-product-meta span {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
}

.catalog-product-price-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: .75rem;
    margin-top: auto;
    padding-top: 1rem;
}

.catalog-product-price {
    color: var(--store-orange);
    font-size: 1.3rem;
    font-weight: 830;
}

.catalog-product-old-price {
    margin-left: .35rem;
    color: var(--store-muted);
    font-size: .72rem;
    font-weight: 650;
    text-decoration: line-through;
}

.catalog-product-tax {
    color: var(--store-muted);
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
}

.catalog-product-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: .5rem;
    margin-top: .85rem;
}

.catalog-product-add {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding-inline: .8rem;
    border-radius: 14px;
    color: #fff;
    background: var(--store-orange);
    font-size: .74rem;
    font-weight: 780;
    transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.catalog-product-add:hover:not(:disabled) {
    background: var(--store-orange-hover);
    box-shadow: 0 9px 18px rgba(249, 115, 22, .22);
    transform: translateY(-1px);
}

.catalog-product-add:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.catalog-product-view {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--store-border);
    border-radius: 14px;
    color: var(--store-text);
    transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}

.catalog-product-view:hover {
    color: var(--store-orange);
    border-color: var(--store-orange);
    background: var(--store-bg-soft);
}

@keyframes catalog-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1180px) {
    .catalog-layout {
        grid-template-columns: 248px minmax(0, 1fr);
        gap: 1.3rem;
    }

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

@media (max-width: 900px) {
    .catalog-hero {
        grid-template-columns: 1fr;
    }

    .catalog-layout {
        display: block;
    }

    .catalog-sidebar {
        display: none;
    }

    .catalog-mobile-categories {
        display: flex;
        gap: .55rem;
        margin-top: 1rem;
        overflow-x: auto;
        padding-bottom: .2rem;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .catalog-mobile-categories::-webkit-scrollbar {
        display: none;
    }

    .catalog-mobile-category {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: .62rem .8rem;
        border: 1px solid var(--store-border);
        border-radius: 999px;
        color: var(--store-muted);
        background: var(--store-card);
        font-size: .69rem;
        font-weight: 740;
        white-space: nowrap;
    }

    .catalog-mobile-category.is-active {
        color: #fff;
        border-color: var(--store-orange);
        background: var(--store-orange);
    }
}

@media (max-width: 700px) {
    .catalog-page {
        padding-top: .8rem;
    }

    .catalog-hero {
        padding: 1.35rem;
        border-radius: 24px;
    }

    .catalog-hero h1 {
        font-size: clamp(2.25rem, 12vw, 3.2rem);
    }

    .catalog-hero-summary {
        grid-template-columns: 1fr 1fr;
    }

    .catalog-summary-card {
        min-height: 96px;
        padding: .9rem;
    }

    .catalog-toolbar {
        grid-template-columns: 1fr;
        padding: .8rem;
        border-radius: 20px;
    }

    .catalog-sort-wrap {
        justify-content: space-between;
    }

    .catalog-sort-select {
        min-width: 0;
        flex: 1;
    }

    .catalog-results-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .catalog-active-filters {
        justify-content: flex-start;
    }

    .catalog-products-grid {
        grid-template-columns: 1fr;
        gap: .9rem;
    }

    .catalog-product-card {
        border-radius: 22px;
    }

    .catalog-product-media {
        aspect-ratio: 1 / .78;
    }
}

@media (prefers-reduced-motion: reduce) {
    .catalog-product-card,
    .catalog-product-media img,
    .catalog-category-button,
    .catalog-product-add,
    .catalog-product-view {
        transition: none;
    }

    .catalog-loading-spinner {
        animation: none;
    }
}
