/* ===== Strong fallback: force 3 columns via flex (overrides grid issues) ===== */

/* Make sure outer section stacks vertically */
.os-row,
.wp-block-uagb-container .os-row,
.uagb-block-6dd8abed .os-row {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 50px 0;
}
/* Header stays on top (H2 left, tabs right) */
.os-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  margin-bottom: 0.75rem !important;
}
.os-header h2 { margin: 0 !important; line-height: 1.05 !important; }

/* ===== FLEX GRID FALLBACK ===== */
.os-products,
.wp-block-uagb-container .os-products,
.uagb-block-6dd8abed .os-products {
  display: flex !important;          /* use flex instead of grid */
  flex-wrap: wrap !important;        /* allow wrapping */
  justify-content: center !important;
  gap: 20px !important;              /* spacing between cards */
  max-width: 1200px !important;      /* centered container width */
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* Force each card to take ~1/3 width on desktop */
.os-products > .os-product,
.wp-block-uagb-container .os-products > .os-product,
.uagb-block-6dd8abed .os-products > .os-product {
  flex: 0 0 calc(33.333% - 13.333px) !important; /* 3 columns accounting for gap */
  max-width: calc(33.333% - 13.333px) !important;
  box-sizing: border-box !important;
  display: block !important;
  justify-self: center !important;
}

/* Card visuals */
.os-product { padding: 10px !important; border: 1px solid #eee !important; border-radius: 0px !important; background:#fff !important; }
.os-product img { width:100% !important; height:auto !important; display:block !important; margin:0 0 8px 0 !important; }

/* Center Load More */
.os-controls { display:flex !important; justify-content:center !important; margin-top:14px !important; }
/* ==== TABS STYLING ==== */
.os-tabs {
  list-style: none !important;   /* remove dots */
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  gap: 10px !important;          /* spacing between tabs */
  align-items: center !important;
  background: transparent;
}

.os-tab,
.os-filter-btn {
  cursor: pointer !important;
  padding: 6px 14px !important;
  border: 1px solid #ee7f00 !important;
  border-radius: 0px !important;
  background: transparent !important;
  transition: background 0.2s ease, color 0.2s ease;
  color:  #ee7f00;
}

.os-tab.active {
  background: #ee7f00 !important;
  color: #000 !important;
  border-color: #ee7f00 !important;
}
.os-product-title {color:#001E10;}
.os-product-title a {
    color: #001E10!important;
    font-size: 24px!important;
    line-height: 15px !important;
}
.os-tab:hover,
.os-filter-btn:hover {
  background: #ee7f00 !important;
	color: #000 !important;
}

/* ===== Force product images to square ===== */
/* === Force product images into perfect square === */
.os-product-link {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;   /* makes it square */
  overflow: hidden !important;
}
.os-product-link img {
  position: absolute !important;
  inset: 0 !important;             /* top:0, right:0, bottom:0, left:0 */
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;    /* crop and fill square */
  object-position: center !important;
}
.os-filter-bar {
  margin: 10px 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.os-filter-bar input {
  width: 120px;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.os-filter-bar button {
  padding: 6px 12px;
  border: none;
  background: #333;
  color: #fff;
  border-radius: 0px;
  cursor: pointer;
}

.os-filter-bar button:hover {
  background: #555;
}
.os-filter-toggle {
  cursor: pointer;
  list-style: none;
  display: inline-block;
  padding: 6px 12px;
  background: #ee7f00;
  border-radius: 0px;
  margin-left: 10px;
  transition: background 0.2s;
}
.os-filter-toggle:hover {
  background: #e2e2e2;
}

/* ===== Responsive: 2 on tablet, 1 on mobile ===== */
@media (max-width: 900px) {
  .os-products > .os-product,
  .wp-block-uagb-container .os-products > .os-product,
  .uagb-block-6dd8abed .os-products > .os-product {
    flex: 0 0 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
  }
}
@media (max-width: 480px) {
  .os-products > .os-product,
  .wp-block-uagb-container .os-products > .os-product,
  .uagb-block-6dd8abed .os-products > .os-product {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}
@media (max-width: 768px) {
  .os-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  .os-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }
  .os-tabs li {
    flex: 0 0 auto;
    margin-right: 10px;
  }
}