/*
Theme Name: LinkMed Theme
Theme URI: https://linkmed.ma
Author: LinkMed Maroc
Author URI: https://linkmed.ma
Description: Thème professionnel pour LinkMed Maroc - Matériel médical et de laboratoire. Conçu pour WooCommerce avec une interface moderne et responsive.
Version: 1.0.18
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: linkmed-theme
Tags: woocommerce, medical, e-commerce, responsive, french
*/

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
    --primary:     #0A6EBD;
    --primary-dark:#085a9a;
    --primary-light:#e8f2fb;
    --secondary:   #00B4A6;
    --secondary-dark:#009488;
    --accent:      #FF6B35;
    --accent-dark: #e55a25;
    --dark:        #1A2B3C;
    --dark-mid:    #2c3e50;
    --gray:        #6b7280;
    --gray-light:  #9ca3af;
    --border:      #e2e8f0;
    --light:       #F4F8FC;
    --white:       #ffffff;

    --font-main:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-sm:   6px;
    --radius:      10px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
    --shadow:      0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:   0 8px 32px rgba(0,0,0,.14);
    --transition:  .25s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    color: var(--dark);
    background: var(--white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--dark);
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* =============================================
   LAYOUT
   ============================================= */
.container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.section-pad { padding-block: 5rem; }
.section-pad-sm { padding-block: 3rem; }

/* =============================================
   SECTION HEADERS
   ============================================= */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header .eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--secondary);
    background: rgba(0,180,166,.1);
    padding: .3rem .9rem;
    border-radius: 50px;
    margin-bottom: .75rem;
}
.section-header h2 { margin-bottom: .75rem; }
.section-header p {
    font-size: 1.05rem;
    color: var(--gray);
    max-width: 560px;
    margin-inline: auto;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.75rem;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(10,110,189,.35);
}
.btn-secondary {
    background: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
}
.btn-secondary:hover {
    background: var(--secondary-dark);
    border-color: var(--secondary-dark);
    color: var(--white);
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}
.btn-accent {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}
.btn-accent:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--white);
    transform: translateY(-1px);
}
.btn-lg { padding: .95rem 2.25rem; font-size: 1.05rem; }
.btn-sm { padding: .5rem 1.2rem; font-size: .85rem; }

/* =============================================
   BADGES
   ============================================= */
.badge {
    display: inline-block;
    padding: .2rem .65rem;
    border-radius: 50px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.badge-primary  { background: var(--primary-light); color: var(--primary); }
.badge-accent   { background: #fff0eb; color: var(--accent); }
.badge-success  { background: #e6f9f7; color: var(--secondary); }

/* =============================================
   TOPBAR — legacy class kept for footer reuse
   New header uses .hdr-topbar (header.php)
   ============================================= */
.topbar {
    background: var(--dark);
    color: rgba(255,255,255,.75);
    font-size: .8rem;
    padding: .45rem 0;
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.topbar a { color: rgba(255,255,255,.75); }
.topbar a:hover { color: var(--white); }
.topbar-item { display: flex; align-items: center; gap: .35rem; }
.topbar-item svg { width: 13px; height: 13px; flex-shrink: 0; }

/* =============================================
   HEADER / NAV
   All visual styles live in header.php <style>.
   Only structural/reset rules here.
   ============================================= */

/* Reset default shadow so header.php controls it fully */
#site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: none;
    transition: box-shadow .28s ease;
}

/* Suppress old .header-search if it ever renders outside header */
.header-search { display: none !important; }

/* =============================================
   GLOBAL LOGO CLAMP — fixes oversized custom logo
   Applies to ANY header (theme, Boostify, HFE, Elementor).
   Overrides WordPress inline width/height attributes.
   ============================================= */
.custom-logo,
.custom-logo-link img,
img.custom-logo,
.site-logo img,
.hdr-logo img,
.hdr-logo .custom-logo {
    max-height: 70px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}
.custom-logo-link { display: inline-flex !important; align-items: center !important; }
@media (max-width: 768px) {
    .custom-logo,
    .custom-logo-link img,
    .site-logo img,
    .hdr-logo img,
    .hdr-logo .custom-logo { max-height: 52px !important; }
}

/* Logo — kept for footer which still uses .site-logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}
.site-logo .logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -.02em;
}
.site-logo .logo-text { line-height: 1; }
.site-logo .logo-name {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -.02em;
}
.site-logo .logo-tagline {
    display: block;
    font-size: .7rem;
    color: var(--gray);
    font-weight: 400;
    margin-top: .1rem;
}

/* Suppress old nav toggle */
.mobile-menu-toggle { display: none; }

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, #0d3b6e 50%, var(--primary) 100%);
    position: relative;
    overflow: hidden;
    min-height: 580px;
    display: flex;
    align-items: center;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
    padding-block: 5rem;
}
.hero-content { color: white; }
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,.9);
    padding: .4rem 1rem;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,.15);
}
.hero-eyebrow-dot {
    width: 7px;
    height: 7px;
    background: var(--secondary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .5; transform: scale(.8); }
}
.hero h1 {
    color: white;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 20px rgba(0,0,0,.2);
}
.hero h1 span { color: var(--secondary); }
.hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,.82);
    max-width: 500px;
    margin-bottom: 2rem;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.hero-stats {
    display: flex;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.15);
}
.hero-stat-num {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}
.hero-stat-label {
    display: block;
    font-size: .78rem;
    color: rgba(255,255,255,.6);
    margin-top: .25rem;
}
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-img-wrap {
    position: relative;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 1 / 1;
    background: rgba(255,255,255,.06);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-xl);
}
.hero-img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: rgba(255,255,255,.4);
    padding: 2rem;
    text-align: center;
}
.hero-img-placeholder svg { width: 80px; height: 80px; opacity: .4; }
.hero-img-placeholder p { font-size: .85rem; }
.hero-badge {
    position: absolute;
    background: white;
    border-radius: var(--radius);
    padding: .75rem 1rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: .6rem;
}
.hero-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-badge-text strong { display: block; font-size: .8rem; color: var(--dark); }
.hero-badge-text span  { font-size: .7rem; color: var(--gray); }
.hero-badge-1 { top: 10%; right: -5%; }
.hero-badge-2 { bottom: 15%; left: -5%; }

/* =============================================
   TRUST BAR
   ============================================= */
.trust-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding-block: 1.25rem;
}
.trust-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 1rem;
    flex-wrap: wrap;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--gray);
    font-size: .85rem;
    font-weight: 500;
}
.trust-item svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }
.trust-divider { width: 1px; height: 24px; background: var(--border); }

/* =============================================
   CATEGORIES
   ============================================= */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
}
.category-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}
.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    color: inherit;
}
.category-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.75rem;
}
.category-card h3 {
    font-size: .9rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: .25rem;
}
.category-card p {
    font-size: .75rem;
    color: var(--gray);
    margin: 0;
}

/* =============================================
   PRODUCTS GRID (Best Sellers)
   ============================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* =============================================
   WHY CHOOSE US
   ============================================= */
.why-us { background: var(--light); }
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.75rem;
}
.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1.5px solid transparent;
    transition: all var(--transition);
}
.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}
.feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: .5rem;
}
.feature-card p { font-size: .875rem; color: var(--gray); margin: 0; }

/* =============================================
   TESTIMONIALS
   ============================================= */
.testimonials { background: var(--dark); }
.testimonials .section-header .eyebrow { background: rgba(0,180,166,.2); }
.testimonials .section-header h2 { color: white; }
.testimonials .section-header p { color: rgba(255,255,255,.6); }
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.testimonial-card {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--transition);
}
.testimonial-card:hover {
    background: rgba(255,255,255,.08);
    transform: translateY(-3px);
}
.testimonial-stars {
    display: flex;
    gap: .25rem;
    margin-bottom: 1rem;
    color: #fbbf24;
}
.testimonial-stars svg { width: 16px; height: 16px; }
.testimonial-text {
    color: rgba(255,255,255,.8);
    font-size: .9rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: .9rem;
    flex-shrink: 0;
}
.testimonial-author-info strong {
    display: block;
    color: white;
    font-size: .875rem;
}
.testimonial-author-info span {
    font-size: .78rem;
    color: rgba(255,255,255,.5);
}

/* =============================================
   CTA BANNER
   ============================================= */
.cta-banner {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding-block: 4rem;
    text-align: center;
    color: white;
}
.cta-banner h2 { color: white; margin-bottom: .75rem; }
.cta-banner p { color: rgba(255,255,255,.85); max-width: 540px; margin-inline: auto; margin-bottom: 2rem; font-size: 1.05rem; }
.cta-banner-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-white { background: white; color: var(--primary); border-color: white; }
.btn-white:hover { background: var(--light); color: var(--primary-dark); }
.btn-outline-white { background: transparent; color: white; border-color: rgba(255,255,255,.5); }
.btn-outline-white:hover { background: rgba(255,255,255,.15); color: white; border-color: white; }

/* =============================================
   FOOTER
   ============================================= */
#site-footer { background: var(--dark); color: rgba(255,255,255,.75); }
.footer-top { padding-block: 4rem; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.2fr;
    gap: 3rem;
}
.footer-brand .site-logo { margin-bottom: 1.25rem; }
.footer-brand .logo-name,
.footer-brand .logo-tagline { color: white; }
.footer-brand p { font-size: .875rem; line-height: 1.7; max-width: 280px; }
.footer-socials {
    display: flex;
    gap: .6rem;
    margin-top: 1.5rem;
}
.footer-social-link {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.6);
    transition: all var(--transition);
    border: 1px solid rgba(255,255,255,.1);
}
.footer-social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}
.footer-social-link svg { width: 16px; height: 16px; }
.footer-col h4 {
    font-size: .9rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 2px solid rgba(255,255,255,.08);
    position: relative;
}
.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--primary);
}
.footer-links li + li { margin-top: .5rem; }
.footer-links a {
    color: rgba(255,255,255,.65);
    font-size: .875rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: all var(--transition);
}
.footer-links a::before {
    content: '›';
    color: var(--primary);
    font-size: 1rem;
    line-height: 1;
}
.footer-links a:hover { color: white; padding-left: .35rem; }
.footer-contact-item {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    font-size: .875rem;
}
.footer-contact-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,.07);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--secondary);
}
.footer-contact-icon svg { width: 15px; height: 15px; }
.footer-contact-text strong { display: block; color: rgba(255,255,255,.9); font-size: .78rem; margin-bottom: .15rem; }
.footer-contact-text span  { color: rgba(255,255,255,.6); font-size: .8rem; }
.footer-contact-text a { color: rgba(255,255,255,.6); }
.footer-contact-text a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-block: 1.25rem;
}
.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .8rem;
    color: rgba(255,255,255,.45);
}
.footer-bottom-links { display: flex; gap: 1.25rem; }
.footer-bottom-links a { color: rgba(255,255,255,.45); }
.footer-bottom-links a:hover { color: rgba(255,255,255,.8); }

/* =============================================
   WOOCOMMERCE OVERRIDES (here for cascade)
   ============================================= */
.woocommerce-page .site-main { padding-block: 3rem; }

/* =============================================
   PAGE / POSTS
   ============================================= */
.page-hero {
    background: linear-gradient(135deg, var(--dark), var(--primary));
    padding-block: 3.5rem;
    text-align: center;
    color: white;
}
.page-hero h1 { color: white; }
.page-hero .breadcrumb { color: rgba(255,255,255,.6); font-size: .85rem; margin-top: .5rem; }
.page-hero .breadcrumb a { color: rgba(255,255,255,.75); }
.page-hero .breadcrumb a:hover { color: white; }

/* =============================================
   SIDEBAR
   ============================================= */
.widget { margin-bottom: 2rem; background: var(--white); border-radius: var(--radius-lg); padding: 1.5rem; border: 1.5px solid var(--border); }
.widget-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 2px solid var(--border); color: var(--dark); }

/* =============================================
   NOTICES
   ============================================= */
.woocommerce-info,
.woocommerce-message { background: var(--primary-light); border-left: 4px solid var(--primary); padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.25rem; }

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumbs { font-size: .82rem; color: var(--gray); margin-bottom: 1.5rem; }
.breadcrumbs a { color: var(--primary); }
.breadcrumbs span { margin-inline: .4rem; color: var(--gray-light); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .hero-inner { gap: 2.5rem; }
}
@media (max-width: 768px) {
    .topbar-left, .topbar-right { gap: .75rem; }
    .topbar-item:nth-child(n+3) { display: none; }
    .header-search { display: none; }
    .primary-menu { display: none; }
    .mobile-menu-toggle { display: flex; }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .hero { min-height: auto; }
    .hero-stats { gap: 1.25rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .trust-divider { display: none; }
    .trust-bar-inner { gap: .75rem; justify-content: flex-start; }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: 1fr 1fr; }
    .hero-actions { flex-direction: column; }
    .hero-stats { flex-wrap: wrap; gap: 1rem; }
}

/* =============================================
   GLOBAL OVERHAUL — final polish
   ============================================= */

/* All buttons: radius 8px + smooth transition */
.btn, button:not(.hdr-mobile-toggle):not(.sp-tab-btn),
input[type="submit"], input[type="button"],
.woocommerce a.button, .woocommerce button.button,
.woocommerce input.button {
    border-radius: 8px !important;
    transition: all .22s cubic-bezier(.4,0,.2,1) !important;
}

/* Product title: 2-line clamp everywhere */
.product-title,
.woocommerce-loop-product__title,
ul.products li.product .woocommerce-loop-product__title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Equal card heights */
ul.products { align-items: stretch !important; }
ul.products li.product,
.product-card { height: 100%; }

/* Smooth hover on all cards */
.product-card,
ul.products li.product,
.ab-stat-card,
.ab-value-card,
.ct-info-card,
.fp-why-card,
.fp-testimonial-card,
.fp-cat-card {
    transition: transform .28s cubic-bezier(.25,.46,.45,.94),
                box-shadow .28s cubic-bezier(.25,.46,.45,.94),
                border-color .2s ease !important;
}

/* Currency symbol — MAD (set WooCommerce currency to MAD in settings) */
.woocommerce .amount bdi::after { content: ''; }

/* Elementor: force our header to show over any Elementor header */
.elementor-location-header { display: none !important; }
.hfe-header, .hfe-nav-menu__main-menu-item { display: none !important; }
#hdr-topbar { display: flex !important; }
#site-header { display: block !important; }

/* Prevent Elementor from adding margin/padding to body that fights the fixed header */
.elementor-page body,
body.elementor-page { padding-top: 0 !important; margin-top: 0 !important; }

/* Fix Elementor sections on pages using our templates */
.elementor-section-wrap > .elementor-section:first-child,
.e-con-inner > .e-con:first-child { margin-top: 0 !important; }

/* =============================================
   functions.php: Elementor header disable hook
   NOTE: actual PHP hook added to functions.php below
   ============================================= */

/* =============================================
   MOBILE: 768px breakpoint additions
   ============================================= */
@media (max-width: 768px) {
    .hdr-search { display: none; }
    .hdr-topbar-center { display: none; }
    .ftr-grid { grid-template-columns: 1fr !important; }
    .ab-story-grid,
    .ab-stats-grid,
    .ab-values-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .ct-cards-grid,
    .ct-main-grid { grid-template-columns: 1fr !important; }
}

/* =============================================
   MOBILE: 480px breakpoint additions
   ============================================= */
@media (max-width: 480px) {
    .ab-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .ab-values-grid { grid-template-columns: 1fr !important; }
    .hdr-cart-label { display: none; }
    .hdr-logo-tagline { display: none; }
}

/* =============================================
   GLOBAL MOBILE POLISH — ALL PAGES
   ============================================= */

/* Prevent horizontal scroll on all viewports */
html, body { overflow-x: hidden !important; max-width: 100vw; }

/* Tap target minimum 44px for touch */
@media (max-width: 768px) {
    a, button, [role="button"], input[type="submit"], input[type="button"] {
        min-height: 44px;
    }
    /* Inline links can be smaller */
    p a, li a, .ftr-links a, .arc-cat-list a,
    .woocommerce-breadcrumb a { min-height: unset; }

    /* Headings scale */
    h1 { font-size: clamp(1.5rem, 7vw, 2.5rem); }
    h2 { font-size: clamp(1.25rem, 5.5vw, 2rem); }
    h3 { font-size: clamp(1rem, 4.5vw, 1.4rem); }

    /* WP admin bar offset if logged in */
    body.admin-bar #hdr-topbar { top: 0; }
    body.admin-bar #site-header { top: 32px; }
}

@media (max-width: 480px) {
    /* Table responsive — allow horizontal scroll */
    .woocommerce table.shop_table,
    .woocommerce table.woocommerce-checkout-review-order-table {
        overflow-x: auto;
        display: block;
        width: 100%;
        -webkit-overflow-scrolling: touch;
    }

    /* WC notices — full width on small screens */
    .woocommerce-message,
    .woocommerce-error,
    .woocommerce-info {
        font-size: .82rem !important;
    }

    /* Image gallery — contain properly */
    .woocommerce-product-gallery figure img {
        max-height: 55vw !important;
        object-fit: contain !important;
    }
}

/* Admin bar correction on scroll for desktop */
@media (min-width: 601px) {
    body.admin-bar #hdr-topbar { top: 32px; }
    body.admin-bar #site-header { top: calc(32px + 32px); }
}
@media (max-width: 600px) {
    body.admin-bar #hdr-topbar { top: 0; }
    body.admin-bar #site-header { top: 32px; }
}

/* =============================================
   À PROPOS template — hide any leftover Elementor
   content (safety net; template no longer prints it)
   ============================================= */
.page-template-page-a-propos .elementor,
.page-template-page-a-propos .elementor-section-wrap,
.page-template-page-a-propos .elementor-location-single,
.page-template-page-a-propos .entry-content > .elementor { display: none !important; }
