/* Storefront fixes shared by the catalog, product details and purchase pages. */
.site-search,
.catalog-search {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 620px;
    margin: 12px 0 20px;
}
.site-search input,
.catalog-search input {
    flex: 1;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #d7d9e0;
    border-radius: 12px;
    font-size: 16px;
    background: #fff;
}
.site-search button,
.catalog-search button {
    min-height: 46px;
    padding: 10px 18px;
    border: 0;
    border-radius: 12px;
    background: #f5c207;
    color: #171827;
    font-weight: 700;
}
.site-search input:focus-visible,
.catalog-search input:focus-visible {
    outline: 2px solid #7a5f00;
    outline-offset: 2px;
}
.sale-pill,
.products-grid .product-media > .sale-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    min-height: 56px;
    padding: 4px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f04452, #cf1e30);
    border: 1px solid rgba(164, 17, 33, .2);
    box-shadow: 0 3px 9px rgba(175, 24, 42, .22), inset 0 1px 0 rgba(255, 255, 255, .25);
    transform: rotate(7deg);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    text-align: center;
}
.products-grid .product-media > .sale-pill {
    top: 8px;
    right: 8px;
    left: auto;
}
.sale-pill::after {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px dashed rgba(255, 255, 255, .65);
    border-radius: inherit;
    pointer-events: none;
}
.products-grid .item .item-inner .item-info .item-price .price2 {
    color: #d62828 !important;
    font-size: 18px !important;
    text-decoration: line-through !important;
    text-decoration-thickness: 2px !important;
}
.product-view .old-price {
    color: #d62828;
    font-size: 24px;
    font-weight: 800;
    text-decoration: line-through;
    text-decoration-thickness: 2px;
}
.product-view .price-box {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}
.product-view .product-description {
    overflow-wrap: anywhere;
}
.product-view .product-description ul { list-style: disc outside; }
.product-view .product-description ol { list-style: decimal outside; }
.product-view .product-description ul,
.product-view .product-description ol { padding-left: 24px; }
.product-view .product-description li { margin-bottom: 6px; }

/* Bootstrap's clearfix pseudo-elements must not occupy cells in the mobile grid. */
@media (max-width: 767px) {
    .products-grid.row::before,
    .products-grid.row::after {
        display: none;
        content: none;
    }
    .products-grid .product-media > .sale-pill {
        width: 48px;
        height: 48px;
        min-height: 48px;
        font-size: 9px;
    }
    .products-grid .item .item-inner .item-info .item-price {
        padding-right: 0;
    }
    .catalog-search { margin: 16px 0 22px; }
    .cart-mobile-item-info { overflow-wrap: anywhere; }
    .cart-mobile-item-top > :first-child { min-width: 0; }
    .product-view .add-to-cart-button { flex: 1 1 170px; }
    .product-view .variation-box .form-select { width: 100%; }
    #sns_menu .top-cart .block-content.mini-cart-dropdown {
        width: min(360px, calc(100vw - 36px));
        max-width: calc(100vw - 36px);
    }
}

@media (max-width: 991px) {
    .checkout-page form > .row,
    .cart-page > .row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        margin: 0;
    }
    .checkout-page form > .row > [class*="col-"],
    .cart-page > .row > [class*="col-"] {
        float: none;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
    }
    .checkout-page form > .row::before,
    .checkout-page form > .row::after,
    .cart-page > .row::before,
    .cart-page > .row::after {
        content: none;
        display: none;
    }
    .checkout-page .summary-line,
    .checkout-page .summary-total {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 767px) {
    /* Reserve the top row for the logo and both navigation shortcuts. */
    #sns_header_logo #logo { text-align: left; }
    #sns_header_logo #logo a { max-width: calc(100% - 112px); }
    #sns_header_logo #logo img { max-width: 100%; }
    #sns_header_logo .mobile-search-launch .fa,
    #sns_header #sns_menu .cart-link .summary > .fa::before { color: #fff; }
    #sns_menu,
    #sns_menu > .container { position: static; }
    #sns_menu .sns_menu_right { width: 44px; }
    #sns_menu .top-cart { width: 44px; }
    #sns_menu .cart-link .amount > span {
        position: static;
        margin: 0;
        color: #fff;
        font-size: 10px;
        line-height: 1;
    }
}

/* Each catalog title occupies its own row, outside the legacy tab-menu layout. */
#sns_content .catalog-section {
    display: flow-root;
    clear: both;
}
#sns_content .catalog-section > .catalog-section-title {
    position: static;
    display: block;
    width: auto;
    margin: 0 0 18px;
    padding: 0;
    background: transparent;
    color: var(--oleko-text);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}
@media (max-width: 767px) {
    #sns_content .catalog-section > .catalog-section-title {
        margin-bottom: 14px;
        font-size: 22px;
    }
}
