/*
Theme Name: Hello Vending Child
Theme URI: https://freshvendingmachines.com
Description: Child theme of Hello Elementor for Fresh Vending Machines — mobile-first tuning, a light performance bloat-strip, and a sticky mobile add-to-cart bar. Header, footer, and product/archive/cart/checkout templates are built with Elementor Pro Theme Builder (which overrides Hello Elementor's defaults).
Author: Fresh Vending Machines
Template: hello-elementor
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: hello-vending-child
*/

/* ============================================================
   Mobile-first base (designed at 375px)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

/* No horizontal scroll at any width */
html, body { overflow-x: hidden; max-width: 100%; }

/* Fluid media */
img, video, iframe, svg { max-width: 100%; height: auto; }

/* Tap targets >= 44px (WCAG 2.5.5 / mobile usability) */
.button,
.woocommerce a.button,
.woocommerce button.button,
.wp-block-button__link,
.menu-item > a {
    min-height: 44px;
}
.button,
.woocommerce a.button,
.woocommerce button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

/* ============================================================
   Sticky mobile add-to-cart bar (single product, < 768px)
   ============================================================ */
.vending-sticky-atc {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;            /* shown via .is-visible from JS */
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}
.vending-sticky-atc.is-visible { display: flex; }

.vending-sticky-atc__info {
    display: flex;
    flex-direction: column;
    min-width: 0;             /* allow ellipsis */
    flex: 1 1 auto;
}
.vending-sticky-atc__title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vending-sticky-atc__price { font-size: 15px; line-height: 1.2; }
.vending-sticky-atc__price .amount { font-weight: 700; }

.vending-sticky-atc__btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 18px;
    white-space: nowrap;
}

/* Tablet/desktop: the in-page add-to-cart is visible, so hide the sticky bar */
@media (min-width: 768px) {
    .vending-sticky-atc { display: none !important; }
}
