/*
 * com_seshopify / mod_seshopify_products
 * Neutral by default: inherits fonts and text colour from the template.
 * Override the custom properties below in your template CSS to restyle.
 */
.sebc,
.sebc-module {
    --sebc-gap: 1.25rem;
    --sebc-radius: 6px;
    --sebc-border: rgba(0, 0, 0, 0.12);
    --sebc-muted: rgba(0, 0, 0, 0.6);
    --sebc-accent: #b00020;
    --sebc-accent-contrast: #fff;
    --sebc-surface: rgba(0, 0, 0, 0.04);
    --sebc-pill: #7a0f1c;
    --sebc-pill-light: #d32f3a;
    --sebc-pill-text: #fff;
}

@media (prefers-color-scheme: dark) {
    .sebc,
    .sebc-module {
        --sebc-border: rgba(255, 255, 255, 0.2);
        --sebc-muted: rgba(255, 255, 255, 0.7);
        --sebc-surface: rgba(255, 255, 255, 0.06);
    }
}

/* Filters and sorting */
.sebc-filters ul,
.sebc-sort {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    align-items: center;
}

.sebc-filters a,
.sebc-sort a {
    background: var(--sebc-pill);
    border: 1px solid var(--sebc-pill);
    border-radius: 999px;
    color: var(--sebc-pill-text);
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.9rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

/* Lighter red for the selected tab, and while hovered or keyboard-focused */
.sebc-filters a:hover,
.sebc-filters a:focus-visible,
.sebc-filters a[aria-current],
.sebc-sort a:hover,
.sebc-sort a:focus-visible,
.sebc-sort a[aria-current] {
    background: var(--sebc-pill-light);
    border-color: var(--sebc-pill-light);
    color: var(--sebc-pill-text);
}

.sebc-filters a:focus-visible,
.sebc-sort a:focus-visible {
    outline: 2px solid var(--sebc-pill-light);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .sebc-filters a,
    .sebc-sort a {
        transition: none;
    }
}

.sebc-count {
    font-size: 0.8em;
    margin-left: 0.25em;
    opacity: 0.7;
}

.sebc-sort > span {
    color: var(--sebc-muted);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    margin-right: 0.25rem;
    text-transform: uppercase;
}

/* Grid */
.sebc-grid {
    display: grid;
    gap: var(--sebc-gap);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}

@media (min-width: 576px) {
    .sebc-cols-3,
    .sebc-cols-4,
    .sebc-cols-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .sebc-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sebc-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Card */
.sebc-card__link {
    color: inherit;
    display: block;
    text-decoration: none;
}

.sebc-card__media {
    aspect-ratio: 1 / 1;
    background: var(--sebc-img-bg, var(--sebc-surface));
    border-radius: var(--sebc-radius);
    display: block;
    overflow: hidden;
    position: relative;
}

.sebc-card__media img {
    display: block;
    height: 100%;
    transition: transform 0.2s ease;
    width: 100%;
}

.sebc-fit-cover img {
    object-fit: cover;
}

.sebc-fit-contain img {
    object-fit: contain;
}

.sebc-card__link:hover img,
.sebc-card__link:focus-visible img {
    transform: scale(1.03);
}

.sebc-card__link:focus-visible {
    outline: 2px solid var(--sebc-accent);
    outline-offset: 2px;
}

.sebc-card.is-sold-out .sebc-card__media img {
    opacity: 0.55;
}

.sebc-card__title {
    font-size: 1rem;
    line-height: 1.3;
    margin: 0.6rem 0 0.15rem;
}

.sebc-card__price {
    color: var(--sebc-muted);
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    .sebc-card__media img {
        transition: none;
    }

    .sebc-card__link:hover img,
    .sebc-card__link:focus-visible img {
        transform: none;
    }
}

/* Badges */
.sebc-badge {
    background: var(--sebc-accent);
    border-radius: 3px;
    color: var(--sebc-accent-contrast);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.15rem 0.5rem;
    text-transform: uppercase;
}

.sebc-card__media .sebc-badge {
    left: 0.5rem;
    position: absolute;
    top: 0.5rem;
}

.sebc-badge--out {
    background: #555;
}

/* Product page */
.sebc-product__layout {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .sebc-product__layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

.sebc-gallery__main {
    background: var(--sebc-img-bg, var(--sebc-surface));
    border-radius: var(--sebc-radius);
    overflow: hidden;
}

.sebc-gallery__main img {
    display: block;
    height: auto;
    max-width: 100%;
    width: 100%;
}

.sebc-gallery__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.sebc-gallery__thumbs a {
    border: 2px solid transparent;
    border-radius: 4px;
    display: block;
    overflow: hidden;
}

.sebc-gallery__thumbs a[aria-current] {
    border-color: var(--sebc-accent);
}

.sebc-gallery__thumbs img {
    display: block;
    height: 80px;
    object-fit: cover;
    width: 80px;
}

.sebc-price {
    font-size: 1.4rem;
    font-weight: 600;
}

.sebc-buy {
    background: var(--sebc-btn-bg, var(--sebc-accent));
    border-radius: var(--sebc-radius);
    color: var(--sebc-btn-fg, var(--sebc-accent-contrast));
    display: inline-block;
    font-weight: 600;
    padding: 0.7rem 1.6rem;
    text-decoration: none;
}

.sebc-buy:hover,
.sebc-buy:focus-visible {
    background: var(--sebc-btn-hover-bg, var(--sebc-btn-bg, var(--sebc-accent)));
    color: var(--sebc-btn-hover-fg, var(--sebc-btn-fg, var(--sebc-accent-contrast)));
    filter: var(--sebc-btn-hover-filter, brightness(1.1));
}

.sebc-note,
.sebc-cats {
    color: var(--sebc-muted);
    font-size: 0.9rem;
}

.sebc-cats a {
    margin-right: 0.75rem;
}

.sebc-h {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
}

.sebc-options {
    display: grid;
    gap: 0.35rem 1rem;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.sebc-options li {
    border-bottom: 1px solid var(--sebc-border);
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    padding: 0.25rem 0;
}

.sebc-options li.is-out span:first-child {
    opacity: 0.55;
    text-decoration: line-through;
}

.sebc-description {
    margin-top: 1.5rem;
}

.sebc-shipping {
    border-collapse: collapse;
    width: 100%;
}

.sebc-shipping th,
.sebc-shipping td {
    border-bottom: 1px solid var(--sebc-border);
    padding: 0.35rem 0.5rem 0.35rem 0;
    text-align: left;
}

.sebc-empty {
    color: var(--sebc-muted);
}

/* Module */
.sebc-module .sebc-grid {
    margin-bottom: 0.75rem;
}

.sebc-module__more a {
    font-weight: 600;
}

/* Thumbnail strip follows the image background colour when one is set */
.sebc-gallery__thumbs a {
    background: var(--sebc-img-bg, transparent);
}

/* Slider (module) */
.sebc-slider {
    position: relative;
}

.sebc-slider__track {
    display: flex;
    gap: var(--sebc-gap);
    list-style: none;
    margin: 0 0 0.75rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.sebc-slider__track > li {
    flex: 0 0 calc((100% - var(--sebc-gap)) / 2);
    min-width: 0;
    scroll-snap-align: start;
}

@media (min-width: 576px) {
    .sebc-slider__track.sebc-cols-3 > li,
    .sebc-slider__track.sebc-cols-4 > li,
    .sebc-slider__track.sebc-cols-5 > li {
        flex-basis: calc((100% - 2 * var(--sebc-gap)) / 3);
    }
}

@media (min-width: 992px) {
    .sebc-slider__track.sebc-cols-4 > li {
        flex-basis: calc((100% - 3 * var(--sebc-gap)) / 4);
    }

    .sebc-slider__track.sebc-cols-5 > li {
        flex-basis: calc((100% - 4 * var(--sebc-gap)) / 5);
    }
}

.sebc-slider__btn {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--sebc-border);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    color: #222;
    cursor: pointer;
    display: flex;
    font-size: 1.6rem;
    height: 2.75rem;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: absolute;
    top: calc(50% - 2rem);
    width: 2.75rem;
    z-index: 2;
}

.sebc-slider__btn[hidden] {
    display: none;
}

.sebc-slider__btn:hover:not(:disabled),
.sebc-slider__btn:focus-visible {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.sebc-slider__btn svg {
    display: block;
    pointer-events: none;
}

.sebc-slider__btn:disabled {
    cursor: default;
    opacity: 0.35;
}

.sebc-slider__btn--prev {
    left: 0.5rem;
}

.sebc-slider__btn--next {
    right: 0.5rem;
}

@media (prefers-reduced-motion: no-preference) {
    .sebc-slider__track {
        scroll-behavior: smooth;
    }
}

/* The "See all" button in the module */
.sebc-module__more {
    margin: 0.5rem 0 0;
    text-align: center;
}
