/*
Theme Name: Schweizer Glaserei
Theme URI: https://schweizer-glaserei.ch/
Author: Schweizer Glaserei GmbH
Description: Thème léger, rapide et optimisé SEO pour Schweizer Glaserei GmbH (Elementor + WooCommerce Mode Catalogue sans prix ni panier + Polylang).
Version: 1.4.0
Text Domain: schweizer-glaserei
*/

:root{
    --sg-blue:#075c9f;
    --sg-blue-dark:#053e6b;
    --sg-blue-soft:#eef6fc;
    --sg-navy:#12263a;
    --sg-text:#34495a;
    --sg-muted:#64748b;
    --sg-line:#d9e4eb;
    --sg-red:#dc2626;
    --sg-red-dark:#b91c1c;
    --sg-green:#16a34a;
}

*, *::before, *::after{
    box-sizing:border-box;
}

html, body{
    margin:0;
    padding:0;
    font-family:'Inter', Arial, sans-serif;
    color:var(--sg-text);
    background:#fff;
    -webkit-font-smoothing:antialiased;
}

img{
    max-width:100%;
    height:auto;
}

a{
    color:var(--sg-blue);
}

/* ==========================================================
   EFFET APP NATIVE : VIEW TRANSITIONS + PROGRESS BAR + MOBILE BAR
========================================================== */
@view-transition{
    navigation:auto;
}

#sg-scroll-bar{
    position:fixed;
    top:0;
    left:0;
    height:3px;
    width:0%;
    background:linear-gradient(90deg, #075c9f, #38bdf8);
    z-index:99999;
    pointer-events:none;
    transition:width 0.08s linear;
}

/* Révélation douce des sections au scroll */
.sg-reveal{
    opacity:0;
    transform:translateY(14px);
    transition:opacity 0.45s ease, transform 0.45s ease;
}

.sg-reveal.is-visible{
    opacity:1;
    transform:translateY(0);
}

@media (prefers-reduced-motion: reduce){
    .sg-reveal{
        opacity:1;
        transform:none;
        transition:none;
    }
}

/* Barre d'action fixe mobile style App (Conversion max) */
.sg-mob-bar{
    display:none;
}

@media (max-width: 768px){
    body{
        padding-bottom:78px;
    }
    .sg-mob-bar{
        position:fixed;
        left:12px;
        right:12px;
        bottom:calc(10px + env(safe-area-inset-bottom, 0px));
        z-index:9998;
        height:56px;
        background:rgba(18,38,58,0.93);
        backdrop-filter:blur(14px);
        -webkit-backdrop-filter:blur(14px);
        border:1px solid rgba(255,255,255,0.14);
        border-radius:16px;
        box-shadow:0 14px 36px rgba(10,25,41,0.28);
        display:grid;
        grid-template-columns:1fr 1fr 1.1fr;
        align-items:center;
        gap:6px;
        padding:6px;
    }
    .sg-mob-bar a{
        height:44px;
        display:flex;
        align-items:center;
        justify-content:center;
        gap:7px;
        border-radius:11px;
        text-decoration:none;
        font-size:12.5px;
        font-weight:700;
        color:#f1f5f9 !important;
        transition:background 0.2s ease, transform 0.15s ease;
    }
    .sg-mob-bar a:active{
        transform:scale(0.97);
    }
    .sg-mob-call{
        background:rgba(255,255,255,0.06);
    }
    .sg-mob-call svg{
        color:#f87171;
    }
    .sg-mob-wa{
        background:rgba(255,255,255,0.06);
    }
    .sg-mob-wa svg{
        color:#4ade80;
    }
    .sg-mob-quote{
        background:linear-gradient(135deg, #0964aa 0%, #075c9f 100%);
        color:#fff !important;
        font-weight:800;
        box-shadow:0 4px 12px rgba(7,92,159,0.35);
    }
    /* Masquer le bouton flottant du footer sur mobile pour éviter le doublon */
    .sg-ftr-float,
    .sg-ffr-float{
        display:none !important;
    }
}

/* ==========================================================
   WOOCOMMERCE — MODE CATALOGUE & IDENTITÉ SCHWEIZER GLASEREI
   Fonctionne sur toutes les pages WooCommerce (Boutique,
   Catégories /product-category/..., et Produit unique)
========================================================== */
.sg-wc-main,
body.woocommerce .site-main,
body.woocommerce-page .site-main,
body.tax-product_cat main{
    max-width:1220px !important;
    margin:0 auto !important;
    padding:42px 24px 72px !important;
}

.sg-wc-main .woocommerce-breadcrumb,
.woocommerce .woocommerce-breadcrumb{
    font-size:13px !important;
    font-weight:600 !important;
    color:var(--sg-muted) !important;
    margin:0 0 16px !important;
}

.sg-wc-main .woocommerce-breadcrumb a,
.woocommerce .woocommerce-breadcrumb a{
    color:var(--sg-blue) !important;
    text-decoration:none !important;
}

.sg-wc-main .woocommerce-products-header,
.woocommerce .woocommerce-products-header{
    background:linear-gradient(120deg, #0964aa 0%, #075c9f 55%, #12263a 100%);
    color:#fff;
    padding:34px 32px;
    border-radius:16px;
    margin-bottom:28px;
    box-shadow:0 16px 38px rgba(18,38,58,0.12);
}

.sg-wc-main .woocommerce-products-header__title,
.woocommerce .woocommerce-products-header__title{
    margin:0 !important;
    font-size:clamp(26px, 3vw, 36px) !important;
    font-weight:800 !important;
    color:#fff !important;
    letter-spacing:-0.02em;
    text-transform:capitalize;
}

.sg-wc-main .woocommerce-result-count,
.woocommerce .woocommerce-result-count{
    font-size:13.5px !important;
    color:var(--sg-muted) !important;
    margin-bottom:22px !important;
}

.sg-wc-main .woocommerce-ordering select,
.woocommerce .woocommerce-ordering select{
    height:40px !important;
    padding:0 12px !important;
    border:1.5px solid var(--sg-line) !important;
    border-radius:8px !important;
    font:inherit !important;
    font-size:13.5px !important;
    color:var(--sg-navy) !important;
    background:#fff !important;
}

/* Grille Produits (Catalogue) — !important pour écraser woocommerce-layout.css */
.sg-wc-main ul.products,
.woocommerce ul.products,
body.tax-product_cat ul.products{
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
    gap:24px !important;
    margin:0 !important;
    padding:0 !important;
    list-style:none !important;
    width:100% !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after{
    display:none !important;
    content:none !important;
}

.sg-wc-main ul.products li.product,
.woocommerce ul.products li.product,
body.tax-product_cat ul.products li.product{
    width:100% !important;
    float:none !important;
    clear:none !important;
    margin:0 !important;
    background:#f9fcff !important;
    border:1px solid var(--sg-line) !important;
    border-radius:16px !important;
    padding:18px !important;
    display:flex !important;
    flex-direction:column !important;
    justify-content:space-between !important;
    transition:transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease !important;
}

.sg-wc-main ul.products li.product:hover,
.woocommerce ul.products li.product:hover{
    transform:translateY(-4px) !important;
    background:#fff !important;
    border-color:#9dc3e2 !important;
    box-shadow:0 18px 40px rgba(7,92,159,0.1) !important;
}

.sg-wc-main ul.products li.product a,
.woocommerce ul.products li.product a{
    text-decoration:none !important;
}

.sg-wc-main ul.products li.product img,
.woocommerce ul.products li.product img{
    width:100% !important;
    height:auto !important;
    aspect-ratio:4 / 3 !important;
    object-fit:cover !important;
    border-radius:12px !important;
    margin:0 0 14px !important;
    display:block !important;
}

.sg-wc-main ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2{
    font-size:17.5px !important;
    font-weight:800 !important;
    color:var(--sg-navy) !important;
    line-height:1.35 !important;
    margin:0 0 12px !important;
    padding:0 !important;
}

/* Masquer résidus éventuels de plugins (checkbox/catégorie brute) */
.woocommerce ul.products li.product .product-categories,
.woocommerce ul.products li.product .yith-wcwl-add-to-wishlist,
.etheme-product-grid-image footer{
    display:none !important;
}

/* ==========================================================
   COMPATIBILITÉ WIDGETS XSTORE ETHEME_PRODUCTS (ARCHIVE)
   Si une page utilise encore div.etheme-product-grid
========================================================== */
.etheme-product-grid{
    display:grid !important;
    grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
    gap:24px !important;
    width:100% !important;
    max-width:1200px !important;
    margin:0 auto !important;
    padding:12px 0 36px !important;
}

.etheme-product-grid-item{
    width:100% !important;
    background:#f9fcff !important;
    border:1px solid var(--sg-line) !important;
    border-radius:16px !important;
    overflow:hidden !important;
    display:flex !important;
    flex-direction:column !important;
    transition:transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease !important;
}

.etheme-product-grid-item:hover{
    transform:translateY(-4px) !important;
    background:#fff !important;
    border-color:#9dc3e2 !important;
    box-shadow:0 18px 40px rgba(7,92,159,0.1) !important;
}

.etheme-product-grid-image{
    position:relative !important;
    aspect-ratio:4 / 3 !important;
    overflow:hidden !important;
    background:#dbe7f0 !important;
}

.etheme-product-grid-image a,
.etheme-product-grid-image img{
    width:100% !important;
    height:100% !important;
    display:block !important;
}

.etheme-product-grid-image img{
    object-fit:cover !important;
    transition:transform 0.4s ease !important;
}

.etheme-product-grid-item:hover .etheme-product-grid-image img{
    transform:scale(1.04) !important;
}

.etheme-product-grid-content{
    padding:18px 20px 20px !important;
    display:flex !important;
    flex-direction:column !important;
    gap:8px !important;
    flex:1 !important;
}

.etheme-product-grid-categories a{
    display:inline-block !important;
    padding:4px 10px !important;
    border-radius:999px !important;
    background:var(--sg-blue-soft) !important;
    color:var(--sg-blue) !important;
    font-size:11px !important;
    font-weight:800 !important;
    text-transform:uppercase !important;
    letter-spacing:0.5px !important;
    text-decoration:none !important;
}

.etheme-product-grid-title{
    margin:0 !important;
    font-size:17.5px !important;
    font-weight:800 !important;
    line-height:1.35 !important;
}

.etheme-product-grid-title a{
    color:var(--sg-navy) !important;
    text-decoration:none !important;
}

.etheme-product-grid-title a:hover{
    color:var(--sg-blue) !important;
}

.sg-wc-card-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    width:100%;
    padding:11px 16px;
    border-radius:8px;
    background:var(--sg-blue);
    color:#fff !important;
    font-size:13.5px;
    font-weight:700;
    text-decoration:none;
    transition:background 0.2s ease;
}

.sg-wc-card-btn:hover{
    background:var(--sg-blue-dark);
}

/* Page Produit Unique (Single Product) */
.sg-wc-main div.product{
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
    gap:42px;
    align-items:start;
}

.sg-wc-main div.product div.images{
    width:100% !important;
    float:none !important;
    margin:0 !important;
    border-radius:18px;
    overflow:hidden;
    border:1px solid var(--sg-line);
    background:#f8fbfd;
    box-shadow:0 16px 40px rgba(18,38,58,0.08);
}

.sg-wc-main div.product div.summary{
    width:100% !important;
    float:none !important;
    margin:0 !important;
}

.sg-wc-main div.product .product_title{
    margin:0 0 14px;
    font-size:clamp(26px, 3vw, 36px);
    font-weight:800;
    color:var(--sg-navy);
    line-height:1.18;
}

.sg-wc-main div.product .woocommerce-product-details__short-description{
    font-size:15.5px;
    line-height:1.7;
    color:var(--sg-text);
    margin-bottom:22px;
}

/* Box CTA Catalogue sur la page produit */
.sg-wc-quote-box{
    background:linear-gradient(135deg, #f8fbfd 0%, #eef6fc 100%);
    border:1px solid var(--sg-line);
    border-radius:16px;
    padding:22px;
    margin:20px 0 24px;
}

.sg-wc-quote-box h3{
    margin:0 0 6px;
    font-size:17px;
    font-weight:800;
    color:var(--sg-navy);
}

.sg-wc-quote-box p{
    margin:0 0 16px;
    font-size:13.5px;
    line-height:1.55;
    color:var(--sg-muted);
}

.sg-wc-quote-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.sg-wc-qbtn-blue{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:12px 18px;
    border-radius:8px;
    background:var(--sg-blue);
    color:#fff !important;
    text-decoration:none;
    font-size:14px;
    font-weight:700;
}

.sg-wc-qbtn-red{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:12px 18px;
    border-radius:8px;
    background:var(--sg-red);
    color:#fff !important;
    text-decoration:none;
    font-size:14px;
    font-weight:800;
}

.sg-wc-qbtn-wa{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:12px 16px;
    border-radius:8px;
    background:#f0fdf4;
    border:1px solid #bbf7d0;
    color:#15803d !important;
    text-decoration:none;
    font-size:14px;
    font-weight:700;
}

.sg-wc-main div.product .woocommerce-tabs,
.sg-wc-main div.product .related.products{
    grid-column:1 / -1;
    margin-top:24px;
}

@media (max-width: 960px){
    .sg-wc-main ul.products,
    .woocommerce ul.products,
    body.tax-product_cat ul.products,
    .etheme-product-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    }
    .sg-wc-main div.product{
        grid-template-columns:1fr;
    }
}

@media (max-width: 600px){
    .sg-wc-main{
        padding:32px 16px 52px;
    }
    .sg-wc-main ul.products,
    .woocommerce ul.products,
    body.tax-product_cat ul.products,
    .etheme-product-grid{
        grid-template-columns:1fr !important;
    }
    .sg-wc-quote-actions a{
        width:100%;
        justify-content:center;
    }
}
