.variant-galleries { width: 100%; }
.color-gallery { display: none; }
.color-gallery.is-active { display: block; }

/* Main + thumbnails */
.vgw-main { width: 100%; margin-bottom: 10px; }
.vgw-main-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.vgw-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}
.vgw-thumb {
  padding: 0; border: none; background: transparent; cursor: pointer;
  border-radius: 8px; overflow: hidden;
  outline-offset: 2px;
}
.vgw-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  aspect-ratio: 1/1;
  transition: transform .16s ease;
}
.vgw-thumb:hover img { transform: scale(1.03); }

/* Color dots (swatches) with tooltip */
.color-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; }
.color-swatch.color-dot {
  width: 26px; height: 26px;
  border-radius: 9999px;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  position: relative;
  padding: 0;
}
.color-swatch.color-dot .dot {
  position: absolute;
  inset: 4px;
  border-radius: 9999px;
  background: var(--dot, #9ca3af);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.color-swatch.color-dot.active { box-shadow: 0 0 0 2px rgba(17,17,17,.12); border-color: #111 !important; }

.color-swatch.color-dot::after {
  content: attr(data-label);
  position: absolute;
  left: 50%; top: -8px; transform: translate(-50%, -100%);
  background: rgba(17,17,17,.9); color: #fff; font-size: 12px;
  padding: 4px 6px; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s;
}
.color-swatch.color-dot:hover::after { opacity: 1; transform: translate(-50%, -110%); }

/* Lightbox */
.vgw-lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.9);
  display: none;
  align-items: center; justify-content: center;
  z-index: 99999;
  padding: 24px;
}
.vgw-lightbox.is-open { display: flex; }
.vgw-lb-img {
  max-width: 100%; max-height: 100%;
  border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.6);
}
.vgw-lb-prev, .vgw-lb-next, .vgw-lb-close {
  position: absolute; background: rgba(255,255,255,.12); color: #fff;
  border: none; width: 44px; height: 44px; border-radius: 9999px;
  cursor: pointer; display: grid; place-items: center; font-size: 26px; line-height: 1;
  transition: background .15s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.vgw-lb-prev:hover, .vgw-lb-next:hover, .vgw-lb-close:hover { background: rgba(255,255,255,.2); }
.vgw-lb-prev { left: 24px; } .vgw-lb-next { right: 24px; } .vgw-lb-close { top: 24px; right: 24px; font-size: 22px; }
.vgw-lb-cap { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; opacity: .9; }

/* Grid helper and card */
.vgw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1100px){ .vgw-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px){ .vgw-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px){ .vgw-grid { grid-template-columns: 1fr; } }

.vgw-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
}
.vgw-card-title { font-weight: 600; margin: 4px 0 10px; font-size: 16px; }

/* v1.5.2 layout polish */
.vgw-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 24px; }
@media (max-width: 1200px){ .vgw-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 900px){ .vgw-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px){ .vgw-grid { grid-template-columns: 1fr; } }

.vgw-card { background:#fff; border:1px solid #e5e7eb; border-radius:16px; padding:14px; box-shadow:0 2px 10px rgba(0,0,0,.03); }
.vgw-card-title { font-weight:600; font-size:16px; margin:8px 0 10px; }

/* Put color dots under title (not overlaying image area) */
.vgw-card .color-swatches { order: 3; margin-top: 10px; }

/* Gallery */
.vgw-main { width:100%; margin-bottom:10px; }
.vgw-main-img { width:100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius:12px; display:block; box-shadow:0 2px 12px rgba(0,0,0,.06); }
.vgw-thumbs { display:grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vgw-thumb { padding:0; border:none; background:transparent; cursor:pointer; border-radius:10px; overflow:hidden; }
.vgw-thumb img { width:100%; aspect-ratio: 1 / 1; object-fit: cover; display:block; transition: transform .16s ease; }
.vgw-thumb:hover img { transform: scale(1.03); }

/* Dots */
.color-swatch.color-dot { width:24px; height:24px; border-radius:9999px; border:1px solid #e5e7eb!important; background:#fff!important; position:relative; padding:0; }
.color-swatch.color-dot .dot { position:absolute; inset:4px; border-radius:9999px; background:var(--dot, #9ca3af); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.color-swatch.color-dot.active { box-shadow: 0 0 0 2px rgba(17,17,17,.12); border-color:#111!important; }
.color-swatch.color-dot::after { content: attr(data-label); position:absolute; left:50%; top:-8px; transform:translate(-50%, -100%); background:rgba(17,17,17,.9); color:#fff; font-size:12px; padding:4px 6px; border-radius:6px; white-space:nowrap; opacity:0; pointer-events:none; transition: opacity .12s, transform .12s; }
.color-swatch.color-dot:hover::after { opacity:1; transform: translate(-50%, -110%); }

/* Lightbox unchanged */
