/** 
    1. Support Banner
*/

.support-banner {
  margin-bottom: clamp(1.875rem, 1.5865rem + 1.2821vw, 3.125rem);
}

.support-banner .support-items {
  display: flex;
  margin: -10px;
  flex-wrap: wrap;
}
.support-banner .support-items .mt-column {
  padding: 10px;
  display: flex;
  align-items: center;
  flex: 1 1 300px;
}

.support-banner .support-items .support-item {
  background-color: var(--mt-bg-light);
  border-radius: var(--mt-radius);
  padding: 30px 10px;
  display: flex;
  align-items: center;
  transition: var(--mt-transition);
  border: 2px solid var(--mt-primary);
  width: 100%;
  height: 100%;
  background-image: url("../images/yellow-bg.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.support-banner .support-items .support-item .media-group {
  margin-right: 14px;
}
.support-banner .support-items .support-item .media-group img {
  width: 58px;
}

.support-banner .support-items .support-item .support-title {
  font-size: 1.2rem;
  color: var(--mt-primary);
}
.support-banner .support-items .support-item .support-description {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--mt-primary);
  line-height: normal;
}
.support-banner
  .support-items
  .support-item
  .media-group
  img[src$="delivery-truck.png"],
.support-banner
  .support-items
  .support-item
  .media-group
  img[src$="quality_icon.png"] {
  width: 80px;
}

/** 
    2. Product Title 
*/

.product-page-header {
  margin-bottom: clamp(1.875rem, 1.5865rem + 1.2821vw, 3.125rem);
}
.product-page-header > *:not(:last-child) {
  margin: 0 0 12px;
}
.product-page-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.product-page-header .breadcrumb-separator {
  display: inline-flex;
  align-items: center;
  margin: 0 2px;
}

/**
    3. Product Styles
*/

.products-main {
  overflow: visible;
}

.product-grid:has(> .product-item .product-card.list-view) {
  display: flex;
  flex-wrap: wrap;
  margin: calc(-1 * clamp(1.25rem, 0.9615rem + 1.2821vw, 2.5rem));
  overflow: visible;
}
.product-grid .product-item:has(> .product-card.list-view) {
  padding: clamp(1.25rem, 0.9615rem + 1.2821vw, 2.5rem);
  overflow: visible;
}
.product-grid .product-item:has(> .product-card.list-view):not(:last-child) {
  border-bottom: 2px dashed var(--mt-border-clr);
}

.product-grid.mt-col-1 .product-item {
  flex: 1 1 100%;
}

/* Product List View */

.product-card.list-view {
  display: grid;
  grid-template-columns: 1fr 2.5fr 0.7fr;
  gap: 30px;
  width: 100%;
  padding: 0px;
}

.product-card.list-view .product-content .product-features {
  margin-bottom: 5px;
  padding-bottom: 5px;
  border-bottom: none;
}
.product-card.list-view .product-content .product-features li {
  position: relative;
  margin-bottom: 8px;
  line-height: 1.6;
  font-size: 0.94rem;
}

/* Featured Products: exactly 4 visual lines (beats shop/default.css).
   Do not add padding into max-height — that was showing a partial 5th line. */
.geocare-featured-products .product-card .product-content .product-features {
  --fp-feature-font-size: 1rem;
  --fp-feature-line-height: 1.5;
  --fp-feature-max-lines: 4;
  box-sizing: content-box;
  font-size: var(--fp-feature-font-size);
  line-height: var(--fp-feature-line-height);
  max-height: calc(
    var(--fp-feature-font-size) * var(--fp-feature-line-height) *
      var(--fp-feature-max-lines)
  );
  overflow: hidden;
  padding-bottom: 10px;
}

.geocare-featured-products .product-card .product-content .product-features li {
  font-size: var(--fp-feature-font-size);
  line-height: var(--fp-feature-line-height);
  margin: 0;
  padding: 0;
}

.product-card .product-card-top .product-img > a {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #fde3bf;
  padding: 5px;
  box-sizing: border-box;
}

.product-card .product-card-top .product-img > a img {
  border-radius: 5px;
  display: block;
  width: 100%;
  height: auto;
}

.product-card .product-price-box .price-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 30px;
  background: var(--mt-quinery);
  color: var(--mt-accent-white);
  font-family: var(--mt-head-font);
  font-size: 16px;
  font-weight: normal;
  text-transform: capitalize;
  border: none;
  border-radius: var(--mt-radius);
  cursor: pointer;
  text-decoration: none;
  transition: var(--mt-transition);
  margin: 0 0 14px;
  align-items: baseline;
}

.product-card .product-price-box .price-wrapper .price-from {
  font-size: 12px;
  font-weight: 300;
  color: var(--mt-accent-white);
  letter-spacing: 0.01em;
  margin-right: 5px;
  line-height: 1;
}

.product-card .product-price-box .price-wrapper .price-amount {
  line-height: 1.3;
  font-size: 1.2em;
  color: var(--mt-accent-white);
  font-weight: 700;
}

.product-brand-logo {
  margin-top: 0;
  padding: 0;
  /* Ignore the image's natural width when the price-box column is
     sized (the buttons decide the width); flex stretch then makes
     this box match the buttons, and the image fills it. */
  contain: inline-size;
  box-sizing: border-box;
  background-color: #efefef;
  border-radius: var(--mt-radius);
  overflow: hidden;
  box-shadow: 0 0 10px rgba(var(--mt-accent-black-rgb), 0.1);
}
.product-brand-logo .brand-link {
  display: block;
  width: 100%;
  height: 100%;
}
.product-brand-logo .brand-link img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: var(--mt-transition);
  max-width: 100%;
  background-color: var(--mt-primary);
}

/**
    4. pagination
*/

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: clamp(2.25rem, 1.6154rem + 2.8205vw, 5rem);
}
.pagination > li {
  width: 45px;
  height: 45px;
  border: 1px solid var(--mt-primary);
  margin-right: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination > li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--mt-primary);
  font-size: 14px;
  font-weight: 500;
  transition: var(--mt-transition);
  text-decoration: none;
}

.woocommerce
  .product-loop-sorting
  .product-layout-controller
  .product-change-layout
  li
  span.active,
.woocommerce
  .product-loop-sorting
  .product-display-controller
  .product-change-display
  li
  span.active,
.woocommerce
  .product-loop-sorting
  .product-list-options-controller
  .product-list-options
  li
  span.active,
.woocommerce nav.woocommerce-pagination ul li a:focus,
.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li .page-numbers.dots,
.pagination > li a:focus,
.pagination > li a:hover,
.pagination > li.current a {
  background-color: var(--mt-quinery);
}

/** 
    5. Product Filter
*/

.product-sorting-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-sorting-inner .refine-toggle button {
  padding: 10px 20px;
  font-weight: 500;
  font-size: 0.8rem;
}

.product-sorting-inner {
  display: flex;
  border-bottom: 2px dashed var(--mt-border-clr);
  padding-bottom: 10px;
  margin: -4px -10px clamp(0.625rem, 0.1923rem + 1.9231vw, 2.5rem);
  justify-content: space-between;
  flex-wrap: wrap;
}

.product-sorting-inner > div {
  padding: 4px 10px;
  display: flex;
  align-items: center;
}

.widget_price_filter {
  margin-top: 30px;
  padding: 0 20px 0 0 !important;
}

/** 
    AT Media Queries
*/

@media only screen and (min-width: 1025px) {
  .product-loop-sorting {
    display: none;
  }
}

@media (max-width: 1024px) {
  .refine-canvas {
    display: block;
  }
}

@media only screen and (min-width: 768px) {
  .product-card.list-view > .product-content .product-features {
    display: block;
  }
}

@media (max-width: 767px) {
  .product-card.list-view {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    width: 100%;
  }

  .product-card.list-view > .product-card-top {
    grid-row: 1/3;
  }
  .product-card.list-view > .product-price-box {
    display: flex;
    align-items: start;
    gap: 7px;
    flex-wrap: wrap;
  }
  .product-card.list-view > .product-price-box > div,
  .product-card.list-view > .product-price-box > div a {
    margin: 0;
    height: 100%;
  }
  .product-card.list-view > .product-price-box .product-brand-logo {
    display: none;
  }

  .product-card.list-view .product-price-box > div {
    flex: 0;
  }

  .product-card.list-view
    > .product-content
    .product-name:has(+ .product-features) {
    margin-bottom: 10px;
  }

  .product-card.list-view > .product-content {
    align-self: flex-end;
  }
  .product-card.list-view > .product-price-box {
    align-self: flex-start;
    flex-direction: row;
    justify-content: flex-start;
    width: fit-content;
    margin-right: auto;
  }

  .widget_price_filter {
    padding: 0 0 0 0 !important;
  }
}

@media (max-width: 480px) {
  .product-card.list-view {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    width: 100%;
  }
}

/* Phase 3: mobile refine drawer */
.refine-canvas {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 8000;
  pointer-events: none;
  visibility: hidden;
}
.refine-canvas.open {
  display: block !important;
  pointer-events: all;
  visibility: visible;
}
.refine-canvas-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 35, 59, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}
.refine-canvas.open .refine-canvas-overlay {
  opacity: 1;
}
.refine-canvas-drawer {
  position: absolute;
  top: 0;
  left: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: var(--mt-primary);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.refine-canvas.open .refine-canvas-drawer {
  transform: translateX(0);
}
.refine-canvas-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.refine-canvas-header .offcanvas-title {
  margin: 0;
  color: var(--mt-accent-white);
  font-family: var(--mt-head-font);
  font-size: 1.1rem;
}
.refine-canvas-close {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 6px;
  color: var(--mt-accent-white);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.refine-canvas-body {
  padding: 20px;
  color: var(--mt-accent-white);
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Product image carousel (shop/category cards) */
.product-img--carousel {
  min-width: 0;
  width: 100%;
}

.product-img--carousel .fp-carousel {
  position: relative;
  display: block;
  width: 100%;
}

.product-img--carousel .fp-carousel-viewport {
  width: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid #fde3bf;
  border-radius: 8px;
  padding: 0;
  box-sizing: border-box;
}

.product-img--carousel .fp-carousel-track {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  transition: transform 0.6s ease;
  will-change: transform;
}

.product-img--carousel .fp-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
}

.product-img--carousel .fp-carousel-slide a {
  display: block;
  padding: 5px;
  box-sizing: border-box;
}

.product-img--carousel .fp-carousel-slide img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.product-img--carousel .fp-carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(120, 120, 120, 0.45);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.product-img--carousel:hover .fp-carousel-arrow {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.product-img--carousel .fp-carousel-arrow:disabled {
  opacity: 0.35 !important;
  cursor: default;
}

.product-img--carousel .fp-carousel-arrow--prev {
  left: 8px;
}
.product-img--carousel .fp-carousel-arrow--next {
  right: 8px;
}

.product-img--carousel .fp-carousel-arrow span {
  display: block;
  width: 7px;
  height: 7px;
  border-style: solid;
  border-color: currentColor;
  border-width: 2px 2px 0 0;
}

.product-img--carousel .fp-carousel-arrow--prev span {
  transform: rotate(-135deg);
  margin-left: 2px;
}
.product-img--carousel .fp-carousel-arrow--next span {
  transform: rotate(45deg);
  margin-right: 2px;
}

/* Fallback: if JS hasn't initialized yet, show first slide only (prevents layout break). */
[data-product-carousel]:not([data-carousel-ready="1"])
  .fp-carousel-slide:not(:first-child) {
  display: none;
}

/* Phase 4: polish — empty state, list images, mobile sorting bar */
.product-card.list-view .product-card-top .product-img img {
  width: 100%;
  height: auto;
  display: block;
}

.products-main .product-archive-empty {
  margin: clamp(1.5rem, 1rem + 2vw, 3rem) 0;
  padding: clamp(1.5rem, 1rem + 2vw, 3rem);
  text-align: center;
  border: 2px dashed var(--mt-border-clr);
  border-radius: var(--mt-radius);
  color: var(--mt-primary);
  font-family: var(--mt-head-font);
  font-size: 1.05rem;
}

@media (max-width: 1024px) {
  .products-main .product-loop-sorting {
    display: block;
  }
}
