/* ===========================
   Project Store – mobile.css
   =========================== */

/* --- Mobile nav tweaks --- */
.mobile-header .special-navigation .sub-toggle { background-color:#fff !important; }
.mobile-header .special-navigation .sub-toggle,
.mobile-navigation .sub-toggle{
  background:#fff !important; color:#000 !important; cursor:pointer;
  display:block; height:35px; line-height:35px; opacity:1; position:absolute;
  right:0; text-align:center; top:5px; transform:none; width:80px !important;
}
.mobile-header .special-navigation .sub-toggle i,
.mobile-navigation .sub-toggle i{
  display:inline-block; font-size:25px !important; height:35px; line-height:35px;
  transition:all .8s ease; width:40px;
}

/* Uploaded/category icons in the first level of the mobile product menu. */
.mobile-header .special-cat-menu > li > .menu-link {
  display:flex;
  align-items:center;
  gap:8px;
}
.mobile-header .special-cat-menu > li > .menu-link > .project-menu-image-icon {
  display:inline-block;
  flex:0 0 30px;
  width:30px !important;
  height:30px !important;
  margin:0;
  object-fit:contain;
}
.mobile-header .special-cat-menu > li > .menu-link > .fa {
  flex:0 0 30px;
  width:30px;
  margin:0;
  text-align:center;
}

/* --- Header on scroll --- */
@media (max-width:1024px){
  .fixed-mobile{
    position:fixed !important; width:100%; top:0; z-index:9999;
    transition:transform .3s ease, opacity .3s ease;
  }
}

/* --- Desktop/Mobile sliders switch --- */
.slider-desktop{ display:block; }
.slider-mobile { display:none; }
@media (max-width:768px){
  .slider-desktop{ display:none; }
  .slider-mobile { display:block; }
}

/* =========================================================
   ALL mobile rules consolidated in one media query (<=768px)
   ========================================================= */
@media (max-width:768px){

  /* --- Product gallery (Swiper) --- */
  .main-slider img, .thumbs-slider img{ width:100%; height:auto; }
  .main-slider .swiper-slide, .thumbs-slider .swiper-slide{ text-align:center; justify-content:center; }
  .thumbs-slider{ padding:10px 0; }

  .custom-product-gallery{ width:100%; max-width:100%; margin:0 auto; padding:0 15px; }
  .custom-product-gallery .main-slider{ margin-bottom:15px; }
  .custom-product-gallery .main-slider .swiper-slide img,
  .custom-product-gallery .thumbs-slider .swiper-slide img{ width:100%; height:auto; display:block; margin:0 auto; }
  .custom-product-gallery .thumbs-slider{ display:flex; overflow-x:auto; gap:10px; padding-bottom:10px; }
  .custom-product-gallery .thumbs-slider .swiper-slide{ width:auto !important; flex:0 0 auto; }
  .custom-product-gallery .thumbs-slider img{ max-width:100px; height:auto; border:1px solid #ccc; border-radius:5px; }
  .single-product-brand-thumb-wrapper{ margin-top:10px; text-align:center; }
  .custom-product-gallery .main-slider img{ max-height:250px; object-fit:contain; }

  /* ==============================
     DESCRIPTION TAB (id="tab-description")
     Stack text + image vertically
     ============================== */
  #tab-description table{ width:100% !important; table-layout:auto !important; border-collapse:collapse; }
  #tab-description tr{
    display:block; margin:14px 0; background:#f0f0f0; padding:12px; border-radius:8px;
  }
  #tab-description td, #tab-description th{
    display:block; width:100% !important; text-align:left !important; vertical-align:top !important;
    padding:0 !important; border:0 !important; box-sizing:border-box;
  }
  #tab-description td + td, #tab-description th + th{ margin-top:12px; }
  #tab-description img{
    max-width:100% !important; width:100% !important; height:auto !important;
    display:block; margin:8px auto 0; object-fit:contain;
  }
  #tab-description img[style*="width"]{  width:100% !important; }
  #tab-description img[style*="height"]{ height:auto !important; }
  #tab-description div[style*="margin-left"]{ margin-left:0 !important; }
  #tab-description p, #tab-description li{ word-break:break-word; }

  /* Technical tab – compact cells */
  #tab-technical_data_tab th, #tab-technical_data_tab td{ padding:6px; }

  /* Description tab: force strong inside lists to align left */
#tab-description ul li strong {
  display: block;         /* да е цял ред */
  text-align: left !important;
}


  /* ==============================
     RELATED PRODUCTS (mobile grid)
     ============================== */
  /* Разстояние преди заглавието */
  .related.products{ margin-top:20px !important; }

  /* 2 равни колони, без преливане */
  .related.products ul.products{
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0,1fr)) !important;
    grid-auto-flow:row dense !important;
    gap:12px !important;
    margin:0 !important; padding:0 !important; width:100% !important; box-sizing:border-box !important;
  }

  /* Нулиране на всички ширини/float-и (вкл. .first/.last/columns-*) */
  .related.products ul.products > li.product,
  .related.products ul.products > li.product.first,
  .related.products ul.products > li.product.last,
  .related.products ul.products.columns-3 > li.product,
  .related.products ul.products[class*="columns-"] > li.product,
  .related.products ul.products.os-mobile-col-2 > li.product,
  .related.products ul.products > li.product:nth-child(3n),
  .related.products ul.products > li.product:nth-child(3n+1){
    float:none !important; clear:none !important; display:block !important;
    width:auto !important; max-width:none !important; margin:0 !important; padding:0 !important;
    box-sizing:border-box !important; min-width:0 !important;
  }

  .related.products .product-main-wrap,
  .related.products .product-info-wrap,
  .related.products .product-thumb-wrap{
    width:100% !important; margin:0 !important; padding:0 !important; box-sizing:border-box !important;
  }

  .related.products .product-thumb-wrap img{
    display:block !important; width:100% !important; height:auto !important; max-width:100% !important; object-fit:contain;
  }

  /* Keep WooCommerce action buttons inside two-column mobile product cards. */
  .woocommerce ul.products.os-mobile-col-2 li.product,
  .woocommerce ul.products[class*="columns-"].os-mobile-col-2 li.product,
  .woocommerce ul.products.os-mobile-col-2 li.product .product-main-wrap,
  .woocommerce ul.products.os-mobile-col-2 li.product .product-info-wrap,
  .woocommerce ul.products.os-mobile-col-2 li.product .custom-cart-btn {
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }

  .woocommerce ul.products.os-mobile-col-2 li.product .product-main-wrap,
  .woocommerce ul.products.os-mobile-col-2 li.product .product-info-wrap {
    overflow:hidden;
  }

  .woocommerce ul.products.os-mobile-col-2 li.product .woocommerce-loop-product__title,
  .woocommerce ul.products.os-mobile-col-2 li.product .price,
  .woocommerce ul.products.os-mobile-col-2 li.product .price * {
    min-width:0 !important;
    max-width:100% !important;
    white-space:normal !important;
    overflow-wrap:anywhere;
    word-break:normal;
  }

  .woocommerce ul.products.os-mobile-col-2 li.product .custom-cart-btn {
    width:100% !important;
  }

  .woocommerce ul.products.os-mobile-col-2 li.product .custom-cart-btn .button,
  .woocommerce ul.products.os-mobile-col-2 li.product a.add_to_cart_button {
    display:flex !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    padding:10px 6px !important;
    box-sizing:border-box !important;
    white-space:normal !important;
    overflow-wrap:anywhere;
    word-break:normal;
    line-height:1.15 !important;
    text-align:center !important;
  }

  .attribute-column {
      flex: 1;
     padding: 0px!important;
  }
  .header-style-1 .mini-cart-open {
        width: 390px;
  }
}
