.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: calc(var(--top-height, 40px) + 1rem);
    left: 21px;
    width: 33px;
    height: 32px;
    cursor: pointer;
    z-index: 1000;
    background: rgba(10, 160, 255, 0.9);
    border-radius: 5px;
    padding: 3px 5px;
    box-sizing: border-box;
    border:0px solid #ccc;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
}

.mobile-menu-toggle span,
.mobile-menu-toggle div
 {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: 0.3s;
    transform-origin: center;
    border-radius:2px;
}

.mobile-menu-toggle.active *:nth-child(1) {
    transform: rotate(45deg) translate(4.8px, 4.8px);}
.mobile-menu-toggle.active *:nth-child(3) {
    transform: rotate(-45deg) translate(4.8px, -4.8px);
}
.mobile-menu-toggle.active *:nth-child(2) {
    opacity: 0;
}



/*
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .mobile-menu-overlay {
        display: none;
    }
    
    .item {
        width: 48%;
        margin: 1%;
        float: left;
    }
    
    #content {
        width: 75%;
    }
    
    #left {
        width: 23%;
        position: static;
        box-shadow: none;
    }
    
    #user {
        float: right;
        width: auto;
    }
    
    ul.mainmenu {
        display: block;
    }
}
*/

  
@media screen and (max-width: 768px) {    
    .mobile-menu-toggle {
        display: block;
    }

    body {
        font-size: 16px;
        line-height: 1.4;
        margin: 0;
        padding: 0;
    }
    
    .w40{
      width: 100%;
    }
    
    .orderPaymentDelivery {
        flex-direction: column;
        gap: 15px;
    }
    
    .orderPaymentDelivery .orderPayment,
    .orderPaymentDelivery .orderDelivery {
        width: 100%;
        flex: none;
    }
    #sliderWrap{
      display: none;
    }
    
    #menubar {
      height:auto;
    }    
    #topcontent, #page, #header, .footcols, .footer1, .footer2, .footer3, .footer3c, ul.mainmenu, .social {
        max-width: 100%;
        width: 98%;
        margin: 0 auto;
        padding: 0 1%;
    }
    #page {
      overflow: initial !important;
    }
    
    #header {
        min-height: 120px;
        position: relative;
        padding: 10px 0;
        display: block;
    }
    
    .header-top-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 15px;
        position: relative;
    }
    
    #logo {
        width: 50%;
        text-align: right;
        margin: 0;
        margin-right: 0px;
        padding: 0;
        float:right;
        border: 0px solid white;
    }
    
    #logo img.logo {
        width: 100%;
        max-width: 280px;
        height: auto;
    }
    
    #user #cart {
        display: flex;
        align-items: center;
        background: transparent;
        border: none;
        padding: 8px 0;
        margin: 0;
        font-size: 18px;
        font-weight: bold;
        color: #3c6885;
        text-decoration: none;
        position: relative;
        background-image: url('../graphics/cart1a.png');
        background-repeat: no-repeat;
        background-position: left center;
        background-size: 24px 24px;
        padding-left: 30px;
    }
    
    .header-bottom-row {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        flex-wrap: wrap;
        clear: both;
    }
    
    #user {
        display: block;
        margin-right:0;
        background: transparent;
        margin-top: 0px;
        margin-bottom: 14px;
    }
    
    #user .loginForm {
        display: flex;
        align-items: center;
        gap: 6px;
        order: 1;
        clear: both;
    }
    
    #user .lfi {
        width: 80px;
        height: 34px;
        padding: 5px 6px;
        border: 1px solid #ddd;
        border-radius: 5px;
        font-size: 13px;
        box-sizing: border-box;
        line-height: 22px;
        font-family: inherit;
    }
    
    #user .loginButton {
        height: 34px;
        padding: 5px 10px;
        border: 1px solid #3BB6ED;
        background: #3BB6ED;
        font-weight: normal;
        color: white;
        border-radius: 5px;
        font-size: 13px;
        cursor: pointer;
        box-sizing: border-box;
        line-height: 22px;
        font-family: inherit;
        text-transform: uppercase;
    }
    
    #user #register {
        display: inline-block;
        height: 34px;
        padding: 5px 10px;
        background: #eefaff;
        color: #3c6885;
        border: 1px solid #ddd;
        border-radius: 5px;
        font-size: 13px;
        font-weight: normal;
        text-decoration: none;
        background-image: none;
        order: 2;
        box-sizing: border-box;
        line-height: 22px;
        vertical-align: top;
        font-family: inherit;
        text-transform: uppercase;
        margin: 0px 0px 0px 8px;
    }
        
    #user #profile, #user #logout {
    	font-size: 14px;
    	color: #3c6885;
    	padding: 4px 8px;
    	margin: 0 2px;
    	order: 3;
    	min-width: 100px;
    	line-height: 30px;
    }

    #user #profile {
      padding-left: 32px;
    }

    #user #logout {
    	width: 90px;
    }

        
    ul.mainmenu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        margin: 1px 0;
        padding: 15px 0;
        background: #f8f8f8;
        border-radius: 5px;
        height: auto;
    }
    
    ul.mainmenu li {
        margin: 3px;
    }
    
    ul.mainmenu li a {
        padding: 12px 15px;
        margin: 0;
        background: white;
        border: 1px solid #ddd;
        border-radius: 10px;
        font-size: 13px;
        color: #3c6885;
        text-transform: uppercase;
        font-weight: normal;
        display: inline-block;
        line-height: 10px;
        text-align: center;
        white-space: nowrap;
    }
    
    ul.mainmenu li a:hover {
        background: #3c6885;
        color: white;
    }
    
    #left {
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        min-width: 280px;
        height: 100vh;
        background: white;
        z-index: 999;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
        transition: left 0.3s ease-in-out;
        padding: 20px;
        text-align: left;
    }
    
    #left.active {
        left: 0;
    }
    
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 998;
        display: none;
    }
    
    .mobile-menu-overlay.active {
        display: block;
    }
    #content {
        width: 100%;
        float: none;
        margin: 0;
        padding: 8px 6px;
        min-height: auto;
    }
    
    #page {
        margin: 10px 0;
        padding: 0;
    }

    body.eshop-modern #content h1.eshop-page-heading.catHeading,
    body.eshop-modern #content h2.eshop-page-heading,
    body.eshop-modern #items > h2.eshop-page-heading,
    body.eshop-modern #itemsList > h1.eshop-page-heading,
    body.eshop-modern #itemsList > h2.eshop-page-heading {
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    body.eshop-modern #content h1.eshop-page-heading.catHeading .eshop-page-heading__main,
    body.eshop-modern #content h2.eshop-page-heading .eshop-page-heading__main,
    body.eshop-modern #items > h2.eshop-page-heading .eshop-page-heading__main,
    body.eshop-modern #itemsList > h1.eshop-page-heading .eshop-page-heading__main,
    body.eshop-modern #itemsList > h2.eshop-page-heading .eshop-page-heading__main {
        flex: 0 1 auto;
        text-align: center;
    }

    body.eshop-modern #content > p.catDesc {
        text-align: center;
    }

    body.eshop-modern #items > p.catDesc {
        text-align: center;
    }
    
    .items {
        display: block;
        flex-direction: column;
    }
    
    .item {
        width: 100%;
        max-width: 100%;
        float: none;
        margin: 10px auto;
        height: auto;
        min-height: 350px;
        box-sizing: border-box;
    }

    /* výpis produktů: užší karty, centrované; větší prostor pro obrázek */
    #items {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 0.65rem;
        max-width: 100%;
        padding: 0 4px;
        box-sizing: border-box;
    }
    #items .item {
        min-height: 0;
        width: 100%;
        max-width: min(17.5rem, calc(100vw - 1.25rem));
        margin: 0;
        box-sizing: border-box;
    }

    #items .item .vc {
        min-height: 200px;
        height: auto !important;
    }

    #items .item .thumb {
        min-height: 168px;
        padding: 0 !important;
    }

    #items .item .thumb a.preview {
        min-height: 168px;
    }

    #items .item .thumb img:not(.video-icon),
    #items .item .vc img:not(.video-icon) {
        max-height: 200px !important;
        width: 100% !important;
        max-width: 100% !important;
        object-fit: contain;
        object-position: center top;
    }

    #items .item .thumb img.thumb-fallback {
        padding: 4px !important;
        box-sizing: border-box;
    }
    
    .catPrev{
        width:100%;
        display:grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap:6px;
        max-width:100%;
        padding:0;
    }
    .catPrev .item{
        width: 100%;
        max-width: none;
        height: auto !important;
    }
    .catPrev .item:first-child{
      display:none;
    }

    .catPrev .item .vc {
        height: auto !important;
    }
    
    .item .vc {
        width: 100%;
        height: 180px;
        display: block;
        text-align: center;
    }
    
    .item img {
        max-width: 100%;
        max-height: 180px;
        margin: auto;
    }
    
    .item a.showDetail{
        text-decoration:none;
    }
    
    .item h3 {
        height: auto;
        min-height: 50px;
        font-size: 18px;
        padding: 10px;
        text-align: center;
    }

    #items .item h3 {
        font-size: 0.88rem;
        line-height: 1.25;
        min-height: 0;
        padding: 8px 6px;
    }
    
    
    
    
    #items .item p.desc {
        width: auto;
        height: auto;
        padding: 8px 6px;
        font-size: 0.85rem;
        margin: 0 8px;
    }
    
    #items .item .price {
        font-size: 18px;
        text-align: right;
        padding: 10px 8px 10px 10px;
        width: auto;
        float: none;
        clear: none;
        margin-left:0px;
    }    

    .buy input {
    	width: 54px;
    	height: 34px;
        padding:0;
        margin-top:0px;
    }

    
    .button, #content .button {
        width: 100%;
        font-size: 16px;
        padding: 12px;
        margin: 5px 0;
        box-sizing: border-box;
        display: block;
        text-align: center;
    }
    
    .detail {
        padding: 10px;
        max-width: 100% !important;
        float: none;
    }
    
    #page .detail img.main {
        max-width: 100%;
        margin: 10px auto;
        display: block;
    }
    
    .detail .price {
        float: none;
        text-align: center;
        font-size: 22px;
        margin: 15px 0;
        clear: both;
    }
    
    .detail .buyBar {
        text-align: center;
        height: auto;
        padding: 15px;
        min-width: auto;
        width: 100%;
        box-sizing: border-box;
    }
    
    input, select, textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px;
        padding: 10px;
        margin: 5px 0;
    }
    
    #footer {
        text-align: center;
        padding: 15px;
    }
    
    .footcol {
        width: 100%;
        float: none;
        margin: 15px 0;
        height: auto;
        border: none;
        padding: 0;
    }
    
    .submenu {
        width: 100%;
        padding: 0;
        padding-bottom: 100px;
        margin-left:12px;
    }
    
    .submenu ul {
        list-style: none;
    }
    .submenu > ul > li {
    	margin-bottom: 0px;
    	margin-left: 0px;
    }
    
    .submenu li a {
        padding: 13px 0 13px 26px !important;
        border-bottom: 1px solid #eee;
        font-size: 16px;
        background-position: 10px 50%;
        display: block;
    }
    
    .submenu li li {
    	width: auto;
    	margin-left: 10px;
    }
        
    .submenu li li a {
        padding-left: 40px;
        width: auto;
    }
    
    a, button, input[type="submit"], .button {
        min-height: 34px;
        touch-action: manipulation;
    }

    #search {
        display: block;
        float: none;
        width: calc(100% - 1.25rem);
        max-width: 28rem;
        margin: 0.5rem auto;
        padding: 0;
        box-sizing: border-box;
    }

    body.eshop-modern #search.eshop-search--menubar {
        width: calc(100% - 1.25rem);
        max-width: min(28rem, calc(100% - 1.25rem));
        margin-left: auto;
        margin-right: auto;
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        transform: none;
    }

    #search .icon {
    	top: -2px;
    	left: 19px;
        zoom: 0.8;
    }
    
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Tabulky - zmenšení pomocí zoom na 98vw */
    table {
        width: 98vw;
        max-width: 98vw;
        zoom: 0.8;
        transform-origin: top left;
        margin: 0 auto;
    }

    .states{
        display: none;
    }
    
    /* Fallback pro prohlížeče bez podpory zoom */
    @supports not (zoom: 1) {
        table {
            zoom: 1;
            transform: scale(0.85);
            transform-origin: top left;
            width: 98vw;
            max-width: 98vw;
        }
    }
    
    /* Pro tabulky v kontejnerech použijeme ještě menší zoom */
    #content table,
    #page table,
    .detail table {
        zoom: 0.75;
        width: 98vw;
        max-width: 98vw;
    }
    
    @supports not (zoom: 1) {
        #content table,
        #page table,
        .detail table {
            zoom: 1;
            transform: scale(0.75);
            transform-origin: top left;
            width: 98vw;
            max-width: 98vw;
        }
    }
    
    table, table * {
        box-sizing: border-box;
    }

    table.cart td{
        padding: 4px;
    }
    table.cart .price.novat,
    table.cart .invoice{
        display: none;
    }
    
    img {
        height: auto;
        max-width: 100%;
    }
    
    #floatbox {
        display: none !important;
    }
    
    .inputRow input{
      width:auto;
    }
    #switchShipping{
      width:20px;
    }
    
    .biyond-guide {
        padding:5px;
    }
    .biyond-guide .modules-grid {
        gap: 5px;
        margin: 5px 0;
    }

    .biyond-guide .biyond-inputRow {
    	display: block;
    	width: 100%;
    }

    .biyond-guide .biyond-input {
    	width: 100%;
        line-height:2rem;
    }

    .biyond-guide .biyond-submit {
    	padding: 20px;
    	float: none;
    	margin-top: 10px;
    	width: 100%;
    } 
     
    .biyond-guide a.button{ 
       float:left; 
       width:auto; 
       margin:20px 0 0 0 !important; 
    } 
    .code-clear{ 
    	width: 100%; 
    }

    .biyond-guide .module-item {
        flex: 0 0 40vw;
    }
    .biyond-guide .module-item label {
        padding: 5px;
    }
    .biyond-guide>p{
        line-height: 2rem !important;
    }
    .biyond-guide .module-image {
        height: 150px;
        border-radius: 5px;
        margin-bottom: 5px;
    }
    
    /* Mobilní verze košíku */
    .cart-item-mobile {
        border: 1px solid #dfdfdf;
        margin-bottom: 10px;
        padding: 8px;
        background: #fff;
        border-radius: 5px;
    }
    
    .cart-item-row {
        display: flex;
        gap: 10px;
        align-items: flex-start;
    }
    
    .cart-item-preview {
        flex: 0 0 auto;
    }
    
    .cart-item-preview img {
        max-width: 70px;
        max-height: 70px;
        border: 1px solid #ddd;
        border-radius: 3px;
    }
    
    .cart-item-info {
        flex: 1 1 auto;
        min-width: 0;
    }
    
    .cart-item-name {
        font-weight: bold;
        margin-bottom: 8px;
        font-size: 15px;
        line-height: 1.3;
    }
    
    .cart-item-name a {
        color: #3c6885;
        text-decoration: none;
    }
    
    .cart-item-controls {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .cart-item-qty-row {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .cart-item-qty-label {
        font-size: 13px;
        color: #666;
        flex: 0 0 auto;
    }
    
    .cart-item-qty-row .buy {
        flex: 0 0 auto;
    }
    
    .cart-item-qty-row .buy input {
        width: 55px;
        font-size: 15px;
        padding: 5px;
        box-sizing: border-box;
    }
    
    .cart-item-remove {
        flex: 0 0 auto;
        margin-left: auto;
    }
    
    .cart-item-remove a {
        display: block;
        width: 28px;
        height: 28px;
        line-height: 28px;
        text-align: center;
        color: #a00;
        font-size: 18px;
        text-decoration: none;
        border: 1px solid #ddd;
        border-radius: 3px;
    }
    
    .cart-item-remove a:hover {
        background: #fee;
    }
    
    .cart-item-price-row {
        display: flex;
        align-items: center;
        gap: 8px;
        justify-content: flex-start;
    }
    
    .cart-item-price-row .price-label {
        font-size: 13px;
        color: #666;
        flex: 0 0 auto;
    }
    
    .cart-item-price-row .price-value {
        font-size: 17px;
        font-weight: bold;
        color: #3c6885;
        flex: 0 0 auto;
    }
    
    .cart-summary-mobile {
        border: 1px solid #dfdfdf;
        padding: 15px;
        margin: 20px 0;
        background: #f9f9f9;
        border-radius: 5px;
    }
    
    .cart-summary-row {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #eee;
    }
    
    .cart-summary-row:last-child {
        border-bottom: none;
    }
    
    .cart-summary-total {
        font-weight: bold;
        font-size: 18px;
        padding-top: 10px;
        margin-top: 5px;
        border-top: 2px solid #3c6885;
    }
    
    .cart-shipping-info {
        margin: 15px 0;
        padding: 10px;
        background: #e8f4f8;
        border-left: 3px solid #3c6885;
        border-radius: 3px;
    }
}


@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    #logo img.logo {
        max-width: 200px;
    }
    
    .item h3 {
        min-height: 40px;
    }
    
    .item .price {
        font-size: 16px;
    }
    
    .detail .price {
        font-size: 20px;
    }
    
    h1 { font-size: 20px; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }
    
    #content h1 {
        font-size: 22px;
    }
    
    #user .lfi {
        width: 70px;
    }
    
    .desc .flex{
      display:block;
    }
    
  #content .detail img.main {
  	max-width: 90vw !important;
  }
  
  /* Úprava mobilního košíku pro velmi malé obrazovky */
  .cart-item-mobile {
      padding: 6px;
      margin-bottom: 8px;
  }
  
  .cart-item-preview img {
      max-width: 60px;
      max-height: 60px;
  }
  
  .cart-item-name {
      font-size: 14px;
      margin-bottom: 6px;
  }
  
  .cart-item-qty-row .buy input {
      width: 50px;
      font-size: 14px;
      padding: 4px;
  }
  
  .cart-item-price-row .price-value {
      font-size: 16px;
  }
       
}


@media screen and (max-width: 400px) {
        .header-bottom-row {
            justify-content: center;
            flex-direction: column;
            gap: 10px;
        }
        
        #user .loginForm {
            order: 1;
        }
        
        #user #register {
            order: 2;
        }
    }

/* Úzké okno + eshop-modern: userbar bez „karty“, přes šířku, prvky v jednom řádku (jen mobil) */
@media screen and (max-width: 768px) {
  body.eshop-modern #topcontent {
    width: 100%;
    max-width: 100%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    box-sizing: border-box;
  }

  body.eshop-modern #user.eshop-userbar {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    float: none;
    clear: both;
    margin: 0.35rem 0 0.5rem;
    margin-right: 0;
    padding: 0 !important;
    gap: 0.35rem 0.5rem;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  body.eshop-modern #user.eshop-userbar:not(:has(.eshop-loginTable)) {
    flex-wrap: nowrap;
  }

  body.eshop-modern #user.eshop-userbar:has(.eshop-loginTable) {
    flex-wrap: wrap;
  }

  body.eshop-modern #user.eshop-userbar .eshop-userbar__main,
  body.eshop-modern #user.eshop-userbar .eshop-userbar__commerce {
    flex-wrap: wrap;
  }

  body.eshop-modern #user.eshop-userbar:not(:has(.eshop-loginTable)) .eshop-userbar__main,
  body.eshop-modern #user.eshop-userbar:not(:has(.eshop-loginTable)) .eshop-userbar__commerce {
    flex-wrap: nowrap;
  }

  body.eshop-modern #user.eshop-userbar .eshop-userbar__commerce {
    margin-left: auto;
    flex: 0 0 auto;
    width: auto;
    justify-content: flex-end;
  }

  body.eshop-modern #user.eshop-userbar a,
  body.eshop-modern #user.eshop-userbar #cart {
    padding: 0.12rem 0.3rem !important;
    padding-left: 0.3rem !important;
    min-height: 0 !important;
  }

  body.eshop-modern #user.eshop-userbar #cart .eshop-cart-sum {
    flex-wrap: nowrap;
    font-size: 0.9rem;
  }

  body.eshop-modern #user.eshop-userbar .eshop-currency-switch {
    padding: 0.12rem 0.3rem !important;
  }

  body.eshop-modern #user.eshop-userbar #register {
    border: 0 !important;
    background: transparent !important;
    min-height: 0 !important;
    padding: 0.12rem 0.35rem !important;
  }

  body.eshop-modern #user.eshop-userbar a:hover {
    transform: none;
  }

  body.eshop-modern #user.eshop-userbar #profile,
  body.eshop-modern #user.eshop-userbar #logout {
    min-width: 0;
    width: auto;
    order: 0;
    padding: 0.12rem 0.3rem !important;
    padding-left: 0.3rem !important;
    line-height: 1.25;
  }

  body.eshop-modern #menubar .innerBar {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    box-sizing: border-box;
  }
}
