/* Ember Products Archive: screenshot-style archive layout */

.epa-archive-wrapper {
    --epa-gap: 24px;
    --epa-card-radius: 6px;
    --epa-border: var(--epa-card-border-color, #dfe3e8);
    --epa-card-bg: var(--epa-card-bg-color, #ffffff);
    --epa-accent: var(--epa-accent-color, #ff7a1a);
    padding: 0;
    box-sizing: border-box;
}

.epa-category-strip {
    margin: 28px 0 34px;
}

.epa-category-strip__scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.epa-category-card {
    flex: 0 0 120px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    background: #f5f5f5;
    padding: 10px 10px 14px;
    text-align: center;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.epa-category-card:hover,
.epa-category-card.is-active {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    border-color: #d4d4d4;
}

.epa-category-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #fff;
    margin: 0 auto 12px;
    overflow: hidden;
}

.epa-category-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.epa-category-card__placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e6e6e6;
}

.epa-category-card__name {
    display: block;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 500;
}

.epa-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0 0 18px;
}

.epa-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}

.epa-sort label {
    margin: 0;
    font-weight: 600;
}

.epa-sort-select {
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    padding-right: 18px;
    outline: none;
    cursor: pointer;
}

.epa-products-grid {
    display: grid;
    grid-template-columns: repeat(var(--epa-columns-mobile, 1), minmax(0, 1fr));
    gap: var(--epa-gap);
}

@media (min-width: 768px) {
    .epa-products-grid {
        grid-template-columns: repeat(var(--epa-columns-tablet, 2), minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .epa-products-grid {
        grid-template-columns: repeat(var(--epa-columns-desktop, 4), minmax(0, 1fr));
    }
}

.epa-product {
    min-width: 0;
}

.epa-product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.epa-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--epa-card-bg);
    border: 1px solid var(--epa-border);
    border-radius: var(--epa-card-radius);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.epa-product-link:hover .epa-product-card {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(0,0,0,.08);
    border-color: var(--epa-card-hover-border-color, #cfd5db);
}

.epa-product-thumbnail {
    position: relative;
    background: #fff;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    overflow: hidden;
}

.epa-product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.epa-product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .02em;
}

.epa-product-badge--logo {
    background: #ff7a1a;
    color: #fff;
}

.epa-product-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px 16px;
}

.epa-product-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 500;
    color: #2d2d2d;
}

.epa-product-price {
    color: var(--epa-price-color, #252525);
    font-size: var(--epa-price-font-size, 17px);
    font-weight: var(--epa-price-font-weight, 700);
    line-height: 1.2;
}

.epa-product-price ins {
    text-decoration: none;
}

.epa-product-swatches-block {
    margin-top: 2px;
}

.epa-product-swatches-slider {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.epa-product-swatches-viewport {
    overflow: hidden;
    width: 100%;
}

.epa-product-swatches-track {
    display: flex;
    transition: transform .28s ease;
    will-change: transform;
}

.epa-product-swatches-page {
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(6, 30px);
    grid-template-rows: repeat(2, 30px);
    gap: 8px;
    justify-content: start;
    align-content: start;
}

.epa-product-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #d8d8d8;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    box-sizing: border-box;
    overflow: hidden;
}

.epa-product-swatch img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.epa-swatch-nav {
    width: 32px;
    height: 32px;
    border: 1px solid #d8d8d8;
    border-radius: 999px;
    background: #fff;
    color: #1f1f1f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 16px;
    transition: opacity .2s ease, background .2s ease;
}

.epa-swatch-nav:hover:not(:disabled) {
    background: #f5f5f5;
}

.epa-swatch-nav:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.epa-load-more-wrapper {
    text-align: center;
    margin-top: 28px;
}

.epa-load-more {
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    background: #fff;
    color: #1f1f1f;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.epa-load-more:hover {
    background: #fafafa;
}

.epa-no-results {
    padding: 24px 0;
    font-size: 16px;
}

.epa-loading .epa-load-more {
    opacity: .6;
    cursor: wait;
}

@media (max-width: 767px) {
    .epa-toolbar {
        justify-content: stretch;
    }

    .epa-sort {
        width: 100%;
        justify-content: space-between;
    }

    .epa-product-title {
        font-size: 16px;
    }

    .epa-product-swatches-slider {
        grid-template-columns: 28px minmax(0, 1fr) 28px;
        gap: 8px;
    }

    .epa-product-swatches-page {
        grid-template-columns: repeat(6, 26px);
        grid-template-rows: repeat(2, 26px);
        gap: 6px;
    }

    .epa-product-swatch {
        width: 26px;
        height: 26px;
        padding: 3px;
    }

    .epa-swatch-nav {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}
