:root {
  --gold: #ffd700;
  --price: #ff3b3b;
  --details: #0d3b66;
}

.zojano-sync-grid.products-grid:not(.related-scroll) {
  max-width: 1150px;
  margin: 0 auto 40px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  list-style: none;
}

@media (max-width: 900px) {
  .zojano-sync-grid.products-grid:not(.related-scroll) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .zojano-sync-grid.products-grid:not(.related-scroll) {
    grid-template-columns: 1fr;
  }
}

/* Related products on single product pages (desktop: 4 cols, mobile: zojano scroll) */
.zojano-sync-related {
  width: 100%;
  max-width: 1150px;
  margin: 40px auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.zojano-sync-related .zojano-related-title {
  margin: 0 0 16px;
  color: #ffd700;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: right;
}

.zojano-sync-related .related-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 0 0 12px;
  margin: 0;
  max-width: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  list-style: none;
}

.zojano-sync-related .related-scroll::-webkit-scrollbar {
  display: none;
}

.zojano-sync-related .related-scroll .product-card {
  flex: 0 0 160px;
  max-width: 160px;
  scroll-snap-align: start;
}

@media (min-width: 992px) {
  .zojano-sync-related .related-scroll {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    overflow-x: visible;
    scroll-snap-type: none;
    padding: 0;
  }

  .zojano-sync-related .related-scroll .product-card {
    flex: unset;
    max-width: none;
    width: auto;
  }
}

/* Elementor loop-grid wraps our section in a multi-column grid — break out */
.elementor-loop-container.elementor-grid {
  display: block !important;
}

.elementor-loop-container.elementor-grid .zojano-sync-grid {
  width: 100% !important;
  max-width: 100% !important;
}

.zojano-sync-grid .product-card {
  background: #fff;
  border-radius: 18px;
  padding: 10px 10px 12px;
  text-align: center;
  border: 1px solid #e8e8e8;
  transition: all 0.2s ease;
  text-decoration: none;
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.zojano-sync-grid .product-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.25);
}

.zojano-sync-grid .product-img-box {
  background: #fff;
  border-radius: 14px;
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  overflow: hidden;
  position: relative;
}

.zojano-sync-grid .product-img-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.45);
  opacity: 0.45;
  pointer-events: none;
  transition: 0.2s;
}

.zojano-sync-grid .product-card:hover .product-img-box::after {
  opacity: 0.9;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.7);
}

.zojano-sync-grid .product-img-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.25s ease;
}

.zojano-sync-grid .product-card:hover .product-img-box img {
  transform: scale(1.03);
}

.zojano-sync-grid .product-title {
  font-weight: 700;
  margin-bottom: 3px;
  font-size: 14px;
  min-height: 26px;
  color: #222;
}

.zojano-sync-grid .product-code {
  font-size: 12px;
  color: #666;
  margin-bottom: 5px;
}

.zojano-sync-grid .product-price {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-bottom: 9px;
  font-size: 13px;
  text-align: center;
  width: 100%;
}

.zojano-sync-grid .product-price .price-number-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.zojano-sync-grid .product-price .price-words {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  color: var(--price);
  font-weight: 600;
}

.zojano-sync-grid .product-price .currency {
  color: #444;
  font-size: 12px;
}

.zojano-sync-grid .product-price .amount {
  color: var(--price);
  font-weight: bold;
  font-size: 15px;
}

.zojano-sync-grid .product-price .out-of-stock {
  color: #ff3b3b;
  font-weight: bold;
  font-size: 14px;
}

.zojano-sync-grid .details-btn {
  display: inline-block;
  background: transparent;
  color: var(--details);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  border: 1px solid var(--details);
  margin-top: auto;
  pointer-events: none;
}

.zojano-sync-grid .product-card:hover .details-btn {
  background: var(--details);
  color: #fff;
}

/* Product page gallery (like zojano.shop) */
.zojano-product-gallery.gallery-box {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.zojano-product-gallery .main-image {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8e8e8;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.zojano-product-gallery .main-image img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
}

.zojano-product-gallery .thumbs {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.zojano-product-gallery .thumbs button {
  background: #fff;
  border: 1px solid #ddd;
  padding: 4px;
  border-radius: 10px;
  cursor: pointer;
  line-height: 0;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.zojano-product-gallery .thumbs button:hover {
  transform: scale(1.03);
}

.zojano-product-gallery .thumbs img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.zojano-product-gallery .thumbs button.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.35);
}

.zojano-sync-grid .product-card.is-out-of-stock {
  opacity: 0.92;
}
