.tea-shop {
    box-sizing: border-box;
    width: 100%;
    max-width: 1184px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
    color: #3d482b;
    font-family: DMSans, Arial, sans-serif;
    text-align: left;
}

.tea-shop :is(h2, h3) {
    margin: 0 0 1rem;
    font-family: 'IM Fell DW Pica', Georgia, serif;
    font-weight: 400;
    line-height: 1.2;
}

.tea-shop h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}

.tea-shop p {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.75;
}

.tea-shop a {
    color: #4f5711;
    text-decoration-color: #b0ba94;
    text-underline-offset: 0.25em;
}

.tea-shop a:hover {
    text-decoration-color: currentColor;
}

.tea-shop .shop-eyebrow {
    margin: 0 0 0.875rem;
    color: #626b54;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tea-shop :is(a, button, select, summary, [tabindex]):focus-visible {
    outline: 2px solid #4f5711;
    outline-offset: 3px;
}

.shop-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
    padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.shop-intro h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.shop-intro-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    margin-top: 1.25rem;
}

.shop-intro-links a,
.shop-text-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    min-height: 2.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
}

.shop-starter {
    padding: 2rem;
    border: 1px solid #c5ccb5;
    border-radius: 16px;
    background: #faf7ef;
}

.shop-starter h3 {
    font-size: 1.6rem;
}

.shop-starter p {
    font-size: 0.875rem;
}

.shop-collection,
.shop-shipping,
.shop-product-heading,
.tea-shop .tea_box {
    scroll-margin-top: 2rem;
}

.shop-collection-header {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 2rem;
    margin-bottom: 1.75rem;
    border-top: 1px solid #c5ccb5;
}

.shop-collection-header h2 {
    margin: 0;
}

.shop-collection-count {
    padding-bottom: 0.25rem;
    color: #626b54;
    font-size: 0.8rem;
}

.shop-collection-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
}

.shop-sort-control {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: #626b54;
    font-size: 0.8rem;
}

.shop-sort-control[hidden] {
    display: none;
}

.shop-sort-control select {
    min-height: 2.75rem;
    max-width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #a7b18f;
    border-radius: 8px;
    background: #faf7ef;
    color: #3d482b;
    font: inherit;
    cursor: pointer;
}

.tea-shop .shop-sort-status {
    margin: -0.75rem 0 1.25rem;
    color: #626b54;
    font-size: 0.8rem;
}

.shop-sort-status:empty {
    display: none;
}

.shop-collection #tea-list {
    reading-flow: grid-order;
}

.tea-shop #tea-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-items: stretch;
    gap: 1.5rem;
    max-width: 560px;
    margin: 0 auto;
    padding: 0;
}

.tea-shop .tea_box.paypal-tea-box,
.tea-shop .tea_box.shop-merch-card {
    position: relative;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    padding: 1.5rem;
    border: 1px solid #c5ccb5;
    border-radius: 16px;
    background: #faf7ef;
    box-shadow: none;
    color: #3d482b;
    text-align: left;
}

.shop-product-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.tea-shop .shop-product-heading h3 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
}

.tea-shop .shop-product-heading h3 a {
    color: #3d482b;
    text-decoration: none;
}

.tea-shop .shop-product-heading h3 a:hover {
    text-decoration: underline;
}

.tea-shop .shop-product-heading .tea_box_tag {
    position: static;
    padding: 0.35rem 0.625rem;
    border-radius: 999px;
    background: #e6ebd8;
    color: #4f5711;
    font-family: DMSans, Arial, sans-serif;
    font-size: 0.625rem;
    line-height: 1.4;
    letter-spacing: 0.04em;
}

.shop-product-photo-link {
    display: block;
    margin-bottom: 1.25rem;
}

.shop-product-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    margin: 0 auto;
    border-radius: 10px;
}

.shop-merch-card {
    /* Keep the merch feature after the teas in every sort mode. */
    order: 999;
}

.shop-merch-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    min-width: 0;
}

.shop-merch-card-photos {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    min-width: 0;
}

.shop-merch-card-photos > .shop-product-photo-link {
    margin-bottom: 0;
}

.shop-merch-card-copy {
    min-width: 0;
}

.shop-merch-card .shop-product-photo {
    padding: 1rem;
    object-fit: contain;
}

.shop-merch-assortment .shop-product-photo {
    width: 70%;
    aspect-ratio: auto;
}

.tea-shop .shop-merch-card-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 44px;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: #4f5711;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.tea-shop .shop-merch-card-link:hover {
    background: #3d482b;
}

.tea-shop paypal-add-to-cart-button {
    min-width: 0;
    margin-bottom: 0.75rem;
}

.tea-shop paypal-add-to-cart-button [id^="form-container-"] {
    width: 100%;
    /* Override PayPal's injected per-product maximum width. */
    max-width: none !important;
}

.tea-shop .tea-box-one-liner {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0.75rem 0 0;
    color: #444936;
    font-family: DMSans, Arial, sans-serif;
}

.tea-shop .tea-box-one-liner p:first-of-type {
    margin: 0 0 1rem;
    font-family: 'IM Fell DW Pica', Georgia, serif;
    font-size: 1rem;
    line-height: 1.5;
    text-align: left;
}

.tea-shop .tea-box-one-liner p:nth-of-type(2) {
    margin: 0 0 1rem;
    color: #626b54;
    font-family: DMSans, Arial, sans-serif;
    font-size: 0.8rem;
    line-height: 1.75;
}

.tea-shop .tea-box-one-liner strong {
    color: #3d482b;
    font-weight: 500;
}

.tea-shop .tea-box-one-liner + details {
    width: 100%;
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    border-top: 1px solid #d5dbc8;
    font-family: DMSans, Arial, sans-serif;
}

.tea-shop .tea-box-one-liner + details > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 2.75rem;
    padding: 0.5rem 0;
    color: #4f5711;
    font-size: 0.85rem;
}

.tea-shop summary::after {
    content: '+';
    font-size: 1.25rem;
}

.tea-shop details[open] summary::after {
    content: '\2212';
}

.tea-shop .tea-box-one-liner + details p {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    line-height: 1.75;
}

.shop-shipping {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    margin-top: 4rem;
    padding: 2.5rem;
    border: 1px solid #c5ccb5;
    border-radius: 16px;
    background: #faf7ef;
}

.shop-shipping-copy p {
    font-size: 0.9rem;
}

.shop-shipping-rates {
    min-width: 0;
    padding: 1.5rem;
    border-radius: 12px;
    background: #e9eddf;
}

.shop-shipping-rates label {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.shop-shipping-rates select {
    width: 100%;
    min-height: 2.75rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid #a7b18f;
    border-radius: 8px;
    background: #fffdf8;
    color: #3d482b;
    font: inherit;
    font-size: 0.9rem;
}

.tea-shop #shippingDisplay {
    margin-top: 1rem;
    font-size: 0.875rem;
    line-height: 1.75;
    text-align: left;
}

.tea-shop #shippingDisplay ul {
    display: block;
    padding-left: 1.25rem;
}

.shop-merch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 3rem;
    margin: 3rem 0;
    padding: 2rem;
    border-radius: 16px;
    background: #e9eddf;
}

.shop-merch img {
    display: block;
    width: 100%;
    height: auto;
}

.tea-shop .shop-recommendations {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    font-family: DMSans, Arial, sans-serif;
    font-weight: 400;
}

.shop-recommendations .scroll-row {
    padding: 0.25rem 0.25rem 1rem;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: #a7b18f transparent;
}

.shop-recommendations .scroll-row::-webkit-scrollbar-thumb {
    background: #a7b18f;
}

.shop-recommendations .scroll-item {
    display: flex;
    width: 180px;
    text-align: left;
    scroll-snap-align: start;
}

.shop-recommendations .scroll-item a {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #c5ccb5;
    border-radius: 12px;
    background: #faf7ef;
    text-decoration: none;
}

.shop-recommendations .scroll-item a:hover {
    border-color: #919d6e;
    background: #f0f2e8;
}

.shop-recommendations .scroll-item img {
    display: block;
    aspect-ratio: 1;
    object-fit: contain;
}

.shop-tea-name {
    margin-top: 1rem;
    color: #3d482b;
    font-family: 'IM Fell DW Pica', Georgia, serif;
    font-size: 1.15rem;
    line-height: 1.25;
}

.shop-recommendations .scroll-item .caption {
    margin-top: 0.5rem;
    color: #626b54;
    font-family: DMSans, Arial, sans-serif;
    font-size: 0.8rem;
    line-height: 1.5;
}

@media (min-width: 700px) {
    .tea-shop #tea-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }

    .tea-shop #tea-list > .tea_box {
        align-self: stretch;
    }

    .tea-shop .shop-merch {
        display: none;
    }
}

@media (width < 700px) {
    .tea-shop .tea_box.shop-merch-card {
        display: none;
    }
}

@media (700px <= width <= 1000px) {
    .shop-merch-assortment .shop-product-photo {
        width: 100%;
    }
}

@media (width > 1000px) {
    .tea-shop #tea-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tea-shop .shop-merch-card {
        grid-column: span 2;
        align-self: stretch;
        justify-content: flex-start;
    }

    .shop-merch-card-body {
        flex: 1;
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        gap: 1rem;
    }

    .shop-merch-card-photos {
        width: 100%;
    }

    .shop-merch-card-photos .shop-product-photo {
        padding: 0;
    }

    .shop-merch-card-photos > .shop-product-photo-link:first-child .shop-product-photo {
        aspect-ratio: auto;
        object-fit: contain;
    }
}

@media (max-width: 760px) {
    .shop-intro,
    .shop-shipping,
    .shop-merch {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .shop-shipping {
        padding: 1.5rem;
    }
}

@media (max-width: 540px) {
    .tea-shop {
        padding-right: 1.25rem;
        padding-left: 1.25rem;
    }

    .shop-starter,
    .shop-merch {
        padding: 1.5rem;
    }

    .tea-shop .tea_box.paypal-tea-box,
    .tea-shop .tea_box.shop-merch-card {
        padding: 1.25rem;
    }

    .shop-shipping {
        margin-top: 2.5rem;
        padding: 1.25rem;
    }

    .shop-shipping-rates {
        padding: 1rem;
    }

    .shop-recommendations .scroll-item {
        width: 160px;
    }
}
