.products-page {
    --products-bg: #fbf9f5;
    --products-paper: #fffdf9;
    --products-ink: #2f2e2c;
    --products-muted: #6c665b;
    --products-green: #124c24;
    --products-green-dark: #0c3719;
    --products-sage: #e7eee8;
    --products-sand: #e2ded2;
    --products-line: #c9bca9;
    width: 100%;
    min-height: 80vh;
    overflow: hidden;
    color: var(--products-ink);
    background: var(--products-bg);
}

.main:has(.products-page) {
    background: var(--products-bg);
}

.main:has(.products-page) .container,
.main:has(.product-detail-page) .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.products-banner {
    position: relative;
    min-height: 14rem;
    display: flex;
    align-items: center;
    padding: 1rem 3rem;
    background-image: url('/img/landing/login_picture.jpg');
    background-size: cover;
    background-position: center;
}

.products-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.products-banner-content {
    max-width: 62rem;
    z-index: 1;
    margin-left: 3rem;
}

.products-eyebrow {
    margin: 0 0 1rem;
    color: var(--products-green);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .14rem;
    line-height: 1.4;
    text-transform: uppercase;
}

.products-banner .products-eyebrow {
    color: #fff;
}

.products-banner h1,
.products-heading h2,
.products-sidebar h2 {
    margin: 0;
    font-weight: 600;
    line-height: 1.08;
}

.products-banner h1 {
    color: #fbf9f5;
}

.products-banner p:last-child {
    max-width: 48rem;
    margin: 1.8rem 0 0;
    color: #f4eee4;
    font-size: 1.7rem;
    line-height: 1.6;
}

.products-banner-mark {
    display: grid;
    width: 13rem;
    height: 13rem;
    flex: 0 0 auto;
    place-items: center;
    border: .1rem solid rgba(251, 249, 245, .5);
    border-radius: 50%;
    color: #f9e9d7;
    font-size: 2.3rem;
    font-weight: 700;
    letter-spacing: .2rem;
}

.products-heading,
.products-filter-form,
.products-results-heading,
.product-grid {
    width: calc(100% - 12rem);
    margin-right: auto;
    margin-left: auto;
}

.products-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 3rem;
    padding-top: 3rem;
}

.products-heading h2 {
    font-size: clamp(3rem, 4vw, 4.6rem);
}

.products-filter-toggle {
    display: inline-flex;
    min-height: 0;
    height: auto;
    align-items: center;
    gap: .8rem;
    margin: 0 0 .4rem auto;
    padding: .4rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--products-green);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .06rem;
    line-height: 1.4;
    text-transform: uppercase;
}

.products-filter-toggle svg {
    width: 2rem;
    height: 2rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.products-filter-toggle:hover,
.products-filter-toggle:focus-visible {
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--products-green);
    text-decoration: underline;
    text-underline-offset: .35rem;
}

.products-filter-section {
    width: calc(100% - 12rem);
    margin: 0 auto;
}

.products-filter-section .products-filter-form {
    width: 100%;
}

.products-cart-link,
.products-search-button,
.products-filter-button,
.product-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 4.6rem;
    border: .1rem solid var(--products-green);
    border-radius: .3rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .08rem;
    line-height: 1.3;
    text-decoration: none;
    text-transform: uppercase;
}

.products-cart-link,
.products-search-button,
.product-action-button {
    padding: 1.1rem 2rem;
    background: var(--products-green);
    color: #fff;
}

.products-cart-link:hover,
.products-search-button:hover,
.product-action-button:hover {
    border-color: var(--products-green-dark);
    background: var(--products-green-dark);
    color: #fff;
}
.products-filter-button {
    padding: 1.1rem 2rem;
    background: var(--products-paper);
    color: var(--products-ink);
}
.products-filter-button:hover {
    border-color: var(--products-green-dark);
    background: var(--products-green-dark);
    color: #fff;
}


.products-filter-form {
    margin-top: 3rem;
}

.products-filter-form[hidden] {
    display: none;
}

.products-toolbar {
    display: grid;
    grid-template-columns: minmax(30rem, 2fr) minmax(18rem, 1fr) minmax(18rem, 1fr) minmax(13rem, 0.6fr);
    gap: 1.2rem;
    align-items: stretch;
}

.products-search-field {
    position: relative;
}

.products-search-field svg {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 1.6rem;
    width: 2rem;
    height: 2rem;
    fill: none;
    stroke: var(--products-ink);
    stroke-linecap: round;
    stroke-width: 1.8;
    transform: translateY(-50%);
    pointer-events: none;
}

.products-search-input,
.products-toolbar-control {
    margin: 0;
}

.products-search-input input,
.products-toolbar-control select {
    width: 100%;
    height: 4.8rem;
    margin: 0;
    border: .1rem solid var(--products-line);
    border-radius: .7rem;
    background: var(--products-paper);
    color: var(--products-ink);
}

.products-search-input input {
    padding-left: 4.7rem;
}

.products-toolbar .products-search-button {
    width: 100%;
    height: 4.8rem;
    min-width: 0;
    margin: 0;
    min-height: 4.8rem;
    padding: 0 2rem;
    border-radius: .7rem;
}

.products-results-heading {
    margin-top: 3.5rem;
    border-bottom: .1rem solid var(--products-line);
}

.products-results-heading p {
    margin: 0 0 1.2rem;
    color: var(--products-muted);
    font-size: 1.4rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
    padding: 2.4rem 0 8rem;
}

.products-empty-state {
    grid-column: 1 / -1;
    padding: 3rem 2rem;
    border: 1px dashed var(--products-line);
    border-radius: 8px;
    background: var(--products-paper);
    text-align: center;
}

.products-empty-state h3 {
    margin-bottom: 1rem;
}

.products-empty-state p {
    color: var(--products-muted);
}

.product-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 0;
    border-radius: .5rem;
    background: var(--products-paper);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.product-grid .product-card {
    padding: 0;
}

.product-heart-form,
.product-detail-heart-form {
    position: absolute;
    z-index: 4;
    top: 1.6rem;
    right: 1.6rem;
    margin: 0;
}

.product-heart-button {
    position: absolute;
    z-index: 4;
    top: 1.6rem;
    right: 1.6rem;
    display: inline-flex;
    width: 3.7rem;
    height: 3.7rem;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.75rem;
    border: 0.1rem solid rgba(47, 46, 44, 0.18);
    border-radius: 50%;
    background: rgba(255, 253, 249, 0.94);
    color: var(--products-green);
    box-shadow: 0 0.6rem 1.8rem rgba(47, 46, 44, 0.12);
}

.product-heart-form .product-heart-button,
.product-detail-heart-form .product-heart-button {
    position: static;
}

.product-heart-button svg {
    width: 2.1rem;
    height: 2.1rem;
    fill: transparent;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.product-card .product-heart-button {
    width: 3.2rem;
    height: 3.2rem;
    padding: 0.65rem;
}

.product-card .product-heart-button svg {
    width: 1.8rem;
    height: 1.8rem;
}

.product-heart-button:hover,
.product-heart-button:focus-visible,
.product-heart-button.is-saved {
    border-color: var(--products-green);
    background: var(--products-green);
    color: #fff;
}

.product-heart-button.is-saved svg {
    fill: currentColor;
}

.product-card:hover {
    box-shadow: 0 1.2rem 3rem rgba(47, 46, 44, .08);
    transform: translateY(-.3rem);
}

.product-card-image {
    overflow: hidden;
    background: #faeee4;
}

.product-card-image img {
    display: block;
    width: 100%;
    height: 36rem;
    object-fit: cover;
    transition: transform 240ms ease;
}

.product-card:hover .product-card-image img {
    transform: scale(1.025);
}

.product-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 2.3rem;
}

.product-category {
    margin: 0 0 1rem;
    color: var(--products-green);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .1rem;
    text-transform: uppercase;
}

.product-card h3 {
    margin: 0 0 1rem;
    font-size: 2.2rem;
    font-weight: 600;
    line-height: 1.25;
}

.product-card h3 a {
    color: var(--products-ink);
}

.product-card-footer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin-top: auto;
    margin-bottom: 1.8rem;
}

.price-tag {
    color: var(--products-green);
    font-size: 1.8rem;
    font-weight: 700;
}

.product-stock {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    gap: .6rem;
    color: var(--products-muted);
    font-size: 1.2rem;
}

.product-stock::before {
    width: .65rem;
    height: .65rem;
    border-radius: 50%;
    background: currentColor;
    content: '';
}

.product-stock.is-available {
    color: var(--products-green);
}

.product-stock.is-unavailable {
    color: #795548;
}

.product-action,
.product-action-button {
    width: 100%;
    margin: 0;
}

.product-detail-page {
    --products-bg: #fbf9f5;
    --products-paper: #fffdf9;
    --products-ink: #2f2e2c;
    --products-muted: #6c665b;
    --products-green: #124c24;
    --products-green-dark: #0c3719;
    --products-line: #c9bca9;
    width: min(100% - 4rem, 104rem);
    margin: 2.2rem auto 4rem;
    color: var(--products-ink);
}

.product-detail-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.8rem;
    color: var(--products-muted);
    font-size: 1.35rem;
}

.product-detail-breadcrumb a {
    color: var(--products-green);
    font-weight: 700;
    text-decoration: none;
}

.product-detail-breadcrumb a:hover,
.product-detail-breadcrumb a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.3rem;
}

.product-detail {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(38rem, 3fr);
    gap: clamp(2.4rem, 3vw, 4rem);
    height: min(61rem, calc(100vh - 15rem));
    min-height: 52rem;
}

.product-detail-gallery {
    display: flex;
    height: 100%;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    padding: 0;
}

.product-detail-image {
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.product-detail-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    transition: transform 300ms ease;
}

.product-detail-image:hover img {
    transform: scale(1.015);
}

.product-detail-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.product-detail-thumbnail {
    overflow: hidden;
    width: 100%;
    height: 7.6rem;
    margin: 0;
    padding: 0;
    border: 0.1rem solid rgba(47, 46, 44, 0.18);
    border-radius: 0.2rem;
    background: #fff;
    opacity: 0.72;
    transition: border-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

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

.product-detail-thumbnail:hover,
.product-detail-thumbnail:focus-visible,
.product-detail-thumbnail.is-active {
    border-color: var(--products-green);
    opacity: 1;
    transform: translateY(-0.2rem);
}

.product-detail-content {
    display: flex;
    height: 100%;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    overflow-y: auto;
    padding: 0 1rem 0 0;
    scrollbar-color: var(--products-line) transparent;
    scrollbar-width: thin;
}

.product-detail-heading {
    padding: 1.6rem 0 2rem;
    border-bottom: 0.1rem solid #e4ded3;
}

.product-detail-wishlist {
    display: flex;
    min-height: 3.6rem;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    color: var(--products-muted);
    font-size: 1.25rem;
    font-weight: 700;
}

.product-detail-wishlist .product-detail-heart-form {
    position: static;
    margin: 0;
}

.product-detail-wishlist .product-heart-button {
    position: static;
    width: 4rem;
    height: 4rem;
    flex: 0 0 4rem;
    padding: 0.8rem;
    box-shadow: none;
}

.product-detail-content h1 {
    max-width: 58rem;
    margin: 0;
    color: var(--products-ink);
    font-size: clamp(3rem, 4vw, 4.2rem);
    font-weight: 600;
    letter-spacing: -0.08rem;
    line-height: 1.08;
}

.product-detail-price {
    margin: 1.2rem 0 0;
    color: var(--products-green);
    font-size: clamp(2.4rem, 3vw, 3rem);
    font-weight: 700;
}

.product-detail-purchase {
    padding: 2rem 0;
    border-bottom: 0.1rem solid #e4ded3;
}

.product-detail-purchase-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.4rem;
}

.product-detail-purchase-heading h2 {
    margin: 0;
    color: var(--products-ink);
    font-size: 1.7rem;
    font-weight: 600;
}

.product-detail-stock {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    color: var(--products-muted);
    background: #f1eee8;
    font-size: 1.15rem;
    font-weight: 700;
}

.product-detail-stock::before {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: currentColor;
    content: '';
}

.product-detail-stock.is-available {
    color: var(--products-green);
    background: var(--products-sage);
}

.product-detail-stock.is-unavailable {
    color: #795548;
    background: #f3e8e1;
}

.product-detail-action {
    width: 100%;
    margin: 0;
}

.product-detail-quantity {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.7rem;
    margin-bottom: 1.4rem;
}

.product-detail-quantity .quantity-label {
    color: var(--products-muted);
}

.product-detail-quantity .quantity-stepper {
    display: grid;
    grid-template-columns: 3.4rem 3.6rem 3.4rem;
    align-items: center;
    overflow: hidden;
    border: 0.1rem solid var(--products-line);
    border-radius: 0.6rem;
    background: #fff;
}

.product-detail-quantity .quantity-button {
    width: 3.6rem;
    height: 3.6rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--products-ink);
    font-size: 1.5rem;
    line-height: 0.5rem;
}

.product-detail-quantity .quantity-button:hover,
.product-detail-quantity .quantity-button:focus-visible {
    background: #f4eee4;
    color: var(--products-green);
}

.product-detail-quantity .quantity-value {
    color: var(--products-ink);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
}

.product-detail-action .product-action-button,
.product-detail-action.product-action-button {
    min-height: 4.8rem;
    border-radius: 0.5rem;
    font-size: 1.35rem;
}

.product-action-button.is-disabled,
.product-action-button.is-disabled:hover {
    border-color: #cbc3b7;
    background: #e5e0d7;
    color: #777166;
    cursor: not-allowed;
}

.product-detail-info {
    margin-top: 2rem;
    padding: 1.8rem 2rem;
    border: 0.1rem solid var(--products-line);
    border-radius: 1.2rem;
    background: rgba(255, 253, 249, 0.72);
}

.product-detail-info h2 {
    margin: 0 0 1.4rem;
    color: var(--products-ink);
    font-size: 2.1rem;
}

.product-detail-info p {
    margin: 0 0 1.5rem;
    color: var(--products-muted);
    font-size: 1.4rem;
    line-height: 1.65;
}

.product-detail-info dl {
    margin: 0;
}

.product-detail-info dl div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: .1rem solid rgba(201, 188, 169, .7);
}

.product-detail-info dt,
.product-detail-info dd {
    margin: 0;
    font-size: 1.3rem;
}

.product-detail-info dt {
    color: var(--products-muted);
}

.product-detail-info dd {
    color: var(--products-ink);
    font-weight: 700;
    text-align: right;
}

.out-of-stock {
    width: 100%;
    min-height: 4.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    border: .1rem solid var(--products-line);
    border-radius: .3rem;
    color: var(--products-muted);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .05rem;
    text-align: center;
    text-transform: uppercase;
}

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

    .products-search-field {
        grid-column: span 2;
    }

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

    .product-detail {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
        min-height: 0;
    }

    .product-detail-gallery {
        height: auto;
        padding: 1.6rem;
    }

    .product-detail-content {
        height: auto;
        overflow: visible;
        padding: 3rem;
    }

    .product-detail-image img {
        height: auto;
        min-height: 0;
        aspect-ratio: 6 / 5;
    }

}

@media (max-width: 640px) {
    .products-banner {
        min-height: 20rem;
        padding: 4rem 2rem;
    }

    .products-banner-mark {
        display: none;
    }

    .products-heading,
    .products-filter-form,
    .products-results-heading,
    .product-grid {
        width: min(100% - 3.2rem, 116rem);
    }

    .products-heading {
        display: block;
        padding-top: 5rem;
    }

    .products-filter-section {
        width: min(100% - 3.2rem, 116rem);
    }

    .products-filter-toggle {
        margin-top: 2rem;
        margin-left: 0;
    }

    .products-cart-link {
        width: 100%;
        margin-top: 2rem;
    }

    .products-toolbar {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .products-search-field,
    .products-search-button {
        grid-column: auto;
        width: 100%;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-detail-page {
        width: min(100% - 3.2rem, 116rem);
        margin-top: 1.8rem;
    }

    .product-detail-breadcrumb {
        font-size: 1.2rem;
    }

    .product-detail-gallery,
    .product-detail-content {
        padding: 1.6rem;
    }

    .product-detail-thumbnail {
        height: 7rem;
    }

    .product-detail-wishlist {
        min-height: 0;
    }

    .product-detail-heading {
        padding-top: 1.8rem;
    }

    .product-detail-content h1 {
        font-size: clamp(3rem, 11vw, 4rem);
    }

    .product-detail-purchase-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-detail-quantity {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-detail-quantity .quantity-stepper {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-detail-quantity .quantity-button,
    .product-detail-quantity .quantity-value {
        width: 100%;
    }
}
