/* ============ NAKEVIO Store — Mobile-first responsive overrides ============
   Breakpoints:
     ≤900px  : tablette / phablet
     ≤680px  : smartphone paysage / petit tablette
     ≤480px  : smartphone portrait standard (390–430px)
     ≤360px  : très petit écran
================================================================ */

/* ── Globals ──────────────────────────────────────────────────── */
@media(max-width:900px){
  :root{ --maxw:100%; }
  .wrap{ padding:0 22px; }
}
@media(max-width:480px){
  .wrap{ padding:0 18px; }
}
@media(max-width:360px){
  .wrap{ padding:0 14px; }
}

/* ── Header ───────────────────────────────────────────────────── */

/* Masquer la barre utilitaire sur mobile — trop dense */
@media(max-width:760px){
  .utility{ display:none; }
}

/* Header : sur mobile, la recherche passe sur sa propre ligne pleine largeur */
@media(max-width:760px){
  .hdr-main{
    padding:12px 0;
    gap:12px;
    flex-wrap:wrap;
    row-gap:10px;
  }
  .brand{ margin-right:auto; }            /* pousse les icônes à droite */
  .searchbar{
    order:3;
    flex-basis:100%;
    width:100%;
    min-width:0;
    height:44px;
    padding:0 14px;
    gap:8px;
  }
  .searchbar input{ font-size:14px; }
  .brand-word{ font-size:24px; }
  .iconbtn{ padding:6px 8px; }
  .iconbtn-label{ display:none; }
  .hdr-avatar{ width:26px; height:26px; font-size:12px; }
}

@media(max-width:480px){
  .hdr-main{ padding:10px 0; gap:10px; }
  .brand-word{ font-size:22px; letter-spacing:.12em; }
  .searchbar{ height:42px; padding:0 12px; }
  /* Cacher le bouton favoris dans le header sur très petit écran */
  .hdr-actions .iconbtn:nth-child(2){ display:none; }
}

/* ── Navigation principale ────────────────────────────────────── */
@media(max-width:900px){
  .mainnav{ display:none; }
  .burger{ display:flex; }
}

/* ── Hero ─────────────────────────────────────────────────────── */
@media(max-width:760px){
  .hero{ padding:32px 0 40px; }
  .hero-row{ grid-template-columns:1fr; gap:0; }
  .hero-art{ display:none; } /* cache l'art sur mobile, le texte suffit */
  .hero-title{ font-size:46px; margin:14px 0 18px; line-height:1.04; }
  .hero-lead{ font-size:15px; }
  .hero-cta{ flex-direction:column; gap:12px; }
  .hero-cta .btn{ width:100%; justify-content:center; }
  .hero-trust{ gap:14px; flex-wrap:wrap; }
  .hero-trust span{ font-size:12px; }
}
@media(max-width:480px){
  .hero-title{ font-size:38px; }
  .hero-lead{ font-size:14px; }
}

/* ── Tuiles catégories ────────────────────────────────────────── */
@media(max-width:760px){
  .cat-tiles{
    grid-template-columns:1fr 1fr;
    gap:14px;
    margin-top:-24px;
  }
  .cat-tile{ height:160px; }
  .cat-tile-body h3{ font-size:22px; }
}
@media(max-width:480px){
  .cat-tiles{ grid-template-columns:1fr 1fr; gap:10px; }
  .cat-tile{ height:140px; }
  .cat-tile-body{ left:14px; bottom:14px; right:14px; }
  .cat-tile-body h3{ font-size:20px; }
}

/* ── Grille produits ──────────────────────────────────────────── */
@media(max-width:760px){
  .grid-products{ grid-template-columns:repeat(2,1fr); gap:20px 12px; }
}
@media(max-width:360px){
  .grid-products{ grid-template-columns:1fr; }
}

/* ── Cartes produit : bouton ajouter toujours visible sur mobile ── */
@media(hover:none),(max-width:900px){
  .pcard-add{
    opacity:1;
    transform:none;
    font-size:11px;
    padding:10px 8px;
    letter-spacing:.08em;
  }
  .pcard-fav{
    opacity:1;
    transform:none;
  }
  /* Réduire la hauteur de l'image sur mobile */
  .pcard-media .ph{ /* height géré par l'inline style en JS */ }
}
@media(max-width:480px){
  .pcard-name{ font-size:17px; }
  .pcard-body{ padding:10px 2px 0; }
  .pcard-add{ font-size:10px; padding:9px 6px; gap:5px; }
}

/* ── Section générique ────────────────────────────────────────── */
@media(max-width:760px){
  .section{ padding:44px 0; }
  .section-head{ flex-direction:column; align-items:flex-start; gap:12px; }
  .section-title{ font-size:32px; }
}
@media(max-width:480px){
  .section{ padding:36px 0; }
  .section-title{ font-size:28px; }
}

/* ── Grille marques partenaires ───────────────────────────────── */
@media(max-width:900px){
  .brand-row{ grid-template-columns:repeat(4,1fr); gap:10px; }
  .brand-chip{ height:76px; font-size:16px; }
}
@media(max-width:680px){
  .brand-row{ grid-template-columns:repeat(3,1fr); gap:10px; }
  .brand-chip{ height:70px; font-size:15px; }
}
@media(max-width:480px){
  /* 2 colonnes — lisible sur iPhone 390/430 */
  .brand-row{ grid-template-columns:repeat(2,1fr); gap:10px; }
  .brand-chip{ height:72px; font-size:16px; border-radius:8px; }
}

/* ── Bande promo ──────────────────────────────────────────────── */
@media(max-width:760px){
  .promo-band{ grid-template-columns:1fr; }
  .promo-band-in{ padding:36px 26px; }
  .promo-band-title{ font-size:30px; }
  .promo-band-art{ display:none; }
}

/* ── Loyauté bloc ─────────────────────────────────────────────── */
@media(max-width:760px){
  .loyalty{ flex-direction:column; text-align:center; padding:28px 22px; gap:18px; }
  .loyalty-txt h3{ font-size:22px; }
}

/* ── Listing / filtres ────────────────────────────────────────── */
@media(max-width:900px){
  .listing-body{ grid-template-columns:1fr; gap:20px; }
  .listing-title{ font-size:36px; }
}
@media(max-width:760px){
  .listing-head{ flex-direction:column; align-items:flex-start; gap:14px; }
  .listing-title{ font-size:30px; }
  .listing-count{ font-size:12px; }
  .sortbox select{ font-size:13px; }
  /* Filtres en ligne horizontale scrollable */
  .filters{
    position:static !important;
    flex-direction:row;
    flex-wrap:nowrap;
    overflow-x:auto;
    gap:8px;
    padding:12px 0;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .filters::-webkit-scrollbar{ display:none; }
  .filt{ border-bottom:none; min-width:140px; }
}
@media(max-width:480px){
  .listing-title{ font-size:26px; }
}

/* ── Panier (drawer) ──────────────────────────────────────────── */
@media(max-width:760px){
  .drawer{ width:100vw; max-width:100vw; }
}
@media(max-width:480px){
  .drawer{ width:100vw; }
  .citem{ gap:12px; }
}

/* ── Checkout ─────────────────────────────────────────────────── */
@media(max-width:900px){
  .checkout-body{ grid-template-columns:1fr; }
  .co-summary{ position:static; order:0; }
  .co-main{ order:1; }
  .co-steps{ gap:8px; }
}
@media(max-width:480px){
  .co-steps span{ font-size:11px; }
  .co-steps .co-step > span:first-child{ width:22px; height:22px; font-size:11px; }
  .field-grid{ grid-template-columns:1fr; }
  .pay-grid{ grid-template-columns:1fr; }
  .co-actions{ flex-direction:column; gap:10px; }
  .co-actions .btn{ width:100%; }
}

/* ── Compte client ────────────────────────────────────────────── */
@media(max-width:760px){
  .acc-grid{ grid-template-columns:1fr; gap:18px; }
  .acc-hero{ padding-top:20px; }
}
@media(max-width:480px){
  .lc-points{ font-size:36px; }
  .acc-stats{ grid-template-columns:repeat(2,1fr); gap:10px; }
  .order-row{ flex-wrap:wrap; gap:6px; font-size:13px; }
}

/* ── Fiche produit ────────────────────────────────────────────── */
@media(max-width:760px){
  .pdp-top{ grid-template-columns:1fr; gap:28px; }
  .pdp-name{ font-size:34px; }
  .pdp-buy{ flex-wrap:wrap; gap:10px; }
  .pdp-buy .btn{ flex:1; min-width:140px; }
  .gallery{ grid-template-columns:64px 1fr; }
}
@media(max-width:480px){
  .pdp-name{ font-size:28px; }
  .pdp-tabs{ gap:0; overflow-x:auto; }
  .gallery{ grid-template-columns:1fr; }
  .gallery-thumbs{ flex-direction:row; order:1; margin-top:10px; }
  .gthumb{ width:60px; height:70px; flex-shrink:0; }
}

/* ── Footer ───────────────────────────────────────────────────── */
@media(max-width:900px){
  .ftr-main{ grid-template-columns:1fr 1fr; gap:28px; padding:40px 22px; }
  .ftr-promise{ grid-template-columns:1fr 1fr; gap:18px; padding:30px 22px; }
}
@media(max-width:680px){
  /* Colonnes de liens sur 2 colonnes ; le bloc marque prend toute la largeur */
  .ftr-main{ grid-template-columns:1fr 1fr; gap:22px 18px; padding:34px 18px; }
  .ftr-brand{ grid-column:1 / -1; }
  .ftr-news{ grid-column:1 / -1; }
  .ftr-promise{ grid-template-columns:1fr 1fr; gap:16px; }
  .ftr-bottom{ flex-direction:column; gap:10px; text-align:center; padding:18px; }
  .ftr-links{ flex-wrap:wrap; justify-content:center; gap:12px; }
  .ftr{ margin-top:50px; }
  .ftr-col h4{ margin-bottom:12px; }
  .ftr-col ul{ gap:9px; }
}
@media(max-width:480px){
  .ftr-word{ font-size:26px; }
  .ftr-main{ padding:26px 16px; gap:20px 16px; }
  .ftr-promise{ padding:22px 16px; grid-template-columns:1fr; }
  .promise-ic{ width:38px; height:38px; }
}

/* ── Carousel pub ─────────────────────────────────────────────── */
@media(max-width:760px){
  .adbox{ height:auto; border-radius:8px; }
  .ad-slide{ position:relative; grid-template-columns:1fr; }
  .ad-slide:not(.on){ display:none; }
  .ad-art{ order:0; height:160px; }
  .ad-copy{ padding:22px 22px 60px; }
  .ad-h{ font-size:26px; }
  .ad-s{ font-size:13px; }
  .ad-dots{ left:22px; bottom:20px; }
}

/* ── Auth (login / register) ──────────────────────────────────── */
@media(max-width:760px){
  .auth,.auth-reg{ grid-template-columns:1fr !important; min-height:0; }
  .auth-aside{ display:none !important; }
  .auth-form-wrap{ padding:40px 20px 60px; }
  .auth-form{ max-width:100%; }
}
@media(max-width:480px){
  .auth-title{ font-size:32px; }
  .auth-form-wrap{ padding:32px 16px 52px; }
}

/* ── Menu mobile (mnav) ───────────────────────────────────────── */
@media(max-width:900px){
  .burger{ display:flex; align-items:center; }
}
.mnav-list button{
  font-size:17px;
  padding:16px 0;
  min-height:52px; /* touch target */
}

/* ── Toast notification ───────────────────────────────────────── */
@media(max-width:480px){
  .toast{
    left:16px;
    right:16px;
    transform:translateY(20px);
    width:auto;
    font-size:13px;
  }
  .toast.on{
    transform:translateY(0);
  }
}

/* ── Touch targets minimum 44px ──────────────────────────────── */
@media(hover:none){
  .btn{ min-height:48px; }
  .btn-sm{ min-height:40px; }
  .iconbtn{ min-height:44px; min-width:44px; }
  .filt-head{ min-height:48px; }
  input,select{ min-height:44px; font-size:16px; } /* 16px évite le zoom iOS */
  textarea{ font-size:16px; }
}
