/*
 * Custom code goes here.
 * A template should always ship with an empty custom.css
 */
.box9-h4 .block_newsletter form input[type=email] {
    text-transform: lowercase !important;
}
.btn-slideshow-2 {
    text-transform: none !important;
}
body:not(#index) #header {
    background: #fff !important;
}
/* Home features row (box3-h4): keep the icon at its size and centre each feature in its column */
.box3-h4 .ApImage img {
    flex-shrink: 0;
}
@media (min-width: 768px) {
    .box3-h4 .ApImage {
        justify-content: center;
    }
}

/* "Out of stock" product flag (added in PS 8/9) had no style in this theme: same look as the "on sale" flag */
.product-flags .product-flag.out_of_stock {
    color: #fff;
    background: #2f3333;
    text-transform: capitalize;
}

/* Floating cart (top right): hidden while the header cart is on screen, see custom.js */
.leo-fly-cart {
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
body.ft-flycart-visible .leo-fly-cart {
    opacity: 1;
    visibility: visible;
}
/* Floating cart dropdown on desktop: open on hover (like the header cart) or on click (.show); no gap so hover is not lost */
@media (min-width: 1200px) {
    body.ft-flycart-visible .leo-fly-cart:hover .leo-dropdown-cart.dropdown,
    body.ft-flycart-visible .leo-fly-cart .leo-dropdown-cart.dropdown.show {
        opacity: 1;
        visibility: visible;
        z-index: 9999;
        margin-top: 0;
    }
}

/* Product page: attribute groups and quantity as clear rows (name above, control below).
   Leo's 100px floating label could not hold names like "Tipo de vinho" and the round radio could not hold "Branco". */
.product-actions .control-label {
    float: none;
    width: auto;
    display: block;
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 13px;
    letter-spacing: .5px;
}
.product-actions .control-label .control-label-value {
    font-weight: 400;
    text-transform: none;
}
.product-variants > .product-variants-item {
    margin: 0 0 18px;
}
.product-variants > .product-variants-item select {
    width: auto;
    min-width: 160px;
    height: 42px;
    color: #2a2a2a;
    border-color: #dcdcdc;
}
.product-variants > .product-variants-item ul li {
    margin: 0 10px 8px 0;
}
.product-actions .radio-label {
    width: auto;
    min-width: 44px;
    height: 38px;
    line-height: 36px;
    padding: 0 18px;
    border: 1px solid #e5e5e5;
    border-radius: 19px;
    font-size: 13px;
    white-space: nowrap;
}
.product-actions .input-radio:checked + .radio-label {
    border-color: #C96838;
}
/* PayPal "buy now" on the product page: the module floats it right with an inline style; put it under "add to cart", same width */
.product-actions [data-container-express-checkout][data-paypal-source-page="product"] {
    float: none !important;
    display: block !important;
    width: 263px;
    max-width: 100%;
    margin: 0 0 15px !important;
}

/* Home category ("Início"): subcategories without images, shown as equal-height clickable cards */
#subcategories.subcategories-noimg{margin-bottom:30px}
#subcategories.subcategories-noimg .subcategories-list{display:flex;flex-wrap:wrap}
#subcategories.subcategories-noimg .subcategories-list::before,#subcategories.subcategories-noimg .subcategories-list::after{display:none}
#subcategories.subcategories-noimg .subcategory-block{float:none;display:flex;margin-bottom:30px}
#subcategories.subcategories-noimg .subcategory-meta{position:relative;flex:1;padding:22px 24px;background:#fff;border:1px solid #e5e5e5;transition:border-color .2s}
#subcategories.subcategories-noimg .subcategory-meta:hover,#subcategories.subcategories-noimg .subcategory-meta:focus-within{border-color:#2a2a2a}
#subcategories.subcategories-noimg .subcategory-meta h5{margin:0 0 10px;font-size:18px}
#subcategories.subcategories-noimg .subcategory-name::after{content:"";position:absolute;inset:0}
#subcategories.subcategories-noimg .subcategory-description{margin:0;line-height:1.5}

/* Checkout: carrier logos are uploaded at any size (DPD ones are 700px wide), keep them inside their column */
.carrier-logo img{max-width:100%;max-height:50px;width:auto;height:auto}
.delivery-option .carrier{display:flex;align-items:center}

/* Mobile off-canvas menu: the theme hides it only through animate.css keyframes (fadeOutLeft), which appagebuilder
   loads only when "waypoints" is enabled; without them the menu showed open on page load. Define both states here. */
@media (max-width: 991px) {
  .off-canvas:not(.rtl) .off-canvas-inactive > .off-canvas-nav-megamenu{transform:translateX(-100%);visibility:hidden;transition:transform .4s,visibility 0s .4s}
  .off-canvas:not(.rtl) .off-canvas-active > .off-canvas-nav-megamenu{transform:none;visibility:visible;transition:transform .4s}
  /* the theme places every caret 18px down (sized for first-level rows); centre it on the 30px sub-level rows */
  .off-canvas-nav-megamenu .dropdown-menu li.dropdown > .caret{top:5px}
  /* long submenus (e.g. Vinhos > Portugal) must scroll inside the panel instead of overflowing the screen */
  .off-canvas-nav-megamenu{box-sizing:border-box;height:100%;overflow-y:auto;overscroll-behavior:contain}
  /* the WhatsApp button (z-index 10000) covered the open menu */
  .off-canvas-active a.float[class*="whatsapp"]{visibility:hidden}
}
