/* Totaci.cz / Quick.Cart 6.6. Original style.css remains unchanged. */
.qc-menu-toggle { display: none; }

@media screen and (max-width: 979px) {
  body { font-size: 16px; line-height: 1.45; }
  #container { padding-bottom: 16px; }
  #head1 .container, #head2 .container, #head3 .container,
  #body .container, #foot .container {
    width: 100%; max-width: 100%; box-sizing: border-box;
  }
  #body .container { background: #fff; }
  #column, #content { float: none; width: 100%; box-sizing: border-box; }
  #body fieldset { min-width: 0; }
  #body img { max-width: 100%; height: auto; box-sizing: border-box; }
  #content { padding: 8px 0 16px; }
  #page { width: auto; margin: 0 16px; }
  #page h1 { margin: 12px 0; padding-left: 0; font-size: 1.65em; line-height: 1.25; }
  #page div.content, #product div.content { font-size: 1em; line-height: 1.55; overflow-wrap: anywhere; }
  #page div.breadcrumb { position: static; margin: 8px 0; overflow-wrap: anywhere; }
  .message { padding: 28px 0; }
  .message h2 { font-size: 1.35em; line-height: 1.5; }
  #options { width: auto; margin: 12px 16px; }
  #options a { display: inline-block; padding: 10px; }

  /* Header and two-column top navigation. */
  #menu1 ul { margin: 6px 12px; }
  #menu1 li.lBasket { min-height: 36px; }
  #menu1 li.lBasket a { display: inline-block; min-height: 24px; }
  #menu1 li.lBasket span { color: #f4dcbc; font-size: .8em; }
  #head2 .container { height: auto; }
  #logo { float: none; padding: 16px; }
  #logo #title { float: none; }
  #logo #title a { display: block; font-size: 1em; line-height: 0; }
  #logo img { max-width: 100%; height: auto; }
  #logo #slogan { float: none; padding: 8px 0 0; font-size: .8em; }
  #head3 .container { height: auto; }
  #menu2 ul { float: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 0; }
  #menu2 li { float: none; min-width: 0; border-bottom: 1px solid #494848; }
  #menu2 li a {
    float: none; display: flex; align-items: center; justify-content: center;
    height: auto; min-height: 44px; padding: 10px 8px; box-sizing: border-box;
    font-size: .95em; text-align: center;
  }

  /* No JavaScript: the original navigation lists remain visible. */
  #column { padding: 14px 16px 0; }
  #searchForm { padding: 0 0 12px; }
  #searchForm fieldset { display: flex; gap: 8px; align-items: center; }
  #searchForm fieldset > span { flex: 1; min-width: 0; }
  #searchForm .input { width: 100%; min-height: 44px; padding: 8px; box-sizing: border-box; font-size: 16px; }
  #searchForm .submit { min-height: 44px; padding: 8px 12px; font-size: 16px; font-style: normal; }
  #menu3, #menu4 { margin: 0 0 8px; padding: 0; }
  #column .type { margin: 0; font-size: 1em; }
  #menu3.qc-menu-ready > .type, #menu4.qc-menu-ready > .type { display: none; }
  .qc-menu-ready > .qc-menu-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; min-height: 44px; padding: 10px 12px; box-sizing: border-box;
    border: 1px solid #ea9a8e; background: #d01c02; color: #fff;
    font: bold 1em Verdana, Arial, sans-serif; text-align: left; cursor: pointer;
  }
  .qc-menu-toggle::after { content: '+'; padding-left: 12px; font-size: 1.3em; line-height: 1; }
  .qc-menu-toggle[aria-expanded="true"]::after { content: '\2212'; }
  #menu3.qc-menu-ready > ul, #menu4.qc-menu-ready > ul { display: none; }
  #menu3.qc-menu-open > ul, #menu4.qc-menu-open > ul { display: block; }
  #menu3 ul, #menu4 ul { padding: 4px 0; }
  #menu3 li, #menu4 li { margin: 0 8px; padding: 0; }
  #menu3 a, #menu4 a { width: auto; min-height: 44px; padding: 10px 8px; box-sizing: border-box; overflow-wrap: anywhere; }
  .qc-menu-toggle:focus-visible, #body a:focus-visible, #header a:focus-visible,
  #body input:focus-visible, #body select:focus-visible, #body textarea:focus-visible {
    outline: 3px solid #2e6a97; outline-offset: 2px;
  }

  /* Product cards: two columns on small tablets, one on phones. */
  #products { float: none; margin: 12px 0; }
  #products ul.list { float: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  #products .list > li {
    display: flex; flex-direction: column; float: none; clear: none;
    width: auto; min-width: 0; margin: 0; padding: 16px 8px;
    box-sizing: border-box; overflow-wrap: anywhere;
  }
  #products .list > li > h2 { order: 0; font-size: 1.12em; line-height: 1.4; padding: 0 0 10px; }
  #products .list > li > .photo { order: 1; }
  #products .list > li > .description { order: 2; text-align: left; font-size: .94em; line-height: 1.55; }
  #products .description span { font-size: inherit !important; line-height: inherit !important; }
  #products .list > li > .price, #products .list > li > .noPrice { order: 3; margin-top: 14px; font-size: 1.12em; }
  #products .list > li > .basket { order: 4; width: 100%; max-width: 300px; padding: 0; margin: 10px auto 0; font-size: 1em; }
  #products li .basket a {
    display: flex; align-items: center; justify-content: center; min-height: 46px;
    padding: 10px 14px; box-sizing: border-box; background: #d01c02;
    color: #fff; font-size: 1em; line-height: 1.4;
  }
  #products li .basket a:hover, #product #box #addBasket .submit:hover { background: #a91702; }
  #products .pages, #products .pages#pagesBefore {
    float: none; clear: both; width: 100%; box-sizing: border-box;
    padding: 8px 0; font-size: .875em; line-height: 2; text-align: center;
  }
  #products .pages .viewAll { display: block; padding: 0; border: 0; }
  #products .pages .title { display: none; }
  #products .pages li { display: inline-block; padding: 0; margin: 2px; }
  #products .pages a, #products .pages strong {
    display: inline-block; min-width: 32px; min-height: 44px; padding: 0 6px;
    box-sizing: border-box; line-height: 44px;
  }
  #products #pagesBefore.qc-compact-pages .viewAll,
  #products #pagesBefore.qc-compact-pages li { display: none; }
  #products #pagesBefore.qc-compact-pages li.qc-page-current,
  #products #pagesBefore.qc-compact-pages li.qc-page-step { display: inline-block; }

  /* Product detail and its existing image gallery. */
  #product { float: none; width: auto; margin: 0 16px; overflow-wrap: anywhere; }
  #product h1 { font-size: 1.65em; line-height: 1.3; }
  #product #imagesList1, #product #imagesList2 { float: none; margin: 14px 0; text-align: center; }
  #product #imagesListPreview { float: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 12px 0; }
  #product #imagesListPreview li { margin: 0; }
  #product #box { float: none; width: 100%; margin: 16px 0; padding: 8px 12px; box-sizing: border-box; }
  #product #box #price { font-size: 1.25em; }
  #product #box #addBasket .submit {
    width: 100%; min-height: 46px; padding: 10px 14px; background: #d01c02;
    color: #fff; box-sizing: border-box; font-size: 16px;
  }
  .qc-mobile-lightbox {
    position: fixed !important; top: 50% !important; left: 50% !important;
    transform: translate(-50%, -50%); width: max-content;
    max-width: calc(100vw - 24px); max-height: calc(100vh - 24px);
    padding: 20px !important; box-sizing: border-box; overflow: auto;
  }
  .qc-mobile-lightbox > img:first-child {
    display: block; width: auto; height: auto; max-width: 100%;
    max-height: calc(100vh - 96px); object-fit: contain;
  }
  .qc-mobile-lightbox > div {
    max-width: calc(50% - 20px); height: calc(100% - 40px) !important;
  }
  .qc-mobile-lightbox > img:not(:first-child) {
    width: 32px !important; height: 32px !important; top: 0 !important; right: 0 !important;
  }
  #content .subpagesList li { width: 100%; box-sizing: border-box; }
  #filesList, #filesList li { float: none; width: auto; box-sizing: border-box; }

  /* Existing basket and checkout forms. */
  #orderedProducts { max-width: 100%; overflow-x: auto; }
  #orderedProducts table { font-size: 1em; overflow-wrap: anywhere; }
  #orderedProducts td, #orderedProducts th { padding: 8px 6px; }
  #body .input, #body select, #body textarea { max-width: 100%; box-sizing: border-box; font-size: 16px; }
  #body .submit { min-height: 44px; max-width: 100%; box-sizing: border-box; font-size: 16px; }
  #orderedProducts tbody .quantity input { width: 60px; min-height: 44px; padding: 6px; }
  #order #personalData { padding: 12px; }
  #order #personalData #setBasic, #order #personalData #setExtend { float: none; width: 100%; }
  #order #personalData label { padding: 8px 0 4px; }
  #order #personalData label span { font-size: .8em; }
  #order #personalData .input, #order #personalData #oComment { width: 100%; margin-bottom: 8px; padding: 10px; }
  #order #personalData .input { min-height: 44px; }
  #order #personalData #oComment { height: 140px; }
  #shippingAndPayments div { padding: 12px; }
  #oShippingPayment { width: 100%; min-height: 44px; }
  #order #rulesAccept th { padding: 16px 0; text-align: left; font-size: .875em; }
  #iRulesAccept { width: 22px; height: 22px; margin: 0 6px 0 0; vertical-align: middle; }
  #orderPrint dl { float: none; width: 100%; display: grid; grid-template-columns: 35% minmax(0, 1fr); }
  #orderPrint dt, #orderPrint dd { float: none; width: auto; padding: 6px; overflow-wrap: anywhere; box-sizing: border-box; }
  #foot .container { display: flex; flex-direction: column; align-items: center; padding: 16px; gap: 10px; text-align: center; font-size: .8em; }
  #copy, .foot { float: none; padding: 0; }
}

@media screen and (max-width: 599px) {
  #products ul.list { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  #products .list > li { padding: 18px 0; }

  /* If JavaScript is unavailable the original table can scroll locally. */
  #orderedProducts table { font-size: .875em; }
  #orderedProducts table.qc-mobile-table { display: flex; flex-direction: column; width: 100%; border: 0; }
  #orderedProducts .qc-mobile-table > thead {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%);
  }
  #orderedProducts .qc-mobile-table > tbody { order: 1; display: block; width: 100%; }
  #orderedProducts .qc-mobile-table > tfoot { order: 2; display: block; width: 100%; }
  #orderedProducts .qc-mobile-table > tbody > tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%; margin: 0 0 14px; padding: 10px; box-sizing: border-box;
    border: 1px solid #ddd; background: #f7f7f7;
  }
  #orderedProducts .qc-mobile-table tbody th, #orderedProducts .qc-mobile-table tbody td {
    display: block; min-width: 0; padding: 8px; border: 0; background: none; text-align: left;
  }
  #orderedProducts .qc-mobile-table tbody [data-qc-column="name"] { grid-column: 1 / -1; font-size: 1.14em; }
  #orderedProducts .qc-mobile-table tbody [data-qc-label]::before {
    content: attr(data-qc-label); display: block; margin-bottom: 4px;
    color: #666; font-size: .86em; font-weight: normal;
  }
  #orderedProducts .qc-mobile-table tbody [data-qc-column="name"]::before,
  #orderedProducts .qc-mobile-table tbody [data-qc-column="options"]::before { display: none; }
  #orderedProducts .qc-mobile-table tbody .del { padding: 0; }
  #orderedProducts .qc-mobile-table tbody .del a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
  #orderedProducts .qc-mobile-table > tfoot > tr { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
  #orderedProducts .qc-mobile-table tfoot th, #orderedProducts .qc-mobile-table tfoot td {
    display: block; min-width: 0; padding: 8px 4px; box-sizing: border-box; text-align: right;
  }
  #orderedProducts .qc-mobile-table tfoot th { flex: 1; }
  #orderedProducts .qc-mobile-table tfoot [data-qc-empty="true"] { display: none; }
  #basket .qc-mobile-table #recount td { width: 100%; }
  #basket .qc-mobile-table .buttons td, #orderedProducts .qc-mobile-table #nextStep td,
  #orderedProducts .qc-mobile-table #rulesAccept th { flex: 0 0 100%; width: 100%; }
  #basket .qc-mobile-table .submit, #orderedProducts .qc-mobile-table .nextStep .submit {
    width: 100%; margin: 0; padding: 10px 8px; font-size: 16px;
  }
  #orderPrint .summaryShippingPayment { font-size: 1em; }
}
