/* Loaded after theme styles so the merchant's mobile density wins consistently. */
.classic-mobile-search { display: none; }
.classic-mobile-cart { display: none; }
.storefront-theme.template_6 .sf-studio-title-row {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    min-width: 0;
}
.storefront-theme.template_6 .sf-studio-title-row .sf-product-name {
    flex: 1;
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
}
.storefront-theme.template_6 .sf-studio-title-row .sf-product-size {
    max-width: 40%;
    margin: 0;
    text-align: right;
    overflow-wrap: anywhere;
}
.storefront-theme.template_6 .sf-header-pop {
    padding-top: var(--studio-top-row-height, 100px);
}
body.storefront-theme.template_6 {
    scroll-padding-top: var(--studio-top-row-height, 100px);
}
.storefront-theme.template_6 .sf-header-pop > .sf-header-row {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: inherit;
    border-bottom: 1px solid #ffffff16;
}
.storefront-theme.template_5 .sf-corner-title-row {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    min-width: 0;
}
.storefront-theme.template_5 .sf-corner-title-row .sf-product-name {
    flex: 1;
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.storefront-theme.template_5 .sf-corner-title-row .sf-product-size {
    max-width: 40%;
    margin: 0;
    text-align: right;
    overflow-wrap: anywhere;
}
.storefront-theme.template_5 .sf-corner-card-tags {
    position: absolute;
    bottom: .5rem;
    left: .5rem;
    max-width: calc(100% - 1rem);
    z-index: 2;
    pointer-events: none;
}
.storefront-theme.template_5 .sf-card-visual:has(.sf-stock-label) .sf-corner-card-tags {
    bottom: 2.8rem;
}
@media (min-width: 769px) {
    .storefront-theme.template_5 .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)) !important;
        gap: 1rem;
    }
    .storefront-theme.template_5 .sf-product {
        grid-template-columns: 128px minmax(0, 1fr) !important;
        min-height: 0;
    }
    .storefront-theme.template_5 .sf-product .sf-card-visual {
        margin: .65rem;
        align-self: start;
    }
    .storefront-theme.template_5 .sf-product .sf-product-image {
        height: 160px;
        min-height: 0;
        margin: 0;
    }
    .storefront-theme.template_5 .sf-product .sf-card-corner-body {
        padding: .75rem .75rem .75rem 0;
        gap: .65rem;
    }
    .storefront-theme.template_5 .sf-product .sf-product-info {
        flex-grow: 0;
        gap: .35rem;
    }
}
.storefront-theme.template_5 .content-container {
    width: 100%;
    max-width: none;
    padding: 1.5rem;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .storefront-theme.template_5 .content-container {
        padding: 1rem;
    }
}
.storefront-theme.template_5 .sf-home-corner {
    padding-top: 0;
}
.storefront-theme.template_5 .sf-corner-welcome {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 1025px) {
    .storefront-theme.template_5 .theme-department-sidebar {
        top: calc(var(--corner-top-row-height, 90px) + 2rem);
        max-height: calc(100dvh - var(--corner-top-row-height, 90px) - 4rem);
    }
}
@media (max-width: 768px) {
    body.storefront-theme.template_5 {
        padding-top: var(--corner-header-height, 180px);
        scroll-padding-top: var(--corner-header-height, 180px);
    }
    .storefront-theme.template_5 .sf-header-corner {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
    }
}
@media (min-width: 769px) {
    .storefront-theme.template_5 .sf-header-corner {
        padding-top: var(--corner-top-row-height, 90px);
    }
    body.storefront-theme.template_5 {
        scroll-padding-top: var(--corner-top-row-height, 90px);
    }
    .storefront-theme.template_5 .sf-header-corner > .sf-header-row {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: inherit;
        border-bottom: 1px solid var(--premium-line);
    }
}
@media (min-width: 769px) {
    .storefront-theme.template_2 .sf-header-market {
        padding-top: var(--market-top-row-height, 90px);
    }
    body.storefront-theme.template_2 {
        scroll-padding-top: var(--market-top-row-height, 90px);
    }
    .storefront-theme.template_2 .sf-header-market > .sf-header-row {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: inherit;
        border-bottom: 1px solid var(--premium-line);
    }
}
@media (min-width: 769px) {
    .storefront-theme.template_3 .sf-header-quick {
        padding-top: var(--quick-top-row-height, 90px);
    }
    body.storefront-theme.template_3 {
        scroll-padding-top: var(--quick-top-row-height, 90px);
    }
    .storefront-theme.template_3 .sf-header-quick > .sf-header-row {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: inherit;
        border-bottom: 1px solid var(--premium-line);
    }
}
.storefront-theme.template_4 .sf-header-pantry {
    padding-top: var(--pantry-logo-height, 84px);
}
body.storefront-theme.template_4 {
    scroll-padding-top: var(--pantry-logo-height, 84px);
}
.storefront-theme.template_4 .sf-pantry-masthead {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: inherit;
    border-bottom: 1px solid var(--premium-line);
}
.storefront-theme.template_4 .sf-pantry-title-row {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    min-width: 0;
}
.storefront-theme.template_4 .sf-pantry-title-row .sf-product-name {
    flex: 1;
    min-width: 0;
}
.storefront-theme.template_4 .sf-pantry-title-row .sf-product-size {
    max-width: 40%;
    margin: 0;
    text-align: right;
    overflow-wrap: anywhere;
}
.storefront-theme.template_3 .sf-quick-card-tags {
    position: absolute;
    top: .65rem;
    left: .65rem;
    max-width: calc(100% - 4rem);
    z-index: 2;
    pointer-events: none;
}
.storefront-theme.template_3 .sf-quick-title-row {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    min-width: 0;
    grid-column: 1 / -1;
}
.storefront-theme.template_3 .sf-quick-title-row .sf-product-name {
    flex: 1;
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.storefront-theme.template_3 .sf-quick-title-row .sf-product-size {
    max-width: 40%;
    margin: 0;
    text-align: right;
    overflow-wrap: anywhere;
}
.storefront-theme.template_3 .sf-product .sf-card-quick-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .5rem;
}
.storefront-theme.template_3 .sf-product .sf-card-quick-body .sf-product-info {
    display: contents;
}
.storefront-theme.template_3 .sf-card-quick-body .sf-product-price {
    min-width: 0;
    flex-wrap: wrap;
    margin: 0;
}
.storefront-theme.template_3 .sf-card-quick-body .product-action-wrapper {
    justify-self: end;
}
@media (max-width: 768px) {
    body.storefront-theme.template_3 {
        padding-top: var(--quick-header-height, 210px);
        scroll-padding-top: var(--quick-header-height, 210px);
    }
    .storefront-theme.template_3 .sf-header-quick {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
    }
    .storefront-theme.template_3 .sf-product .sf-card-quick-body {
        padding: .65rem;
    }
    .storefront-theme.template_3 .sf-product .sf-card-quick-body:has(.qty-controller[style*="flex"]) .product-action-wrapper,
    .storefront-theme.template_3 .grid-cols-mobile-3 .sf-card-quick-body .product-action-wrapper {
        grid-column: 1 / -1;
    }
    .storefront-theme.template_3 .grid-cols-mobile-3 .sf-product .sf-card-quick-body {
        padding: .4rem;
    }
}
/* Badge colors come from the merchant's branding in every theme. */
.storefront-theme .sf-product-tag {
    display: inline-block;
    align-self: flex-start;
    max-width: 100%;
    padding: .2rem .45rem;
    border-radius: 4px;
    background: var(--store-badge-bg);
    color: var(--store-badge-fg);
    overflow-wrap: anywhere;
}

.storefront-theme.template_2 .sf-market-card-tags {
    position: absolute;
    top: .65rem;
    left: .65rem;
    max-width: calc(100% - 4rem);
    z-index: 2;
    pointer-events: none;
}
.storefront-theme.template_2 .sf-market-title-row {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    min-width: 0;
}
.storefront-theme.template_2 .sf-market-title-row .sf-product-name {
    flex: 1;
    min-width: 0;
    min-height: 0;
}
.storefront-theme.template_2 .sf-market-title-row .sf-product-size {
    flex: 0 1 auto;
    max-width: 40%;
    margin: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    body.storefront-theme.template_2 {
        padding-top: var(--market-header-height, 190px);
        scroll-padding-top: var(--market-header-height, 190px);
    }
    .storefront-theme.template_2 .sf-header-market {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
    }
    .storefront-theme.template_2 .product-grid .sf-product-info {
        flex-grow: 0;
        padding: .65rem .75rem .5rem !important;
        gap: .25rem;
    }
    .storefront-theme.template_2 .product-grid .sf-product-name {
        height: auto !important;
        min-height: 0;
        margin: 0 !important;
        line-height: 1.35 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .storefront-theme.template_2 .product-grid .sf-product-price {
        margin-top: .15rem;
    }
    .storefront-theme.template_2 .product-grid .sf-card-market-footer {
        padding: 0 .75rem .75rem;
    }
    .storefront-theme.template_2 .product-grid.grid-cols-mobile-3 .sf-product-info {
        padding: .5rem .4rem !important;
    }
    .storefront-theme.template_2 .product-grid.grid-cols-mobile-3 .sf-card-market-footer {
        padding: 0 .4rem .5rem;
    }
    .storefront-theme.template_2:has(.pd-market) {
        --market-purchase-bar-height: calc(53px + 1.3rem + env(safe-area-inset-bottom, 0px));
        padding-bottom: var(--market-purchase-bar-height);
    }
    .storefront-theme.template_2 #main-product-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1100;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        width: auto;
        height: var(--market-purchase-bar-height);
        gap: .65rem;
        margin: 0;
        padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid var(--premium-line);
        box-shadow: 0 -4px 20px rgba(15, 23, 42, .08);
        box-sizing: border-box;
    }
    .storefront-theme.template_2 #main-product-actions .qty-control {
        flex: 0 0 96px;
        width: 96px;
        height: 52px;
        gap: .25rem;
        box-sizing: border-box;
    }
    .storefront-theme.template_2 #main-product-actions .qty-control button {
        flex: 0 0 28px;
        width: 28px;
        min-height: 44px;
        padding: 0;
    }
    .storefront-theme.template_2 #main-product-actions .btn-add-to-cart {
        height: 52px;
        min-height: 52px;
    }
    .storefront-theme.template_2:has(.pd-market) #floating-cart-summary {
        bottom: calc(var(--market-purchase-bar-height) + .75rem) !important;
    }
    .storefront-theme.template_2:has(.pd-market) .whatsapp-float-btn {
        bottom: calc(var(--market-purchase-bar-height) + 5.5rem) !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 24px !important;
    }
}
.storefront-theme .sf-stock-label {
    background: var(--store-stock-bg);
    color: var(--store-stock-fg);
}
@media (min-width: 769px) {
    .storefront-theme .sf-card-quick-body:has(.qty-controller[style*="flex"]) {
        flex-wrap: wrap;
    }
    .storefront-theme .sf-card-quick-body:has(.qty-controller[style*="flex"]) .sf-product-info {
        flex-basis: 100%;
    }
}
@media (max-width: 768px) {
    .storefront-theme.template_1 .store-header {
        padding-top: 0 !important;
        gap: 0 !important;
    }
    .storefront-theme.template_1 .store-header > .header-container {
        min-height: 60px;
        padding: 8px 16px;
        gap: .5rem;
    }
    .storefront-theme.template_1 .store-header .logo {
        min-width: 0;
        max-width: calc(100% - 56px);
        font-size: 1.1rem !important;
    }
    .storefront-theme.template_1 .store-header .logo img {
        max-height: 40px !important;
        max-width: 180px;
        object-fit: contain;
    }
    .storefront-theme.template_1 .store-header .logo {
        flex: 0 1 auto;
        max-width: 84px;
        max-height: 44px;
        overflow: hidden;
        line-height: 1.2;
    }
    .storefront-theme.template_1 .classic-mobile-search {
        display: flex;
        align-items: center;
        flex: 1 1 0;
        min-width: 0;
        height: 44px;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        background: #f8fafc;
    }
    .storefront-theme.template_1 .classic-mobile-search input {
        flex: 1 1 0;
        min-width: 0;
        width: 100%;
        height: 42px;
        padding: 0 .65rem;
        background: transparent;
        color: var(--primary-color);
        border: 0;
        outline: none;
        font-size: 16px;
    }
    .storefront-theme.template_1 .classic-mobile-search:focus-within {
        outline: 2px solid var(--accent-color);
        outline-offset: 2px;
    }
    .storefront-theme.template_1 .classic-mobile-search button {
        flex: 0 0 44px;
        width: 44px;
        height: 42px;
        display: grid;
        place-items: center;
        background: transparent;
        border: 0;
        color: var(--primary-color);
        font-size: 18px;
        cursor: pointer;
    }
    .storefront-theme.template_1 .classic-mobile-cart {
        display: grid;
        place-items: center;
        position: relative;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--primary-color);
        font-size: 21px;
        cursor: pointer;
    }
    .storefront-theme.template_1 .classic-mobile-cart-count {
        position: absolute;
        top: 0;
        right: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        border-radius: 12px;
        background: var(--store-badge-bg);
        color: var(--store-badge-fg);
        font-size: 10px;
        font-weight: 700;
        line-height: 1;
    }
    .storefront-theme .product-grid.grid-cols-mobile-1 {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .storefront-theme .product-grid.grid-cols-mobile-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .storefront-theme .product-grid.grid-cols-mobile-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: .5rem !important;
    }
    .storefront-theme .product-grid > * {
        min-width: 0;
    }
    .storefront-theme .product-grid .product-card {
        min-width: 0;
        max-width: 100%;
    }
    .storefront-theme .product-grid .sf-product-name,
    .storefront-theme .product-grid .p-name,
    .storefront-theme .product-grid .sf-product-price {
        overflow-wrap: anywhere;
    }
    .storefront-theme .product-grid .product-action-wrapper {
        max-width: 100%;
        min-width: 0;
    }
    .storefront-theme .product-grid .qty-controller {
        width: 100% !important;
        max-width: 110px;
        min-height: 44px;
        height: auto !important;
        padding: 2px !important;
        gap: 0 !important;
        box-sizing: border-box;
    }
    .storefront-theme .product-grid .qty-controller button {
        flex: 0 0 24px;
        width: 24px !important;
        min-height: 36px;
    }
    .storefront-theme .product-grid .inline-add-btn {
        min-height: 44px !important;
    }
    /* Classic titles take their natural height; metadata and controls share a row. */
    .storefront-theme.template_1 .product-grid .product-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto auto minmax(44px, 1fr);
        column-gap: .35rem;
        row-gap: .25rem;
        padding: .5rem;
    }
    .storefront-theme.template_1 .product-grid .card-img,
    .storefront-theme.template_1 .product-grid .classic-card-prices,
    .storefront-theme.template_1 .product-grid .p-name {
        grid-column: 1 / -1;
    }
    .storefront-theme.template_1 .product-grid .card-img {
        margin-bottom: .25rem;
    }
    .storefront-theme.template_1 .product-grid .card-info {
        display: contents !important;
    }
    .storefront-theme.template_1 .product-grid .p-name {
        height: auto !important;
        min-height: 0;
        -webkit-line-clamp: 2;
        font-size: .8rem !important;
        line-height: 1.35 !important;
        margin: 0 !important;
    }
    .storefront-theme.template_1 .product-grid .product-action-wrapper {
        position: static !important;
        grid-column: 2;
        grid-row: 4;
        align-self: center;
        display: flex;
        justify-content: flex-end;
        width: 44px;
        margin: 0 !important;
    }
    .storefront-theme.template_1 .product-grid .product-action-wrapper:has(.qty-controller[style*="flex"]) {
        width: 76px;
    }
    .storefront-theme.template_1 .product-grid .inline-add-btn {
        width: 44px !important;
        height: 44px !important;
    }
    .storefront-theme.template_1 .product-grid .p-meta {
        grid-column: 1;
        grid-row: 4;
        align-self: center;
        min-width: 0;
        padding-right: 0 !important;
    }
    .storefront-theme.template_1 .grid-cols-mobile-3 .product-card {
        grid-template-rows: auto auto auto auto minmax(44px, 1fr);
        padding: .35rem;
    }
    .storefront-theme.template_1 .grid-cols-mobile-3 .p-name {
        font-size: .7rem !important;
    }
    .storefront-theme.template_1 .grid-cols-mobile-3 .p-meta {
        grid-column: 1 / -1;
    }
    .storefront-theme.template_1 .grid-cols-mobile-3 .product-action-wrapper {
        grid-column: 1 / -1;
        grid-row: 5;
        justify-self: end;
    }
    /* Corner Store uses its horizontal composition when one card fills the row. */
    .storefront-theme.template_5 .product-grid.grid-cols-mobile-2 .sf-product,
    .storefront-theme.template_5 .product-grid.grid-cols-mobile-3 .sf-product {
        grid-template-columns: minmax(0, 1fr) !important;
        min-height: 0;
    }
    .storefront-theme.template_5 .product-grid.grid-cols-mobile-2 .sf-product-image,
    .storefront-theme.template_5 .product-grid.grid-cols-mobile-3 .sf-product-image {
        aspect-ratio: 1;
        height: auto;
        min-height: 0;
    }
    .storefront-theme.template_5 .product-grid.grid-cols-mobile-2 .sf-card-corner-body,
    .storefront-theme.template_5 .product-grid.grid-cols-mobile-3 .sf-card-corner-body {
        padding: .5rem;
        gap: .5rem;
    }
    .storefront-theme .grid-cols-mobile-3 .sf-card-market-footer,
    .storefront-theme .grid-cols-mobile-3 .sf-card-quick-body {
        padding: .4rem;
    }
    .storefront-theme .grid-cols-mobile-3 .sf-card-quick-body,
    .storefront-theme .grid-cols-mobile-3 .sf-card-pantry-caption {
        flex-direction: column;
        align-items: stretch;
    }
    .storefront-theme.template_3 .grid-cols-mobile-3 .sf-product-info {
        flex-basis: auto;
        width: 100%;
    }
    .storefront-theme.template_4 .grid-cols-mobile-3 .product-action-wrapper {
        margin-left: 0 !important;
    }
    .storefront-theme .grid-cols-mobile-3 .sf-product-info {
        padding: .5rem .4rem !important;
    }
    .storefront-theme .grid-cols-mobile-3 .sf-product-name {
        font-size: .75rem !important;
        line-height: 1.4 !important;
    }
    .storefront-theme .grid-cols-mobile-3 .sf-product-price {
        font-size: .75rem !important;
        flex-wrap: wrap;
    }
    .storefront-theme .grid-cols-mobile-3 .sf-add-label {
        font-size: .65rem;
        white-space: normal;
    }
    .storefront-theme .grid-cols-mobile-3 .sf-product-wishlist {
        width: 28px;
        height: 28px;
        right: .25rem;
        top: .25rem;
    }
    .storefront-theme .grid-cols-mobile-3 .sf-card-studio-label {
        gap: .25rem;
        overflow-wrap: anywhere;
    }
    .storefront-theme .grid-cols-mobile-3 .sf-option-link {
        font-size: .65rem;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 768px) {
    .storefront-theme.template_1 .product-page-container .product-core-grid {
        gap: 1rem !important;
    }
    .storefront-theme.template_1 .product-page-container .product-details-panel {
        padding: 1rem !important;
        margin: 0 !important;
    }
    .storefront-theme.template_1 .product-page-container .p-vendor-label {
        margin-bottom: .4rem !important;
    }
    .storefront-theme.template_1 .product-page-container .p-title {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
        margin-bottom: .5rem !important;
    }
    .storefront-theme.template_1 .product-page-container .p-price-row {
        padding: 0 !important;
        margin-bottom: .85rem !important;
        background: transparent !important;
        border: 0 !important;
    }
    .storefront-theme.template_1 .product-page-container .p-current-price {
        font-size: 1.75rem !important;
    }
    .storefront-theme.template_1 .product-page-container .delivery-note {
        padding: .7rem .8rem !important;
        margin-bottom: 1rem !important;
    }
    .storefront-theme.template_1 .product-page-container .variant-container,
    .storefront-theme.template_1 .product-page-container .size-rect-grid {
        margin-bottom: .85rem !important;
    }
    .storefront-theme.template_1 .product-page-container .size-rect-grid {
        gap: .5rem !important;
    }
    .storefront-theme.template_1 .product-page-container .p-section-label {
        margin-bottom: .5rem !important;
    }
    .storefront-theme.template_1 .product-page-container .p-actions-row {
        flex-direction: row !important;
        align-items: stretch;
        gap: .65rem !important;
        height: 52px !important;
        min-height: 52px;
        margin-bottom: .65rem !important;
    }
    .storefront-theme.template_1 .product-page-container .p-actions-row .qty-control {
        flex: 0 0 76px;
        width: 76px !important;
        min-width: 0 !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 24px;
        align-items: center;
        height: 52px !important;
        padding: 1px 6px !important;
        box-sizing: border-box;
    }
    .storefront-theme.template_1 .product-page-container .p-actions-row .page-qty {
        margin: 0 !important;
        text-align: center;
    }
    .storefront-theme.template_1 .product-page-container .classic-qty-stepper {
        display: grid !important;
        grid-template-rows: repeat(2, 24px);
        gap: 0 !important;
    }
    .storefront-theme.template_1 .product-page-container .classic-qty-stepper button {
        display: grid;
        place-items: center;
        width: 24px !important;
        height: 24px !important;
        min-height: 0;
        padding: 0 !important;
        font-size: .7rem !important;
        line-height: 1 !important;
    }
    .storefront-theme.template_1 .product-page-container .p-actions-row .btn-add-to-cart {
        flex: 1 1 0;
        width: auto !important;
        height: 52px !important;
        min-height: 52px;
        font-size: .75rem !important;
    }
    .storefront-theme.template_1 .product-gallery .main-image-display:only-child {
        margin-bottom: 0 !important;
    }
    .storefront-theme.template_1 .product-page-container .secondary-actions-row {
        margin-bottom: 1.25rem !important;
    }
    /* Keep the existing, live variant/cart controls visible while scrolling. */
    .storefront-theme.template_1 .product-page-container {
        animation: none;
        transform: none;
    }
    .storefront-theme.template_1:has(.product-page-container) {
        --classic-purchase-bar-height: calc(53px + 1.3rem + env(safe-area-inset-bottom, 0px));
        padding-bottom: var(--classic-purchase-bar-height);
    }
    .storefront-theme.template_1 #main-product-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1100;
        width: auto;
        height: var(--classic-purchase-bar-height) !important;
        margin: 0 !important;
        padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom, 0px)) !important;
        background: #fff;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -4px 20px rgba(15, 23, 42, .08);
        box-sizing: border-box;
    }
    .storefront-theme.template_1:has(.product-page-container) #floating-cart-summary {
        bottom: calc(var(--classic-purchase-bar-height) + .75rem) !important;
    }
    .storefront-theme.template_1:has(.product-page-container) .whatsapp-float-btn {
        bottom: calc(var(--classic-purchase-bar-height) + 5.5rem) !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 24px !important;
    }
}
/* Merchant hero copy stays readable without changing each theme's composition. */
.storefront-theme .sf-home h1,.storefront-theme .sf-home p,.sf-classic-custom-hero h1,.sf-classic-custom-hero p {white-space:pre-line;overflow-wrap:anywhere;}
.storefront-theme .sf-home .sf-kicker {overflow-wrap:anywhere;}
.sf-classic-custom-hero {padding:2rem;margin-bottom:1.5rem;background:var(--bg-light);border-radius:1rem;}
.sf-classic-custom-hero>span {font-size:.75rem;letter-spacing:.08em;color:var(--primary-color);}
.sf-classic-custom-hero h1 {font-size:clamp(1.8rem,4vw,3rem);line-height:1.15;margin:1rem 0;}
.sf-classic-custom-hero p {margin-bottom:1.5rem;line-height:1.6;}
.sf-classic-custom-hero a {display:inline-block;max-width:100%;padding:.8rem 1.2rem;border-radius:.5rem;background:var(--primary-color);color:var(--store-stock-fg);overflow-wrap:anywhere;}
@media(max-width:768px){.sf-classic-custom-hero{padding:1.25rem;}}
.storefront-theme .sf-home .sf-primary-button {max-width:100%;overflow-wrap:anywhere;}
.storefront-theme .sf-quick-greeting {flex-wrap:wrap;}
.storefront-theme .sf-quick-greeting>div {flex:1 1 220px;min-width:0;}
.storefront-theme .sf-quick-greeting>a {white-space:normal;overflow-wrap:anywhere;max-width:100%;}
.storefront-theme .sf-corner-welcome>div {min-width:0;}
