/* Mobile storefront */
body {
    --ats-tab-bar: calc(64px + env(safe-area-inset-bottom, 0px));
    padding-bottom: var(--ats-tab-bar);
}

#siteHeader .nav-wrap {
    min-height: 60px;
    gap: 8px;
}

#siteHeader .logo-link {
    min-width: 0;
    gap: 8px;
}

#siteHeader .logo-link img {
    width: 44px !important;
    height: 44px !important;
}

#siteHeader .logo-link strong {
    font-size: clamp(12px, 3.5vw, 16px);
}

#siteHeader .logo-link small {
    font-size: 10px;
}

#siteHeader .nav-icons > a {
    display: none;
}

#siteHeader .nav-icons > button {
    width: 44px;
    height: 44px;
}

nav.ats-social-rail {
    display: none;
}

.mobile-bottom-nav.ats-mobile-tabs {
    position: fixed;
    z-index: 80;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: var(--ats-tab-bar);
    padding: 4px env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    border-top: 1px solid #e7d4b8;
    background: #fffaf2;
    box-shadow: 0 -4px 20px #47231d18;
}

.ats-mobile-tabs a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 52px;
    color: #684339;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.ats-mobile-tabs a[aria-current="page"] {
    color: #762236;
    background: #f4e6d2;
    border-radius: 12px;
}

.ats-mobile-tabs svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ats-mobile-tabs .ats-mobile-count {
    position: absolute;
    top: 2px;
    left: calc(50% + 7px);
    min-width: 16px;
    padding-inline: 3px;
    border-radius: 10px;
    background: #762236;
    color: white;
    text-align: center;
    font-size: 10px;
}

a.whatsapp-float {
    bottom: calc(var(--ats-tab-bar) + 12px);
}

main > .section {
    padding-block: 36px;
}

#homeSlider.ats-art-slider {
    margin: 12px 12px 0;
    border-radius: 18px;
    background: #341a18;
    overflow: hidden;
}

#homeSlider .ats-slide-art picture {
    display: block;
    aspect-ratio: 6 / 5;
    overflow: hidden;
}

#homeSlider .ats-slide-art picture > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 58%;
}

#homeSlider .ats-mobile-banner-title[hidden] {
    display: block;
    margin: 0;
    padding: 12px 16px 4px;
    color: #fff3da;
    font-size: clamp(18px, 5vw, 26px);
    line-height: 1.2;
}

#homeSlider .ats-slide-art .ats-slide-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 12px 4px;
}

#homeSlider .ats-slide-art .ats-slide-link {
    position: static;
    display: grid;
    place-items: center;
    width: auto;
    height: auto;
    min-height: 44px;
    padding: 6px;
    border: 1px solid #d5a862;
    border-radius: 10px;
    color: #fff3da;
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
}

#homeSlider .ats-slide-art .ats-slide-link:first-child {
    background: #ecc476;
    color: #341a18;
}

#homeSlider .ats-slide-art .ats-slide-link span {
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
}

.home-products-direct .product-scroll-slider {
    gap: 10px;
    scroll-padding-inline: 2px;
}

.ats-mobile-tabs a:focus-visible {
    outline: 2px solid #762236;
    outline-offset: -3px;
}

.home-products-direct .product-scroll-slider > .product-card {
    flex-basis: calc((100% - 10px) / 2);
}

/* Dense two-column product browsing, with no empty stretched cards. */
.home-products-direct .product-scroll-slider {
    align-items: flex-start;
}

.home-products-direct .product-scroll-slider > .ats-upcoming-card {
    flex: 0 0 calc((100% - 10px) / 2);
    min-width: 0;
    padding: 12px;
    scroll-snap-align: start;
}

.home-products-direct .product-scroll-slider > .ats-upcoming-card h3 {
    font-size: 15px;
    line-height: 1.25;
    margin: 10px 0 0;
}

.home-products-direct .product-scroll-slider > .ats-upcoming-card p {
    font-size: 12px;
    line-height: 1.35;
    margin: 5px 0 0;
}

.home-products-direct .product-scroll-slider > .ats-upcoming-card .ats-upcoming-badge {
    font-size: 10px;
    line-height: 1.2;
    padding: 5px 8px;
}

.product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: auto;
}

.product-card .product-media {
    aspect-ratio: 1 / 1;
    width: 100%;
}

.product-card .product-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 12px 10px;
}

.product-card .product-info h3 {
    min-height: 0;
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.3;
}

.product-card .card-summary {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 0;
    margin: 5px 0 8px;
    font-size: 11px;
    line-height: 1.4;
}

.product-card .price {
    margin-top: auto;
    flex-wrap: wrap;
    gap: 3px 6px;
}

.product-card .price strong {
    font-size: 16px;
}

.product-card .price del {
    font-size: 10px;
}

.product-card .product-actions {
    margin-top: 10px;
}

.product-card .product-actions .btn.wine {
    min-height: 44px;
    padding: 8px 4px !important;
    border-radius: 9px;
    font-size: 12px !important;
    letter-spacing: 0;
}

.product-card[data-mobile-qty]:not([data-mobile-qty="0"]) .product-actions [data-add-cart] {
    display: none;
}

.product-card[data-mobile-qty]:not([data-mobile-qty="0"]) .ats-mobile-qty {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 44px;
    border-radius: 9px;
    background: #74243b;
    color: #fff;
    text-align: center;
}

.ats-mobile-qty button {
    min-width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: 25px;
    cursor: pointer;
}

.ats-mobile-qty output {
    min-width: 20px;
    font-size: 16px;
    font-weight: 700;
}

.ats-mobile-qty button:disabled {
    opacity: .5;
}

@media (max-width: 360px) {
    .shop-layout .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Cart remains above the tab bar and the WhatsApp shortcut. */
.ats-mobile-cart-bar {
    position: fixed;
    z-index: 90;
    left: 12px;
    right: 12px;
    bottom: calc(var(--ats-tab-bar) + 8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 8px 17px;
    border-radius: 13px;
    background: #74243b;
    box-shadow: 0 10px 28px #47231d45;
    color: #fff;
    font-size: 15px;
    text-decoration: none;
    transform: translateY(110px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .2s ease, opacity .2s ease, visibility .2s;
}

body.ats-has-mobile-cart-bar .ats-mobile-cart-bar {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.ats-has-mobile-cart-bar {
    padding-bottom: calc(var(--ats-tab-bar) + 72px);
}

.ats-mobile-cart-bar-count {
    padding: 6px 10px;
    border-radius: 8px;
    background: #ffffff24;
    font-size: 13px;
    font-weight: 700;
}

body.ats-has-mobile-cart-bar a.whatsapp-float {
    bottom: calc(var(--ats-tab-bar) + 76px);
}

body .toast {
    z-index: 1100;
    left: 12px;
    right: 12px;
    bottom: calc(var(--ats-tab-bar) + 12px);
    width: auto;
    max-width: none;
    border-radius: 10px;
    background: #352126;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 12px 35px #47231d55;
}

body.ats-has-mobile-cart-bar .toast {
    bottom: calc(var(--ats-tab-bar) + 70px);
}

body .toast.success,
body .toast.error,
body .toast .ats-cart-link {
    color: #fff;
}

body .toast .ats-cart-link {
    display: inline-block;
    font-weight: 700;
}

/* Mobile shop: a category rail beside a compact catalogue. */
.home-products-direct {
    padding: 0 0 25px;
}

.home-products-direct > .shell {
    width: 100%;
    max-width: none;
}

.home-products-direct .home-products-head,
.home-products-direct #featuredSliderTop {
    display: none !important;
}

.home-products-direct .ats-mobile-home-catalogue {
    display: grid;
    grid-template-columns: clamp(80px, 21vw, 96px) minmax(0, 1fr);
    align-items: start;
}

.ats-mobile-home-products {
    min-width: 0;
    padding: 0 8px 18px;
}

.ats-mobile-home-products .ats-mobile-shop-top {
    margin-inline: -8px;
}

.home-products-direct .home-products-all {
    margin: 0 12px;
}

.ats-shop-hero {
    display: none;
}

.ats-shop-section.section {
    padding: 0 0 90px;
    background: #fffcf7;
}

.ats-shop-section > .shell {
    width: 100%;
    max-width: none;
}

.ats-shop-section .shop-layout {
    display: block;
}

.ats-shop-section .filter-card {
    position: fixed !important;
    z-index: 70;
    top: 78px;
    left: clamp(80px, 21vw, 96px);
    right: 8px;
    max-height: calc(100dvh - 150px);
    margin: 0;
    overflow-y: auto;
    box-shadow: 0 20px 40px #47231d30;
}

.ats-mobile-shop-shell {
    display: grid;
    grid-template-columns: clamp(80px, 21vw, 96px) minmax(0, 1fr);
    align-items: start;
    gap: 0;
}

.ats-mobile-category-rail {
    position: sticky;
    top: 78px;
    display: flex;
    flex-direction: column;
    align-self: start;
    height: calc(100dvh - 78px - var(--ats-tab-bar));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid #ead9c6;
    background: #fff;
    scrollbar-width: none;
}

.ats-mobile-category-rail::-webkit-scrollbar {
    display: none;
}

.ats-mobile-category-rail a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: 95px;
    padding: 10px 4px 8px;
    color: #664a45;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.ats-mobile-category-rail a[aria-current="page"] {
    background: #f7eee2;
    color: #74243b;
    font-weight: 800;
}

.ats-mobile-category-rail a[aria-current="page"]::before {
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: 0;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: #74243b;
    content: '';
}

.ats-mobile-category-art {
    display: grid;
    flex: 0 0 50px;
    place-items: center;
    width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 50%;
    background: #f1e3cf;
    font-size: 24px;
}

.ats-mobile-category-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ats-mobile-shop-results {
    min-width: 0;
    padding: 0 8px 18px;
}

.ats-mobile-shop-top {
    position: sticky;
    z-index: 10;
    top: 78px;
    display: block;
    margin-inline: -8px;
    padding: 12px 8px 9px;
    border-bottom: 1px solid #ead9c6;
    background: #fffcf7;
}

.ats-mobile-shop-heading .eyebrow {
    font-size: 8px;
    letter-spacing: .12em;
}

.ats-mobile-shop-heading h2 {
    margin: 3px 0 10px;
    color: #56202a;
    font-size: 18px;
    line-height: 1.15;
}

.ats-mobile-shop-chips {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 0;
}

.ats-mobile-shop-chips .mobile-filter-toggle {
    justify-content: center;
    width: auto;
    min-height: 36px;
    margin: 0;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 10px;
    letter-spacing: 0;
    text-transform: none;
}

.ats-mobile-shop-chips .mobile-filter-toggle::after {
    margin-left: 5px;
    font-size: 13px;
}

.ats-mobile-sort {
    display: flex;
    align-items: center;
    min-width: 0;
    max-width: 160px;
    height: 36px;
    padding: 0 6px;
    border: 1px solid #dbc2a0;
    border-radius: 9px;
    background: #fffdf8;
    color: #692831;
}

.ats-mobile-sort label {
    padding-right: 3px;
    font-size: 10px;
    font-weight: 700;
}

.ats-mobile-sort select {
    min-width: 0;
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 10px;
}

.ats-mobile-shop-results .shop-toolbar {
    margin: 12px 0;
    font-size: 11px;
}

.ats-mobile-shop-results .shop-toolbar span + span {
    display: none;
}

.ats-shop-section .ats-mobile-shop-grid,
.home-products-direct .ats-mobile-shop-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 8px;
}

.ats-mobile-shop-grid .product-card {
    container-type: inline-size;
    border-radius: 10px;
    box-shadow: none;
}

.ats-mobile-shop-grid .product-card .product-media {
    aspect-ratio: 1 / 1;
}

.ats-mobile-shop-grid .product-card .product-info {
    padding: 28px 8px 10px;
}

.ats-mobile-shop-grid .product-card .product-category,
.ats-mobile-shop-grid .product-card .card-summary {
    display: none;
}

.ats-mobile-shop-grid .product-card .price {
    order: 0;
    margin: 0;
    line-height: 1.2;
}

.ats-mobile-shop-grid .product-card .price strong {
    font-size: 15px;
}

.ats-mobile-shop-grid .product-card .product-info h3 {
    display: -webkit-box;
    order: 1;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
    margin: 7px 0 0;
    font-family: Inter, sans-serif;
    font-size: 12px;
    line-height: 1.35;
}

.ats-mobile-shop-grid .product-card .product-actions {
    position: absolute;
    z-index: 4;
    top: calc(100cqi - 23px);
    right: 7px;
    width: min(110px, calc(100cqi - 14px));
    margin: 0;
}

.ats-mobile-shop-grid .product-card[data-mobile-orderable="1"] .product-actions .btn.wine {
    border: 1px solid #74243b;
    background: #fff;
    color: #74243b;
    font-size: 0 !important;
    box-shadow: 0 3px 8px #47231d22;
}

.ats-mobile-shop-grid .product-card[data-mobile-orderable="1"] .product-actions .btn.wine::after {
    content: 'ADD';
    font-size: 13px;
    font-weight: 800;
}

.ats-mobile-shop-grid .product-card .ats-mobile-qty {
    box-shadow: 0 3px 8px #47231d22;
}

.ats-mobile-shop-grid .product-card .ats-mobile-qty button {
    min-width: 0;
    width: 100%;
}

.ats-mobile-shop-grid .ats-mobile-upcoming-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #ead8bc;
    border-radius: 10px;
    box-shadow: none;
}

.ats-mobile-upcoming-art {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: radial-gradient(circle, #f9eacb, #f0d8b9);
    color: #74243b;
    font-size: 48px;
}

.ats-mobile-upcoming-info {
    padding: 10px 8px;
}

.ats-mobile-upcoming-info .ats-upcoming-badge {
    display: inline-block;
    border-radius: 99px;
    background: #721f32;
    color: #fff8e9;
    font-weight: 700;
    font-size: 9px;
    padding: 4px 7px;
}

.ats-mobile-upcoming-info h3 {
    margin: 8px 0 0;
    font-family: Inter, sans-serif;
    font-size: 12px;
    line-height: 1.35;
}

.ats-mobile-upcoming-info p {
    margin: 5px 0 0;
    font-size: 10px;
    line-height: 1.3;
}

.ats-shop-section .ats-mobile-hide-empty,
.ats-desktop-upcoming {
    display: none;
}

.ats-shop-section .empty {
    margin: 20px 0;
    padding: 18px;
}

/* Product detail uses the same immediate quantity control. */
.product-detail-info[data-mobile-product] .buy-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.product-detail-info[data-mobile-product] .buy-row > .qty {
    display: none;
}

.product-detail-info[data-mobile-product] .buy-row > [data-add-cart],
.product-detail-info[data-mobile-product] .buy-row > .ats-mobile-qty {
    grid-column: 1;
    min-width: 0;
    min-height: 48px;
}

.product-detail-info[data-mobile-product] .buy-row > .whatsapp-product {
    grid-column: 2;
    min-width: 0;
    padding: 10px 5px;
    font-size: 10px;
}

.product-detail-info[data-mobile-qty]:not([data-mobile-qty="0"]) .buy-row > [data-add-cart] {
    display: none;
}

.product-detail-info[data-mobile-qty]:not([data-mobile-qty="0"]) .buy-row > .ats-mobile-qty {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    border-radius: 9px;
    background: #74243b;
    color: white;
    text-align: center;
}

@media (max-width: 350px) {
    .ats-mobile-shop-shell {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .ats-shop-section .ats-mobile-shop-grid,
    .home-products-direct .ats-mobile-shop-grid {
        grid-template-columns: 1fr;
    }
}
