/* Kolyne Mobile UX 1.0.1 - agisce solo sotto i 768px */
@media (max-width: 767.98px) {

  /* ---------- 1. Intestazione compatta ---------- */
  #header .k-header-main {
    grid-template-columns: minmax(0, 1fr) 44px 44px 52px !important;
    padding-top: 4px !important;
    padding-bottom: 6px !important;
    row-gap: 2px;
  }
  #header .k-header-main .k-brand { grid-area: 1 / 1 !important; }
  #header .k-header-main .k-brand img { height: 40px; width: auto; }
  #header .k-header-main .kc-favorites-link {
    grid-area: 1 / 2 !important;
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0 !important;
    font-size: 0 !important;
    line-height: 1;
    text-decoration: none;
    color: #2d2627;
  }
  #header .k-header-main .kc-favorites-link::before {
    content: "\2661";
    font-size: 25px;
    line-height: 1;
  }
  #header .k-header-main .kc-favorites-link [data-kc-count] {
    position: absolute;
    top: 3px;
    right: 0;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: #63243b;
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 17px;
    text-align: center;
  }
  #header .k-header-main .kc-favorites-link [data-kc-count].kmux-zero { display: none; }
  #header .k-header-main .k-language { grid-area: 1 / 3 !important; }
  #header .k-header-main .k-cart { grid-area: 1 / 4 !important; }
  #header .k-header-main .k-search { grid-area: 2 / 1 / auto / -1 !important; }
  #header .k-search #k-search-input {
    height: 38px;
    min-height: 0;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }
  #header .k-search button {
    height: 38px !important;
    min-height: 0;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }
  #header .k-browse-inner > a,
  #header .k-browse-inner > button {
    min-height: 42px;
    height: 42px;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
  }

  /* ---------- 2. WhatsApp e iubenda: piccoli, in basso a sinistra ---------- */
  #kolyne-whatsapp-contact {
    left: 50px !important;
    right: auto !important;
    bottom: calc(10px + var(--kmux-bar, 0px)) !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 0 !important;
  }
  #kolyne-whatsapp-contact svg,
  #kolyne-whatsapp-contact img { width: 24px !important; height: 24px !important; }
  #kolyne-whatsapp-contact .kolyne-whatsapp-contact__label { display: none !important; }
  html body .iubenda-tp-btn.iubenda-cs-preferences-link[data-tp-float][data-tp-float][data-tp-float] {
    left: 0 !important;
    right: auto !important;
    bottom: calc(0px + var(--kmux-bar, 0px)) !important;
    margin: 15px 10px !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 0 !important;
    background-size: 22px auto !important;
    opacity: .9;
  }
  /* mentre si scorre verso il basso spariscono, cosi' non coprono prezzi e pulsanti;
     tornano scorrendo verso l'alto, in cima e in fondo alla pagina (1.0.1) */
  #kolyne-whatsapp-contact {
    transition: background-color .15s, box-shadow .15s, transform .25s ease, opacity .25s ease !important;
  }
  html body .iubenda-tp-btn.iubenda-cs-preferences-link[data-tp-float][data-tp-float][data-tp-float] {
    transition: transform .25s ease, opacity .25s ease !important;
  }
  html.kmux-float-off #kolyne-whatsapp-contact,
  html.kmux-float-off body .iubenda-tp-btn.iubenda-cs-preferences-link[data-tp-float][data-tp-float][data-tp-float] {
    transform: translateY(160%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* ---------- 3. Categorie: prodotti prima della descrizione ---------- */
  body.page-category #main { display: flex; flex-direction: column; }
  body.page-category #main > * { min-width: 0; }
  body.page-category #js-product-list-header,
  body.page-category #js-product-list-header > .k-category-header,
  body.page-category .k-category-header > .k-category-heading,
  body.page-category .k-category-heading > .k-category-copy { display: contents; }
  body.page-category .k-category-copy > h1 { order: 1; margin-bottom: 10px; }
  body.page-category #subcategories { order: 2; margin-bottom: 6px; }
  body.page-category .kmux-color-jump { order: 3; }
  body.page-category #products { order: 4; }
  body.page-category #category-description { order: 5; margin-top: 8px; margin-bottom: 20px; }
  body.page-category #js-product-list-header > .kc-discovery { order: 6; scroll-margin-top: 150px; }
  body.page-category #main > *:not(#js-product-list-header):not(#products):not(.kmux-color-jump) { order: 7; }

  /* sottocategorie su una riga scorrevole */
  body.page-category #subcategories .subcategory-heading { display: none; }
  body.page-category #subcategories .k-subcategory-list {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -16px !important;
    padding: 2px 16px 6px !important;
  }
  body.page-category #subcategories .k-subcategory-list::-webkit-scrollbar { display: none; }
  body.page-category #subcategories .k-subcategory-list > li {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
  }
  body.page-category #subcategories .k-subcategory-list > li > a {
    padding: 8px 14px !important;
    min-height: 40px;
    gap: 8px !important;
    white-space: nowrap;
    border-radius: 999px;
  }
  body.page-category .kmux-color-jump {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    margin: 2px 0 12px;
    padding: 8px 14px;
    min-height: 40px;
    border: 1px solid #e6d7de;
    border-radius: 999px;
    background: #fff;
    color: #63243b;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
  }
  body.page-category .kmux-color-jump i {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: conic-gradient(#c2185b, #f4b6c2, #e8c39e, #7b1e3a, #3d2a5c, #c2185b);
  }
  body.page-category #js-product-list-top.k-catalog-toolbar { margin-top: 0; }

  /* ---------- 4. Scheda prodotto: barra fissa in basso ---------- */
  .kmux-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid #e5dbd7;
    box-shadow: 0 -4px 16px rgba(45, 38, 39, .10);
    transform: translateY(110%);
    transition: transform .22s ease;
  }
  .kmux-bar.kmux-on { transform: translateY(0); }
  .kmux-bar[hidden] { display: none; }
  .kmux-bar-price {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    color: #63243b;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
  }
  .kmux-bar-price s {
    color: #8a7d80;
    font-size: 12px;
    font-weight: 400;
  }
  .kmux-bar-btn {
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    padding: 0 12px;
    border: 1px solid #63243b;
    border-radius: 12px;
    background: #63243b;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.1;
    cursor: pointer;
  }
  .kmux-bar-btn:active { opacity: .85; }
  body.kmux-has-bar { padding-bottom: 66px; }
}

@media (min-width: 768px) {
  .kmux-bar, .kmux-color-jump { display: none !important; }
}
