/* Cookiecraft storefront overrides — keep Spree geometry, fix only breakage.
   Do NOT override .padmenu / .clogo percentage margins on desktop. */

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Cap board like Spree .maxw; allow shrink on small screens via Spree MQ */
.container.maxw,
.container.maxw.phone {
  max-width: 980px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100%;
  box-sizing: border-box;
}

/*
 * Full horizontal menu from 992px (Bootstrap md).
 * Spree originally used 1200px — laptops/windows 1000–1199 looked "broken"
 * (hamburger + tall white drawer). Desktop geometry restored here.
 */
@media (min-width: 992px) {
  .navbar-toggle {
    display: none !important;
  }

  .navbar-collapse.collapse {
    display: block !important;
    height: auto !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
    width: auto !important;
    border-top: 0 !important;
    box-shadow: none !important;
  }

  .navbar-header {
    float: left !important;
    width: auto !important;
  }

  .navbar-nav {
    float: left !important;
    margin: 0 !important;
  }

  .navbar-nav > li {
    float: left !important;
    width: auto !important;
  }

  .navbar-nav.navbar-right {
    float: right !important;
  }

  .padmenu .navbar-nav > li > a {
    white-space: nowrap;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  /* True-center logo; size leaves a clear gap between left/right menus */
  .clogo {
    pointer-events: none;
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    width: 280px !important;
    max-width: 30% !important;
    height: 220px !important;
    min-height: 132px !important;
    margin-top: -17% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    transform: translateX(-50%) !important;
    background-size: contain !important;
  }

  .clogo a {
    pointer-events: auto;
  }

  .otstup {
    width: 100%;
    overflow: visible;
  }

  .padmenu {
    width: auto;
    max-width: 100%;
  }
}

/* Mid desktop: slightly smaller badge, same true center */
@media screen and (min-width: 992px) and (max-width: 1199px) {
  .clogo {
    margin-top: -15% !important;
    width: 240px !important;
    max-width: 28% !important;
    height: 200px !important;
  }
}

/*
 * <992: true phone/tablet hamburger.
 * Full-width white bar; logo badge centered; menu hidden until toggle.
 */
@media screen and (max-width: 991px) {
  .container.maxw.phone {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .otstup,
  .padmenu {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: visible;
  }

  .otstup:before,
  .otstup:after {
    display: none !important;
  }

  .padmenu {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .navbar-header {
    float: none !important;
    width: 100% !important;
    display: block;
    min-height: 50px;
  }

  .navbar-toggle {
    display: block !important;
    float: right !important;
    position: relative;
    z-index: 5;
    margin-right: 8px !important;
    border-color: #bbb !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .navbar-toggle:focus,
  .navbar-toggle:active,
  .navbar-toggle:hover {
    background: transparent !important;
    box-shadow: none !important;
  }

  .navbar-collapse.collapse:not(.in) {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .navbar-collapse.collapse.in,
  .navbar-collapse.collapsing {
    display: block !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    max-width: 100%;
    width: 100% !important;
    float: none !important;
    box-shadow: none;
  }

  .navbar-collapse .navbar-nav,
  .navbar-collapse .navbar-nav.navbar-right {
    float: none !important;
    margin: 0 !important;
    width: 100%;
  }

  .navbar-collapse .navbar-nav > li {
    float: none !important;
    width: 100%;
  }

  .navbar-collapse .navbar-nav > li > a {
    white-space: normal !important;
  }

  .clogo {
    width: 40% !important;
    max-width: 180px !important;
    height: 180px !important;
    min-height: 120px !important;
    background-size: contain !important;
    left: 50%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: translateX(-50%);
  }

  .contact-block,
  .cart-block {
    max-width: 100%;
    box-sizing: border-box;
  }

  #search-form {
    max-width: 100%;
    box-sizing: border-box;
  }

  #search-form .input-group {
    width: 100% !important;
    max-width: 100%;
    table-layout: fixed;
  }

  #search-form .form-control {
    width: 100% !important;
    max-width: 100%;
  }
}

/* Phone + cart side-by-side on narrow screens — shorter header than Spree stacked xs-12 */
@media screen and (max-width: 774px) {
  .contact-block,
  .cart-block {
    float: left !important;
    width: 50% !important;
    max-width: 50% !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    position: relative;
    z-index: 3;
  }

  .cart-block {
    float: right !important;
    padding-top: 12px !important;
  }

  .column > .col-md-12:has(.contact-block)::after,
  .column > .col-md-12:has(.cart-block)::after {
    content: "";
    display: table;
    clear: both;
  }

  .phonc,
  .mailc,
  .login,
  .account,
  .logout,
  .cartc,
  #search-form {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .login,
  .account,
  .logout {
    text-align: right;
    float: none !important;
    width: 100% !important;
  }

  .cartc {
    text-align: left;
  }

  .cartc img {
    margin: 0 5px 0 0 !important;
  }

  .cartc .cart-caption {
    margin: -36px 0 0 36px !important;
    font-size: 14px;
  }

  .cartc .cart-info {
    margin: 2px 0 0 36px !important;
    font-size: 12px;
  }

  #search-form {
    padding-right: 0 !important;
    margin-top: 6px !important;
  }

  .phonc {
    font-size: 12px !important;
  }

  .phonc .number,
  .mailc a {
    word-break: break-word;
    font-size: 12px;
  }

  .mailc {
    font-size: 12px !important;
    padding-top: 2px !important;
  }

  .mailc img,
  .phonc img {
    max-width: 28px;
    height: auto;
  }

  .padmenu {
    margin-top: 6% !important;
  }

  .clogo {
    width: 32% !important;
    max-width: 130px !important;
    height: 130px !important;
    min-height: 96px !important;
    margin-top: -8% !important;
  }

  .clogo .logo1 {
    margin: 10% 0 0 12% !important;
    width: 75% !important;
  }

  .clogo .logo1 img {
    max-width: 100%;
    height: auto;
  }

  .footer_small,
  .personal-data-consent,
  .processing-personal-data {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

/* Callback form — dimensions match Spree all.css; keep zero margin in flow */
#recall {
  /* Spree: width/height 300px already in all.css */
}

#recall .recall-title {
  font-weight: 800;
  color: #268d8d;
  margin-bottom: 0;
  text-align: center;
}

/* Flash notices: Spree sets position:fixed without left — they stuck over the logo. */
.alert {
  position: static !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  max-width: none;
  z-index: 10;
  clear: both;
  margin: 12px 20px 0 !important;
  box-shadow: none;
}

/* Catalog taxon tiles — Spree already styles .taxonimage; keep label overlay positioned */
.paddc {
  position: relative;
}

.paddc .bglable1 {
  position: absolute;
  top: 69%;
  left: 12%;
  right: 10%;
  z-index: 60;
}

button.prod-footer-cart-button {
  background: none !important;
  border: none;
  border-bottom: 1px solid #e74c3c;
  padding: 0 !important;
  cursor: pointer;
  color: #e74c3c;
  font-weight: 700;
  font-size: 14px;
  text-transform: none;
  font: inherit;
}

button.prod-footer-cart-button:hover {
  color: #473421;
  border-bottom-color: #473421;
}

#search-form .input-group {
  display: table;
  width: 100%;
}

#search-form .form-control {
  display: table-cell;
  width: 100%;
}

#search-form .input-group-btn {
  display: table-cell;
  width: 1%;
  white-space: nowrap;
  vertical-align: top;
}

/* News ticker — match live site teal text */
.news-ticker {
  background: transparent;
  margin: 10px;
  padding: 10px;
}

#news-container {
  margin-top: 0;
  overflow: hidden;
}

#news-container ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#news-container li {
  line-height: 1.45;
}

/* Phone number must keep Spree orange (#D35400 via .phonc), not link brown */
.phonc .number,
.phonc .number a {
  color: #d35400 !important;
  text-decoration: none;
}

.phonc .number a:hover {
  text-decoration: underline;
}

/* Product / page images */
.page-content img {
  max-width: 100%;
  height: auto;
}

/* Product gallery (nivo #slider2)
 * After init Nivo injects .nivo-main-image (relative, sets height).
 * Source imgs must stay absolute/hidden — NEVER keep :first-child in flow
 * or returning to slide 1 shows two photos stacked.
 */
#slider2.nivoSlider,
#slider2.product-gallery {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin-top: 10px;
  background: #fff;
}
#slider2.nivoSlider > img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  display: none;
}
#slider2.nivoSlider img.nivo-main-image {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  visibility: visible !important;
}
/* Before Nivo boots: show first source img so layout has height */
#slider2.nivoSlider:not(.nivoSliderDone) > img:first-of-type {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  max-width: 100%;
}
#slider2.product-gallery-single img,
#slider2.product-gallery-single img:first-child {
  position: static !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
}
#slider2 .nivo-controlNav {
  float: none;
  text-align: center;
  margin: 10px 0 0;
  padding: 0;
  clear: both;
  position: relative;
  z-index: 20;
}
#slider2 .nivo-controlNav a {
  display: inline-block;
  float: none;
  vertical-align: middle;
}
#slider2 .nivo-directionNav a {
  z-index: 30;
}
#slider2 .nivo-slice {
  z-index: 10;
}

/*
 * Mid breakpoint (775–1199): Spree uses fixed .image-box height (150px).
 * Do NOT force aspect-ratio squares here — that vertically stretches the homepage.
 */
@media screen and (min-width: 775px) and (max-width: 1199px) {
  .home-dop-tiles .image-box {
    height: 150px !important;
    overflow: visible;
    margin-bottom: 28px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .home-dop-tiles .bgprd1 {
    position: relative;
    aspect-ratio: auto !important;
    height: 100% !important;
    overflow: hidden;
    border-radius: 8px;
  }
  .home-dop-tiles .bgprd1 > img:not(.tframe) {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
  }
  .home-dop-tiles .bgprd1 > img.tframe {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: fill;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 0 0.6px rgba(71, 52, 33, 0.75));
  }
}

/* Homepage dop tiles — square only on small screens */
@media screen and (max-width: 774px) {
  .home-dop-tiles .image-box {
    height: auto !important;
    min-height: 0 !important;
    margin-bottom: 16px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .home-dop-tiles .prod1 {
    margin-top: 0;
    position: relative;
  }
  .home-dop-tiles .prod1 > a {
    display: block;
    position: relative;
  }
  .home-dop-tiles .bgprd1 {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto !important;
    overflow: hidden;
    border-radius: 10px;
    background: #f3efe8;
  }
  .home-dop-tiles .bgprd1 > img:not(.tframe) {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 10px;
  }
  .home-dop-tiles .bgprd1 > img.tframe {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: fill;
    pointer-events: none;
    z-index: 2;
    border-radius: 0 !important;
    filter: drop-shadow(0 0 0.6px rgba(71, 52, 33, 0.75)) drop-shadow(0 0 0.6px rgba(71, 52, 33, 0.45));
  }
}

/* Desktop (≥1200): unify dop tiles without blowing mid-layout */
@media screen and (min-width: 1200px) {
  .home-dop-tiles .image-box {
    height: 200px !important;
    overflow: visible;
    margin-bottom: 12px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .home-dop-tiles .prod1 {
    margin-top: 0;
    position: relative;
  }
  .home-dop-tiles .prod1 > a {
    display: block;
    position: relative;
  }
  .home-dop-tiles .bgprd1 {
    position: relative;
    aspect-ratio: auto !important;
    height: 100% !important;
    overflow: hidden;
    border-radius: 10px;
    background: #f3efe8;
  }
  .home-dop-tiles .bgprd1 > img:not(.tframe) {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 10px;
  }
  .home-dop-tiles .bgprd1 > img.tframe {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: fill;
    pointer-events: none;
    z-index: 2;
    border-radius: 0 !important;
    filter: drop-shadow(0 0 0.6px rgba(71, 52, 33, 0.75)) drop-shadow(0 0 0.6px rgba(71, 52, 33, 0.45));
  }
}
.home-dop-tiles .bglable2 {
  z-index: 3;
}

/* Product cards: fixed title band + square photo; stock badge absolute (no Spree -113% hack) */
.prodhit {
  position: relative;
  overflow: hidden;
  clear: both;
}
.prodhit > a.prodhit-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.prodhit .descr {
  height: 60px !important;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.prodhit .bgprd1 {
  position: relative;
  height: auto !important;
  overflow: hidden;
  line-height: 0;
  z-index: 1;
}
.prodhit .bgprd1 > img.prodhit-photo {
  width: 100%;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  margin: 0 !important;
}
.prodhit .bgprd1 > img.prodhit-stock {
  position: absolute !important;
  left: 4%;
  bottom: 6%;
  width: 42% !important;
  max-width: 120px;
  height: auto !important;
  margin: 0 !important;
  z-index: 3;
  pointer-events: none;
  display: block;
}
.prodhit .custom {
  display: none !important;
}

/* Kill Spree/normalize dotted focus rings on click (a:focus{outline:thin dotted}) */
a:focus,
a:active,
a:focus-visible,
button:focus,
button:active,
button:focus-visible,
.btn:focus,
.btn:active,
.btn:focus:active,
.btn:focus-visible,
input:focus,
input:focus-visible,
select:focus,
select:focus-visible,
textarea:focus,
textarea:focus-visible,
summary:focus,
[tabindex]:focus,
[tabindex]:focus-visible,
.navbar-toggle:focus,
.navbar-toggle:focus-visible,
.prodhit a:focus,
.prodhit a:active,
.prod1 a:focus,
.prod1 a:active,
.paddc a:focus,
.paddc a:active,
button.prod-footer-cart-button:focus,
button.prod-footer-cart-button:active {
  outline: 0 !important;
  outline-style: none !important;
  outline-width: 0 !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}

@media screen and (min-width: 775px) and (max-width: 1199px) {
  .prodhit .descr {
    height: 60px !important;
  }
}

/* Quantity field — Spree .form-control.quantity, fixed usable width */
#cart-form .quantity-row {
  margin: 12px 0 16px;
  overflow: hidden;
}
#cart-form .quantity-row .control-label {
  float: left;
  width: auto;
  padding-top: 7px;
  padding-right: 12px;
  text-align: left;
  font-weight: 700;
  color: #473421;
}
#cart-form input.form-control.quantity {
  float: left;
  width: 72px !important;
  min-width: 72px;
  max-width: 90px;
  height: 34px;
  padding: 6px 7px;
  display: block;
  box-sizing: border-box;
}

/* Product card footer: form itself is the gray bar (Spree float layout) */
.prodhit form.prod-footer {
  margin: 0;
  background-color: #ebebeb;
  height: 30px;
  line-height: 16px;
  overflow: hidden;
  clear: both;
  position: relative;
  z-index: 2;
}
.prodhit form.prod-footer .prod-cart-link {
  float: left;
  padding: 5px 0 5px 15px;
}
.prodhit form.prod-footer .prod-price {
  float: right;
  padding: 5px 15px 5px 0;
}

/* Recommendations — Spree #product-recommendation */
#product-recommendation .row > [class*="col-"] {
  clear: none;
}
#product-recommendation .row > [class*="col-"]:nth-child(2n+1) {
  clear: left;
}
#product-recommendation .prodhit {
  padding-bottom: 16px;
  overflow: hidden;
}
#product-recommendation .descr {
  height: 60px !important;
  overflow: hidden;
}
#product-recommendation .bgprd1 {
  height: auto !important;
}
#product-recommendation .prod-price {
  font-size: 12px;
}
#product-recommendation .prod-footer-cart-button {
  font-size: 12px;
}

/* Review form: heading + fields share one left edge */
.product-review-form {
  margin-left: 0;
  padding-left: 0;
}
.product-review-form .form-group {
  margin-left: 0;
  margin-right: 0;
}
.product-review-form label {
  display: block;
  margin-bottom: 4px;
}

/* Two-column footer — lower height */
.footer-col-left,
.footer-col-right {
  padding-top: 8px;
  padding-bottom: 20px;
}
.footer-col-right .footer_small {
  margin-top: 12px;
}
.footer-subscribe {
  margin: 8px 0 0;
  max-width: 360px;
}
.footer-subscribe-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.footer-subscribe-row .form-control {
  width: auto;
  flex: 1 1 180px;
  max-width: 220px;
  display: inline-block;
}
.footer-subscribe .personal-data-consent {
  margin: 6px 0 8px !important;
  font-size: 12px;
  line-height: 1.35;
}
.footer-subscribe .personal-data-consent label {
  font-weight: 400;
}
@media screen and (max-width: 767px) {
  .footer-col-right .footer_small {
    margin-top: 4px;
  }
}

/* Variant swatches + checkout shipping (Spree class names) */
.variant-options .option-value {
  cursor: pointer;
  background: #fff;
}
.variant-options .option-value.with-image img {
  display: block;
}
#methods .shipment .rate-cost {
  margin-left: 4px;
}
.production-calendar th,
.production-calendar td {
  width: 14.28%;
}
.account-my-addresses label {
  font-weight: normal;
}
