/* atopik child theme – loaded after classic's theme.css and brand.css */

/* FONT: Noto Sans like the old shop (classic 9 switched to Manrope); files from the old theme, SIL Open Font License */
@font-face { font-family: "Noto Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url(../fonts/NotoSans-Regular.woff2) format("woff2"), url(../fonts/NotoSans-Regular.woff) format("woff"); }
@font-face { font-family: "Noto Sans"; font-weight: 700; font-style: normal; font-display: swap;
  src: url(../fonts/NotoSans-Bold.woff2) format("woff2"), url(../fonts/NotoSans-Bold.woff) format("woff"); }
@font-face { font-family: "Noto Sans"; font-weight: 400; font-style: italic; font-display: swap;
  src: url(../fonts/NotoSans-Italic.woff2) format("woff2"), url(../fonts/NotoSans-Italic.woff) format("woff"); }
@font-face { font-family: "Noto Sans"; font-weight: 700; font-style: italic; font-display: swap;
  src: url(../fonts/NotoSans-BoldItalic.woff2) format("woff2"), url(../fonts/NotoSans-BoldItalic.woff) format("woff"); }

html, body {
  font-family: "Noto Sans", sans-serif;
}

/* GENERAL */
.h1, .h2, .h3,
.btn-primary, .btn-secondary, .btn-tertiary {
  text-transform: none;
}

.breadcrumb li:last-child {
  font-weight: bold;
}

.table-bordered, .table-bordered td, .table-bordered th {
  border: 1px solid #dee2e6;
}

/* HEADER: search bar takes the free space between logo and account/cart */
@media (min-width: 768px) {
  #header .header-nav {
    border: none;
    margin-bottom: 0;
  }

  #header .header-top {
    padding-top: 1.5rem;
    padding-bottom: 1.25rem;
  }

  #header .header-top > .container > .row:first-child {
    display: flex;
    align-items: center;
  }

  #header .header-top-right {
    display: flex;
    align-items: center;
  }

  /* classic caps the search box at 13rem */
  #header .header-top-right #search_widget {
    float: none;
    flex-grow: 1;
    min-width: 0;
    max-width: none;
  }
}

#header .user-info, #header .blockcart, #search_widget {
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) and (max-width: 991px) {
  #header {
    font-size: 0.8rem;
  }
}

/* Mobile header: menu icon | logo | account | cart */
@media (max-width: 767px) {
  #header .header-nav .mobile {
    display: flex;
    align-items: center;
  }

  #header .header-nav #menu-icon {
    margin-left: 1rem;
    padding-right: 1rem;
  }

  #header .header-nav #menu-icon .material-icons {
    line-height: normal;
  }

  #header .header-nav .top-logo {
    padding: 11px 0;
  }

  #header .header-nav #_mobile_user_info {
    margin-left: auto;
  }

  #header .header-nav .user-info {
    margin: 0;
  }

  .header-top .search-widget form {
    margin: 0;
  }
}

/* Full header in checkout (templates/checkout/checkout.tpl) */
body#checkout #header .header-nav {
  max-height: inherit;
  padding: inherit;
  border: inherit;
  margin-bottom: inherit;
  box-shadow: inherit;
}

/* MAIN MENU: top categories spread across the width, subcategories in columns */
@media (min-width: 768px) {
  #header .menu {
    width: 100%;
  }

  .top-menu[data-depth="0"] {
    display: flex;
    justify-content: space-around;
    position: relative;
  }

  .top-menu a[data-depth="0"] {
    font-weight: normal;
  }

  .top-menu[data-depth="1"] {
    column-gap: 20px;
  }

  .top-menu[data-depth="1"] > li {
    float: none !important;
    text-align: center;
  }

  .top-menu[data-depth="2"] {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .top-menu[data-depth="1"] {
    column-count: 2;
  }
}

@media (min-width: 992px) {
  .top-menu[data-depth="1"] {
    column-count: 3;
  }
}

.top-menu a[data-depth="1"], .top-menu a[data-depth="2"] {
  font-weight: normal !important;
}

.top-menu a.dropdown-submenu {
  text-transform: none;
}

/* CATEGORY TREE (left column) */
.block-categories {
  padding: 1.25rem;
}

.block-categories .category-sub-menu {
  margin-top: 0;
}

.block-categories .category-sub-menu li[data-depth="0"] > a {
  font-weight: normal;
}

/* PRODUCT LISTS: 4 per row like the old shop – full-width pages (home, product page) from tablet width,
   pages with the left column on wide screens */
@media (min-width: 768px) {
  .featured-products .products > .product {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

@media (min-width: 1200px) {
  #category #js-product-list .products > .product,
  #search #js-product-list .products > .product,
  #manufacturer #js-product-list .products > .product {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

.product-miniature .product-title {
  padding-left: 8px;
  padding-right: 8px;
}

/* PRODUCT TILES like the old shop (1.7 classic): white cards with a shadow, the photo inset, all cards in a row
   equally high with "Dodaj" at the bottom. Flexbox instead of the old fixed heights (388px), so long names don't
   overflow. Titles always take two lines, so prices line up too. */
.products > .js-product {
  display: flex;
  margin-bottom: 1.5rem;
}

.product-miniature {
  display: flex;
  width: 100%;
}

.product-miniature .thumbnail-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 0;
  padding: 8px;
  background: #fff;
  box-shadow: 2px 2px 8px 0 rgba(0, 0, 0, 0.2);
}

.product-miniature .product-description {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 0 4px;
}

.product-miniature .product-title {
  min-height: 2.8em;
}

.product-miniature .atopik-add-to-cart {
  margin-top: auto;
  padding-top: 10px;
}

/* Quantity + "Add" in product lists (templates/catalog/_partials/miniatures/product.tpl) */
.atopik-add-to-cart {
  margin: 10px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.atopik-add-to-cart .atopik-qty {
  width: 3.5rem;
  margin-right: 5px;
  padding: 0.4rem 0;
  text-align: center;
}

/* The quantity box gives way when space is short, never the button's text */
.atopik-add-to-cart .add-to-cart {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Narrow tiles ("Inni klienci kupili też" in the cart and the popup: 4 in a row in part of the page, 130–160px):
   quantity and "Dodaj" (181px, or ~150px with the box shrunk) stuck out of the card on both sides. The tile is a
   size container measured inside its padding: below 160px the button gets slimmer, below 150px it loses the cart
   icon and the quantity box narrows. Category pages (168px and wider) don't reach these sizes and stay as they are. */
.product-miniature .thumbnail-container {
  container: tile / inline-size;
}

@container tile (max-width: 160px) {
  .atopik-add-to-cart .add-to-cart {
    padding-right: 0.625rem;
    padding-left: 0.625rem;
  }
}

@container tile (max-width: 150px) {
  .atopik-add-to-cart .atopik-qty {
    width: 2.75rem;
  }

  .atopik-add-to-cart .add-to-cart .material-icons {
    display: none;
  }
}

/* RECOMMENDATION TABS (assets/js/custom.js) */
.recommendation-tab-list {
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  padding: 0;
  font-weight: bold;
  list-style: none;
}

.recommendation-tab-list li {
  margin: 0 10px 0.5rem 0;
  text-align: center;
}

.recommendation-tab-list li button,
.recommendation-tab-list li span {
  color: #7a7a7a;
  font-weight: bold;
}

.recommendation-tab-list li.active button,
.recommendation-tab-list li.active span {
  color: #0a507d;
}

/* Inactive tabs switch the list on click: show it like a link */
.recommendation-tab-list li:not(.active) button {
  cursor: pointer;
}

.recommendation-tab-list li:not(.active) button:hover {
  color: #0a507d;
}

.recommendation-tabs > section {
  display: none;
}

.recommendation-tabs > section.active {
  display: block;
}

#product-recommendations,
#homepage-recommendations {
  margin-top: 30px;
}

#homepage-recommendations .recommendation-tab-list {
  margin-bottom: 25px;
  font-size: 20px;
}

@media (max-width: 767px) {
  .recommendation-tab-list li button,
  .recommendation-tab-list li span {
    font-size: 15px;
  }
}

.featured-products .products-section-title {
  margin-top: 0;
}

/* PRODUCT PAGE */
.product-prices .current-price-value {
  font-size: 3em;
  color: #232323;
}

.product-prices .current-price-netto {
  margin-left: 0.25rem;
  color: #0a507d;
  font-weight: 700;
  font-size: 0.875rem;
}

.quickview a .h1:hover {
  color: #0a507d;
}

.product-images-modal .image-caption,
#product-modal .image-caption {
  display: none;
}

/* ACCOUNT */
/* Order history: no invoice column (the shop gives paragon/faktura itself) */
#history #content .table th:nth-child(6),
#history #content .table td:nth-child(6) {
  display: none;
}

#order-detail #order-products .order-product-cover {
  width: 3.125rem;
  margin-right: 0.5rem;
}

/* BRAND LIST */
#brand-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

#brand-list .brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-basis: 200px;
  margin-bottom: 20px;
}

/* FOOTER */
#footer .h1, #footer .h2, #footer .h3 {
  text-transform: uppercase;
}

#footer {
  padding-top: 0;
}

.footer-container {
  margin-top: 0;
}

@media (min-width: 768px) {
  .footer-container {
    padding-top: 2rem;
  }
}

/* CMS page "Darmowa Dostawa Lokalna" (classes used in its content) */
.local-delivery-feature {
  text-align: center;
  margin-bottom: 20px;
}

.local-delivery-feature img {
  width: 40%;
}

.local-delivery-feature h3 {
  font-size: 20px;
  margin-top: 8px;
}

#local-delivery-map {
  text-align: center;
  margin-top: 40px;
}

#local-delivery-map p {
  padding: 10px;
}

#local-delivery-description {
  padding-left: 15px;
  padding-right: 15px;
}

#local-delivery-attribution, #local-delivery-attribution a {
  color: lightgray;
}

/* "Inni klienci kupili też" in the add-to-cart popup (ps_crossselling on displayCartModalFooter): same side padding as the popup */
#blockcart-modal [data-type="crossselling"] {
  padding: 0 1.875rem 1rem;
}

/* MAIN MENU: the dropdown opens and closes instantly. Classic fades it out over 0.5 s and it stays hoverable
   meanwhile, so moving the mouse back over it reopened it (the old shop's menu had no fade either). */
#_desktop_top_menu .top-menu .sub-menu {
  transition: none;
}
