:root{
  --veriga-price:#3C3C3B;
  --veriga-sale:#B42831;
  --veriga-blue:#0084AF;
}

/* =====================================================================
   Veriga Bike Details PRO (VBDP)
   - Cleaned: removed duplicate/legacy rules, kept current behavior
   - Goals:
     • Title aligned with main image
     • Desktop thumbs: wrap with equal gaps
     • Mobile: ONLY thumbs grid (no big images), 2 columns
     • Tabs: flat bar, active tab = Veriga blue
   ===================================================================== */

/* Local spacing knob (thumbs gap + spacing below main image) */
.vbdp{ --vbdp-gap:22px; }

/* Layout wrapper */
.vbdp.bike-pro{
  max-width:1200px;
  margin:40px auto;
  padding:0 20px;
}

/* Top: gallery + summary */
.vbdp .bike-top{
  display:grid;
  grid-template-columns:1.2fr 1fr;
  gap:40px;
  align-items:flex-start;
}

/* Main image */
.vbdp .bike-gallery{margin:0;padding:0;}
.vbdp .main-image-link{display:block;margin:0;padding:0;}
.vbdp .main-image{
  width:100%;
  display:block;
  margin:0;
  border-radius:12px;
}
.vbdp .no-image{
  width:100%;
  padding:80px 20px;
  background:#f5f5f5;
  border-radius:12px;
  text-align:center;
  color:#666;
}

/* Summary: align title with image top */
.vbdp .bike-summary{
  margin:0;
  padding:0;
  align-self:flex-start;
}
.vbdp .bike-title{
  margin:0 0 8px;
  padding:0;
  line-height:1.1;
}
.vbdp .bike-summary > :first-child{margin-top:0;}

/* Highlights */
.vbdp .bike-highlights{
  margin:4px 0 8px;
  color:#374151;
  font-weight:400;
  line-height:1.5;
}

/* Price */
.vbdp .price{
  display:flex;
  align-items:baseline;
  gap:10px;
  flex-wrap:wrap;
  margin:16px 0 2px;
  font-size:22px;
  color:var(--veriga-price);
}
.vbdp .price del{
  margin:0;
  padding:0;
  color:var(--veriga-price);
  opacity:.55;
  font-weight:600;
  font-size:22px;
}
.vbdp .price .sale{
  margin:0;
  display:inline;
  font-size:22px;
  font-weight:700;
  color:var(--veriga-sale);
}

/* Countdown + sale note */
.vbdp .countdown{
  margin:2px 0 0;
  line-height:1.15;
  font-weight:500;
  font-size:15px;
}
.vbdp .sale-note{
  display:block;
  margin:0 0 14px;
  line-height:1.15;
  color:var(--veriga-sale);
  font-weight:600;
}

/* CTA */
.vbdp .cta{display:grid;gap:10px;margin-top:10px;}
.vbdp .btn{
  display:block;
  padding:14px 16px;
  border-radius:10px;
  text-decoration:none;
  color:#fff;
  font-weight:700;
  text-align:center;
}
.vbdp .btn.call{background:var(--veriga-blue);}
.vbdp .btn.call:hover{filter:brightness(.92);}
.vbdp .btn.wa{background:#25D366;}

/* CTA row (used in markup) */
.vbdp .cta.cta-row{
  display:flex;
  gap:10px;
  margin-top:20px; /* više zraka iznad botuna */
  flex-wrap:wrap;
}
.vbdp .cta.cta-row .btn{
  padding:12px 14px;
  font-size:14px;
  border-radius:12px;
  flex:1 1 auto;
}

/* Tabs bar – flat like main menu */
.vbdp .bike-tabs{
  position:sticky;
  top:var(--veriga-header-h,0px);
  z-index:50;

  background:#f3f4f6;
  border:1px solid #e5e7eb;
  border-radius:0;

  margin:24px 0 12px;
  padding:0;

  display:flex;
  align-items:stretch;
  gap:0;

  overflow-x:auto;
  white-space:nowrap;
  -webkit-overflow-scrolling:touch;
}
.vbdp .bike-tabs a{
  display:flex;
  align-items:center;
  padding:10px 14px; /* smaller height */

  text-decoration:none;
  font-weight:700;
  color:#111;
  border-radius:0;
  flex:0 0 auto;
}
.vbdp .bike-tabs a + a{border-left:1px solid #e5e7eb;}
.vbdp .bike-tabs a:hover{background:#e5e7eb;}
.vbdp .bike-tabs a.is-active,
.vbdp .bike-tabs a.is-active:hover,
.vbdp .bike-tabs a.is-active:focus,
.vbdp .bike-tabs a.is-active:active{
  background:var(--veriga-blue) !important;
  color:#fff !important;
}

/* Sections */
.vbdp .section{padding:18px 0;}
.vbdp .section h2{margin:0 0 12px;}

/* Specs table */
.vbdp .specs{width:100%;border-collapse:collapse;}
.vbdp .specs th,
.vbdp .specs td{
  border-bottom:1px solid #eee;
  padding:10px 8px;
  text-align:left;
  vertical-align:top;
}
.vbdp .specs th{width:38%;color:#333;}

/* Thumbnails (desktop) */
.vbdp .thumbs-wide{
  display:flex;
  flex-wrap:wrap;
  gap:var(--vbdp-gap);
  margin-top:var(--vbdp-gap);
  padding:0;
  justify-content:flex-start;
  align-items:flex-start;
}
.vbdp .thumbs-wide .thumb{margin:0;padding:0;flex:0 0 auto;}
.vbdp .thumbs-wide .thumb img{
  width:120px;
  height:90px;
  object-fit:cover;
  border-radius:12px;
  border:1px solid #eee;
  display:block;
}

/* Legacy thumbs (not used; keep hidden) */
.vbdp .thumbs{display:none;}

/* Mobile images block (kept for safety, but hidden by mobile rules below) */
.vbdp .mobile-all{display:none;margin-top:14px;}
.vbdp .mobile-all img{
  width:100%;
  border-radius:12px;
  display:block;
  margin:10px 0;
}

/* Lightbox */
.vbdp-lb{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.92);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:999999;
}
.vbdp-lb-img{max-width:96vw;max-height:96vh;object-fit:contain;}
.vbdp-lb-close{
  position:absolute;
  top:14px;
  right:18px;
  background:transparent;
  border:0;
  color:#fff;
  font-size:38px;
  cursor:pointer;
}
.vbdp-lb-prev,
.vbdp-lb-next{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.18);
  color:#fff;
  font-size:44px;
  line-height:44px;
  width:54px;
  height:54px;
  border-radius:999px;
  cursor:pointer;
}
.vbdp-lb-prev{left:16px;}
.vbdp-lb-next{right:16px;}

/* Responsive */
@media (max-width:860px){
  .vbdp .bike-top{grid-template-columns:1fr;gap:14px;}

  /* Mobile: only thumbs grid (NO big images) */
  .vbdp .mobile-all{display:none !important;}

  .vbdp .thumbs-wide{
    display:grid !important;
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
    gap:12px !important;
    margin-top:14px !important;

    width:100% !important;
    max-width:100% !important;
    padding:0 !important;

    /* neutralize any old flex/scroll leftovers */
    overflow:visible !important;
  }

  .vbdp .thumbs-wide .thumb{display:block !important;margin:0 !important;padding:0 !important;}
  .vbdp .thumbs-wide .thumb img{
    width:100% !important;
    height:96px !important;
    object-fit:cover !important;
    display:block !important;
  }

  /* align side padding with site container on mobile */
  .vbdp.bike-pro{padding:0 16px !important;}

  /* Tabs: slightly more compact */
  .vbdp .bike-tabs{margin:18px 0 10px;}
  .vbdp .bike-tabs a{padding:8px 12px;font-size:14px;}
}
/* =========================
   VBDP MOBILE GALLERY – CLEAN 2-ROW GRID (FINAL)
   ========================= */
@media (max-width: 860px){

  /* NEMA velikih slika na mobitelu */
  .vbdp .mobile-all{
    display: none !important;
  }

  /* GLAVNA GALERIJA = GRID */
  .vbdp .thumbs-wide{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;

    margin-top: 12px !important;
    padding: 0 !important;

    /* ubij sve stare flex/scroll fore */
    flex-wrap: unset !important;
    overflow: visible !important;
    justify-content: unset !important;
    align-items: unset !important;
  }

  .vbdp .thumbs-wide .thumb{
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    display: block !important;
  }

  .vbdp .thumbs-wide .thumb img{
    width: 100% !important;
    height: 96px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 12px !important;
  }
}
/* =========================
   MOBILE: remove grey gap above main image (no crop)
   ========================= */
@media (max-width: 860px){

  /* makni prostor koji dolazi iz main wrappera na single bicikl */
  body.single-bicikl main.container{
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  /* makni prostor iznad cijelog plugin bloka */
  .vbdp.bike-pro{
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* makni gap iznad layouta */
  .vbdp .bike-top{
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* najvažnije: gallery wrapper bez ikakvog top prostora */
  .vbdp .bike-gallery{
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* link oko slike zna dobiti line-height/padding iz teme */
  .vbdp .main-image-link{
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
  }

  /* slika ostaje “prirodna” (bez cropa) */
  .vbdp .main-image{
    display: block !important;
    margin: 0 !important;
    height: auto !important;
    object-fit: contain !important;
  }
}
