/* =========================
   Woo Layout Overlord - Base Styling
   ========================= */

/* === Single product grid === */
.wlo-container .wlo-single {
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 40px;
  align-items: stretch;
}

.wlo-gallery {
  padding: 15px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.wlo-summary {
  padding: 20px;
  box-sizing: border-box;
}

.wlo-summary h1.wlo-title {
  margin-top: 0;
  font-size: 1.8rem;
}

.wlo-price {
  margin: 0.5rem 0 1rem;
  font-weight: bold;
  font-size: 1.2rem;
}

.wlo-cart { margin: 1rem 0; }
.wlo-tabs { margin-top: 40px; }

/* === Links + Buttons === */
.wlo-container a,
.product-card a {
  text-decoration: none;
  color: inherit;
}

.wlo-button,
.product-card .button {
  display: inline-block;
  padding: 10px 18px;
  background-color: #006400;
  color: #fff !important;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
}
.wlo-button:hover,
.product-card .button:hover {
  background-color: #008000;
}
.wlo-button:active,
.product-card .button:active {
  transform: scale(0.97);
}

/* =========================
   Catalog / Archive Styling
   ========================= */

.woocommerce ul.products,
.woocommerce ul.products.columns-5,
.products-grid {
  margin-top: 66px !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(250px, 1fr)) !important;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.product-card {
  border: 1px solid #ddd;
  border-radius: 16px;
  padding: 20px;
  background: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.product-card .product-thumb {
  min-height: 230px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
  overflow: hidden;
}
.product-card .product-thumb img {
  max-width: 100%;
  max-height: 230px;
  object-fit: contain;
}
.product-card h2.woocommerce-loop-product__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 12px 0 6px;
  text-align: center;
}
.product-card .price {
  margin: 10px 0 14px;
  font-weight: bold;
  font-size: 1rem;
  color: #111;
}

/* === Responsive grid === */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* =========================
   Category Grid Styling
   ========================= */

.products-grid li.product-category {
  border: 1px solid #ddd;
  padding: 15px;
  text-align: center;
  background: #fff;
  list-style: none;
}
.products-grid li.product-category img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.products-grid li.product-category h2 {
  font-size: 1.2em;
  margin-top: 10px;
}

/* =========================
   WooCommerce Product Gallery: Thumbnails Carousel
   ========================= */

/* Wrap around thumbs only */
.wlo-thumb-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

/* Thumbnail strip */
.woocommerce div.product div.images .flex-control-thumbs {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 8px !important;
  padding: 6px 40px !important; /* space for arrows */
  scrollbar-width: none !important;
}
.woocommerce div.product div.images .flex-control-thumbs::-webkit-scrollbar {
  display: none !important;
}
.woocommerce div.product div.images .flex-control-thumbs li {
  flex: 0 0 auto !important;
  width: 80px !important;
  list-style: none;
}
.woocommerce div.product div.images .flex-control-thumbs img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.woocommerce div.product div.images .flex-control-thumbs img:hover {
  border-color: #555;
}

/* =========================
   Thumbnail Navigation Arrows
   ========================= */

/* === FINAL CLEAN MATERIAL ARROWS === */
.thumb-scroll-btn {
  all: unset;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  opacity: 0.9;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  z-index: 10;
}

/* Remove any background SVGs or icons from older code */
.thumb-scroll-btn::after {
  content: none !important;
}

/* Single pseudo-element for the arrow */
.thumb-scroll-btn::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-top: 2px solid #222;
  border-right: 2px solid #222;
  transform: rotate(45deg);
}

/* Flip for left arrow */
.thumb-scroll-btn.left::before {
  transform: rotate(225deg);
}

/* Hover lift */
.thumb-scroll-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Active click feedback */
.thumb-scroll-btn:active {
  transform: translateY(-50%) scale(0.93);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Placement beside thumbs */
.thumb-scroll-btn.left {
  left: -28px;
}
.thumb-scroll-btn.right {
  right: -28px;
}

/* Smaller version on mobile */
@media (max-width: 600px) {
  .thumb-scroll-btn {
    width: 36px;
    height: 36px;
  }
  .thumb-scroll-btn::before {
    width: 10px;
    height: 10px;
  }
}

/* === Fix focus state for stylish arrows === */
.thumb-scroll-btn:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(0, 100, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.2s ease;
}
