/* Product catalogue, category navigation and product detail pages. */

.product-navigation-toolbar {
    position: fixed;
    top: calc(var(--site-header-height, 80px) + 12px);
    left: 24px;
    z-index: 990;
}

.hamburger-button {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 6px;
    border: 0;
    border-radius: 3px;
    background: #f2efe8;
    color: #333333;
    cursor: pointer;
    flex-shrink: 0;
    list-style: none;
}

.hamburger-button::-webkit-details-marker {
    display: none;
}

.hamburger-button span {
    display: block;
    width: 34px;
    height: 4px;
    border-radius: 2px;
    background: currentColor;
}

.hamburger-button:hover,
.hamburger-button:focus {
    background: #f2efe8;
    color: #354738;
}

.hamburger-button:focus-visible {
    outline: 2px solid #354738;
    outline-offset: 3px;
}

.product-navigation-toolbar[open] {
    top: var(--site-header-height, 80px);
    left: 0;
    width: min(368px, 100%);
    height: calc(100dvh - var(--site-header-height, 80px));
    overflow: auto;
    background: #354738;
    box-shadow: 4px 0 16px #25322926;
}

.product-navigation-toolbar[open].has-category-preview {
    width: min(1200px, 100%);
}

.product-navigation-toolbar[open] .hamburger-button {
    position: relative;
    margin: 16px 12px;
    color: #f7f5f0;
}

.product-navigation-toolbar[open] .hamburger-button:hover,
.product-navigation-toolbar[open] .hamburger-button:focus {
    background: #465c49;
}

.product-navigation-toolbar[open] .hamburger-button:focus-visible {
    outline-color: #d9dfd3;
}

.product-navigation-toolbar[open] .hamburger-button span {
    position: absolute;
    width: 28px;
    height: 2px;
    transform: rotate(45deg);
}

.product-navigation-toolbar[open] .hamburger-button span:nth-child(2) {
    opacity: 0;
}

.product-navigation-toolbar[open] .hamburger-button span:last-child {
    transform: rotate(-45deg);
}

.product-side-menu {
    width: 368px;
    box-sizing: border-box;
    padding: 0 16px 32px;
    color: #f7f5f0;
}

.category-preview {
    position: absolute;
    top: 0;
    left: 368px;
    width: calc(100% - 368px);
    min-height: 100%;
    padding: 32px;
    box-sizing: border-box;
    background: #ffffff;
    color: #2f332f;
    box-shadow: 4px 0 16px #25322926;
}

.category-preview__back {
    display: inline-block;
    width: auto;
    height: auto;
    margin-bottom: 20px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #354738;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.category-preview__back:hover,
.category-preview__back:focus {
    background: transparent;
    color: #253229;
}

.category-preview__header {
    padding-bottom: 16px;
    border-bottom: 1px solid #d9ddd7;
}

.category-preview__header h2 {
    margin-bottom: 8px;
    font-size: 32px;
}

.category-preview__header p {
    margin-bottom: 0;
}

.category-preview__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.category-preview__product {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.category-preview__product .product-cart-form {
    margin-top: auto;
}

.category-preview__product img,
.category-preview__placeholder {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #f7f5f0;
}

.category-preview__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #626b64;
}

.category-preview__product h3 {
    margin: 14px 0 8px;
    font-size: 19px;
}

.category-preview__product h3 a {
    color: #354738;
}

.category-preview__product p {
    margin: 0 0 8px;
    font-size: 14px;
}

.category-preview__all {
    margin-top: 28px;
}

.side-menu-search {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 8px 36px;
    border-bottom: 1px solid #71806f;
    color: #c7d0c4;
}

.side-menu-search input {
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 8px;
    border: 0;
    background: transparent;
    color: #f7f5f0;
    opacity: 1;
    font-size: 18px;
}

.side-menu-search input::placeholder {
    color: #c7d0c4;
    opacity: 1;
}

.side-menu-search input:focus {
    outline: 2px solid #d9dfd3;
    outline-offset: 2px;
}

.side-menu-search-icon {
    display: block;
    position: relative;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    flex-shrink: 0;
}

.side-menu-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #c7d0c4;
}

.side-menu-search-submit:hover,
.side-menu-search-submit:focus {
    background: #465c49;
    color: #f7f5f0;
}

.side-menu-search-submit:focus-visible {
    outline: 2px solid #d9dfd3;
    outline-offset: 2px;
}

.side-menu-search-results {
    margin-bottom: 24px;
    border-bottom: 1px solid #71806f;
}

.side-menu-search-results p {
    margin: 0 8px 12px;
    color: #d9dfd3;
}

.side-menu-search-icon::after {
    position: absolute;
    right: -7px;
    bottom: -4px;
    width: 10px;
    height: 2px;
    background: currentColor;
    content: '';
    transform: rotate(45deg);
}

.side-menu-items,
.side-menu-subcategories {
    margin: 0;
    padding: 0;
    list-style: none;
}

.side-menu-items li {
    margin: 0;
    font-size: 18px;
}

.side-menu-items a,
.side-menu-category summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: #f7f5f0;
    text-decoration: none;
    border-radius: 4px;
}

.side-menu-items a:hover,
.side-menu-category summary:hover {
    background: #465c49;
    color: #f7f5f0;
}

.side-menu-items a:focus-visible,
.side-menu-category summary:focus-visible {
    outline: 2px solid #d9dfd3;
    outline-offset: -2px;
}

.side-menu-category {
    border-radius: 4px;
    background: #465c49;
}

.side-menu-category summary {
    cursor: pointer;
    list-style: none;
}

.side-menu-category summary::-webkit-details-marker {
    display: none;
}

.side-menu-category summary span {
    font-size: 30px;
    line-height: 1;
}

.side-menu-category[open] summary span {
    transform: rotate(90deg);
}

.side-menu-subcategories a {
    padding-left: 36px;
    font-size: 16px;
    color: #d9dfd3;
}

/* ========================================
   ALL PRODUCTS PAGE
======================================== */

.products-index {
    position: relative;
    background: #ffffff;
    min-height: 100vh;
    padding: 32px 24px;
}

.products-index__header,
.products-index__controls,
.products-index__pagination,
.products-index__grid,
.products-index__admin-links {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.products-index__header {
    position: relative;
    padding: 0 56px;
    text-align: center;
    margin-bottom: 32px;
}

.shopping-bag-link {
    position: fixed;
    top: calc(var(--site-header-height, 80px) + 12px);
    right: 24px;
    z-index: 980;
    background: transparent;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #354738;
}

.shopping-bag-link:focus-visible,
.products-index__categories a:focus-visible,
.products-index__filter-panel summary:focus-visible {
    outline: 2px solid #354738;
    outline-offset: 3px;
}

.product-detail__header {
    position: relative;
    padding-right: 76px;
}

.product-detail__feedback .message {
    margin: 16px 0;
    padding: 14px 20px;
    border: 1px solid #cdd7d0;
    border-radius: 6px;
    background: #edf5ee;
    color: #28543c;
}

.products-index > .product-detail__feedback {
    max-width: min(1200px, calc(100% - 144px));
    margin: 0 auto;
}

.product-detail__feedback .message.error {
    background: #fff2f1;
    color: #a12622;
}

.product-detail__header .shopping-bag-link {
    top: calc(var(--site-header-height, 80px) + 12px);
    right: 24px;
}

.shopping-bag-count {
    position: absolute;
    top: 0;
    right: -4px;
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    box-sizing: border-box;
    border-radius: 999px;
    background: #c62828;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.products-index__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.products-index__categories a {
    padding: 6px 14px;
    border: 1px solid #71806f;
    border-radius: 4px;
    color: #354738;
    font-size: 14px;
}

.products-index__categories a[aria-current="page"],
.products-index__categories a:hover {
    background: #354738;
    color: #ffffff;
}

.side-menu-items a[aria-current="page"] {
    background: #253229;
    color: #ffffff;
}

.products-index__filter-panel summary {
    width: fit-content;
    margin-bottom: 16px;
    cursor: pointer;
    color: #354738;
}

.products-index__filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
    align-items: end;
    gap: 24px;
    margin-bottom: 28px;
}

.products-index__filters .input {
    min-width: 0;
    margin: 0;
}

.products-index__filters select {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
}

.products-index__filters button {
    background: #465c49;
    border-color: #465c49;
    margin: 0;
    white-space: nowrap;
}

.products-index__filters > a {
    align-self: center;
    margin: 24px 0 0;
    white-space: nowrap;
    color: #354738;
}

.products-index__controls {
    margin-bottom: 32px;
}

.products-index__total {
    text-align: right;
}

.products-index__pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    list-style: none;
    padding: 24px 0;
}

.products-index__pagination a {
    color: #354738;
}

.products-index__pagination .active {
    font-weight: bold;
}

.products-index__header h1 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #2f3e34;
    font-size: 48px;
    font-weight: 400;
}

.products-index__admin-links {
    margin-bottom: 36px;
}

.products-index__admin-links h2 {
    font-size: 28px;
}

.products-index__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 24px;
}

.products-index .product-card {
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    padding-bottom: 16px;
    border: 1px solid #d9ddd7;
    background: #ffffff;
}

.products-index .product-card h3 {
    margin: 16px 16px 8px;
    font-size: 20px;
}

/* Extend the product name link across the card, below its form controls. */
.products-index .product-card h3 a::after,
.category-preview__product h3 a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.products-index .product-card h3 a:focus-visible::after,
.category-preview__product h3 a:focus-visible::after {
    outline: 2px solid #354738;
    outline-offset: -3px;
}

.products-index .product-card select,
.products-index .product-card label,
.products-index .product-card button,
.products-index .product-card__actions > a,
.category-preview__product select,
.category-preview__product label,
.category-preview__product button {
    position: relative;
    z-index: 2;
}

.products-index .product-card p {
    margin: 0 16px 8px;
    font-size: 14px;
}

.products-index .product-card__actions {
    margin: auto 16px 0;
    padding-top: 12px;
}

.products-index .hamper-card .product-card__actions > a {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
}

.product-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #626b64;
}

.product-cart-form {
    width: 100%;
    margin-bottom: 0;
}

.product-cart-form select,
.product-cart-form button {
    width: 100%;
}

.product-cart-form button {
    margin-bottom: 0;
    background: #354738;
    border-color: #354738;
}

.product-cart-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.products-index .product-cart-form p {
    margin: 0 0 8px;
}

.product-card__image {
    width: 100%;
    height: 260px;
    object-fit: contain;
    background: #f7f5f0;
}

.product-detail__image {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 0 auto;
}

.product-gallery {
    position: relative;
    z-index: 2;
    background: #f7f5f0;
}

.product-gallery__slide {
    display: block;
}

.product-gallery__slide[hidden],
.product-gallery__controls[hidden] {
    display: none;
}

.product-gallery__slide img,
.category-preview__product .product-gallery__slide img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-gallery__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px;
    color: #354738;
    font-size: 14px;
}

.product-gallery__controls button {
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 1px solid #71806f;
    background: #ffffff;
    color: #354738;
    font-size: 26px;
    line-height: 1;
}

.product-detail__media .product-gallery {
    max-width: 600px;
    margin: 0 auto;
}

.add-to-bag-form {
    max-width: 520px;
    margin-top: 24px;
}

.product-detail__accordion {
    margin: 12px 0;
    border-radius: 6px;
    background: #f5f0e7;
    overflow: hidden;
}

.product-detail__accordion summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    color: #354738;
    cursor: pointer;
    list-style: none;
    font-size: 20px;
}

.product-detail__accordion summary::-webkit-details-marker { display: none; }
.product-detail__accordion summary span { font-size: 28px; line-height: 1; }
.product-detail__accordion[open] summary span { transform: rotate(90deg); }
.product-detail__accordion summary:focus-visible { outline: 2px solid #354738; outline-offset: -3px; }
.product-detail__accordion ul { margin: 0; padding: 0 24px 20px 40px; }

.product-card__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 24px 26px 0;
}

.product-card__actions a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 18px;
    background: #465c49;
    color: #ffffff;
    font-size: 13px;
    text-decoration: none;
}

.product-card__actions a:hover {
    background: #354738;
    color: #ffffff;
}

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

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

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

.products-index .product-card:nth-child(n) .product-card__image {
        height: 280px;
    }

}

@media (max-width: 650px) {
    .products-index > .product-detail__feedback:has(.message) {
        max-width: 100%;
        padding-top: 64px;
    }

.product-navigation-toolbar[open].has-category-preview,
    .product-navigation-toolbar[open].has-category-preview .category-preview {
        width: 100%;
    }

.product-navigation-toolbar[open].has-category-preview .product-side-menu {
        display: none;
    }

.category-preview {
        left: 0;
        padding: 76px 20px 28px;
    }

.category-preview__grid {
        grid-template-columns: 1fr;
    }

.category-preview__product img,
    .category-preview__placeholder {
        height: 280px;
    }

.products-index {
        padding: 32px 20px;
    }

.products-index__header h1 {
        font-size: 38px;
    }

.products-index__filters {
        grid-template-columns: 1fr;
    }

.products-index__filters > a { margin-top: 0; }

    .products-index__grid { grid-template-columns: 1fr; }

.product-card__image {
        height: 390px;
    }

}

/* Product card presentation. */
.shopping-bag-link {
    flex-direction: column;
    gap: 2px;
    width: 64px;
    height: 64px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}
.products-index .product-card h3 a,
.category-preview__product h3 a {
    color: #354738;
    font-weight: 600;
}
.products-index .product-cart-price,
.category-preview__product .product-cart-price {
    font-size: 34px;
    font-weight: 600;
    color: #354738;
}
.product-single-size {
    margin-bottom: 16px;
}
.product-single-size p {
    font-size: 18px;
}

/* Detail page: gallery and ingredients left, purchase information right. */
.product-detail { max-width: 1200px; margin: 0 auto; padding: 32px 24px 64px; }
.product-detail__breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; padding-right: 64px; font-size: 14px; text-align: left; }
.product-detail__breadcrumb a { color: #354738; }
.product-detail__layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.product-detail__content h1 { color: #354738; font-size: 38px; font-weight: 600; margin: 0 0 16px; text-align: left; }
.product-detail__rating { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; color: #354738; font-size: 15px; text-decoration: none; }
.product-detail__rating:hover { text-decoration: underline; }
.product-detail__rating-stars { color: #ad7840; letter-spacing: 2px; font-size: 20px; }
.product-detail__price { font-size: 34px; font-weight: 600; color: #354738; margin: 0 0 12px; }
.product-detail__media .product-gallery { max-width: none; }
.product-detail__thumbnails { display: grid; width: 85%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 24px; }
.product-detail:has(.hamper-included) .product-detail__thumbnails { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-detail__thumbnails button { height: auto; padding: 3px; margin: 0; background: transparent; border: 2px solid transparent; line-height: 1; }
.product-detail__thumbnails button[aria-pressed="true"] { border-color: #354738; }
.product-detail__thumbnails img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-detail__sizes { border: 0; padding: 0; margin: 0 0 20px; }
.product-detail__sizes legend { font-size: 14px; margin-bottom: 10px; }
.product-detail__size { display: inline-block; margin: 0 6px 8px 0; cursor: pointer; }
.product-detail__size input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.product-detail__size span { display: block; border: 1px solid #71806f; border-radius: 4px; padding: 8px 12px; font-size: 14px; font-weight: 400; }
.product-detail__size input:checked + span { background: #354738; color: white; }
.product-detail__size:has(input:disabled) { cursor: not-allowed; }
.product-detail__size input:disabled + span { border-color: #bbb; background: #eee; color: #777; }
.product-detail__size input:focus-visible + span { outline: 3px solid #b9cfb6; outline-offset: 2px; }
.product-detail .add-to-bag-form { max-width: none; }
.product-detail .add-to-bag-form input[type="number"] { max-width: 110px; }
.product-detail__add { width: 100%; height: auto; min-height: 48px; background: #354738; border-color: #354738; }
.product-detail__add:disabled { background: #eee; border-color: #bbb; color: #777; cursor: not-allowed; }
.product-detail__description h2 { font-size: 20px; font-weight: 600; margin-top: 28px; }
.product-detail__faqs { margin-top: 32px; }
.product-detail__faqs h2 { color: #354738; font-size: 22px; margin-bottom: 16px; }
.product-detail__faqs .product-detail__accordion summary { font-size: 17px; }
.product-detail__faqs .product-detail__accordion p { margin: 0; padding: 0 20px 20px; color: #5b645b; }
.hamper-included { margin-top: 32px; border: 1px solid #cbd3c8; padding: 24px; }
.hamper-included h2 { margin: 0 0 16px; font-size: 22px; }
.hamper-included ul { list-style: none; margin: 0; padding: 0; }
.hamper-included li { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; }
.hamper-included li:last-child { margin-bottom: 0; }
.hamper-included img { width: 64px; height: 64px; object-fit: cover; }
.hamper-included span { display: grid; gap: 3px; }
.hamper-included a { color: #354738; }
.hamper-included small { color: #5b645b; }
.product-detail__reviews { margin-top: 48px; padding-top: 28px; border-top: 1px solid #cbd3c8; scroll-margin-top: 20px; }
.product-detail__reviews-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.product-detail__reviews-heading h2 { margin: 0; font-size: 26px; color: #354738; }
.product-detail__reviews-heading p { margin: 6px 0 0; color: #647064; }
.product-detail__reviews-heading a { color: #354738; }
.product-detail__review { padding: 22px 0; border-top: 1px solid #dce3d9; }
.product-detail__review-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.product-detail__review-author { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.product-detail__review-meta > span { color: #ad7840; letter-spacing: 2px; white-space: nowrap; }
.product-detail__review p { margin: 10px 0 0; }
.product-detail__purchase-label { display: inline-block; color: #28543c; background: #e5f0e7; border: 1px solid #b8d2bf; border-radius: 4px; padding: 3px 8px; font-size: 14px; letter-spacing: normal; }
.product-review-form { max-width: 760px; margin: 48px auto 80px; padding: 0 24px; }
.product-review-form__card { background: #fff; border: 1px solid #dce3d9; border-radius: 10px; padding: 40px; }
.product-review-form__eyebrow { margin: 0 0 10px; color: #607267; font-size: 13px; font-weight: 700; letter-spacing: .12em; }
.product-review-form h1 { margin: 0 0 8px; color: #354738; font-size: clamp(28px, 4vw, 38px); line-height: 1.2; }
.product-review-form__intro { margin: 0 0 28px; color: #647064; }
.product-review-form .product-detail__purchase-label { margin: 0 0 24px; }
.product-review-form .input { margin-bottom: 22px; }
.product-review-form label { display: block; margin-bottom: 8px; color: #354738; font-weight: 600; }
.product-review-form select, .product-review-form textarea { display: block; width: 100%; background: #fff; border: 1px solid #9eae9e; border-radius: 5px; color: #24392d; }
.product-review-form select { min-height: 48px; }
.product-review-form textarea { min-height: 150px; padding: 12px; resize: vertical; }
.product-review-form select:focus, .product-review-form textarea:focus { border-color: #354738; outline: 2px solid #c9dbc9; }
.product-review-form__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 28px; }
.product-review-form__actions button { margin: 0; background: #354738; border-color: #354738; color: #fff; }
.product-review-form__actions a { color: #354738; }
@media (max-width: 650px) { .product-review-form { margin: 24px auto 56px; } .product-review-form__card { padding: 24px; } }
@media (max-width: 760px) {
    .product-detail__layout { grid-template-columns: 1fr; gap: 28px; }
    .product-detail__content h1 { font-size: 30px; }
}

.main-nav .shopping-bag-link { position: static; width: auto; height: auto; flex-direction: row; font-size: 15px; }
.main-nav .shopping-bag-count { position: static; }
