/* CraftPrint – poprawki widoku mobilnego (moduł cpmobile) */
img{max-width:100%}
.cp-msearch,.cp-stickybuy{display:none}

@media (max-width:767px){
  html,body{overflow-x:hidden;max-width:100%}
  body{-webkit-text-size-adjust:100%}

  /* --- górny pasek: koszyk / logowanie --- */
  #contact-header{padding:0!important}
  #contact-header .row{display:flex;align-items:center;flex-wrap:nowrap;margin:0 8px!important;min-height:40px}
  #contact-header .row>div{float:none;width:auto;max-width:none;flex:0 0 auto;padding:0}
  #contact-header .login-buttons{margin-left:auto;text-align:right}
  #contact-header a,#_mobile_cart .cart-preview>div{display:inline-block;padding:8px 6px;font-size:14px;line-height:1.2}
  #_mobile_cart .cart-preview>div{white-space:nowrap}
  #_mobile_cart i{font-size:18px;margin-right:3px}

  /* --- logo + hamburger w jednym wierszu --- */
  #header{position:relative}
  #main-header{padding:6px 0!important;min-height:0!important}
  #main-header .row{margin:0 8px!important}
  #main-header .logo{padding:0;text-align:left!important}
  #main-header .logo img{max-height:56px!important;width:auto!important;margin:0!important}
  #header>.hidden-md-up.mobile{position:absolute;right:6px;top:46px;z-index:20;height:0}
  #menu-icon{padding:10px!important;cursor:pointer}
  #menu-icon i{font-size:34px!important;line-height:1}

  /* wyszukiwarka mobilna (dodawana przez JS) */
  .cp-msearch{display:flex;margin:0 10px 8px;border:2px solid #111;border-radius:6px;background:#fff;overflow:hidden}
  .cp-msearch input{flex:1;min-width:0;border:0;padding:9px 10px;font-size:16px!important;outline:0;background:#fff}
  .cp-msearch button{border:0;background:#111;color:#ffd400;padding:0 14px;font-size:16px}

  /* menu mobilne */
  #mobile_top_menu_wrapper{margin:0!important}
  #mobile_top_menu_wrapper .top-menu a{display:block;padding:12px 14px!important;font-size:16px!important;line-height:1.3}
  #mobile_top_menu_wrapper .top-menu .sub-menu a,#mobile_top_menu_wrapper .top-menu .top-menu a{padding:10px 14px 10px 24px!important;font-size:15px!important}

  /* ikonki social – tylko na stronie głównej, nie zasłaniają treści */
  .socialmedia{right:0!important;left:auto!important;top:auto!important;bottom:120px;z-index:40}
  body:not(#index) .socialmedia{display:none!important}

  /* nagłówki stron */
  #main h1,#content-wrapper h1,#main .h1{font-size:22px!important;line-height:1.25!important;word-break:break-word}

  /* --- strona główna: kafelki kategorii po 2 w rzędzie --- */
  #our-offer .oferta-content{display:flex;flex-wrap:wrap;margin:0 4px}
  #our-offer .icon-box{flex:0 0 50%;max-width:50%;width:50%;padding:6px!important;margin:0!important}
  #our-offer .icon-box-inside{padding:6px!important;margin:0!important;height:100%}
  #our-offer .icon-box img{width:100%;height:auto}
  #our-offer .icon-title{font-size:13px!important;line-height:1.25!important;margin:4px 0 0!important;word-break:break-word}
  #our-offer .oferta h5{margin:10px 0}

  /* --- listy produktów: 2 kolumny --- */
  #js-product-list .products,.featured-products .products,.product-accessories .products{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0!important}
  #js-product-list .products:before,#js-product-list .products:after,.featured-products .products:before,.featured-products .products:after{display:none}
  .products .product-miniature{width:auto!important;max-width:none!important;margin:0!important;padding:0!important;float:none!important}
  .product-miniature .thumbnail-container{width:100%!important;height:auto!important;margin:0!important}
  .product-miniature .thumbnail-container img{width:100%;height:auto}
  .product-miniature .product-description{position:static!important;width:auto!important;height:auto!important;padding:6px!important}
  .product-miniature .product-title,.product-miniature .product-title a{font-size:13px!important;line-height:1.3!important;margin:0 0 4px!important;text-transform:none}
  .product-miniature .price{font-size:15px!important;font-weight:700}

  /* --- karta produktu --- */
  body#product h1,body#product .h1{font-size:21px!important;line-height:1.25!important;margin:10px 0!important;text-transform:none}
  body#product .product-prices{margin:6px 0!important}
  body#product .current-price span{font-size:24px}
  body#product .product-add-to-cart .add-to-cart{min-height:46px;font-size:16px}
  .product-images{overflow-x:auto;-webkit-overflow-scrolling:touch}
  #description img,.product-description img,.cms-content img,#cms img{max-width:100%!important;height:auto!important}
  #description table,.product-description table,#cms table{display:block;max-width:100%;overflow-x:auto}
  #description iframe,.product-description iframe{max-width:100%}
  .tabs .nav-tabs{display:flex;flex-wrap:wrap}
  .tabs .nav-tabs .nav-link{padding:10px 12px}

  /* przyklejony pasek „Do koszyka” (JS) */
  .cp-stickybuy{position:fixed;left:0;right:0;bottom:0;z-index:60;background:#111;color:#fff;align-items:center;gap:10px;padding:8px 10px calc(8px + env(safe-area-inset-bottom));box-shadow:0 -2px 10px rgba(0,0,0,.25);transform:translateY(110%);transition:transform .2s}
  .cp-stickybuy.cp-on{display:flex;transform:none}
  .cp-stickybuy .cp-sb-price{font-size:18px;font-weight:700;color:#ffd400;white-space:nowrap}
  .cp-stickybuy button{margin-left:auto;border:0;border-radius:6px;background:#ffd400;color:#111;font-weight:700;font-size:16px;padding:12px 18px}
  body.cp-has-sticky #footer{padding-bottom:70px}

  /* --- formularze: 16px = brak auto-zoomu na iPhone --- */
  input[type=text],input[type=email],input[type=password],input[type=tel],input[type=number],input[type=search],select,textarea{font-size:16px!important}
  .btn{min-height:44px}

  /* --- baner cookies --- */
  #jscookies{bottom:0!important;padding:10px 12px!important;z-index:70}
  #jscookies p{font-size:13px!important;line-height:1.35;margin:0 0 6px!important}
  body.cp-has-sticky #jscookies{bottom:62px!important}

  /* --- stopka --- */
  #footer a{display:inline-block;padding:5px 0}
}

/* ================= TABLETY 768–991 px ================= */
@media (min-width:768px) and (max-width:991px){
  html,body{overflow-x:hidden}

  /* koszyk: motyw przenosi go tu do kolumny wyszukiwarki, którą ukrywał – pokazujemy kolumnę */
  #main-header .search-bar{display:block!important}
  #main-header .search-bar form{display:none!important}
  #_desktop_cart .cart-preview>div{padding:8px 6px;font-size:15px;white-space:nowrap}
  #_mobile_cart{display:none!important}
  #contact-header .login-buttons{margin-left:auto;text-align:right}
  #contact-header a{display:inline-block;padding:8px 6px}

  /* wyszukiwarka (dodawana przez JS) */
  .cp-msearch{display:flex;max-width:560px;margin:0 auto 10px;border:2px solid #111;border-radius:6px;background:#fff;overflow:hidden}
  .cp-msearch input{flex:1;min-width:0;border:0;padding:10px 12px;font-size:16px!important;outline:0;background:#fff}
  .cp-msearch button{border:0;background:#111;color:#ffd400;padding:0 16px;font-size:16px}

  /* menu poziome – większe pola do kliknięcia */
  #_desktop_top_menu .top-menu[data-depth="0"]>li>a{padding:12px 8px!important}

  /* kafelki kategorii: 4 w rzędzie */
  #our-offer .oferta-content{display:flex;flex-wrap:wrap;margin:0}
  #our-offer .icon-box{flex:0 0 25%;max-width:25%;width:25%;padding:8px!important;margin:0!important}
  #our-offer .icon-box-inside{padding:8px!important;margin:0!important;height:100%}
  #our-offer .icon-box img{width:100%;height:auto}
  #our-offer .icon-title{font-size:13px!important;line-height:1.25!important;margin:6px 0 0!important;overflow-wrap:normal;word-break:normal;hyphens:auto}

  /* lewa kolumna z (bardzo długą) listą kategorii – ukryta jak na telefonie; kategorie są w menu */
  #left-column{display:none!important}
  #content-wrapper{width:100%!important;max-width:100%!important;flex:0 0 100%!important;float:none!important}
  /* „Szybki podgląd” działa na najechanie myszą – na dotyku zasłania cenę */
  .product-miniature .highlighted-informations{display:none!important}
  #js-product-list-top .sort-by-row{display:flex;align-items:center;justify-content:flex-end}

  /* listy produktów: 3 kolumny */
  #js-product-list .products,.featured-products .products,.product-accessories .products{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0!important}
  #js-product-list .products:before,#js-product-list .products:after,.featured-products .products:before,.featured-products .products:after{display:none}
  .products .product-miniature{width:auto!important;max-width:none!important;margin:0!important;padding:0!important;float:none!important}
  .product-miniature .thumbnail-container{width:100%!important;height:auto!important;margin:0!important}
  .product-miniature .thumbnail-container img{width:100%;height:auto}
  .product-miniature .product-description{position:static!important;width:auto!important;height:auto!important;padding:8px!important}
  .product-miniature .product-title,.product-miniature .product-title a{font-size:14px!important;line-height:1.3!important;text-transform:none}

  /* nagłówki i karta produktu */
  #main h1,#content-wrapper h1,#main .h1{font-size:26px!important;line-height:1.25!important;word-break:break-word}
  body#product h1,body#product .h1{font-size:24px!important;text-transform:none}
  #description img,.product-description img{max-width:100%!important;height:auto!important}
  #description table,.product-description table{display:block;max-width:100%;overflow-x:auto}

  /* social – nie zasłaniają treści poza stroną główną */
  body:not(#index) .socialmedia{display:none!important}

  input[type=text],input[type=email],input[type=password],input[type=tel],input[type=number],input[type=search],select,textarea{font-size:16px!important}
}
