/* WERSJA MOBILNA - WINNICA GOLESZ */

#menu-mobilne {
  display: none;
}

@media screen and (max-width: 1000px) {
  body {
    width: auto;
    margin: 0;
    font-size: 16px;
  }

  #main {
    min-height: 0;
  }

  /* Ukrycie elementow wersji komputerowej */

  #main > a.naglowek-graficzny,
  #menu,
  #aktual,
  #roman,
  #paw {
    display: none;
  }

  /* Naglowek i menu mobilne */

  #menu-mobilne {
    display: block;
    padding: 12px;
    background: linear-gradient(135deg, #244522, #648044);
  }

  #menu-mobilne .nazwa-mobilna {
    display: block;
    text-align: center;
    color: #ffffcc;
    font-size: 28px;
    font-weight: bold;
    padding: 10px 0 18px;
  }

  .menu-glowne-mobilne,
  .menu-dodatkowe-mobilne {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #menu-mobilne .menu-glowne-mobilne a,
  #menu-mobilne .menu-dodatkowe-mobilne a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 5px;
    min-height: 44px;
    box-sizing: border-box;
    background: #ffffcc;
    color: #006600;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
  }

  #menu-mobilne details {
    margin-top: 10px;
    color: #ffffcc;
  }

  #menu-mobilne summary {
    cursor: pointer;
    padding: 12px;
    border: 1px solid #ffffcc;
    border-radius: 4px;
    font-weight: bold;
  }

  .menu-dodatkowe-mobilne {
    margin-top: 8px;
  }

  /* Glowna tresc */

  #tresc {
    width: auto;
    max-width: 630px;
    margin: 0 auto;
    padding: 18px 14px;
    line-height: 1.6;
    overflow-wrap: break-word;
  }

  #tresc h1 {
    padding-left: 0;
    font-size: 22px;
    line-height: 1.3;
    margin: 0 0 16px;
  }

  #tresc h1 + br,
  #tresc h1 + br + br {
    display: none;
  }

  #tresc h2 {
    font-size: 19px;
  }

  #tresc h3 {
    font-size: 17px;
  }

  #tresc img {
    max-width: 100%;
    height: auto;
  }

  #tresc img[width="190"] {
    max-width: 46%;
  }

  #tresc img[width="85"] {
    max-width: 28%;
  }

  #tresc .aktualnosci-tresc {
    padding: 12px;
  }

  #zobacz {
    margin-left: 0;
  }

  /* Tabele */

  .tabela-oferta,
  .tabela-win,
  .tabela-nagrod {
    width: 100%;
  }

  .tabela-oferta th,
  .tabela-oferta td,
  .tabela-win th,
  .tabela-win td,
  .tabela-nagrod th,
  .tabela-nagrod td {
    padding: 8px 4px;
    font-size: 12px;
    line-height: 1.4;
  }

.tabela-cennik tbody td,
.tabela-win tbody td.wino-cena,
.tabela-win:not(.tabela-koszyk) tbody td:last-child {
  font-size: 14px;
}

  .tabela-odmiany th:first-child {
    width: 30%;
  }

  .odmiana-nazwa {
    white-space: normal;
  }

  /* Stopka */

  #stopka {
    text-align: center;
    padding: 12px;
  }
}

/* Tabele odmian na malych ekranach */

@media screen and (max-width: 600px) {
  .tabela-odmiany th,
  .tabela-odmiany td {
    font-size: 11px;
    padding: 7px 3px;
  }

  .tabela-odmiany thead th {
    overflow-wrap: anywhere;
  }

  .tabela-odmiany .odmiana-etykiety {
    gap: 2px;
  }

  .tabela-odmiany .odmiana-etykiety span {
    font-size: 8px;
  }
}

/* Przewijanie szerokich tabel na telefonach */

@media screen and (max-width: 1000px) {
  .tabela-przewijana {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin: 15px 0;
  }

  .tabela-przewijana table {
    min-width: 650px;
  }

  .tabela-przewijana td,
  .tabela-przewijana th {
    font-size: 12px;
    line-height: 1.4;
  }
}

/* WINNICA GOLESZ - nowa szata mobilna */

@media screen and (max-width: 1000px) {
  #menu-mobilne {
    background: linear-gradient(0deg,#17340fe8 0%,#17340f44 100%),url('grafika/tlo-naglowka.webp') right top/cover no-repeat;
    border-bottom: 3px solid #b99a45;
  }

  #menu-mobilne .nazwa-mobilna {
    font-family: Georgia,serif;
    font-size: clamp(25px,7.5vw,42px);
    color: #fff8de;
    text-shadow: 0 2px 4px #142411;
    padding: 3px 0 24px;
    margin-bottom: 8px;
    background: url('grafika/ornament.svg') center bottom 8px/65% 13px no-repeat;
  }

  #menu-mobilne .nazwa-mobilna::before {
    content: '';
    display: block;
    width: 68px;
    height: 48px;
    margin: 0 auto 2px;
    background: url('grafika/zamek.png') center/contain no-repeat;
  }

  #menu-mobilne .menu-glowne-mobilne a,
  #menu-mobilne .menu-dodatkowe-mobilne a {
    background: linear-gradient(#fffdf3,#eee4c4);
    color: #294522;
    border: 1px solid #e0d5b3;
    border-radius: 8px;
    box-shadow: 0 2px 4px #0003;
    gap: 5px;
  }

  #menu-mobilne .menu-glowne-mobilne a::before {
    content: '';
    flex: 0 0 18px;
    height: 20px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
  }

  #menu-mobilne .menu-glowne-mobilne a:nth-child(1)::before {
    background-image: url('grafika/lisc.svg');
  }

  #menu-mobilne .menu-glowne-mobilne a:nth-child(2)::before {
    background-image: url('grafika/grono.svg');
  }

  #menu-mobilne .menu-glowne-mobilne a:nth-child(3)::before {
    background-image: url('grafika/sekator.svg');
  }

  #menu-mobilne .menu-glowne-mobilne a:nth-child(4)::before {
    background-image: url('grafika/kieliszek.svg');
  }

  #menu-mobilne summary {
    color: #fff8de;
    background: #193b1bb3;
    border-color: #e2d5ac;
    border-radius: 8px;
  }

  #tresc h1 {
    font-size: 25px;
  }

  #tresc {
    color: #30352a;
  }
}

/* Shop header: wine first, alternate every ten seconds. */

@media screen and (min-width:1001px) {
  #main > a.naglowek-graficzny {
    background: linear-gradient(0deg,#152b1644,#152b1610),url('grafika/tlo-wino-desktop.webp') center/cover no-repeat;
    animation: shop-desktop 20s steps(1,end) infinite;
  }

  #main > a.naglowek-graficzny::after {
    padding-bottom: 23px;
    background: url('grafika/sklep.svg') center bottom/260px 22px no-repeat;
    animation: shop-label 20s steps(1,end) infinite;
  }
}

@media screen and (max-width:1000px) {
  #menu-mobilne {
    background: linear-gradient(0deg,#17340fe8,#17340f22),url('grafika/tlo-wino-mobile.webp') right top/cover no-repeat;
    animation: shop-mobile 20s steps(1,end) infinite;
  }

  #menu-mobilne .nazwa-mobilna {
    background-image: url('grafika/sklep.svg');
    background-size: 75% 22px;
    animation: shop-label 20s steps(1,end) infinite;
  }
}

@keyframes shop-desktop {
  0%,100% {
    background-image: linear-gradient(0deg,#152b1644,#152b1610),url('grafika/tlo-wino-desktop.webp');
  }

  50% {
    background-image: linear-gradient(0deg,#152b1666,#152b1610),url('grafika/tlo-naglowka-desktop.webp');
  }
}

@keyframes shop-mobile {
  0%,100% {
    background-image: linear-gradient(0deg,#17340fe8,#17340f22),url('grafika/tlo-wino-mobile.webp');
  }

  50% {
    background-image: linear-gradient(0deg,#17340fe8,#17340f44),url('grafika/tlo-naglowka.webp');
  }
}

@keyframes shop-label {
  0%,100% {
    background-image: url('grafika/sklep.svg');
  }

  50% {
    background-image: url('grafika/ornament.svg');
  }
}

@media (prefers-reduced-motion:reduce) {
  #main > a.naglowek-graficzny,
  #main > a.naglowek-graficzny::after,
  #menu-mobilne,
  #menu-mobilne .nazwa-mobilna {
    animation: none!important;
  }
}

/* Mobile wine header: dedicated image, aligned to title area. */

@media screen and (max-width:1000px) {
  #menu-mobilne {
    background-color: #17340f;
    background-repeat: no-repeat;
    background-image: linear-gradient(0deg,#17340f 0%,#17340f 43%,#17340f22 100%),url('grafika/tlo-wino-mobile.webp');
    background-size: 100% 100%,100% auto;
    background-position: center,center top;
    animation: shop-mobile-framing 20s steps(1,end) infinite;
  }
}

@keyframes shop-mobile-framing {
  0%,100% {
    background-image: linear-gradient(0deg,#17340f 0%,#17340f 43%,#17340f22 100%),url('grafika/tlo-wino-mobile.webp');
    background-size: 100% 100%,100% auto;
    background-position: center,center top;
  }

  50% {
    background-image: linear-gradient(0deg,#17340fe8,#17340f44),url('grafika/tlo-naglowka.webp');
    background-size: cover,cover;
    background-position: right top,right top;
  }
}

/* Zdjecia i podpisy na malych ekranach */

@media screen and (max-width: 600px) {
  #tresc table[align="right"]:has(img),
  #tresc table[align="left"]:has(img) {
    float: none;
    clear: both;
    width: auto;
    max-width: 100%;
    margin: 14px auto;
  }

  #tresc img[align="right"],
  #tresc img[align="left"] {
    float: none;
    clear: both;
    display: block;
    margin: 14px auto;
  }
}

/* Grudniowy baner - wersja mobilna */

@media screen and (max-width: 600px) {
  .baner-grudzien {
    margin: 15px 0 20px;
    padding: 30px 22px 35px;
    background-size: cover;
  }

  #tresc .baner-grudzien h2 {
    font-size: 20px;
  }

  .grudzien-korzysc {
    font-size: 36px;
  }

  .grudzien-warunek {
    font-size: 16px;
  }

  .grudzien-zestaw {
    font-size: 14px;
  }

  .grudzien-termin {
    font-size: 13px;
  }

  #tresc a.grudzien-przycisk {
    font-size: 15px;
    padding: 12px 22px;
  }
}

/* KOSZYK WIN - WERSJA MOBILNA */

@media screen and (max-width: 600px) {
  .tabela-koszyk th,
  .tabela-koszyk td {
    padding: 8px 3px;
    font-size: 11px;
  }

  .tabela-koszyk tbody td.wino-cena {
    font-size: 13px;
  }

  .tabela-koszyk .wino-ilosc {
    width: 48px;
  }

  .wino-ilosc input {
    width: 46px;
    min-height: 44px;
    padding: 4px 2px;
    font-size: 16px;
  }

  .tabela-koszyk .wino-polecamy {
    display: block;
    width: fit-content;
    margin: 4px 0 0;
    font-size: 8px;
  }

  .koszyk-podsumowanie {
    width: 95%;
    margin: 10px auto;
    padding: 8px 12px;
    font-size: 13px;
  }

  .koszyk-pozycja {
    padding: 2px 0;
  }

  .koszyk-razem {
    margin-top: 5px;
    padding-top: 7px;
    font-size: 16px;
  }

  #koszyk-informacja {
    margin-top: 6px;
    font-size: 11px;
  }

@media screen and (min-width: 601px) and (max-width: 1000px) {
  .koszyk-podsumowanie {
    width: 75%;
  }
}