/* ===================================================================
   beorganic.sk — final mobile/layout overrides (2026-05-10)
   Load AFTER the current /storage/kody_css/nove/beorganic-fixes1.css
   =================================================================== */

/* -------------------------------------------------------------------
   0) GLOBAL MOBILE OVERFLOW GUARD
   Goal: page itself must never widen beyond viewport, but intentional
   inner sliders/carousels can still scroll inside their own wrappers.
   ------------------------------------------------------------------- */
@media only screen and (max-width: 900px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body .wrapper,
  body .pageContent,
  body .pageContentIn,
  body .pageBodyCenter,
  body .pageBodyCenterIn,
  body .page-width,
  body .pageTitleSubFrame,
  body .main,
  body #pan_main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body img,
  body video,
  body iframe,
  body svg {
    max-width: 100% !important;
  }
}

/* -------------------------------------------------------------------
   1) COOKIE BANNER — mobile readability + non-chaotic button layout
   Based on live DOM from ce_cookie_consent.init():
   #ce-site-cookie
   .ce-site-cookie-content
   .ce-site-cookie-btns
   ------------------------------------------------------------------- */
@media only screen and (max-width: 800px) {
  #ce-site-cookie {
    left: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    width: auto !important;
    max-width: none !important;
    padding: 14px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    max-height: min(72vh, 420px) !important;
    overflow: auto !important;
    box-shadow: 0 14px 36px rgba(34, 31, 28, 0.18) !important;
  }

  #ce-site-cookie,
  #ce-site-cookie * {
    box-sizing: border-box !important;
  }

  #ce-site-cookie .ce-site-cookie-content {
    font-size: 12.5px !important;
    line-height: 1.55 !important;
    margin-bottom: 12px !important;
  }

  #ce-site-cookie .ce-site-cookie-btns {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    align-items: stretch !important;
  }

  #ce-site-cookie .ce-site-cookie-btn,
  #ce-site-cookie .ce-site-cookie-btn.ce-btn-ok,
  #ce-site-cookie .ce-site-cookie-btn.ce-btn-settings,
  #ce-site-cookie .ce-site-cookie-btn.ce-btn-no {
    width: 100% !important;
    min-width: 0 !important;
    padding: 10px 8px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }
}

@media only screen and (max-width: 520px) {
  #ce-site-cookie .ce-site-cookie-btns {
    grid-template-columns: 1fr !important;
  }
}

/* -------------------------------------------------------------------
   1b) MOBILE VIEWPORT DRIFT — homepage/root containers
   Live homepage currently contains a bad inline block with:
   width:900px + translateX(182px), which widens the whole page.
   ------------------------------------------------------------------- */
@media only screen and (max-width: 900px) {
  #page_home_out .pageBodyCenterIn,
  #page_home_out #pageBodyEditContent,
  #page_home_out #pageBodyEditContent.editContent,
  #page_home_out .pageTitleSubFrame,
  #page_home_out .pageTitleSubFrame.width1900,
  #page_home_out #mainPageProductsView {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  #page_home_out .bo-home-picked-center,
  #page_home_out .bo-why-clean-footer.bo-home-picked-center,
  #page_home_out .bo-why-clean-footer[style*="translateX"],
  #page_home_out .bo-why-clean-footer[style*="width: 900px"],
  #page_home_out .bo-why-clean-footer[style*="width:900px"] {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 28px auto 24px !important;
    padding: 0 16px !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  #page_home_out .bo-home-picked-center .bo-why-clean-p-foot,
  #page_home_out .bo-home-picked-center .bo-why-clean-p-foot > span,
  #page_home_out .bo-why-clean-footer .bo-why-clean-p-foot,
  #page_home_out .bo-why-clean-footer .bo-why-clean-p-foot > span {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
    text-align: center !important;
  }

  #page_home_out .bo-home-picked-center .bo-why-clean-p-foot:nth-child(2) > span {
    font-size: clamp(24px, 7vw, 32px) !important;
  }
}

/* -------------------------------------------------------------------
   2) MOBILE CART — real cart DOM verified from live /cart/ markup
   Goal: card-like rows, readable summary, full-width coupon controls
   ------------------------------------------------------------------- */
@media only screen and (max-width: 800px) {
  #page_cart_out .pageBodyCenterIn {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #page_cart_out .cart-panel-con {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  #page_cart_out .cart-panel-con > .panel-form,
  #page_cart_out .cart-panel-con > .summary,
  #page_cart_out .cart-panel-con > .pan_product_gift {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  #page_cart_out .cartTable {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }

  #page_cart_out .cartTable .trHeader {
    display: none !important;
  }

  #page_cart_out .cartTable .tr[class*="product_type"] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 88px !important;
    grid-template-areas:
      "name image"
      "qty image"
      "price image"
      "remove image" !important;
    gap: 10px 14px !important;
    align-items: start !important;
    padding: 16px 14px !important;
    border: 1px solid #e6dfd4 !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 8px 24px rgba(42, 37, 31, 0.06) !important;
  }

  #page_cart_out .cartTable .tr[class*="product_type"] > .td {
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  #page_cart_out .cartTable .tr[class*="product_type"] > .td.img {
    grid-area: image !important;
    justify-self: end !important;
    align-self: start !important;
  }

  #page_cart_out .cartTable .tr[class*="product_type"] > .td.quantity {
    grid-area: qty !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
  }

  #page_cart_out .cartTable .tr[class*="product_type"] > .td.price {
    grid-area: price !important;
    text-align: left !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #2d5016 !important;
    white-space: nowrap !important;
  }

  #page_cart_out .cartTable .tr[class*="product_type"] > .td.delete {
    grid-area: remove !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  #page_cart_out .cartTable .tr[class*="product_type"] > .td:not(.img):not(.quantity):not(.price):not(.delete) {
    grid-area: name !important;
  }

  #page_cart_out .cartTable .productName {
    display: block !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
    margin: 0 0 6px !important;
  }

  #page_cart_out .cartTable .cart_product_state {
    display: inline-flex !important;
    margin-top: 2px !important;
  }

  #page_cart_out .cartTable .imgCartProduct {
    width: 88px !important;
    max-width: 88px !important;
    height: 88px !important;
    max-height: 88px !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    background: #f7f2eb !important;
    padding: 6px !important;
  }

  #page_cart_out .cartTable .numberArrows {
    display: inline-flex !important;
    align-items: center !important;
  }

  #page_cart_out .cartTable .numberArrows input.textBox {
    width: 56px !important;
    min-width: 56px !important;
    height: 40px !important;
    text-align: center !important;
    font-size: 15px !important;
  }

  #page_cart_out .cartTable .productMetric {
    font-size: 13px !important;
    color: #6d665e !important;
  }

  #page_cart_out .summary {
    padding: 18px 16px !important;
    border: 1px solid #e6dfd4 !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    box-shadow: 0 8px 24px rgba(42, 37, 31, 0.05) !important;
  }

  #page_cart_out .summary .cart_navigation {
    font-size: 12px !important;
    line-height: 1.5 !important;
    margin-bottom: 14px !important;
    word-break: break-word !important;
  }

  #page_cart_out .cartSummary {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
  }

  #page_cart_out .cartSummary .total-price,
  #page_cart_out .cartSummary .total-price-vat {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
  }

  #page_cart_out .cartSummary .total-price-vat {
    font-size: 17px !important;
  }

  #page_cart_out #btn_cartOrderCheckout,
  #page_cart_out .cartButtonOrderCheckout {
    width: 100% !important;
    min-height: 46px !important;
  }

  #page_cart_out .block_cart_delta,
  #page_cart_out .block_product_gift {
    margin-top: 14px !important;
    padding: 14px 16px !important;
    border-radius: 14px !important;
    line-height: 1.45 !important;
  }

  #page_cart_out .block_discount_coupon {
    margin-top: 14px !important;
  }

  #page_cart_out .discountControls {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }

  #page_cart_out .discountControls #txtb_discount_coupon,
  #page_cart_out .discountControls #btn_discount_coupon_add {
    width: 100% !important;
    max-width: 100% !important;
  }

  #page_cart_out .discountControls #txtb_discount_coupon {
    min-height: 42px !important;
  }

  #page_cart_out .discountControls #btn_discount_coupon_add {
    min-height: 42px !important;
  }

  #page_cart_out .orderCustomerDesctiption {
    margin-top: 14px !important;
  }

  #page_cart_out .orderCustomerDesctiption textarea {
    width: 100% !important;
    min-height: 110px !important;
    box-sizing: border-box !important;
  }
}

/* -------------------------------------------------------------------
   3) HOMEPAGE REVIEWS — full text, calmer meta, larger reading space
   Live homepage currently clamps text to 6 lines and injects inline width
   ------------------------------------------------------------------- */
#page_home_out .bo-review-section .bors-track {
  align-items: stretch !important;
}

#page_home_out .bo-review-section .bors-card,
#page_home_out .bo-review-section .bors-card[style] {
  height: auto !important;
  box-sizing: border-box !important;
  padding: 22px !important;
}

#page_home_out .bo-review-section .bors-top {
  align-items: flex-start !important;
}

#page_home_out .bo-review-section .bors-meta {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  line-height: 1.4 !important;
  font-size: 12px !important;
  color: #7a7369 !important;
}

#page_home_out .bo-review-section .bors-meta strong {
  display: block !important;
  margin-bottom: 2px !important;
  font-size: 14px !important;
  color: #34312d !important;
}

#page_home_out .bo-review-section .bors-text {
  display: block !important;
  overflow: visible !important;
  max-height: none !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  white-space: normal !important;
  word-break: break-word !important;
}

@media only screen and (max-width: 900px) {
  #page_home_out .bo-review-section {
    overflow: visible !important;
    padding: 36px 16px !important;
  }

  #page_home_out .bo-review-section .bors-btn,
  #page_home_out .bo-review-section .bors-dots,
  #page_home_out .bo-review-section #borsDots {
    display: none !important;
    pointer-events: none !important;
  }

  #page_home_out .bo-review-section .bors-outer {
    display: block !important;
    overflow: visible !important;
  }

  #page_home_out .bo-review-section .bors-viewport {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    width: 100% !important;
    min-width: 0 !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #page_home_out .bo-review-section .bors-track,
  #page_home_out .bo-review-section #borsTrack {
    display: flex !important;
    gap: 12px !important;
    width: max-content !important;
    min-width: 100% !important;
    transform: none !important;
    transition: none !important;
  }

  #page_home_out .bo-review-section .bors-card,
  #page_home_out .bo-review-section .bors-card[style] {
    flex: 0 0 calc(100vw - 40px) !important;
    width: calc(100vw - 40px) !important;
    min-width: calc(100vw - 40px) !important;
    max-width: calc(100vw - 40px) !important;
    margin-right: 0 !important;
    scroll-snap-align: start !important;
  }
}

/* -------------------------------------------------------------------
   4) HOMEPAGE CUSTOMER PHOTOS — 6 cards, full image text visible
   The uploaded customer visuals already contain their testimonial text
   inside the image, so we must not crop them into a square.
   ------------------------------------------------------------------- */
#page_home_out .bo-customers-wrap {
  max-width: 1380px !important;
  margin: 0 auto !important;
}

#page_home_out .bo-customers-content {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 18px !important;
  max-width: 1320px !important;
  margin: 0 auto !important;
}

#page_home_out .bo-customers-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 20px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 10px 4px 14px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-behavior: smooth !important;
  scroll-snap-type: x mandatory !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}

#page_home_out .bo-customers-grid::-webkit-scrollbar {
  display: none !important;
}

#page_home_out .bo-customers-item {
  flex: 0 0 calc((100% - 40px) / 3) !important;
  min-width: 300px !important;
  background: #ffffff !important;
  border-radius: 24px !important;
  padding: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 12px 30px rgba(44, 56, 38, 0.08) !important;
  scroll-snap-align: start !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

#page_home_out .bo-customers-item:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 16px 34px rgba(44, 56, 38, 0.12) !important;
}

#page_home_out .bo-customers-item img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  display: block !important;
  border-radius: 16px !important;
  background: #ffffff !important;
}

#page_home_out .bo-customers-arrow {
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  border: none !important;
  background: #ffffff !important;
  color: #64775d !important;
  box-shadow: 0 10px 28px rgba(44, 56, 38, 0.12) !important;
  flex: 0 0 52px !important;
}

#page_home_out .bo-customers-arrow[disabled] {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
}

@media only screen and (max-width: 1120px) {
  #page_home_out .bo-customers-item {
    flex: 0 0 calc((100% - 20px) / 2) !important;
    min-width: 280px !important;
  }
}

@media only screen and (max-width: 800px) {
  #page_home_out .bo-customers-content {
    gap: 12px !important;
  }

  #page_home_out .bo-customers-grid {
    gap: 12px !important;
    padding-bottom: 8px !important;
  }

  #page_home_out .bo-customers-item {
    flex: 0 0 84% !important;
    min-width: 0 !important;
    border-radius: 20px !important;
    padding: 8px !important;
  }

  #page_home_out .bo-customers-item img {
    border-radius: 14px !important;
  }

  #page_home_out .bo-customers-arrow {
    display: none !important;
  }
}

/* -------------------------------------------------------------------
   5) PRODUCT LISTING — small mobile cleanup for homepage cards
   Prevent overly tall cards after quick-buy injection
   ------------------------------------------------------------------- */
@media only screen and (max-width: 800px) {
  #mainPageProductsView .c-product {
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 14px !important;
  }

  #mainPageProductsView .c-product .p-subtitle,
  #mainPageProductsView .c-product .p-desc {
    min-height: 0 !important;
  }

  #mainPageProductsView .c-product .p-desc {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
}
