/* Shared refinements for the existing storefront, without vendor CSS changes. */
:root{
    --ec-space-1:4px;--ec-space-2:8px;--ec-space-3:12px;--ec-space-4:16px;
    --ec-space-5:24px;--ec-space-6:32px;--ec-space-7:48px;
    --ec-red:#d91c25;--ec-ink:#252830;--ec-muted:#5f6570;
    --ec-success:#247a18;--ec-warning:#845100;--ec-border:#858b95;
    --ec-body-font:Inter,Arial,sans-serif;--ec-title-font:Poppins,Inter,Arial,sans-serif;
}
.ec-storefront{font-family:var(--ec-body-font);line-height:1.65}
.ec-storefront .electro-page-content{color:var(--ec-ink)}
.ec-storefront .titulo_d{
    height:auto;min-height:72px;padding:var(--ec-space-4);margin-bottom:var(--ec-space-5);
    font:700 clamp(24px,2.3vw,34px)/1.3 var(--ec-title-font);overflow-wrap:anywhere;
}
.ec-storefront .subtitulo_d{font-size:18px;line-height:1.4;font-weight:600;margin:var(--ec-space-4) 0 var(--ec-space-3)}
.ec-storefront .bloco_texto_d{line-height:1.75;margin-bottom:var(--ec-space-5)}
.ec-storefront .banner-product-wrapper2 .title{font-size:clamp(20px,1.8vw,28px);line-height:1.35}
.ec-storefront .product-single .product-title{font-size:clamp(24px,2.2vw,34px);line-height:1.3}
.ec-storefront .product-single .product-sku,
.ec-storefront .product-single .product-categories{font-size:12px;line-height:1.65}
.ec-reading-page .electro-page-content{max-width:calc(80ch + 2 * var(--electro-gutter));margin-left:auto;margin-right:auto}
.ec-reading-page .electro-page-content p{line-height:1.8;margin-bottom:var(--ec-space-4);overflow-wrap:anywhere}
.ec-storefront .electro-page-content .disponivel,
.ec-storefront .main .disponivel{color:var(--ec-success)}
.ec-storefront .electro-page-content .limitado,
.ec-storefront .main .limitado{color:var(--ec-warning)}
.ec-storefront .electro-page-content .porencomenda{color:#1a5f9a}
.ec-storefront .electro-page-content .esgotado{color:#b51720}
.ec-storefront :is(.electro-page-content,.fancybox-inner,.mfp-content) form .form-group{margin-bottom:var(--ec-space-5)}
.ec-storefront :is(.electro-page-content,.fancybox-inner,.mfp-content) form .form-group>label{font-size:14px;line-height:1.5;margin-bottom:var(--ec-space-2)}
.ec-storefront :is(.electro-page-content,.fancybox-inner,.mfp-content) form :is(input,select,textarea).form-control{
    min-height:44px;padding:10px 12px;border:1px solid var(--ec-border);border-radius:8px;
    font:400 14px/1.5 var(--ec-body-font);color:var(--ec-ink);background:#fff;
    transition:border-color 180ms ease,box-shadow 180ms ease;
}
.ec-storefront :is(.electro-page-content,.fancybox-inner,.mfp-content) form textarea.form-control{min-height:120px;resize:vertical}
.ec-storefront :is(.electro-page-content,.fancybox-inner,.mfp-content) form .form-control:focus{border-color:var(--ec-red);box-shadow:0 0 0 3px #d91c251a}
.ec-storefront :is(.electro-page-content,.fancybox-inner,.mfp-content) form .has-error .form-control{border-color:#b51720;background:#fff8f8}
.ec-storefront :is(.electro-page-content,.fancybox-inner,.mfp-content) :is(.button3,.btn-primary){
    min-height:44px;padding:11px 16px;border-radius:8px;font-size:14px;line-height:1.4;
    transition:background-color 180ms ease,border-color 180ms ease,color 180ms ease;
}
.ec-storefront :is(.electro-page-content,.fancybox-inner,.mfp-content) :is(input[type="submit"].button3,.btn-primary){color:#fff;background:var(--ec-red);border-color:var(--ec-red)}
.ec-storefront :is(button,input[type="button"],input[type="submit"],[role="button"],.prodby){cursor:pointer}
.ec-storefront :is(button,input,select,textarea):disabled{cursor:not-allowed;opacity:.65}
.ec-storefront :is(a,button,input,select,textarea,[tabindex]):focus-visible{outline:2px solid #b41620;outline-offset:3px}
.ec-storefront .header-top a:focus-visible{outline-color:#fff}
.ec-storefront .electro-page-content :is(button,.button3,.prodby):active{transform:translateY(1px)}
.ec-storefront #login_form .form-group:last-child{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--ec-space-4)}
.ec-storefront #login_form .login-registo{font-size:12px;line-height:1.7}
.ec-storefront #login_form .login-registo a{text-underline-offset:3px}
.ec-storefront #encomendas>h1{font-size:clamp(20px,1.8vw,28px);line-height:1.35;margin-bottom:var(--ec-space-5)}
.ec-storefront #encomendas .panel{border-color:#d8dce1;border-radius:8px;box-shadow:none;margin-bottom:var(--ec-space-5);overflow:hidden}
.ec-storefront #encomendas .panel-heading{padding:var(--ec-space-4) 20px}
.ec-storefront #encomendas .panel-title{font-size:clamp(16px,1.3vw,18px);line-height:1.45;margin:0}
.ec-storefront #encomendas .panel-body{padding:20px}
.ec-storefront .electro-page-content .table-responsive{overflow-x:auto;overscroll-behavior-x:contain}
.ec-page-8 .electro-page-content iframe[src*="google.com/maps"]{display:block;width:100%;max-width:100%;height:clamp(260px,38vw,420px);border:0}
.ec-storefront .breadcrumb{font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.ec-storefront .breadcrumb a{color:var(--ec-muted);transition:color 180ms ease}
.ec-storefront .footer a{transition:color 180ms ease;text-underline-offset:3px}
.ec-brand-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:var(--ec-space-4);padding:var(--ec-space-4) 0 var(--ec-space-6)}
.ec-brand-card{min-height:100px;display:flex;align-items:center;justify-content:center;text-align:center;padding:var(--ec-space-4);border:1px solid #d8dce1;border-radius:8px;background:#fff;color:var(--ec-ink);font-size:15px;font-weight:600;line-height:1.5;overflow-wrap:anywhere;transition:border-color 180ms ease,background-color 180ms ease,transform 180ms ease}
.ec-brand-card img{width:100%;max-width:180px;height:80px;object-fit:contain}
@media(hover:hover){
    .ec-storefront :is(.electro-page-content,.fancybox-inner,.mfp-content) :is(input[type="submit"].button3,.btn-primary):hover:not(:disabled){background:#b71620;border-color:#b71620}
    .ec-storefront :is(.login-registo a,.breadcrumb a):hover{color:#b71620;text-decoration:underline}
    .ec-reading-page .electro-page-content a:hover{color:#b71620;text-decoration:underline;text-underline-offset:3px}
    .ec-storefront .footer a:hover{color:#f04a50}
    .ec-brand-card:hover{border-color:var(--ec-red);background:#fff8f8;transform:translateY(-2px)}
}
@media(max-width:767px){
    .ec-storefront .page-wrapper{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
    .ec-storefront .sticky-footer{padding-bottom:calc(8px + env(safe-area-inset-bottom,0px))}
    .ec-storefront .titulo_d{min-height:64px;font-size:clamp(24px,6.5vw,30px)}
    .ec-storefront :is(.electro-page-content,.fancybox-inner,.mfp-content) form :is(input,select,textarea).form-control{font-size:16px}
    .ec-storefront .footer input.form-control{font-size:16px;min-height:44px}
    .ec-storefront #swipper_cat_desc_home .category-name{font-size:11px;line-height:1.45}
    .ec-storefront .electro-home-products .electro-product-card.prd_d .prd_stock{font-size:12px}
    .ec-storefront .electro-home-products .electro-product-action :is(.electro-buy,.electro-stock-alert){font-size:11px}
    .ec-page-5 .electro-page-content .col-md-5{margin-bottom:var(--ec-space-6)}
    .ec-brand-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--ec-space-3)}
    .ec-brand-card{font-size:14px;min-height:88px}
    .ec-storefront #shopping-cart .column-labels{display:none}
    .ec-storefront #shopping-cart .product{display:grid;grid-template-columns:58px minmax(0,1fr) 36px;gap:12px;padding:16px 0;align-items:start}
    .ec-storefront #shopping-cart .product>div{float:none;width:auto;min-width:0;padding:0}
    /* Override the legacy 70/100px !important widths only in this cart grid. */
    .ec-storefront #shopping-cart .product-price,.ec-storefront #shopping-cart .product-quantity{width:auto!important}
    .ec-storefront #shopping-cart .product-image{grid-column:1;grid-row:1/span 3}
    .ec-storefront #shopping-cart .product-image img{width:58px;max-height:80px;object-fit:contain;margin:0}
    .ec-storefront #shopping-cart .product-details{grid-column:2;grid-row:1;text-align:left}
    .ec-storefront #shopping-cart .product-details :is(.product-title,.product-description){white-space:normal;overflow:visible;text-overflow:clip;font-size:13px;line-height:1.5;margin:0 0 4px}
    .ec-storefront #shopping-cart .product-price{grid-column:2;grid-row:2;display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 8px;text-align:left;font-size:14px;max-width:none;white-space:nowrap;overflow:visible;text-overflow:clip}
    .ec-storefront #shopping-cart .product-quantity{grid-column:2;grid-row:3;display:flex;flex-wrap:wrap;align-items:center;gap:8px;max-width:none}
    .ec-storefront #shopping-cart .product-removal{grid-column:3;grid-row:1}
    .ec-storefront #shopping-cart .remove-product{min-width:32px;min-height:32px;padding:4px;border-radius:6px}
    .ec-storefront #shopping-cart .product-line-price{grid-column:2;grid-row:4;display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 8px;text-align:left;font-size:16px;font-weight:700;max-width:none;white-space:nowrap;overflow:visible;text-overflow:clip}
    .ec-storefront #shopping-cart .produto_qtd{display:flex;align-items:center;width:84px;height:48px;border:1px solid var(--ec-border);border-radius:6px;background:#fff}
    .ec-storefront #shopping-cart .produto_qtd input{width:48px;height:46px;min-width:44px;font-size:16px}
    .ec-storefront #shopping-cart .spinnerwrapper{float:none;display:grid;grid-template-rows:24px 24px;width:32px;height:48px}
    .ec-storefront #shopping-cart :is(.spinnerup,.spinnerdown){display:grid;place-items:center;width:32px;height:24px;min-width:24px;min-height:24px;cursor:pointer;background:#f3f4f6;font-size:17px;line-height:1}
    .ec-storefront #shopping-cart .spinnerup:before{content:'+'}
    .ec-storefront #shopping-cart .spinnerdown:before{content:'−'}
    .ec-storefront #shopping-cart .totals{margin-top:var(--ec-space-4)}
    .ec-storefront #shopping-cart .totals .totals-item{display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:12px;line-height:1.6;padding:8px 0}
    .ec-storefront #shopping-cart .totals .totals-item>label{grid-column:1;grid-row:1;float:none;width:auto;max-width:none;text-align:left}
    .ec-storefront #shopping-cart .totals .totals-value{grid-column:2;grid-row:1;float:none;width:auto;max-width:none;white-space:nowrap;text-align:right}
    .ec-storefront #shopping-cart .product:before,.ec-storefront #shopping-cart .product:after,.ec-storefront #shopping-cart .totals-item:before,.ec-storefront #shopping-cart .totals-item:after{display:none;content:none}
    .ec-storefront #shopping-cart .product [data-ec-label]:before{content:attr(data-ec-label);font-size:12px;line-height:1.6;font-weight:400;color:var(--ec-muted)}
}
@media(prefers-reduced-motion:reduce){
    .ec-storefront :is(.electro-product-card,.electro-category,.ec-brand-card,button,a,.form-control){transition:none;scroll-behavior:auto}
    .ec-storefront .appear-animate{opacity:1!important;visibility:visible!important;animation:none!important}
}

.ec-image-fallback{display:inline-flex;align-items:center;justify-content:center;max-width:100%;min-height:69px;padding:12px;border:1px solid #d8dce1;border-radius:6px;background:#f5f6f7;color:#5f6570;font-size:12px;line-height:1.5;text-align:center}

/* Validation notices use the same readable controls as the existing forms. */
.ec-storefront .apprise{max-width:calc(100vw - 32px);border-radius:10px;overflow:hidden}
.ec-storefront .apprise .apprise-inner{padding:20px;font:400 14px/1.65 var(--ec-body-font);color:var(--ec-ink)}
.ec-storefront .apprise .apprise-content{width:100%;float:none;padding:0;font:400 14px/1.65 var(--ec-body-font);color:var(--ec-ink)}
.ec-storefront .apprise .apprise-buttons{padding:12px 20px}
.ec-storefront .apprise .apprise-buttons button{min-height:44px;padding:10px 20px;border:1px solid var(--ec-red);border-radius:8px;background:var(--ec-red);color:#fff;font:600 14px/1.5 var(--ec-body-font);transition:background-color 180ms ease}
.ec-storefront .apprise .apprise-buttons button:active{background:#b71620}
@media(hover:hover){.ec-storefront .apprise .apprise-buttons button:hover{background:#b71620}}

/* Keep the existing AJAX sign-in form inside the responsive lightbox. */
.ec-storefront .fancybox-inner #login_frm{max-width:calc(100vw - 88px);padding:8px;box-sizing:border-box}
.ec-storefront .fancybox-inner #login_frm .floatright{font-size:12px;line-height:1.6}
.ec-storefront .fancybox-inner #login_frm .row{display:flex;flex-wrap:wrap;align-items:center;row-gap:16px}
.ec-storefront .fancybox-inner #login_frm .button3-sub{min-height:44px;padding:10px 20px;border-radius:8px;border:1px solid var(--ec-red);background:var(--ec-red);color:#fff;font-size:14px}
.ec-storefront .fancybox-inner #login_frm .link-recuperate{font-size:13px;line-height:1.6;display:inline-block}

.ec-storefront .mobile-menu-wrapper .nav-link.active{color:var(--ec-ink);background:#fff}
.ec-storefront .mobile-menu-wrapper .nav-link:focus-visible{outline:2px solid #fff;outline-offset:2px}
.ec-storefront .mobile-menu-wrapper .mobile-menu>li>a,
.ec-storefront .mobile-menu-wrapper .mobile-menu>li>h4>a{min-height:40px;padding-top:9px;padding-bottom:9px}
.ec-storefront .mobile-menu-wrapper #main-menu .mobile-menu>li>h4{margin:0}
