.sh {
    --shop-green: #07553e;
    --shop-green-dark: #043e2c;
    --shop-text: #153f2e;
    --shop-muted: #5d7056;
    --shop-border: #d3dfcd;
    --shop-cream: #f7f5ed;

    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 65px;
    color: var(--shop-text);
    overflow-wrap: anywhere;
}

.sh,
.sh * {
    box-sizing: border-box;
}

.sh h1 {
    margin: 12px 0 25px;
    font-size: clamp(28px, 5vw, 42px);
}

.sh h2 {
    margin: 12px 0;
    font-size: 23px;
}

.sh p {
    line-height: 1.7;
}

.sh a {
    color: var(--shop-green);
}

.sh nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.sh nav a,
.sh button,
.sh .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    background: var(--shop-green);
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.sh nav a:hover,
.sh button:hover,
.sh .button:hover {
    background: var(--shop-green-dark);
}

.sh .secondary {
    background: #e6eddf;
    color: #17472f;
}

.sh .secondary:hover {
    background: #d5e2cb;
}

.sh .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 20px;
}

.sh article,
.sh .box,
.sh .notice {
    min-width: 0;
    margin-bottom: 20px;
    padding: 24px;
    border: 1px solid var(--shop-border);
    border-radius: 20px;
    background: #fff;
}

.sh .notice {
    background: #edf3e6;
}

.sh .error {
    background: #fff0e8;
    border-color: #ebc6af;
    color: #873b1a;
}

.sh img,
.sh .photo-placeholder {
    width: 100%;
    height: 200px;
    border-radius: 13px;
    object-fit: cover;
}

.sh .store-banner {
    height: 260px;
}

.sh .photo-placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #dce8cb, #edf2e7);
    color: #43653a;
    font-family: Georgia, serif;
    font-size: 32px;
}

.sh .product {
    display: flex;
    flex-direction: column;
}

.sh .product > form {
    margin-top: auto;
}

.sh .price {
    color: var(--shop-green);
    font-size: 24px;
    font-weight: 800;
}

/* Product listings use fixed columns so one item stays card-sized. */
.sh .grid:has(> article > h2 > a:is([href^="/shop/?slug="], [href^="/shop/?product="])) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.sh .grid > article:has(> h2 > a:is([href^="/shop/?slug="], [href^="/shop/?product="])) {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    padding: 16px;
    border-radius: 18px;
}

.sh .grid > article > a:is([href^="/shop/?slug="], [href^="/shop/?product="]):has(> img) {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: 10px;
    border-radius: 13px;
    background: var(--shop-cream);
}

.sh .grid > article > a:is([href^="/shop/?slug="], [href^="/shop/?product="]) > img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
}

.sh .grid > article > h2:has(> a:is([href^="/shop/?slug="], [href^="/shop/?product="])) {
    margin: 14px 0 6px;
    font-size: 19px;
    line-height: 1.3;
}

.sh .grid > article > h2 > a:is([href^="/shop/?slug="], [href^="/shop/?product="]) {
    text-decoration: none;
}

.sh .grid > article > h2 > a:is([href^="/shop/?slug="], [href^="/shop/?product="]):hover {
    text-decoration: underline;
}

.sh .grid > article:has(> h2 > a:is([href^="/shop/?slug="], [href^="/shop/?product="])) > p {
    font-size: 14px;
}

.sh .grid > article:has(> h2 > a:is([href^="/shop/?slug="], [href^="/shop/?product="])) > strong {
    display: block;
    margin-bottom: 8px;
    color: var(--shop-green);
    font-size: 23px;
}

.sh .grid > article:has(> h2 > a:is([href^="/shop/?slug="], [href^="/shop/?product="])) > form {
    margin-top: auto;
}

.sh label {
    display: block;
    margin: 15px 0;
    font-weight: 700;
}

.sh input:not([type="hidden"]),
.sh select,
.sh textarea {
    display: block;
    width: 100%;
    min-width: 0;
    margin-top: 7px;
    padding: 12px;
    border: 1px solid #bdd0b6;
    border-radius: 10px;
    background: #fbfcf8;
    color: var(--shop-text);
    font: inherit;
    font-size: 16px;
}

.sh input[type="number"] {
    max-width: 140px;
}

.sh textarea {
    resize: vertical;
}

.sh .muted {
    color: var(--shop-muted);
    font-size: 14px;
}

.sh progress {
    width: 100%;
    height: 16px;
    accent-color: var(--shop-green);
}

.sh .actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.sh .actions form {
    margin: 0;
}

.sh .search {
    display: flex;
    gap: 10px;
    margin: 0 0 25px;
}

.sh .search input[type="search"] {
    flex: 1;
    margin: 0;
}

/* Keep the catalogue search compact with the current PHP form. */
.sh form.box[method="get"][action="/shop/"] {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    padding: 16px;
}

.sh form.box[method="get"][action="/shop/"] > label {
    flex: 1 1 230px;
    margin: 0;
}

.sh .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.sh :focus-visible {
    outline: 3px solid #b76d26;
    outline-offset: 4px;
}

@media (max-width: 900px) {
    .sh .grid:has(> article > h2 > a:is([href^="/shop/?slug="], [href^="/shop/?product="])) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .sh {
        padding: 22px 15px 45px;
    }

    .sh nav {
        gap: 8px;
    }

    .sh nav a {
        flex: 1 1 28%;
        padding: 11px 9px;
        font-size: 13px;
    }

    .sh article,
    .sh .box,
    .sh .notice {
        padding: 18px;
    }

    .sh .grid:has(> article > h2 > a:is([href^="/shop/?slug="], [href^="/shop/?product="])) {
        grid-template-columns: minmax(0, 1fr);
    }

    .sh .search button {
        padding-inline: 14px;
    }
}