.ap-header [hidden],
.ap-footer [hidden] {
    display: none !important;
}

.ap-shell-panel,
.ap-finder {
    width: min(30rem, calc(100% - 24px));
    max-height: calc(100% - 24px);
    overflow: auto;
    padding: clamp(16px, 4vw, 26px);
    border: 1px solid color-mix(in srgb, var(--ap-ink, #28352d) 25%, transparent);
    border-radius: 16px;
    background: var(--ap-card-bg, #fff);
    color: var(--ap-ink, #28352d);
    box-shadow: 0 20px 65px #10261b35;
    overscroll-behavior: contain;
}

.ap-shell-panel::backdrop,
.ap-finder::backdrop {
    background: rgb(15 28 21 / 60%);
}

.ap-shell-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.ap-shell-panel-heading h2,
.ap-shell-panel-heading form {
    margin: 0;
}

.ap-shell-close,
.ap-newsletter-trigger,
.ap-newsletter-form button {
    min-height: 44px;
    min-width: 44px;
    padding: 6px 12px;
    border: 1px solid currentColor;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.ap-shell-close {
    font-size: 1.3rem;
}

.ap-panel-links {
    display: grid;
    gap: 8px;
}

.ap-panel-links a,
.ap-finder-results a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}

.ap-panel-links a:hover,
.ap-finder-results a:hover {
    background: color-mix(in srgb, var(--ap-accent, #246045) 10%, transparent);
}

.ap-panel-links .ap-panel-primary,
.ap-newsletter-form button {
    background: var(--ap-footer-bg, #25372f);
    color: var(--ap-on-footer, #fff);
}

.ap-cart-status:empty,
.ap-finder-status:empty,
.ap-cart-preview-items:empty {
    display: none;
}

.ap-cart-preview-items {
    display: grid;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin-block: 12px;
}

.ap-cart-preview-items li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-block: 8px;
    border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.ap-cart-preview-items img {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 6px;
}

.ap-cart-preview-items a {
    color: inherit;
}

.ap-cart-preview-items p {
    margin: 0;
}

.ap-cart-subtotal {
    font-weight: 700;
}

.ap-finder {
    width: min(38rem, calc(100% - 24px));
}

.ap-finder-results {
    display: grid;
    gap: 6px;
}

.ap-footer-newsletter {
    min-width: min(100%, 15rem);
}

.ap-footer-newsletter > p + p {
    margin-block: 6px 12px;
}

.ap-newsletter-form {
    display: grid;
    gap: 8px;
}

.ap-newsletter-form > p {
    margin: 0 0 6px;
}

.ap-newsletter-form input[type="email"] {
    min-height: 44px;
    min-width: 0;
    border: 1px solid currentColor;
    border-radius: 8px;
    padding: 6px 10px;
    font: inherit;
}

.ap-newsletter-consent {
    display: flex;
    align-items: center;
    min-height: 44px;
    gap: 8px;
}

.ap-footer--compact .ap-footer-base:first-child {
    min-height: 42px;
    padding: 0;
    border-top: 0;
}

@media (max-width: 1040px) {
    .ap-header .ap-nav-enhanced:not([hidden]) {
        max-height: min(60vh, 28rem);
        overflow: auto;
        padding: 8px 12px;
        border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
        border-radius: 12px;
    }

    .ap-footer-newsletter {
        min-width: 0;
    }
}

@media (max-width: 767px) {
    .ap-shell-panel,
    .ap-finder {
        position: fixed;
        inset: auto 0 0;
        width: 100%;
        max-width: none;
        max-height: calc(100% - 16px);
        margin: 0;
        border-radius: 16px 16px 0 0;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
}
