/* ========== Catalog adaptations: section-catalog / panes / gar-slider ========== */

.section-catalog {
  overflow: hidden;
}

.section-catalog .pane form > .wrapper {
  max-width: 1252px;
  padding: 0 15px;
  box-sizing: border-box;
}

.section-catalog-top {
  padding-top: 150px;
}

.section-catalog-top h2 {
  word-wrap: break-word;
  padding: 0 10px;
}

.panes {
  overflow: visible;
}

.pane.active {
  display: block;
}

/* Clean gar-slider: flex grid desktop, slick handles mobile via main.js */
.section-catalog .gar-slider {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px 0;
  text-align: center;
  margin: 32px auto 48px;
  max-width: 1208px;
  padding: 0 10px;
  box-sizing: border-box;
}

.section-catalog .gar-slider:not(.slick-initialized) .gar-col {
  flex: 0 0 16.666%;
  max-width: 16.666%;
  padding: 0 8px;
  box-sizing: border-box;
}

.section-catalog .gar-slider .gar-col {
  font-size: 18px;
  color: #104077;
  font-weight: 600;
}

.section-catalog .gar-slider .gar-col .circ-bord {
  height: 83px;
  width: 83px;
  border-width: 2px;
  margin: 0 auto 16px;
  line-height: 79px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-catalog .gar-slider .gar-col .circ-bord img {
  vertical-align: middle;
  max-height: 52px;
  max-width: 64px;
}

.section-catalog .gar-slider .gar-col p {
  line-height: 1.2;
  margin: 0;
  font-size: 16px;
}

/* When slick is active, reset flex so slick controls layout */
.section-catalog .gar-slider.slick-initialized {
  display: block;
  padding: 0;
}

.section-catalog .gar-slider.slick-initialized .gar-col {
  flex: none;
  max-width: none;
}

/* Product list */
#reload-filter1-cont .tovs {
  margin: 0 0 40px;
}

#reload-filter1-cont .tov {
  transition: box-shadow 0.25s ease;
}

#reload-filter1-cont .tov:hover {
  box-shadow: 5px 8px 40px rgba(11, 66, 129, 0.12);
}

#reload-filter1-cont .tov .btn-cov {
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

#reload-filter1-cont .tov .btn-cov.added .btn {
  background: #0b4281;
}

#reload-filter1-cont .tov .tov__price b.b2 {
  font-size: 14px;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

#reload-filter1-cont .tov .tov__price b.b2 .b2_big {
  font-size: 22px;
  color: #00316b;
}

#reload-filter1-cont .total_price {
  color: #da0052;
  font-size: 22px;
}

/* ========== Floating cart button ========== */
.cart-fab {
  position: fixed;
  right: 110px;
  bottom: 28px;
  z-index: 9990;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(145deg, #da0052 0%, #b80045 100%);
  color: #fff;
  border: none;
  box-shadow: 0 8px 28px rgba(218, 0, 82, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 32px rgba(218, 0, 82, 0.5);
}

.cart-fab svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.cart-fab__count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  background: #0b4281;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: none;
}

.cart-fab__count.is-visible {
  display: block;
}

.cart-fab.pulse {
  animation: cartPulse 0.45s ease;
}

@keyframes cartPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* Header cart link */
.header-cart {
  position: relative;
  top: -10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  vertical-align: middle;
  transition: background 0.2s;
  flex-shrink: 0;
}

#header .mob-nav .header-cart {
  margin-left: 10px;
}

.header-cart:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.header-cart svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.header-cart__count {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 10px;
  background: #da0052;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  display: none;
}

.header-cart__count.is-visible {
  display: block;
}

/* ========== Cart modal ========== */
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(9, 42, 96, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cart-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.cart-modal {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10001;
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 40px rgba(9, 42, 96, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.cart-overlay.is-open .cart-modal {
  transform: translateX(0);
}

.cart-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e8edf5;
  background: #0b4281;
  color: #fff;
  flex-shrink: 0;
}

.cart-modal__head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-family: "MagistralC", sans-serif;
}

.cart-modal__close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.cart-modal__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.cart-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 20px;
  background: #f7f8fa;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: #627b98;
}

.cart-empty svg {
  width: 64px;
  height: 64px;
  fill: #c5d0e0;
  margin-bottom: 16px;
}

.cart-empty p {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: #104077;
}

.cart-empty span {
  font-size: 14px;
}

.cart-item {
  display: flex;
  gap: 14px;
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(182, 192, 212, 0.2);
  position: relative;
}

.cart-item__img {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #f0f4fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cart-item__img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cart-item__info {
  flex: 1;
  min-width: 0;
}

.cart-item__name {
  font-size: 15px;
  font-weight: 700;
  color: #00316b;
  line-height: 1.25;
  margin: 0 0 6px;
}

.cart-item__unit {
  font-size: 13px;
  color: #627b98;
  margin-bottom: 10px;
}

.cart-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cart-item__qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d5deeb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.cart-item__qty button {
  width: 32px;
  height: 32px;
  border: none;
  background: #f0f4fa;
  color: #0b4281;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.cart-item__qty button:hover {
  background: #e2eaf5;
}

.cart-item__qty span {
  min-width: 36px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #00316b;
}

.cart-item__sum {
  font-size: 17px;
  font-weight: 700;
  color: #da0052;
  white-space: nowrap;
}

.cart-item__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: #94a8c1;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  border-radius: 50%;
}

.cart-item__remove:hover {
  color: #da0052;
  background: #fde8f0;
}

.cart-modal__foot {
  flex-shrink: 0;
  padding: 18px 22px 22px;
  border-top: 1px solid #e8edf5;
  background: #fff;
}

.cart-modal__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 16px;
  color: #627b98;
}

.cart-modal__total b {
  font-size: 26px;
  color: #00316b;
  font-family: "MagistralC", sans-serif;
  letter-spacing: 0.5px;
}

.cart-modal__order {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 8px;
  background: #25d366;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  box-sizing: border-box;
}

.cart-modal__order:hover {
  background: #1ebe57;
  color: #fff;
  transform: translateY(-1px);
}

.cart-modal__order:disabled,
.cart-modal__order.is-disabled {
  background: #a8b8cc;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.cart-modal__order svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.cart-modal__clear {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: none;
  background: none;
  color: #94a8c1;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 6px;
}

.cart-modal__clear:hover {
  color: #da0052;
}

.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%) translateY(20px);
  z-index: 10010;
  background: #0b4281;
  color: #fff;
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(11, 66, 129, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
}

.cart-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

body.cart-open {
  overflow: hidden;
}

/* ========== Responsive ========== */
@media screen and (max-width: 1149px) {
  .section-catalog .gar-slider:not(.slick-initialized) .gar-col {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    margin-bottom: 20px;
  }
}

@media screen and (max-width: 1023px) {
  .section-catalog-top {
    padding-top: 100px;
  }

  .section-catalog .gar-slider:not(.slick-initialized) {
    box-shadow: 0 0 40px #edeef2 inset;
    padding: 40px 20px 28px;
    margin: 0 -15px 20px;
    background: #f9fafb;
  }

  .section-catalog .gar-slider:not(.slick-initialized) .gar-col {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .header-cart {
    margin-left: 8px;
    width: 40px;
    height: 40px;
  }
}

@media screen and (max-width: 767px) {
  .section-catalog-top {
    padding-top: 90px;
  }

  .section-catalog-top h2 {
    font-size: 28px;
    line-height: 1.15;
  }

  .section-catalog .pane form > .wrapper {
    padding: 0;
  }

  .section-catalog .gar-slider:not(.slick-initialized) {
    margin: 0 0 16px;
    padding: 36px 16px 24px;
  }

  .section-catalog .gar-slider .gar-col {
    font-size: 15px;
  }

  .section-catalog .gar-slider .gar-col .circ-bord {
    width: 70px;
    height: 70px;
    line-height: 66px;
  }

  .section-catalog .gar-slider .gar-col p {
    font-size: 14px;
  }

  .cart-fab {
    right: 22px;
    bottom: 340px;
    width: 56px;
    height: 56px;
    display: none;
  }

  .cart-modal {
    max-width: 100%;
  }

  .cart-modal__head {
    padding: 18px 16px 14px;
  }

  .cart-modal__head h3 {
    font-size: 19px;
  }

  .cart-modal__body {
    padding: 12px 12px 16px;
  }

  .cart-item {
    padding: 12px;
  }

  .cart-item__img {
    width: 60px;
    height: 60px;
  }

  .cart-modal__total b {
    font-size: 22px;
  }

  .cart-toast {
    bottom: 90px;
    font-size: 13px;
    padding: 10px 16px;
    max-width: 90%;
    white-space: normal;
    text-align: center;
  }

  /* Floating cart is primary on mobile; header cart stays in menu */
  #header .mob-nav .header-cart {
    margin: 16px auto 0;
    width: 48px;
    height: 48px;
    display: flex;
  }
}

@media screen and (max-width: 480px) {
  .section-catalog .gar-slider:not(.slick-initialized) .gar-col {
    flex: 0 0 50%;
    max-width: 50%;
  }
}
