/* Shared responsive corrections, loaded after the page-specific styles. */
.sf-product-story__disclaimer {
    white-space: normal;
    overflow-wrap: anywhere;
}

.sf-cart-actions fieldset,
.sf-checkout-grid fieldset,
.sf-withdrawal-form fieldset {
    min-inline-size: 0;
}

.sf-cart-actions__row {
    grid-template-columns: 76px minmax(0, 1fr) 140px;
}

.sf-cart-stock-row {
    grid-template-columns: minmax(0, 1fr);
}

.sf-contact-line > div {
    min-width: 0;
}

.sf-contact-line a,
.sf-contact-line span {
    overflow-wrap: anywhere;
}

.sf-header-search-popover__panel {
    right: 0;
}

/* Visibility changes immediately on opening, so the close control can receive focus. */
.sf-device-rail {
    transition: transform 300ms var(--mc-ease), visibility 0s linear 300ms;
}

.sf-device-rail.is-open {
    transition-delay: 0s;
}

.sf-product-feedback-controls button {
    min-width: 44px;
    min-height: 44px;
}

@media (min-width: 761px) and (max-width: 1100px) {
    .sf-home-trust__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .sf-cart-page .sf-table-wrap {
        overflow: visible;
        border: 0;
    }

    .sf-cart-page .sf-table,
    .sf-cart-page .sf-table tbody,
    .sf-cart-page .sf-table tr,
    .sf-cart-page .sf-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .sf-cart-page .sf-table thead {
        display: none;
    }

    .sf-cart-page .sf-table tr {
        margin-bottom: 16px;
        padding: 14px;
        border: 1px solid var(--mc-line);
        background: var(--mc-bg-soft);
    }

    .sf-cart-page .sf-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 12px 0;
        border-bottom: 1px solid var(--mc-line);
    }

    .sf-cart-page .sf-table td::before {
        content: attr(data-label);
        color: var(--mc-muted);
        font-size: 11px;
        text-transform: uppercase;
    }

    .sf-cart-page .sf-table .sf-cart-cell-product {
        display: block;
    }

    .sf-cart-page .sf-cart-cell-product::before,
    .sf-cart-page .sf-cart-cell-remove::before {
        display: none;
    }

    .sf-cart-product > div {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 760px) {
    .sf-product-card__foot > .sf-stock {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .sf-product-card__foot > .sf-card-prices {
        flex: 1;
        min-width: 0;
    }

    .sf-product-card__foot .sf-price,
    .sf-product-card__foot .sf-card-prices s {
        white-space: nowrap;
    }

    .sf-product-page-body .sf-product-summary h1 {
        font-size: 26px;
        line-height: 1.2;
    }

    .sf-product-page-body .sf-price-stock-row {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .sf-price-stock-row > .sf-product-price {
        flex: 1 1 55%;
        min-width: 0;
        gap: 4px 10px;
    }

    .sf-price-stock-row > .sf-purchase-benefits {
        min-width: 0;
        flex: 0 1 50%;
        margin: 0 0 0 auto;
        padding: 0;
    }

    .sf-cart-stock-row__content {
        flex-direction: column;
        align-items: flex-start;
    }

    .sf-cart-stock-row__content .sf-viewer-counter {
        margin-inline-start: 0;
    }

    .sf-category-body .sf-category-page {
        padding-top: 18px;
    }

    .sf-category-body .sf-category-page__header {
        display: grid;
        gap: 8px;
        margin-bottom: 20px;
        border-radius: 12px;
        padding: 16px;
    }

    .sf-category-body .sf-category-page__header h1 {
        font-size: 26px;
        line-height: 1.2;
    }

    .sf-category-body .sf-category-page__header p {
        margin-top: 0;
        font-size: 14px;
        line-height: 1.5;
    }

    .sf-home-cta__benefits article,
    .sf-contact-card {
        text-align: center;
    }

    .sf-home-trust__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 1fr;
        gap: 12px;
        padding-block: 24px;
    }

    .sf-home-trust article {
        gap: 12px;
        border: 1px solid rgba(139, 161, 204, 0.2);
        border-radius: 10px;
        padding: 18px 12px;
        background: rgba(139, 161, 204, 0.045);
        text-align: center;
    }

    .sf-home-trust__main {
        display: contents;
    }

    .sf-home-trust__visual {
        order: -2;
        align-self: center;
        width: 36px;
        height: 36px;
    }

    .sf-home-trust__eyebrow {
        order: -1;
        min-height: 2.8em;
        margin: 0;
        font-size: 9px;
        letter-spacing: 0.08em;
    }

    .sf-home-trust strong {
        min-height: 2.4em;
        font-size: clamp(14px, 3.6vw, 17px);
        letter-spacing: 0;
        line-height: 1.2;
        text-wrap: balance;
    }

    .sf-home-trust p {
        margin-top: 8px;
        font-size: 12.5px;
        line-height: 1.55;
        white-space: normal;
    }

    .sf-home-trust__rule {
        display: none;
    }

    .sf-home-feature__copy ul {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        margin-top: 24px;
        border: 1px solid rgba(139, 161, 204, 0.18);
        border-radius: 12px;
        padding: 18px 16px;
        background: rgba(139, 161, 204, 0.045);
    }

    .sf-home-feature__copy li {
        display: flex;
        align-items: center;
        min-height: 24px;
        border: 0;
        padding: 0 0 0 34px;
        font-family: var(--wd-text-font);
        font-size: 14px;
        font-weight: 400;
        letter-spacing: 0;
        line-height: 1.5;
    }

    .sf-home-feature__copy li::before {
        top: 50%;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: rgba(134, 170, 255, 0.12);
        box-shadow: none;
        transform: translateY(-50%);
    }

    .sf-home-feature__copy li::after {
        position: absolute;
        top: 50%;
        left: 8px;
        width: 6px;
        height: 10px;
        border: solid #86aaff;
        border-width: 0 2px 2px 0;
        transform: translateY(-65%) rotate(45deg);
        content: "";
    }

    .sf-input,
    .sf-withdrawal-form input,
    .sf-withdrawal-form select,
    .sf-withdrawal-form textarea {
        font-size: 16px;
    }

    .sf-form-grid > *,
    .sf-checkout-grid > *,
    .sf-summary-line__top > *,
    .sf-footer-main > * {
        min-width: 0;
    }

    .sf-device-rail,
    .sf-minicart__panel {
        height: 100dvh;
        max-height: 100dvh;
    }

    .sf-product-gallery__thumbnail-nav,
    .sf-product-feedback-controls button,
    .sf-cart-qty button,
    .sf-cart-remove-small,
    .sf-minicart__remove {
        min-width: 44px;
        min-height: 44px;
    }

    .sf-product-gallery__thumbnail-nav {
        width: 44px;
    }

    .sf-footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 20px;
        padding-block: 36px;
    }

    .sf-footer-brand,
    .sf-footer-partners {
        grid-column: 1 / -1;
    }

    .sf-footer-col a,
    .sf-footer-col .sf-cookie-settings {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        overflow-wrap: anywhere;
    }

    .sf-footer-help span {
        overflow-wrap: anywhere;
    }

    .sf-cart-page .sf-cart-cell-quantity {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .sf-cart-cell-quantity .sf-inline-form {
        width: 100%;
        min-width: 0;
    }

    .sf-cart-cell-quantity .sf-quantity {
        flex: 0 0 64px;
        width: 64px;
    }

    .sf-cart-cell-quantity .sf-btn {
        flex: 1;
        min-width: 0;
    }

    .sf-order-summary {
        position: static;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .sf-checkout-summary-panel {
        padding: 20px;
    }

    .sf-summary-line--with-image .sf-summary-line__top {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 8px 12px;
    }

    .sf-summary-line__top img {
        width: 48px;
        height: 48px;
        grid-row: span 2;
    }

    .sf-summary-line--with-image .sf-summary-line__top strong {
        grid-column: 2;
    }

    .sf-summary-line__top span,
    .sf-cart-product strong,
    .sf-minicart__item strong,
    .sf-checkline span {
        overflow-wrap: anywhere;
    }

    .sf-minicart__item {
        position: relative;
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 8px 12px;
    }

    .sf-minicart__item img,
    .sf-minicart__placeholder {
        width: 56px;
        height: 56px;
    }

    .sf-minicart__item > div {
        min-width: 0;
        padding-inline-end: 28px;
    }

    .sf-minicart__item > div > span {
        display: block;
        margin-block: 4px 6px;
    }

    .sf-minicart__item > b {
        grid-column: 2;
    }

    .sf-minicart__remove-form {
        position: absolute;
        inset: 10px -10px auto auto;
    }

    .sf-home-builder > .sf-home-hero:first-child::before {
        background: linear-gradient(90deg, rgba(3, 5, 8, 0.8), rgba(3, 5, 8, 0.38));
    }

    .sf-home-builder > .sf-home-hero:first-child .sf-home-hero__copy > p:not(.sf-home-hero__note) {
        position: relative;
        isolation: isolate;
    }

    .sf-home-builder > .sf-home-hero:first-child .sf-home-hero__copy > p:not(.sf-home-hero__note)::before {
        position: absolute;
        z-index: -1;
        inset: -4px 0;
        border-radius: 8px;
        background: rgba(3, 5, 8, 0.82);
        box-shadow: 0 0 12px 6px rgba(3, 5, 8, 0.64);
        pointer-events: none;
        content: "";
    }
}

@media (max-width: 480px) {
    .sf-product-page-body .sf-product-summary {
        padding: 22px 18px;
    }

    .sf-cart-actions__row {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .sf-cart-actions__row .sf-product-wishlist {
        grid-column: 1 / -1;
        min-height: 44px;
    }

    .sf-cart-stock-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .sf-cart-stock-row .sf-viewer-counter {
        max-width: 100%;
        min-width: 0;
    }

    .sf-cart-stock-row .sf-viewer-counter > span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .sf-cart-actions__row > [data-add-to-cart] {
        min-width: 0;
        padding-inline: 12px;
    }

    .sf-product-story-card.has-corner-image {
        display: flex;
        flex-direction: column;
    }

    .sf-product-story-card.has-corner-image > :not(.sf-product-story-card__corner-image) {
        max-width: none;
    }

    .sf-product-story-card.has-corner-image > .sf-product-story-card__number {
        align-self: flex-start;
    }

    .sf-product-story-card__corner-image {
        position: relative;
        inset: auto;
        order: 2;
        align-self: center;
        width: min(100%, 180px);
        margin-top: 16px;
    }
}
