/* =====================================================================
   GUZONES THEME: blue brand + compact layout
   Matches sell.guzones.com: blue primary actions with white text,
   clean white cards, compact product grids.

   Loaded last from base.html. Every rule is prefixed with
   body.gz-theme so it outranks the page-level <style> blocks that load
   after <head> (they mostly use single-class selectors).

   Scope rules:
   - Shared chrome (header cart, bottom nav, primary buttons) applies to
     every page, including the homepage.
   - Product-grid/card density rules skip the homepage
     (body.gz-page-home): templates/home.html is design-locked.
   - Admin pages (gz-page-admin-*) keep their existing look.
   Prices stay bold near-black for readability; blue is for actions,
   badges and highlights. (Variable names still say "yellow" from the
   previous palette; their values are the blue brand.)
   ===================================================================== */

:root {
  --yellow-primary: #1433D6;
  --yellow-dark: #0F27A8;
  --yellow-light: #EBEFFD;
  --on-brand: #FFFFFF;
  --black: #1A1A1A;
  --gray-900: #212121;
  --gray-700: #424242;
  --gray-500: #757575;
  --gray-300: #E0E0E0;
  --gray-100: #F5F5F5;
  --white: #FFFFFF;
  --success: #4CAF50;
  --error: #F44336;
  --warning: #FF9800;
  --gz-radius-btn: 10px;
  --gz-radius-card: 12px;
  --gz-shadow-yellow: 0 4px 12px rgba(20, 51, 214, 0.25);
  --gz-shadow-yellow-hover: 0 6px 16px rgba(20, 51, 214, 0.35);
}

/* ---------------------------------------------------------------------
   1. PRIMARY BUTTONS (shared utility + existing primary actions)
   --------------------------------------------------------------------- */
body.gz-theme .btn-primary-yellow,
body.gz-theme:not([class*="gz-page-admin"]) .btn-primary,
body.gz-theme .add-to-cart-btn.btn-dark {
  background: var(--yellow-primary);
  border-color: var(--yellow-primary);
  color: var(--on-brand);
  border-radius: var(--gz-radius-btn);
  font-weight: 700;
  box-shadow: var(--gz-shadow-yellow);
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
body.gz-theme .btn-primary-yellow:hover,
body.gz-theme:not([class*="gz-page-admin"]) .btn-primary:hover,
body.gz-theme .add-to-cart-btn.btn-dark:hover {
  background: var(--yellow-dark);
  border-color: var(--yellow-dark);
  color: var(--on-brand);
  transform: translateY(-2px);
  box-shadow: var(--gz-shadow-yellow-hover);
}
body.gz-theme .btn-primary-yellow:active,
body.gz-theme:not([class*="gz-page-admin"]) .btn-primary:active,
body.gz-theme .add-to-cart-btn.btn-dark:active { transform: translateY(0); }
body.gz-theme :is(.btn-primary-yellow, .add-to-cart-btn):focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 2px;
}
body.gz-theme :is(.btn-primary-yellow, .add-to-cart-btn):disabled {
  opacity: .6; cursor: not-allowed; transform: none;
}

/* ---------------------------------------------------------------------
   2. HEADER CART BUTTON
   Yellow ring + dark icon (a yellow icon on white would be too faint),
   yellow count badge with dark number.
   --------------------------------------------------------------------- */
body.gz-theme .cart-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--yellow-primary);
  color: var(--black);
  font-size: 19px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  transition: background-color .2s ease, transform .2s ease;
}
body.gz-theme .cart-icon:hover {
  background: var(--yellow-light);
  transform: scale(1.05);
}
body.gz-theme .cart-badge {
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  background: var(--yellow-primary);
  color: var(--on-brand);
  font-size: 11px;
  font-weight: 800;
  border: 2px solid var(--white);
}

/* ---------------------------------------------------------------------
   3. BOTTOM NAV + NAV TABS: blue active state
   --------------------------------------------------------------------- */
body.gz-theme .nav-item.active { color: var(--yellow-primary); }
body.gz-theme .nav-item.active .nav-icon-wrapper {
  background: var(--yellow-primary);
  box-shadow: 0 3px 10px rgba(20, 51, 214, .30);
}
body.gz-theme .nav-item.active .nav-icon { color: var(--on-brand); }

body.gz-theme .nav-tab { color: var(--gray-500); transition: color .2s ease; }
body.gz-theme .nav-tab:hover { color: var(--black); }
body.gz-theme .nav-tab.active {
  color: var(--black);
  border-bottom: 3px solid var(--yellow-primary);
}

/* ---------------------------------------------------------------------
   4. PRODUCT DETAIL: purchase buttons
   Add to cart = brand blue; Proceed to checkout = graphite so the two
   stacked actions stay distinct.
   --------------------------------------------------------------------- */
body.gz-page-product-detail .btn-amazon-cart,
body.gz-page-product-detail .btn-cart {
  background: var(--yellow-primary);
  border: none;
  color: var(--on-brand);
  border-radius: var(--gz-radius-btn);
  font-weight: 800;
  box-shadow: var(--gz-shadow-yellow);
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
body.gz-page-product-detail .btn-amazon-cart:hover,
body.gz-page-product-detail .btn-cart:hover {
  background: var(--yellow-dark);
  transform: translateY(-2px);
  box-shadow: var(--gz-shadow-yellow-hover);
}
body.gz-page-product-detail .btn-amazon-cart:active,
body.gz-page-product-detail .btn-cart:active { transform: translateY(0); }

/* Proceed to checkout: premium graphite, distinct from the blue Add to
   cart. Every state (hover, tap, processing/disabled) stays graphite —
   phones keep :hover after a tap, so hover must not change the hue. */
body.gz-page-product-detail .btn-mpesa,
body.gz-page-product-detail .btn-mpesa:is(:hover, :focus, :active, :disabled) {
  background: linear-gradient(135deg, #0B1220 0%, #1F2937 55%, #334155 100%);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: var(--gz-radius-btn);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .28), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
body.gz-page-product-detail .btn-mpesa:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.12);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .34), inset 0 1px 0 rgba(255, 255, 255, .1);
}
body.gz-page-product-detail .btn-mpesa:active:not(:disabled) { transform: translateY(0); filter: brightness(.96); }
body.gz-page-product-detail .btn-mpesa:disabled { opacity: .85; cursor: wait; transform: none; }
body.gz-page-product-detail .btn-mpesa :is(.mpesa-icon, .mpesa-arrow) {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .16);
  color: #FFFFFF;
}
body.gz-page-product-detail .btn-mpesa .mpesa-small { opacity: .75; }

/* Add to cart: stay brand blue while adding (disabled) and on sticky hover. */
body.gz-page-product-detail :is(.btn-amazon-cart, .btn-cart):disabled {
  background: var(--yellow-primary);
  color: var(--on-brand);
  opacity: .85;
  cursor: wait;
  transform: none;
}

/* ---------------------------------------------------------------------
   5. PRODUCT CARDS (all listing pages except the locked homepage)
   --------------------------------------------------------------------- */
body.gz-theme:not(.gz-page-home) .product-card,
body.gz-theme .ss-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--gz-radius-card);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  transition: box-shadow .2s ease, transform .2s ease;
}
body.gz-theme:not(.gz-page-home) .product-card:hover,
body.gz-theme .ss-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  transform: translateY(-4px);
}

/* Prices: bold near-black everywhere outside the homepage */
body.gz-theme:not(.gz-page-home) .product-price,
body.gz-theme .ss-card-price,
body.gz-page-products-by-category .card-premium .price {
  color: var(--black);
  font-weight: 800;
}

/* ---------------------------------------------------------------------
   6. CATEGORY PAGE: list -> compact 2-column grid
   (endpoint products_by_category; cards from partials/_category_products)
   --------------------------------------------------------------------- */
body.gz-page-products-by-category .category-products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 12px 120px;
}
@media (min-width: 768px) {
  body.gz-page-products-by-category .category-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}
@media (min-width: 1200px) {
  body.gz-page-products-by-category .category-products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
body.gz-page-products-by-category .category-products-grid .product-item {
  border-bottom: none;
  min-width: 0;
}
body.gz-page-products-by-category .card-premium {
  flex-direction: column;
  gap: 0;
  padding: 0;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--gz-radius-card);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  transition: box-shadow .2s ease, transform .2s ease;
}
body.gz-page-products-by-category .card-premium:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
  transform: translateY(-4px);
}
body.gz-page-products-by-category .card-premium > a { display: block; width: 100%; }
body.gz-page-products-by-category .card-premium .image-wrap {
  flex: none;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border: none;
  border-radius: 0;
}
body.gz-page-products-by-category .card-premium .image-wrap :is(img, video) {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.gz-page-products-by-category .card-premium .info {
  width: 100%;
  min-width: 0;
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
body.gz-page-products-by-category .card-premium .title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--black);
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.gz-page-products-by-category .card-premium .price { font-size: 16px; margin: 0 0 4px; }
/* Keep grid cards compact: long description, colours, sizes and
   "ships to" are on the product page. */
body.gz-page-products-by-category .card-premium :is(.product-desc, .colors, .sizes, .ships-to-line) {
  display: none;
}
body.gz-page-products-by-category .card-premium :is(.ships-from-line, .delivery-line) {
  font-size: 11.5px;
  line-height: 1.35;
  margin: 1px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.gz-page-products-by-category .card-premium .cart-btn {
  margin-top: auto;
  padding-top: 0;
}
body.gz-page-products-by-category .card-premium .info > .cart-btn { margin-top: 8px; }

/* Category quick-add button */
body.gz-theme .cart-btn {
  background: var(--yellow-primary);
  color: var(--on-brand);
  border-radius: var(--gz-radius-btn);
  min-height: 40px;
  font-weight: 700;
  box-shadow: var(--gz-shadow-yellow);
  transition: background-color .2s ease, transform .2s ease;
}
body.gz-theme .cart-btn:hover { background: var(--yellow-dark); transform: translateY(-2px); }
body.gz-theme .cart-btn:active { background: var(--yellow-dark); transform: translateY(0); }
body.gz-theme .cart-btn.success { background: var(--success); color: var(--white); box-shadow: none; }

/* ---------------------------------------------------------------------
   7. SUBCATEGORY PAGE (already a compact grid): brand the quick-add
   --------------------------------------------------------------------- */
body.gz-theme .product-add-btn {
  background: var(--yellow-primary);
  color: var(--on-brand);
  box-shadow: 0 4px 12px rgba(20, 51, 214, .40);
}
body.gz-theme .product-add-btn:hover { background: var(--yellow-dark); transform: scale(1.06); }
body.gz-page-subcategory-products .product-grid { gap: 8px; padding: 0 12px; }
@media (min-width: 768px) {
  body.gz-page-subcategory-products .product-grid { gap: 12px; }
}

/* ---------------------------------------------------------------------
   8. SELLER SHOP: stylish add to cart + compact grid
   --------------------------------------------------------------------- */
body.gz-theme .ss-grid { gap: 8px; padding-left: 12px; padding-right: 12px; }
@media (min-width: 768px) { body.gz-theme .ss-grid { gap: 12px; } }
body.gz-theme .ss-add-cart-btn {
  background: var(--yellow-primary);
  color: var(--on-brand);
  border-radius: var(--gz-radius-btn);
  padding: 11px 8px;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  white-space: nowrap;
  min-width: 0;
  box-shadow: 0 4px 12px rgba(20, 51, 214, .25);
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
body.gz-theme .ss-add-cart-btn:hover {
  background: var(--yellow-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(20, 51, 214, .35);
}
body.gz-theme .ss-add-cart-btn:active { transform: translateY(0); }
body.gz-theme .ss-add-cart-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
body.gz-theme .ss-wish-btn { border-radius: var(--gz-radius-btn); height: 42px; width: 42px; }
body.gz-theme .ss-btn-primary:not(.following) {
  background: var(--yellow-primary);
  border-color: var(--yellow-primary);
  color: var(--on-brand);
}

/* ---------------------------------------------------------------------
   9. CART: checkout button
   --------------------------------------------------------------------- */
body.gz-theme .checkout-btn {
  background: var(--yellow-primary);
  color: var(--on-brand);
  border-radius: var(--gz-radius-btn);
  font-weight: 800;
  box-shadow: var(--gz-shadow-yellow);
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
body.gz-theme .checkout-btn:hover {
  background: var(--yellow-dark);
  color: var(--on-brand);
  transform: translateY(-2px);
  box-shadow: var(--gz-shadow-yellow-hover);
}

@media (prefers-reduced-motion: reduce) {
  body.gz-theme * { transition: none !important; }
  body.gz-theme :is(.btn-primary-yellow, .btn-primary, .cart-btn, .checkout-btn, .ss-add-cart-btn, .btn-cart, .btn-amazon-cart, .btn-mpesa, .card-premium, .product-card, .ss-card):hover {
    transform: none;
  }
}

/* No colour swatches on product listing cards (Alibaba-style cards) */
body.gz-page-subcategory-products .product-card .colors,
body.gz-theme .color-dots { display: none !important; }

/* White app background on every customer page (admin keeps its own) */
body.gz-theme:not([class*="gz-page-admin"]) {
  background: #FFFFFF !important;
  --ss-bg: #FFFFFF;
  --ck-bg: #FFFFFF;
  --bg: #FFFFFF;
}
body.gz-theme:not([class*="gz-page-admin"]) :is(.desktop-wrapper, .category-products-grid, .product-grid-wrap, .ss-page, .ck-page, .od-pg) {
  background-color: #FFFFFF;
}

/* =====================================================================
   9. AMAZON-STYLE PRODUCT CARDS (category, subcategory, seller shop)
   White 6px cards with a light border, square image, and a round cart
   button pinned to the card's bottom-right corner (below the image, not
   on it). The button is anchored to the card by making the image/info
   wrappers non-positioned; the last text lines leave room for it.
   ===================================================================== */
body.gz-page-products-by-category .card-premium,
body.gz-page-subcategory-products .product-card,
body.gz-theme .ss-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid #EEEEEE;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
  transition: box-shadow .2s ease;
}
body.gz-page-products-by-category .card-premium:hover,
body.gz-page-subcategory-products .product-card:hover,
body.gz-theme .ss-card:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

/* square images */
body.gz-page-products-by-category .card-premium .image-wrap,
body.gz-page-subcategory-products .product-card .product-img :is(img, .pv-video-wrap),
body.gz-theme .ss-card-img {
  aspect-ratio: 1 / 1 !important;
  background: #F5F5F5;
}
body.gz-page-subcategory-products .product-card .product-img img { height: auto; object-fit: cover; }

/* anchor the button to the card, not the image / info block */
body.gz-page-products-by-category .card-premium .info,
body.gz-page-subcategory-products .product-card .product-img,
body.gz-theme .ss-card-footer-wrap,
body.gz-theme .ss-card-footer {
  position: static;
}
body.gz-page-products-by-category .card-premium .info,
body.gz-page-subcategory-products .product-card .product-info,
body.gz-theme .ss-card-body {
  padding: 8px 12px 12px;
  background: #FFFFFF;
}
/* keep the cart-image chips/badges on the image corner */
body.gz-page-subcategory-products .product-card .product-img > :is(.china-badge-corner, .fd-label, .fd-sponsored) { z-index: 3; }

/* the round corner button */
body.gz-page-products-by-category .card-premium .cart-btn,
body.gz-page-subcategory-products .product-card .product-add-btn,
body.gz-theme .ss-card .ss-add-cart-btn {
  position: absolute !important;
  right: 8px; bottom: 8px; top: auto; left: auto;
  width: 46px; height: 46px; min-height: 0;
  margin: 0 !important; padding: 0;
  border: none; border-radius: 50%;
  background: var(--yellow-primary); color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-size: 0;                       /* hides the "Add to Cart" text label */
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  z-index: 10;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
body.gz-page-products-by-category .card-premium .cart-btn i,
body.gz-page-subcategory-products .product-card .product-add-btn i,
body.gz-theme .ss-card .ss-add-cart-btn i { font-size: 20px; margin: 0; color: #FFFFFF; }
@media (min-width: 768px) {
  body.gz-page-products-by-category .card-premium .cart-btn,
  body.gz-page-subcategory-products .product-card .product-add-btn,
  body.gz-theme .ss-card .ss-add-cart-btn { width: 50px; height: 50px; }
  body.gz-page-products-by-category .card-premium .cart-btn i,
  body.gz-page-subcategory-products .product-card .product-add-btn i,
  body.gz-theme .ss-card .ss-add-cart-btn i { font-size: 22px; }
}
body.gz-page-products-by-category .card-premium .cart-btn:hover,
body.gz-page-subcategory-products .product-card .product-add-btn:hover,
body.gz-theme .ss-card .ss-add-cart-btn:hover {
  transform: scale(1.08);
  background: var(--yellow-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
body.gz-page-products-by-category .card-premium .cart-btn:is(.success),
body.gz-page-subcategory-products .product-card .product-add-btn:is(.success) { background: var(--success); }
body.gz-page-subcategory-products .product-card .product-add-btn.loading { background: var(--yellow-primary); opacity: .75; }
body.gz-page-products-by-category .card-premium .cart-btn:disabled,
body.gz-theme .ss-card .ss-add-cart-btn:disabled { opacity: .8; transform: none; }

/* leave room for the button on the card's bottom text lines */
body.gz-page-products-by-category .card-premium .info > :is(.price, .ships-from-line, .delivery-line, div:has(+ .cart-btn)),
body.gz-page-subcategory-products .product-card .product-info > :nth-last-child(-n+2),
body.gz-theme .ss-card :is(.ss-card-price-row, .ss-card-chips) {
  padding-right: 52px;
}
body.gz-page-products-by-category .card-premium .info { min-height: 62px; }

/* seller shop: heart moves to the image corner */
body.gz-theme .ss-card .ss-wish-btn {
  position: absolute; top: 8px; right: 8px; z-index: 4;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}
body.gz-theme .ss-card-footer-wrap { padding: 0; }
body.gz-theme .ss-card-body { padding-bottom: 14px; min-height: 64px; }

/* compact 8px grids, 2 / 3 / 4 columns, white pages */
body.gz-page-products-by-category .category-products-grid,
body.gz-page-subcategory-products .product-grid,
body.gz-page-subcategory-products .product-grid.fd-masonry,
body.gz-page-subcategory-products .fd-col,
body.gz-theme .ss-grid { gap: 8px !important; }
body.gz-page-products-by-category,
body.gz-page-subcategory-products,
body.gz-page-seller-shop,
body.gz-page-seller-shop-by-id { background: #FFFFFF !important; }
/* style.css gives every .product-img a fixed 220px height; with square
   images that left a grey band under each photo. */
body.gz-page-subcategory-products .product-card .product-img { height: auto; min-height: 0; background: #F5F5F5; }
body.gz-page-subcategory-products .product-card .product-img > a { display: block; }
/* category page with subcategory tiles: white panels */
body.gz-page-products-by-category :is(.cat-layout, .cat-main, .cat-content) { background: #FFFFFF; }

/* Corner add-to-cart: plain "+" icon and a smaller button (all listing
   pages). Category/shop markup uses fa-cart-plus; swap its glyph for the
   Font Awesome plus so JS state changes (spinner / check) still work. */
body.gz-page-products-by-category .card-premium .cart-btn i.fa-cart-plus::before,
body.gz-theme .ss-card .ss-add-cart-btn i.fa-cart-plus::before { content: "\f067"; }
body.gz-page-products-by-category .card-premium .cart-btn,
body.gz-page-subcategory-products .product-card .product-add-btn,
body.gz-theme .ss-card .ss-add-cart-btn { width: 36px; height: 36px; right: 8px; bottom: 8px; }
body.gz-page-products-by-category .card-premium .cart-btn i,
body.gz-page-subcategory-products .product-card .product-add-btn i,
body.gz-theme .ss-card .ss-add-cart-btn i { font-size: 16px; }
@media (min-width: 768px) {
  body.gz-page-products-by-category .card-premium .cart-btn,
  body.gz-page-subcategory-products .product-card .product-add-btn,
  body.gz-theme .ss-card .ss-add-cart-btn { width: 40px; height: 40px; }
  body.gz-page-products-by-category .card-premium .cart-btn i,
  body.gz-page-subcategory-products .product-card .product-add-btn i,
  body.gz-theme .ss-card .ss-add-cart-btn i { font-size: 17px; }
}
body.gz-page-products-by-category .card-premium .info > :is(.price, .ships-from-line, .delivery-line, div:has(+ .cart-btn)),
body.gz-page-subcategory-products .product-card .product-info > :nth-last-child(-n+2),
body.gz-theme .ss-card :is(.ss-card-price-row, .ss-card-chips) { padding-right: 44px; }
body.gz-page-products-by-category .card-premium .info { min-height: 52px; }
body.gz-theme .ss-card-body { min-height: 54px; }
/* Perfectly centre the "+" inside the round button */
body.gz-page-products-by-category .card-premium .cart-btn,
body.gz-page-subcategory-products .product-card .product-add-btn,
body.gz-theme .ss-card .ss-add-cart-btn {
  display: grid !important; place-items: center; padding: 0 !important;
  line-height: 0; text-align: center; gap: 0;
}
body.gz-page-products-by-category .card-premium .cart-btn i,
body.gz-page-subcategory-products .product-card .product-add-btn i,
body.gz-theme .ss-card .ss-add-cart-btn i {
  display: block; width: 1em; height: 1em; line-height: 1;
  margin: 0 !important; text-align: center;
}
body.gz-page-products-by-category .card-premium .cart-btn i::before,
body.gz-page-subcategory-products .product-card .product-add-btn i::before,
body.gz-theme .ss-card .ss-add-cart-btn i::before { display: block; line-height: 1; }
/* hidden "Add to Cart" text still takes a grid row on category/shop
   buttons; pin the icon to the exact centre instead */
body.gz-page-products-by-category .card-premium .cart-btn i,
body.gz-page-subcategory-products .product-card .product-add-btn i,
body.gz-theme .ss-card .ss-add-cart-btn i {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}

/* =====================================================================
   10. FLEXIBLE CARD HEIGHTS: every card is only as tall as its content.
   Grid rows no longer stretch cards to the tallest neighbour, and the
   info blocks don't grow to fill leftover space.
   ===================================================================== */
body.gz-page-products-by-category .category-products-grid,
body.gz-page-subcategory-products .product-grid,
body.gz-theme .ss-grid { align-items: start; }
body.gz-page-products-by-category .category-products-grid .product-item { height: auto; }
body.gz-page-products-by-category .card-premium,
body.gz-page-subcategory-products .product-card,
body.gz-theme .ss-card {
  height: auto !important; min-height: 0 !important;
  display: flex; flex-direction: column;
}
body.gz-page-products-by-category .card-premium .info,
body.gz-page-subcategory-products .product-card .product-info,
body.gz-theme .ss-card-body {
  flex: 0 0 auto !important; min-height: 0 !important;
  padding: 8px 12px 12px;
}
body.gz-theme .ss-card > a { flex: 0 0 auto; }
body.gz-theme .ss-card-name { min-height: 0 !important; }
body.gz-theme .ss-card-footer { margin-top: 0; padding-top: 0; }
/* the corner "+" needs ~52px: cards with only a name + price still clear it */
body.gz-page-products-by-category .card-premium .info,
body.gz-page-subcategory-products .product-card .product-info,
body.gz-theme .ss-card-body { min-height: 52px !important; }

/* =====================================================================
   11. MASONRY GRIDS (category + seller shop, same as subcategory):
   feed-dynamics.js splits the grid into .fd-col columns and drops each
   card into the shortest one, so cards pack upward with no row gaps.
   ===================================================================== */
body.gz-page-products-by-category .category-products-grid.fd-masonry,
body.gz-theme .ss-grid.fd-masonry {
  display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important;
  align-items: flex-start; gap: 8px !important;
}
body.gz-page-products-by-category .category-products-grid.fd-masonry > .fd-col,
body.gz-theme .ss-grid.fd-masonry > .fd-col {
  display: flex; flex-direction: column; gap: 8px; flex: 1 1 0; min-width: 0;
}
