/*
 * Default theme. Colors, fonts and radius come from CSS variables defined
 * by config/settings_schema.json (css_var) and printed in content_for_header.
 */
*,
*::before,
*::after {
    box-sizing: border-box;
}
html {
    -webkit-text-size-adjust: 100%;
}
body {
    margin: 0;
    font-family: var(--font-sans, system-ui, sans-serif);
    color: var(--foreground);
    background: var(--background);
    line-height: 1.5;
}
img {
    max-width: 100%;
    display: block;
}
a {
    color: inherit;
}
h1,
h2,
h3 {
    line-height: 1.2;
    margin: 0 0 0.5em;
}
.muted {
    color: var(--muted-foreground);
}
.error {
    color: #b91c1c;
    font-size: 0.875rem;
    margin: 0.25rem 0 0;
}
.page-width {
    width: 100%;
    max-width: var(--page-width, 72rem);
    margin-inline: auto;
    padding-inline: 1rem;
}
.main {
    min-height: 60vh;
}
.section-block {
    padding-block: 2.5rem;
}
.section-title {
    font-size: 1.5rem;
}
.skip-link {
    position: absolute;
    left: -999px;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 100;
    background: var(--background);
    padding: 0.5rem;
}

/* Controls */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    background: var(--primary);
    color: var(--primary-foreground);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.button:hover {
    opacity: 0.9;
}
.button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
.button--outline {
    background: transparent;
    color: var(--foreground);
    border-color: var(--border);
}
.button--full {
    width: 100%;
}
.link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
    color: var(--muted-foreground);
}
.input {
    width: 100%;
    padding: 0.5rem 0.65rem;
    font: inherit;
    color: inherit;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.input--qty {
    width: 5rem;
}
.badge {
    display: inline-block;
    min-width: 1.4rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 0.75rem;
    text-align: center;
}
.chip {
    display: inline-block;
    margin: 0 0.4rem 0.4rem 0;
}
.chip input {
    position: absolute;
    opacity: 0;
}
.chip span {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}
.chip input:checked + span {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--primary-foreground);
}
.chip input:focus-visible + span {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.toast {
    max-width: var(--page-width, 72rem);
    margin: 1rem auto 0;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    background: var(--muted);
    border: 1px solid var(--border);
}
.toast--error {
    border-color: #b91c1c;
    color: #b91c1c;
}

/* Header / footer */
.announcement {
    background: var(--primary);
    color: var(--primary-foreground);
    text-align: center;
    font-size: 0.875rem;
    padding: 0.4rem 1rem;
}
.announcement a {
    text-decoration: none;
}
.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--background);
    position: sticky;
    top: 0;
    z-index: 20;
}
.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding-block: 0.85rem;
}
.site-header__logo {
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
}
.site-header__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    flex: 1;
}
.site-header__nav a,
.site-header__actions a,
.site-footer a {
    text-decoration: none;
}
.site-header__nav a:hover,
.site-header__actions a:hover,
.site-footer a:hover {
    text-decoration: underline;
}
.site-header__search input {
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    background: var(--background);
    color: inherit;
}
.site-header__actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}
.site-footer {
    margin-top: 4rem;
    border-top: 1px solid var(--border);
    background: var(--muted);
    padding-block: 2rem 1rem;
}
.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
}
.site-footer nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.site-footer__name {
    font-weight: 700;
    margin: 0;
}
.site-footer__copy {
    font-size: 0.8rem;
    margin-top: 1.5rem;
}

/* Sections */
.hero {
    background: var(--muted);
    padding-block: 4rem;
    background-size: cover;
    background-position: center;
}
.hero--image {
    color: #fff;
    text-shadow: 0 1px 3px rgb(0 0 0 / 0.5);
}
.hero__title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    max-width: 40rem;
}
.hero__subtitle {
    font-size: 1.15rem;
    max-width: 36rem;
    margin-bottom: 1.5rem;
}
.rich-text {
    padding-block: 2.5rem;
}
.rich-text--center {
    text-align: center;
}
.rich-text--center .rte {
    max-width: 42rem;
    margin-inline: auto;
}
.image-with-text {
    display: grid;
    gap: 2rem;
    align-items: center;
    padding-block: 2.5rem;
}
@media (min-width: 768px) {
    .image-with-text {
        grid-template-columns: 1fr 1fr;
    }
    .image-with-text--reverse .image-with-text__image {
        order: 2;
    }
}
.image-with-text__image {
    border-radius: var(--radius);
    width: 100%;
}
.grid {
    display: grid;
    gap: 1.25rem;
}
.grid--products {
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
}
.grid--categories {
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}
.category-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
}
.category-card:hover {
    border-color: var(--primary);
}
.category-card__name {
    font-weight: 600;
}
.product-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-decoration: none;
}
.product-card__media {
    aspect-ratio: 1;
    background: var(--muted);
    border-radius: var(--radius);
    overflow: hidden;
    display: grid;
    place-items: center;
}
.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-card__placeholder {
    font-size: 2.5rem;
    color: var(--muted-foreground);
}
.product-card__info {
    display: flex;
    flex-direction: column;
}
.product-card__brand {
    font-size: 0.8rem;
}
.product-card__name {
    font-weight: 500;
}
.price__compare {
    margin-left: 0.4rem;
    font-size: 0.9em;
}

/* Product */
.product {
    display: grid;
    gap: 2rem;
    padding-block: 2rem;
}
@media (min-width: 768px) {
    .product {
        grid-template-columns: 1fr 1fr;
    }
}
.product__image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--muted);
}
.product__image--placeholder {
    display: grid;
    place-items: center;
    font-size: 4rem;
    color: var(--muted-foreground);
}
.product__thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.product__thumbs button {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    width: 4rem;
    cursor: pointer;
    background: none;
    overflow: hidden;
}
.product__title {
    font-size: 2rem;
}
.product__price {
    font-size: 1.35rem;
    font-weight: 600;
}
.product__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-block: 1.5rem;
}
.product__option {
    border: 0;
    padding: 0;
    margin: 0;
}
.product__option legend {
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.product__buy {
    display: flex;
    gap: 0.75rem;
}
.product__pickup {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
}
.product__pickup summary {
    cursor: pointer;
    font-weight: 500;
}
.product__description {
    margin-top: 1.5rem;
}

/* Collection */
.collection {
    padding-block: 2rem;
}
.collection__layout {
    display: grid;
    gap: 2rem;
}
@media (min-width: 900px) {
    .collection__layout {
        grid-template-columns: 15rem 1fr;
    }
    .collection__layout--full {
        grid-template-columns: 1fr;
    }
}
.filters {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.filters__group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.filters__title {
    font-weight: 600;
    margin: 0;
}
.filters__price {
    display: flex;
    gap: 0.5rem;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Cart */
.cart {
    padding-block: 2rem;
}
.cart__layout {
    display: grid;
    gap: 2rem;
}
@media (min-width: 900px) {
    .cart__layout {
        grid-template-columns: 1fr 22rem;
    }
}
.cart__items {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cart-item {
    display: grid;
    grid-template-columns: 4rem 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    padding-block: 1rem;
    border-bottom: 1px solid var(--border);
}
.cart-item__image {
    width: 4rem;
    height: 4rem;
    object-fit: cover;
    border-radius: var(--radius);
}
.cart-item__image--placeholder {
    display: block;
    background: var(--muted);
}
.cart-item__info {
    display: flex;
    flex-direction: column;
}
.cart__summary {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-self: start;
}
.cart__coupon {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.cart__coupon .input {
    flex: 1;
}
.totals {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.35rem;
    margin: 0;
}
.totals dd {
    margin: 0;
    text-align: right;
}
.totals__total {
    font-weight: 700;
    font-size: 1.1rem;
}
.rte p:first-child {
    margin-top: 0;
}
