/* ===========================================================
   Ghorer Bazar — inspired grocery theme
   Plain HTML + Bootstrap 5 + jQuery. No build step.
   =========================================================== */

:root {
  --gb-green: #2e7d32;
  --gb-green-dark: #1b5e20;
  --gb-green-light: #e8f5e9;
  --gb-orange: #ff9800;
  --gb-orange-dark: #f57c00;
  --gb-ink: #1f2937;
  --gb-muted: #6b7280;
  --gb-line: #e5e7eb;
  --gb-bg: #f7faf7;
  --gb-card-radius: 14px;
  --gb-shadow: 0 6px 20px rgba(27, 94, 32, 0.08);
  --gb-shadow-hover: 0 12px 28px rgba(27, 94, 32, 0.16);
}

* { box-sizing: border-box; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background-color: var(--gb-bg);
  color: var(--gb-ink);
  margin: 0;
  line-height: 1.6;
}

h1, h2, h3, h4, h5 { line-height: 1.2; font-weight: 700; color: var(--gb-ink); }

.theme-gb { overflow-x: hidden; }
@supports (overflow-x: clip) {
  .theme-gb { overflow-x: clip; }
}
.theme-gb img { max-width: 100%; }
.theme-gb .container { min-width: 0; }

a { text-decoration: none; }

/* ---------- Top announcement bar ---------- */
.topbar {
  background: var(--gb-green-dark);
  color: #fff;
  font-size: 0.85rem;
  padding: 7px 0;
  letter-spacing: 0.2px;
}
.topbar a { color: #fff; }
.topbar a:hover { color: var(--gb-orange); }

/* ---------- Navbar ---------- */
.gb-navbar {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1030;
}
.gb-brand {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--gb-green);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gb-brand .leaf {
  width: 30px; height: 30px;
  background: var(--gb-green);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.gb-search {
  border: 2px solid var(--gb-green-light);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
}
.gb-search:focus { box-shadow: 0 0 0 4px var(--gb-green-light); border-color: var(--gb-green); }
.gb-nav-link { color: var(--gb-ink); font-weight: 600; }
.gb-nav-link:hover { color: var(--gb-green); }

.gb-cart {
  position: relative;
  color: var(--gb-ink);
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  transition: background 0.2s;
}
.gb-cart:hover { background: var(--gb-green-light); }
.gb-cart .badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--gb-orange);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ---------- Buttons ---------- */
.btn-gb {
  background: var(--gb-green);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  padding: 0.6rem 1.6rem;
  transition: all 0.2s ease;
}
.btn-gb:hover { background: var(--gb-green-dark); color: #fff; transform: translateY(-1px); }
.btn-gb-orange {
  background: var(--gb-orange);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  padding: 0.6rem 1.6rem;
  transition: all 0.2s ease;
}
.btn-gb-orange:hover { background: var(--gb-orange-dark); color: #fff; transform: translateY(-1px); }
.btn-outline-gb {
  background: transparent;
  border: 2px solid var(--gb-green);
  color: var(--gb-green);
  border-radius: 999px;
  font-weight: 600;
  padding: 0.5rem 1.4rem;
  transition: all 0.2s ease;
}
.btn-outline-gb:hover { background: var(--gb-green); color: #fff; }

/* ---------- Hero ---------- */
.gb-hero {
  background: linear-gradient(115deg, var(--gb-green-light) 0%, #ffffff 60%);
  overflow: hidden;
}
.gb-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.gb-hero .lead { color: var(--gb-muted); font-size: 1.15rem; }
.gb-hero-img {
  border-radius: 24px;
  box-shadow: var(--gb-shadow-hover);
  width: 100%;
  object-fit: cover;
}
.gb-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--gb-line);
  color: var(--gb-green-dark);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---------- Feature strip ---------- */
.gb-feature {
  background: #fff;
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-card-radius);
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}
.gb-feature:hover { transform: translateY(-3px); box-shadow: var(--gb-shadow); }
.gb-feature .ic {
  width: 46px; height: 46px;
  background: var(--gb-green-light);
  color: var(--gb-green);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.gb-feature > div { min-width: 0; }
.gb-feature h6 { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.gb-feature small { color: var(--gb-muted); overflow-wrap: anywhere; }

/* ---------- Section heading ---------- */
.gb-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
  gap: 10px;
}
.gb-section-head h2 { margin: 0; font-size: 1.6rem; }
.gb-section-head .accent-line {
  width: 48px; height: 4px;
  background: var(--gb-orange);
  border-radius: 999px;
  margin-top: 6px;
}

/* ---------- Category cards ---------- */
.gb-cat {
  background: #fff;
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-card-radius);
  padding: 1.4rem 1rem;
  text-align: center;
  height: 100%;
  transition: all 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.gb-cat:hover {
  border-color: var(--gb-green);
  box-shadow: var(--gb-shadow-hover);
  transform: translateY(-4px);
}
.gb-cat .ic {
  width: 64px; height: 64px;
  margin: 0 auto 12px;
  background: var(--gb-green-light);
  color: var(--gb-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: background 0.25s;
  flex-shrink: 0;
}
.gb-cat:hover .ic { background: var(--gb-green); color: #fff; }
.gb-cat h6 { margin: 0; font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.gb-cat small { color: var(--gb-muted); margin-top: auto; }

/* ---------- Product card ---------- */
.gb-product {
  background: #fff;
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-card-radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}
.gb-product:hover {
  box-shadow: var(--gb-shadow-hover);
  transform: translateY(-4px);
  border-color: transparent;
}
.gb-product .img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f3f7f3;
}
.gb-product .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gb-product:hover .img-wrap img { transform: scale(1.06); }
.gb-product .tag {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--gb-orange);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.gb-product .tag.green { background: var(--gb-green); }
.gb-product .body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.gb-product .cat-label { color: var(--gb-green); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.gb-product h6 { margin: 4px 0 6px; font-weight: 700; font-size: 1rem; overflow-wrap: anywhere; }
.gb-product .unit { color: var(--gb-muted); font-size: 0.82rem; margin-bottom: 8px; }
.gb-product .price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-top: auto; }
.gb-product .price { font-size: 1.15rem; font-weight: 800; color: var(--gb-green-dark); }
.gb-product .price-old { color: var(--gb-muted); text-decoration: line-through; font-size: 0.9rem; }
.gb-product .add-btn {
  margin-top: 10px;
  width: 100%;
  background: var(--gb-green-light);
  color: var(--gb-green-dark);
  border: none;
  border-radius: 999px;
  font-weight: 700;
  padding: 0.5rem;
  transition: all 0.2s ease;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.gb-product .add-btn:hover { background: var(--gb-green); color: #fff; }
.gb-product .add-btn.added { background: var(--gb-green); color: #fff; }

/* ---------- Promo banner ---------- */
.gb-promo {
  background: linear-gradient(120deg, var(--gb-green-dark), var(--gb-green));
  border-radius: 22px;
  color: #fff;
  overflow: hidden;
  position: relative;
}
.gb-promo h3 { color: #fff; }
.gb-promo .price-big { font-size: 2.4rem; font-weight: 800; color: var(--gb-orange); }

/* ---------- Footer ---------- */
.gb-footer {
  background: #11271a;
  color: #c7d8cc;
  padding: 3rem 0 1.5rem;
}
.gb-footer h6 { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.gb-footer a { color: #c7d8cc; display: block; padding: 4px 0; font-size: 0.92rem; overflow-wrap: anywhere; }
.gb-footer p, .gb-footer span { overflow-wrap: anywhere; }
.gb-footer a:hover { color: var(--gb-orange); }
.gb-footer .brand { color: #fff; font-size: 1.4rem; font-weight: 800; }
.gb-footer .social a {
  display: inline-flex;
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  align-items: center; justify-content: center;
  margin-right: 8px;
  color: #fff;
}
.gb-footer .social a:hover { background: var(--gb-green); }
.gb-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2rem;
  padding-top: 1.2rem;
  font-size: 0.85rem;
  color: #8fa899;
}

/* ---------- Store layout ---------- */
.gb-store-hero {
  background: linear-gradient(120deg, var(--gb-green-light), #fff);
  padding: 2.4rem 0;
}
.gb-filter {
  background: #fff;
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-card-radius);
  padding: 1.2rem;
  position: sticky;
  top: 80px;
}
.gb-filter h6 { font-weight: 700; margin-bottom: 1rem; }
.gb-filter .form-check-label { font-size: 0.9rem; color: var(--gb-ink); }
.gb-chip {
  display: inline-block;
  background: var(--gb-green-light);
  color: var(--gb-green-dark);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 6px 8px 0;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.gb-chip:hover, .gb-chip.active { background: var(--gb-green); color: #fff; }

/* ---------- Product detail ---------- */
.gb-pd-gallery {
  background: #fff;
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-card-radius);
  overflow: hidden;
}
.gb-pd-gallery .main-img { aspect-ratio: 1/1; object-fit: cover; width: 100%; }
.gb-pd-thumb {
  aspect-ratio: 1/1;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}
.gb-pd-thumb.active, .gb-pd-thumb:hover { border-color: var(--gb-green); }
.gb-pd-info .price { font-size: 2rem; font-weight: 800; color: var(--gb-green-dark); }
.gb-pd-info .price-old { font-size: 1.2rem; color: var(--gb-muted); text-decoration: line-through; }
.gb-pd-badge {
  display: inline-block;
  background: var(--gb-green-light);
  color: var(--gb-green-dark);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 6px;
}
.gb-qty {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--gb-line);
  border-radius: 999px;
  overflow: hidden;
}
.gb-qty button {
  background: var(--gb-green-light);
  color: var(--gb-green-dark);
  border: none;
  width: 40px; height: 40px;
  font-size: 1.2rem;
  font-weight: 700;
}
.gb-qty input {
  border: none;
  width: 50px;
  text-align: center;
  font-weight: 700;
}
.gb-tab-nav .nav-link { color: var(--gb-muted); font-weight: 600; border: none; border-bottom: 3px solid transparent; border-radius: 0; }
.gb-tab-nav .nav-link.active { color: var(--gb-green-dark); border-bottom-color: var(--gb-green); background: transparent; }

/* ---------- Cart / checkout ---------- */
.gb-cart-item {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-card-radius);
  padding: 12px;
  align-items: center;
}
.gb-cart-item img { width: 70px; height: 70px; border-radius: 10px; object-fit: cover; }
.gb-summary {
  background: #fff;
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-card-radius);
  padding: 1.4rem;
  position: sticky;
  top: 80px;
}
.gb-summary .row-line { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--gb-ink); }
.gb-summary .total { font-size: 1.5rem; font-weight: 800; color: var(--gb-green-dark); }
.gb-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 1.6rem; }
.gb-steps .step { display: inline-flex; align-items: center; gap: 6px; color: var(--gb-muted); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.gb-steps .step.active { color: var(--gb-green-dark); }
.gb-steps .step.done { color: var(--gb-green); }
.gb-steps .line { width: 32px; height: 2px; background: var(--gb-line); flex-shrink: 0; }
.gb-step { display: flex; align-items: center; gap: 8px; color: var(--gb-muted); font-weight: 600; font-size: 0.9rem; }
.gb-step .num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gb-line); color: var(--gb-muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.gb-step.active .num { background: var(--gb-green); color: #fff; }
.gb-step.active { color: var(--gb-green-dark); }
.gb-step .bar { width: 40px; height: 2px; background: var(--gb-line); }

.gb-form-card {
  background: #fff;
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-card-radius);
  padding: 1.6rem;
}
.form-control, .form-select { border-radius: 10px; }
.form-control:focus, .form-select:focus { border-color: var(--gb-green); box-shadow: 0 0 0 4px var(--gb-green-light); }

/* ---------- Toast ---------- */
.gb-toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--gb-green-dark);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: var(--gb-shadow-hover);
  z-index: 2000;
  font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  transform: translateY(120%);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}
.gb-toast.show { transform: translateY(0); }

/* ---------- Helpers ---------- */
.text-green { color: var(--gb-green) !important; }
.text-green-dark { color: var(--gb-green-dark) !important; }
.text-orange { color: var(--gb-orange) !important; }
.bg-green-light { background: var(--gb-green-light) !important; }
.section-pad { padding-top: 3.2rem; padding-bottom: 3.2rem; }
.muted { color: var(--gb-muted); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--gb-muted); }
.empty-state .ic { font-size: 3rem; color: var(--gb-line); margin-bottom: 12px; }

/* ---------- Animations ---------- */
@keyframes gbFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.gb-fade-up { animation: gbFadeUp 0.5s ease both; }
.gb-fade-up.d1 { animation-delay: 0.05s; }
.gb-fade-up.d2 { animation-delay: 0.12s; }
.gb-fade-up.d3 { animation-delay: 0.2s; }

/* ===========================================================
   Integration layer — maps the storefront's own markup hooks
   (checkout scripts, related products component, pagination)
   onto the theme above.
   =========================================================== */

.hidden { display: none !important; }
.border-gray-300 { border-color: var(--gb-line) !important; }
.border-red-500 { border-color: #ef4444 !important; }
.ring-red-500, .ring-1 { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18) !important; }

/* Breadcrumbs */
.gb-crumbs { font-size: 0.85rem; color: var(--gb-muted); }
.gb-crumbs a { color: var(--gb-muted); }
.gb-crumbs a:hover { color: var(--gb-green); }

/* Search form inside the navbar */
.gb-search-form { flex: 1 1 320px; max-width: 560px; min-width: 0; }
.gb-search-form .form-select {
  border: 2px solid var(--gb-green-light);
  border-right: none;
  border-radius: 999px 0 0 999px;
  flex: 0 1 165px;
  width: auto;
  min-width: 0;
  max-width: 165px;
  font-size: 0.9rem;
}
.gb-search-form .gb-search { border-radius: 0; border-left: none; border-right: none; flex: 1 1 0; min-width: 0; }
.gb-search-form .form-select:first-child + .gb-search { border-radius: 0; }
.gb-search-form .gb-search:first-child { border-radius: 999px 0 0 999px; border-left: 2px solid var(--gb-green-light); }
.gb-search-form .btn { border-radius: 0 999px 999px 0; flex-shrink: 0; }
@media (max-width: 575.98px) {
  .gb-search-form { flex-basis: 100%; max-width: none; order: 3; }
  .gb-search-form .form-select { flex-basis: 120px; max-width: 120px; }
}

/* Product card action buttons wired to the app's cart cookie */
.gb-product .img-wrap .gb-pd-badge { position: absolute; top: 10px; left: 10px; z-index: 2; margin: 0; }
.gb-product .add-btn[disabled] { opacity: 0.7; }
.gb-product .card-actions { display: flex; gap: 8px; margin-top: 10px; }
.gb-product .card-actions .add-btn { margin-top: 0; min-width: 0; flex: 1 1 0; }
.gb-product .view-btn {
  border: none;
  background: #fff;
  color: var(--gb-green-dark);
  border: 1px solid var(--gb-line);
  border-radius: 999px;
  width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gb-product .view-btn:hover { background: var(--gb-green); color: #fff; border-color: var(--gb-green); }
@media (max-width: 575.98px) {
  .gb-product .body { padding: 0.7rem 0.7rem 0.9rem; }
  .gb-product .card-actions { flex-wrap: wrap; }
  .gb-product .card-actions .add-btn { flex: 1 1 100%; white-space: nowrap; font-size: 0.85rem; padding: 0.45rem 0.5rem; }
  .gb-product .card-actions .add-btn .bi { font-size: 0.95rem; }
  .gb-product .card-actions .view-btn { display: none; }
}

/* Pagination */
.gb-pagination { display: flex; justify-content: center; gap: 6px; list-style: none; padding: 0; margin: 2rem 0 0; }
.gb-pagination .page-item .page-link {
  border: 1px solid var(--gb-line);
  border-radius: 999px;
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gb-ink);
  background: #fff;
  font-weight: 600;
}
.gb-pagination .page-item.active .page-link { background: var(--gb-green); border-color: var(--gb-green); color: #fff; }
.gb-pagination .page-item.disabled .page-link { opacity: 0.45; pointer-events: none; }

/* Order form (product detail sidebar) */
.gb-order-card { background: #fff; border: 1px solid var(--gb-line); border-radius: var(--gb-card-radius); overflow: hidden; }
.gb-order-card .head { background: var(--gb-green); color: #fff; padding: 0.9rem 1.2rem; font-weight: 700; }
.gb-order-card .body { padding: 1.2rem; }
.gb-option-list { border: 1px solid var(--gb-line); border-radius: 12px; background: #fff; overflow: hidden; }
.gb-option-list .gb-option { padding: 0.85rem 1rem; }
.gb-option-list .gb-option + .gb-option { border-top: 1px solid var(--gb-line); }
.gb-option-list .form-check-input:checked { background-color: var(--gb-green); border-color: var(--gb-green); }
.gb-total-btn {
  background: var(--gb-orange);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  padding: 0.8rem 1.2rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.gb-total-btn:hover { background: var(--gb-orange-dark); color: #fff; }

/* Gallery thumbs on the product detail page */
.gb-pd-gallery .gallery-scroll { display: flex; gap: 10px; overflow-x: auto; }
.gb-pd-gallery .gallery-img {
  width: 78px;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.gb-pd-gallery .gallery-img.active, .gb-pd-gallery .gallery-img:hover { border-color: var(--gb-green); }

/* Related products view component */
.gb-related .custom-card { background: #fff; border: 1px solid var(--gb-line); border-radius: var(--gb-card-radius); padding: 1.4rem; }
.gb-related .section-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; }
.gb-related .related-scroll { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.gb-related .related-product-link { flex: 0 0 170px; }
.gb-related .related-product-card {
  background: #fff;
  border: 1px solid var(--gb-line);
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  transition: box-shadow 0.2s, transform 0.2s;
}
.gb-related .related-product-card:hover { box-shadow: var(--gb-shadow); transform: translateY(-3px); }
.gb-related .related-product-img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.gb-related .related-product-info { padding: 0.7rem 0.8rem 0.9rem; }
.gb-related .related-product-title { font-weight: 600; font-size: 0.9rem; color: var(--gb-ink); }
.gb-related .related-product-price { font-weight: 800; color: var(--gb-green-dark); margin-top: 4px; }

/* Checkout line items reuse the app's product-item hooks */
.gb-checkout .product-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--gb-line); }
.gb-checkout .product-item:last-child { border-bottom: none; }
.gb-checkout .product-item > .flex-grow-1 { min-width: 0; }
.gb-checkout .product-item h6, .gb-checkout .product-item p { overflow-wrap: anywhere; }
.gb-summary .row-line span, .gb-option-list .gb-option span { overflow-wrap: anywhere; }
.gb-checkout .product-item .thumb { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: #f3f7f3; flex-shrink: 0; }
.gb-checkout .product-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.gb-checkout .item-qty-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--gb-orange);
  color: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
}
.gb-checkout .variant-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.gb-checkout .size-selector { max-width: 190px; }
.gb-checkout .size-error-msg { color: #ef4444; font-size: 0.75rem; font-weight: 600; }
.gb-checkout .item-total-price { font-weight: 800; color: var(--gb-green-dark); }
.gb-checkout .btn-delete-product { border: none; background: transparent; color: #ef4444; }
.gb-checkout .btn-remove-variant { border: none; background: transparent; color: #ef4444; }
.gb-checkout .gb-qty .input-qty { border: none; width: 46px; text-align: center; font-weight: 700; background: #fff; }
.gb-checkout .gb-qty button { line-height: 1; }

/* Buy page */
.gb-buy-hero { background: linear-gradient(115deg, var(--gb-green-light) 0%, #fff 60%); }
.gb-buy-gallery .main-shot { border-radius: 22px; box-shadow: var(--gb-shadow-hover); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gb-buy-price {
  display: inline-flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--gb-line);
  border-radius: 16px;
  padding: 0.8rem 1.4rem;
  box-shadow: var(--gb-shadow);
}
.gb-buy-price small { color: var(--gb-muted); font-weight: 600; text-transform: uppercase; font-size: 0.72rem; }
.gb-buy-price strong { font-size: 1.8rem; color: var(--gb-green-dark); }
.gb-buy .gallery-frame { aspect-ratio: 4/3; overflow: hidden; border-radius: 18px; background: var(--gb-green-light); }
.gb-buy .gallery-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.gb-buy .gallery-slide.active { opacity: 1; transform: scale(1); }
.gb-buy .gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--gb-green-dark);
  box-shadow: var(--gb-shadow);
  z-index: 3;
}
.gb-buy .gallery-arrow:hover { background: var(--gb-green); color: #fff; }
.gb-buy .gallery-arrow.prev { left: 10px; }
.gb-buy .gallery-arrow.next { right: 10px; }
.gb-buy .gallery-dots { display: flex; gap: 7px; justify-content: center; padding-top: 0.8rem; }
.gb-buy .gallery-dot { width: 8px; height: 8px; border: none; border-radius: 50%; background: var(--gb-line); }
.gb-buy .gallery-dot.active { background: var(--gb-green); transform: scale(1.3); }
.gb-buy-description { overflow-wrap: anywhere; }
.gb-buy-description img { max-width: 100%; height: auto; border-radius: 12px; }
.gb-buy-description video, .gb-buy-description iframe { max-width: 100%; }
.gb-buy-description table { display: block; max-width: 100%; overflow-x: auto; }
.gb-buy-price { max-width: 100%; }
.gb-buy-price strong { overflow-wrap: anywhere; }

/* The checkout scripts toggle these utility class names on cart rows */
.theme-gb .hidden { display: none !important; }
.theme-gb .border-red-500 { border-color: #ef4444 !important; box-shadow: 0 0 0 1px #ef4444; }
.theme-gb .border-gray-300 { border-color: var(--gb-line); box-shadow: none; }
.gb-qty-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--gb-orange);
  color: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
}

/* Floating cart tab from the shared cart component */
.floating-cart-tab { background-color: var(--gb-green-dark) !important; border-color: var(--gb-green-dark) !important; }
.floating-cart-tab:hover { background-color: var(--gb-green) !important; }
.cart-badge { background-color: var(--gb-orange) !important; }

/* ---------- Landing carousels (categories + product sections) ---------- */
.gb-carousel {
  position: relative;
}
.gb-carousel-track {
  display: flex;
  align-items: stretch;
  column-gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 2px 20px;
  cursor: grab;
}
.gb-carousel-track::-webkit-scrollbar { height: 0; }
.gb-carousel-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
  user-select: none;
}
.gb-carousel .landing-carousel-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
}
.gb-carousel-product,
.gb-carousel-cat {
  display: flex;
  width: calc((100% - 16px) / 2);
}
.gb-carousel-product > .gb-product,
.gb-carousel-cat > .gb-cat { width: 100%; }
.gb-carousel .landing-carousel-nav {
  position: absolute;
  top: 50%;
  right: -16px;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--gb-line);
  color: var(--gb-green-dark);
  box-shadow: var(--gb-shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.gb-carousel:hover .landing-carousel-nav,
.gb-carousel .landing-carousel-nav:focus-visible { opacity: 1; }
.gb-carousel .landing-carousel-nav:hover {
  background: var(--gb-green);
  border-color: var(--gb-green);
  color: #fff;
}
.gb-carousel .landing-carousel-prev { right: auto; left: -16px; }
.gb-carousel .landing-carousel-nav.is-disabled { opacity: 0; pointer-events: none; }
.gb-carousel.is-static .landing-carousel-nav { display: none; }
.gb-carousel .landing-carousel-loader {
  position: absolute;
  right: 12px;
  bottom: -4px;
  color: var(--gb-muted);
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .gb-carousel-product,
  .gb-carousel-cat { width: calc((100% - 2 * 16px) / 3); }
}
@media (min-width: 992px) {
  .gb-carousel-product { width: calc((100% - 4 * 16px) / 5); }
  .gb-carousel-cat { width: calc((100% - 3 * 16px) / 4); }
}
@media (max-width: 575.98px) {
  .gb-carousel .landing-carousel-nav {
    display: inline-flex;
    width: 36px;
    height: 36px;
    opacity: 1;
    z-index: 10;
  }
  .gb-carousel .landing-carousel-nav:hover {
    background: var(--gb-green);
    color: #fff;
  }
  .gb-carousel .landing-carousel-prev { left: 6px; }
  .gb-carousel .landing-carousel-next { right: 6px; }
  .gb-product .card-actions { flex-wrap: wrap; }
  .gb-product .card-actions .add-btn { flex: 1 1 100%; white-space: nowrap; font-size: 0.85rem; padding: 0.45rem 0.5rem; }
  .gb-product .card-actions .add-btn .bi { font-size: 0.95rem; }
  .gb-product .card-actions .view-btn { display: none; }
}