/*
Theme Name: Meezan Book House
Theme URI: https://meezan-book-house.netlify.app
Author: iTECH19
Author URI: https://github.com/shabbiritech19
Description: Custom WooCommerce theme for Meezan Book House — a Pakistani online bookstore for competitive-exam prep (CSS, PMS, PPSC, FPSC, NTS), Islamic literature and educational books. Brand green #1a7a3c, PKR currency, COD / Bank Transfer / Easypaisa payments.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: meezan-book-house
Tags: ecommerce, woocommerce, bookstore, two-columns, custom-menu, featured-images, rtl-language-support
WC requires at least: 7.0
WC tested up to: 9.0
*/

/* ===========================================================================
   Base + shared styles (mirrors the approved Stage-1 prototype).
   Page-specific styles live in /assets/css/ and are enqueued conditionally
   in functions.php (shop / product / cart / checkout / account).
   =========================================================================== */

/* ============================================================
   Meezan Book House — Main Stylesheet
   WooCommerce-compatible CSS
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary:       #1a7a3c;
  --primary-dark:  #145c2c;
  --primary-light: #2aad58;
  --accent:        #f0c030;
  --text:          #1a1a1a;
  --text-muted:    #666;
  --bg:            #ffffff;
  --bg-light:      #f7f5fa;
  --border:        #e8e0f0;
  --footer-bg:     #2d2d2d;
  --footer-text:   #ccc;
  --radius:        8px;
  --shadow:        0 4px 20px rgba(155, 28, 138, 0.12);
  --shadow-hover:  0 8px 32px rgba(155, 28, 138, 0.22);
  --transition:    0.25s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(155,28,138,0.35);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

/* Announcement Bar */
.announcement-bar {
  background: var(--accent);
  color: #1a1a1a;
  text-align: center;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
}

/* Header Main */
.header-main {
  background: var(--primary);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Logo */
.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  color: #fff;
  font-family: Georgia, 'Times New Roman', serif;
}
.logo-line1 {
  font-size: 22px;
  font-weight: 700;
  font-style: italic;
}
.logo-line2 {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 400;
}

/* Desktop Nav */
.desktop-nav { display: none; }
/* Base rule: mega-menu always hidden until hover — MUST be outside media query */
.mega-menu { display: none; }
@media (min-width: 900px) {
  .desktop-nav {
    display: flex;
    flex: 1;
    justify-content: center;
  }
  .desktop-nav > ul {
    display: flex;
    gap: 4px;
    align-items: center;
  }
  .desktop-nav > ul > li { position: relative; }
  .desktop-nav ul li a {
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: background var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .desktop-nav ul li a:hover { background: rgba(255,255,255,0.15); }

  /* Mega dropdown — shown/hidden via JS class .is-open (no CSS :hover) */
  .mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow);
    padding: 8px 0;
    z-index: 999;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .mega-menu.is-open {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .mega-menu li a {
    color: var(--text) !important;
    padding: 10px 18px !important;
    font-weight: 500 !important;
    background: transparent !important;
    display: block !important;
  }
  .mega-menu li a:hover { background: var(--bg-light) !important; color: var(--primary) !important; }
}

/* Header Icons */
.header-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.icon-btn {
  color: #fff;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 17px;
  transition: background var(--transition);
  position: relative;
}
.icon-btn:hover { background: rgba(255,255,255,0.18); }
.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--accent);
  color: #1a1a1a;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: 4px;
  transition: background var(--transition);
}
.menu-toggle:hover { background: rgba(255,255,255,0.15); }
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}
@media (min-width: 900px) { .menu-toggle { display: none; } }

/* ============================================================
   MOBILE MENU OVERLAY
   ============================================================ */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--primary);
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.mobile-menu-overlay.is-open { transform: translateX(0); }
.mobile-menu-inner { min-height: 100%; display: flex; flex-direction: column; }

.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.menu-close {
  color: #fff;
  font-size: 22px;
  padding: 8px;
  border-radius: 50%;
  transition: background var(--transition);
}
.menu-close:hover { background: rgba(255,255,255,0.15); }

.mobile-nav { padding: 20px 0; }
.mobile-nav ul li {
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.mobile-nav ul li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background var(--transition);
}
.mobile-nav ul li a:hover { background: rgba(255,255,255,0.08); }

/* ============================================================
   SECTION SHARED
   ============================================================ */
.section { padding: 60px 0; }
.bg-light { background: var(--bg-light); }

.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  color: var(--text);
  font-family: Georgia, serif;
  margin-bottom: 12px;
}
.title-line {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.title-line span {
  display: block;
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.title-line::before,
.title-line::after {
  content: '';
  display: block;
  width: 20px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.section-footer {
  text-align: center;
  margin-top: 36px;
}

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: #1a0a2e;
}
.hero-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-slide {
  min-width: 100%;
  min-height: 380px;
  display: flex;
  align-items: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) { .hero-slide { min-height: 480px; } }

.hero-content {
  flex: 1;
  padding: 20px 0;
  z-index: 1;
}
.hero-tag {
  display: inline-block;
  background: var(--accent);
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.hero-content h1 {
  font-size: clamp(28px, 6vw, 54px);
  color: #fff;
  font-family: Georgia, serif;
  line-height: 1.15;
  margin-bottom: 16px;
}
.hero-content h1 strong { color: var(--accent); }
.hero-sub {
  color: rgba(255,255,255,0.82);
  font-size: 15px;
  max-width: 420px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-image-wrap {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.18;
}
@media (min-width: 600px) {
  .hero-image-wrap { opacity: 0.35; }
}
@media (min-width: 900px) {
  .hero-image-wrap { opacity: 1; position: relative; width: auto; min-width: 300px; }
  .hero-slide { padding: 60px 0; max-width: 1200px; margin: 0 auto; }
  .hero-slider .hero-slide { padding-left: max(20px, calc((100% - 1200px)/2 + 20px)); }
}

.hero-book-stack {
  display: flex;
  gap: -10px;
  transform: perspective(600px) rotateY(-10deg);
}
.hero-book {
  width: 80px;
  height: 130px;
  border-radius: 4px 8px 8px 4px;
  box-shadow: 4px 4px 20px rgba(0,0,0,0.4);
  margin-left: -12px;
}
.b1 { background: linear-gradient(180deg, #3b5bdb, #1864ab); height: 140px; }
.b2 { background: linear-gradient(180deg, #7048e8, #5f3dc4); height: 120px; }
.b3 { background: linear-gradient(180deg, #e64980, #c2255c); height: 110px; }
.b4 { background: linear-gradient(180deg, #2b8a3e, #2f9e44); height: 130px; }
.b5 { background: linear-gradient(180deg, #862e9c, #9c36b5); height: 115px; }
.b6 { background: linear-gradient(180deg, #e67700, #f59f00); height: 125px; }
.b7 { background: linear-gradient(180deg, #e8590c, #f76707); height: 135px; }
.b8 { background: linear-gradient(180deg, #099268, #0ca678); height: 120px; }
.b9 { background: linear-gradient(180deg, #1971c2, #1c7ed6); height: 110px; }

/* Slider controls */
.hero-prev, .hero-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 5;
}
.hero-prev:hover, .hero-next:hover { background: var(--primary); }
.hero-prev { left: 12px; }
.hero-next { right: 12px; }
.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: background var(--transition), transform var(--transition);
}
.dot.active {
  background: var(--primary);
  transform: scale(1.3);
}

/* ============================================================
   CATEGORIES
   ============================================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (min-width: 600px) { .categories-grid { grid-template-columns: repeat(6, 1fr); } }

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 10px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  text-align: center;
}
.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.category-card.featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, #fff5fd, #fff);
}
.cat-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}
.cat-badge.ppsc { background: linear-gradient(135deg, #1864ab, #1971c2); }
.cat-badge.nts  { background: linear-gradient(135deg, #862e9c, #9c36b5); }
.cat-badge.fpsc { background: linear-gradient(135deg, #2b8a3e, #2f9e44); }
.cat-badge.islamic { background: linear-gradient(135deg, #e67700, #f59f00); }
.cat-badge.school  { background: linear-gradient(135deg, #c92a2a, #e03131); }
.cat-badge.general { background: linear-gradient(135deg, #087f5b, #0ca678); }

.cat-abbr { font-size: 14px; font-weight: 900; letter-spacing: 1px; }
.category-card h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* "Can't find the book" helper line (home categories + shop top) */
.cant-find-line {
  text-align: center;
  margin-top: 28px;
  font-size: 14px;
  color: var(--text-muted);
}
.cant-find-line a {
  color: #1a7a3c;
  font-weight: 700;
  margin-left: 4px;
  white-space: nowrap;
}
.cant-find-line a:hover { text-decoration: underline; }
.cant-find-line .fa-whatsapp { color: #25d366; }

/* Shop-page variant: full-width green strip above the product grid */
.shop-cant-find {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  text-align: center;
  background: #f0faf4;
  border: 1px solid #cdebd8;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text);
}
.shop-cant-find a { color: #1a7a3c; font-weight: 700; white-space: nowrap; }
.shop-cant-find a:hover { text-decoration: underline; }
.shop-cant-find .fa-whatsapp { color: #25d366; }

/* ============================================================
   PRODUCTS / WooCommerce Cards
   ============================================================ */
.products-carousel {
  position: relative;
  overflow: hidden;
}
.products-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.products-track::-webkit-scrollbar { display: none; }

/* WooCommerce product card inside a horizontal carousel (homepage).
   Scoped to .products-track so it never conflicts with the shop grid. */
.products-track { list-style: none; margin: 0; padding: 0 0 4px; }
.products-track .product-card {
  /* FIXED width (flex-basis + width), not min-width — otherwise cards size to
     their title length, giving uneven thumbnail heights across the row. */
  flex: 0 0 calc(50% - 8px);
  width: calc(50% - 8px);
  max-width: calc(50% - 8px);
  min-width: 0;
  scroll-snap-align: start;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  list-style: none;
}
@media (min-width: 600px)  { .products-track .product-card { flex-basis: calc(33.333% - 11px); width: calc(33.333% - 11px); max-width: calc(33.333% - 11px); } }
@media (min-width: 900px)  { .products-track .product-card { flex-basis: calc(25% - 12px);     width: calc(25% - 12px);     max-width: calc(25% - 12px); } }
@media (min-width: 1100px) { .products-track .product-card { flex-basis: calc(25% - 12px);     width: calc(25% - 12px);     max-width: calc(25% - 12px); } }

.products-track .product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.product-link { display: block; }

/* Book Cover (placeholder for WooCommerce product image) */
.product-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--bg-light);
}
.product-thumb:hover .product-actions { opacity: 1; transform: translateY(0); }

.book-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  position: relative;
  border-radius: 0;
}
.book-spine {
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 100%;
  background: rgba(0,0,0,0.25);
  border-radius: 2px 0 0 2px;
}
.book-content {
  color: rgba(255,255,255,0.9);
  text-align: left;
}
.book-category {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  background: rgba(255,255,255,0.25);
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 4px;
}
.book-subtitle {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

/* Book cover colors */
.cover-blue      { background: linear-gradient(160deg, #1864ab, #4dabf7); }
.cover-purple    { background: linear-gradient(160deg, #5f3dc4, #9775fa); }
.cover-green     { background: linear-gradient(160deg, #2b8a3e, #69db7c); }
.cover-red       { background: linear-gradient(160deg, #c92a2a, #ff6b6b); }
.cover-teal      { background: linear-gradient(160deg, #087f5b, #63e6be); }
.cover-orange    { background: linear-gradient(160deg, #d9480f, #ffa94d); }
.cover-dark      { background: linear-gradient(160deg, #212529, #495057); }
.cover-green-dark{ background: linear-gradient(160deg, #1b4332, #40916c); }
.cover-blue-dark { background: linear-gradient(160deg, #023e8a, #0096c7); }
.cover-maroon    { background: linear-gradient(160deg, #6a040f, #e85d04); }

/* Badges */
.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 4px;
  flex-direction: column;
}
.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
}
.badge.new  { background: var(--primary); }
.badge.best { background: #e67700; }
.badge.sale { background: #c92a2a; }

/* Product actions (hover overlay) */
.product-actions {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition);
}
.action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background var(--transition), color var(--transition);
}
.action-btn:hover { background: var(--primary); color: #fff; }
.action-btn.add-to-cart:hover { background: var(--primary-dark); }

/* Product Info */
.product-info {
  padding: 12px 14px 14px;
}
/* WooCommerce standard class */
.woocommerce-loop-product__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* WooCommerce price classes */
.price.woocommerce-Price-amount {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

/* Carousel nav buttons */
.carousel-prev, .carousel-next {
  position: absolute;
  top: 35%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  z-index: 5;
  transition: background var(--transition), color var(--transition);
  border: 1px solid var(--border);
}
.carousel-prev:hover, .carousel-next:hover { background: var(--primary); color: #fff; }
.carousel-prev { left: -8px; }
.carousel-next { right: -8px; }
@media (max-width: 480px) {
  .carousel-prev, .carousel-next { display: none; }
}

/* ============================================================
   PROMO BANNER
   ============================================================ */
.promo-banner {
  background: var(--primary);
  padding: 28px 0;
}
.promo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (min-width: 768px) { .promo-grid { grid-template-columns: repeat(4, 1fr); } }

.promo-card {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}
.promo-card > .fa, .promo-card > i {
  font-size: 28px;
  color: var(--accent);
  flex-shrink: 0;
}
.promo-card h4 { font-size: 14px; font-weight: 700; }
.promo-card p  { font-size: 12px; opacity: 0.8; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) { .testimonials-grid { grid-template-columns: repeat(3, 1fr); } }

.testimonial-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(155,28,138,0.06);
}
.stars { color: #f59f00; margin-bottom: 12px; font-size: 14px; }
.testimonial-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
  font-style: italic;
}
.reviewer {
  display: flex;
  align-items: center;
  gap: 12px;
}
.reviewer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.reviewer strong { font-size: 14px; display: block; }
.reviewer span { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--footer-bg); }

/* Newsletter */
.newsletter-section {
  background: var(--primary);
  padding: 50px 20px;
  text-align: center;
}
.newsletter-section h3 {
  color: #fff;
  font-size: clamp(20px, 4vw, 28px);
  font-family: Georgia, serif;
  margin-bottom: 8px;
}
.newsletter-section p {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  margin-bottom: 24px;
}
.newsletter-form {
  display: flex;
  max-width: 460px;
  margin: 0 auto;
  gap: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  font-size: 14px;
  border: none;
  outline: none;
  color: var(--text);
}
.newsletter-form .btn {
  border-radius: 0;
  background: #1a1a1a;
  border: none;
  white-space: nowrap;
  padding: 14px 24px;
}
.newsletter-form .btn:hover { background: #333; }

/* Footer Main */
.footer-main { padding: 50px 0 30px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
@media (min-width: 600px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1.3fr; } }

.footer-col .footer-logo .logo-line1 { font-size: 20px; color: #fff; }
.footer-col .footer-logo .logo-line2 { font-size: 10px; color: rgba(255,255,255,0.6); }
.footer-logo { margin-bottom: 14px; }

.footer-about {
  color: var(--footer-text);
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.social-links a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.footer-heading {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.footer-heading .fa { transition: transform var(--transition); }
.footer-accordion.is-open .footer-heading .fa { transform: rotate(180deg); }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (max-width: 899px) {
  .footer-accordion .accordion-body {
    display: none;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .footer-accordion.is-open .accordion-body { display: flex; }
}

.footer-links li a {
  color: var(--footer-text);
  font-size: 13px;
  transition: color var(--transition);
}
.footer-links li a:hover { color: var(--primary-light); }

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--footer-text);
  font-size: 13px;
  line-height: 1.6;
}
.contact-list li .fa {
  color: var(--primary-light);
  margin-top: 3px;
  width: 14px;
  flex-shrink: 0;
}

/* Payment */
.footer-payments {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 24px 0;
}
.footer-payments .container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.payment-label {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.payment-icons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.payment-icon {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0;
}
.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-bottom p { color: rgba(255,255,255,0.45); font-size: 13px; }
.footer-legal { display: flex; gap: 16px; }
.footer-legal a {
  color: rgba(255,255,255,0.45);
  font-size: 12px;
  transition: color var(--transition);
}
.footer-legal a:hover { color: var(--primary-light); }

/* ============================================================
   WOOCOMMERCE PAGE COMPATIBILITY
   (These extend default WooCommerce styles for single product,
    shop archive, cart, checkout pages)
   ============================================================ */

/* WooCommerce: shop / archive */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
  padding: 0 !important;
  margin: 0 !important;
}
@media (min-width: 600px) {
  .woocommerce ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (min-width: 900px) {
  .woocommerce ul.products { grid-template-columns: repeat(4, 1fr) !important; }
}
.woocommerce ul.products li.product {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  overflow: hidden !important;
  transition: box-shadow var(--transition), transform var(--transition) !important;
  background: #fff !important;
}
.woocommerce ul.products li.product:hover {
  box-shadow: var(--shadow-hover) !important;
  transform: translateY(-4px) !important;
}
.woocommerce ul.products li.product a img {
  border-radius: 0 !important;
  margin-bottom: 0 !important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 12px 14px 4px !important;
  color: var(--text) !important;
}
.woocommerce ul.products li.product .price {
  color: var(--primary) !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  padding: 0 14px 8px !important;
}
.woocommerce ul.products li.product .button {
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: 0 !important;
  display: block !important;
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 10px !important;
  margin: 0 !important;
  transition: background var(--transition) !important;
}
.woocommerce ul.products li.product .button:hover {
  background: var(--primary-dark) !important;
}

/* WooCommerce: single product */
.woocommerce div.product div.summary .price {
  color: var(--primary) !important;
  font-size: 28px !important;
  font-weight: 800 !important;
}
.woocommerce div.product .product_title {
  font-family: Georgia, serif !important;
  color: var(--text) !important;
}
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button {
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
  padding: 14px 32px !important;
  font-size: 15px !important;
  transition: background var(--transition) !important;
}
.woocommerce div.product form.cart .single_add_to_cart_button:hover,
.woocommerce button.button:hover {
  background: var(--primary-dark) !important;
}

/* WooCommerce: cart & checkout */
.woocommerce-cart .cart-collaterals .cart_totals h2,
.woocommerce-checkout h3 {
  color: var(--text) !important;
  font-family: Georgia, serif !important;
}
.woocommerce #payment #place_order,
.woocommerce-page #payment #place_order {
  background: var(--primary) !important;
  font-size: 16px !important;
  padding: 16px 36px !important;
  border-radius: 4px !important;
  font-weight: 700 !important;
  width: 100% !important;
}

/* WooCommerce: breadcrumb */
.woocommerce .woocommerce-breadcrumb {
  font-size: 13px !important;
  color: var(--text-muted) !important;
}
.woocommerce .woocommerce-breadcrumb a { color: var(--primary) !important; }

/* WooCommerce: widgets (sidebar) */
.widget_product_categories ul li a { color: var(--text) !important; }
.widget_product_categories ul li a:hover { color: var(--primary) !important; }

/* WooCommerce: star rating */
.woocommerce .star-rating span { color: var(--primary) !important; }

/* WooCommerce: sale badge */
.woocommerce span.onsale {
  background: var(--primary) !important;
  border-radius: 3px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  min-width: unset !important;
  min-height: unset !important;
  padding: 4px 10px !important;
  line-height: 1 !important;
}

/* WooCommerce: notices */
.woocommerce-message, .woocommerce-info {
  border-top-color: var(--primary) !important;
}
.woocommerce-message::before { color: var(--primary) !important; }

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 599px) {
  .section { padding: 40px 0; }
  .hero-slide { min-height: 320px; }
  .promo-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===========================================================================
   WordPress / WooCommerce dynamic-markup adjustments (Stage 2)
   =========================================================================== */

/* Desktop nav: WP submenus reuse the .mega-menu look (JS adds the class).
   Add a dropdown chevron to parent items (prototype had a manual <i>). */
@media (min-width: 900px) {
  .desktop-nav .menu-item-has-children > a::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
    margin-left: 6px;
    position: relative;
    top: 1px;
  }
  .desktop-nav .sub-menu {
    min-width: 200px;
    padding: 8px 0;
  }
  .desktop-nav .sub-menu li a {
    color: var(--text) !important;
    padding: 10px 18px !important;
    font-weight: 500 !important;
    background: transparent !important;
    display: block !important;
    white-space: nowrap;
  }
  .desktop-nav .sub-menu li a:hover { background: var(--bg-light) !important; color: var(--primary) !important; }
}

/* Mobile nav: add the right chevron WP menus don't output */
.mobile-nav .menu-item > a::after {
  content: "\f054";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
  opacity: 0.7;
}

/* Carousel product cards (homepage) — button + price + meta */
.products-track .product-card .button,
.products-track .product-card .added_to_cart {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 0;
  transition: background var(--transition);
}
.products-track .product-card .button:hover { background: var(--primary-dark); }
.products-track .product-card .price { display: block; font-size: 14px; font-weight: 800; color: var(--primary); }
.products-track .product-card .price del { color: var(--text-muted); font-weight: 400; font-size: 12px; margin-right: 4px; }
.products-track .product-card .price ins { text-decoration: none; }
.products-track .product-card .star-rating { font-size: 11px; margin: 2px 0 6px; }

/* Make the loop add-to-cart "added/loading" states look right everywhere */
.product-card .button.loading { opacity: 0.7; }
.product-card .added_to_cart { margin-top: 6px; font-size: 11px; }

/* Empty-state helper */
.mbh-empty { color: var(--text-muted); padding: 20px 0; }
.widget-hint { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.shop-banner-desc { color: rgba(255,255,255,0.9); font-size: 14px; max-width: 640px; margin: 0 auto; }

/* ---------- Blog / posts ---------- */
.post-list { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 700px) { .post-list { grid-template-columns: 1fr 1fr; } }
.mbh-post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.mbh-post-card:hover { box-shadow: var(--shadow); }
.mbh-post-thumb img { width: 100%; height: 200px; object-fit: cover; }
.mbh-post-body { padding: 20px; }
.mbh-post-title { font-family: Georgia, serif; font-size: 20px; margin-bottom: 8px; }
.mbh-post-title a { color: var(--text); }
.mbh-post-title a:hover { color: var(--primary); }
.mbh-post-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.mbh-post-meta .fa { color: var(--primary); margin-right: 4px; }
.mbh-post-content { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.mbh-post-content .btn { margin-top: 12px; }
.mbh-single { max-width: 760px; }
.mbh-single .mbh-post-card { border: none; background: transparent; }
.mbh-single .mbh-post-body { padding: 0; }

/* Single post navigation */
.post-navigation { margin-top: 32px; display: flex; justify-content: space-between; gap: 16px; font-weight: 600; }
.post-navigation a { color: var(--primary); }

/* Pagination (blog) reuse shop pagination look */
.pagination .nav-links, .navigation .nav-links { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.pagination .page-numbers, .navigation .page-numbers {
  display: flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-weight: 600; color: var(--text);
}
.pagination .page-numbers.current, .navigation .page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination a.page-numbers:hover, .navigation a.page-numbers:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Generic page wrapper */
.page-section .page-content { max-width: 860px; margin: 0 auto; }
.page-section .page-content h2 { font-family: Georgia, serif; margin: 20px 0 10px; }
.page-section .page-content p { margin-bottom: 14px; line-height: 1.8; color: var(--text); }

/* Product search form (header) — match the prototype search bar */
.header-search-bar .woocommerce-product-search,
.header-search-bar form {
  display: flex; gap: 10px; background: #fff; border-radius: var(--radius); padding: 4px 6px 4px 14px; align-items: center;
}
.header-search-bar input[type="search"], .header-search-bar input[type="text"] {
  flex: 1; border: none; outline: none; padding: 10px 0; font-size: 15px; background: transparent;
}
.header-search-bar button { background: var(--primary); color: #fff; border-radius: 4px; padding: 8px 16px; font-weight: 700; cursor: pointer; }

/* ===========================================================================
   Stage 2 — LIVE LAYOUT FIXES (header logo + WooCommerce product images/grid)
   =========================================================================== */

/* ---- Header: constrain the uploaded custom logo so it can't balloon the bar ---- */
.header-main .custom-logo-link,
.mobile-menu-top .custom-logo-link {
  display: inline-flex;
  align-items: center;
  margin: 0;
  max-width: 200px;
}
.custom-logo {
  max-height: 48px !important;
  width: auto !important;
  height: auto !important;
  display: block;
}
@media (min-width: 900px) { .custom-logo { max-height: 52px !important; } }
/* Keep the header row compact regardless of logo type */
.header-inner { min-height: 0; }

/* Admin bar: keep the sticky header below the WP toolbar when logged in */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* ---- WooCommerce product images must FILL the card thumbnail box ----
   (WC images use .attachment-woocommerce_thumbnail / .wp-post-image, not
   the prototype's .book-real-img class.) */
.product-thumb img,
.products-track .product-card .product-thumb img,
.product-grid .product-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

/* ---- Shop grid: make .product-grid a grid on its own (don't depend on a
   .woocommerce class being on the <ul>); overrides any WooCommerce default
   float/flex on ul.products. ---- */
ul.products.product-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
  list-style: none !important;
  margin: 0 0 32px !important;
  padding: 0 !important;
}
@media (min-width: 600px)  { ul.products.product-grid { grid-template-columns: repeat(3, 1fr) !important; } }
@media (min-width: 1100px) { ul.products.product-grid { grid-template-columns: repeat(4, 1fr) !important; } }

/* Each card: column flexbox so image / info / button stack cleanly and the
   button sits flush at the bottom (kills the big mid-card gap). */
ul.products.product-grid li.product {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column;
}
ul.products.product-grid li.product .product-info { flex: 1 1 auto; }
ul.products.product-grid li.product .button,
ul.products.product-grid li.product .added_to_cart { margin-top: auto; }

/* The product card thumbnail keeps a stable book-cover ratio everywhere. */
.product-thumb { aspect-ratio: 3 / 4; }

/* ===========================================================================
   Stage 2 — PREMIUM POLISH (logo mark, equal thumbnails, single-product
   trust block, slide-in cart drawer)
   =========================================================================== */

/* ---- Premium brand mark (header + footer) ---- */
.site-logo--mark { flex-direction: row !important; align-items: center; gap: 12px; }
.logo-badge {
  width: 46px; height: 46px; border-radius: 12px;
  background: #0f4d2a;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.logo-badge i { color: var(--accent); font-size: 22px; }
.site-logo--mark .logo-words { display: flex; flex-direction: column; line-height: 1.05; }
.site-logo--mark .logo-line1 {
  font-size: 24px; font-weight: 800; font-style: normal;
  color: #fff; font-family: Georgia, serif; letter-spacing: 0.5px;
}
.site-logo--mark .logo-line2 {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: rgba(255,255,255,0.85); font-weight: 600;
}
/* Footer keeps the same white mark */
.footer-logo .site-logo--mark .logo-line1 { font-size: 22px; color: #fff; font-weight: 800; }
.footer-logo .site-logo--mark .logo-line2 { color: rgba(255,255,255,0.7); }
.footer-logo { margin-bottom: 16px; }

/* ---- Equal-height product thumbnails (bulletproof ratio box) ----
   Fixes uneven book covers on home carousels, shop grid, related/upsells. */
.product-thumb {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 133%;           /* 3:4 portrait, identical for every card */
  aspect-ratio: auto;
  overflow: hidden;
  background: var(--bg-light);
}
.product-thumb > a,
.product-thumb > .woocommerce-LoopProduct-link {
  position: absolute; inset: 0; display: block;
}
.product-thumb img {
  position: absolute; inset: 0;
  width: 100% !important; height: 100% !important;
  object-fit: cover; object-position: center;
  display: block;
}

/* ---- Single product: WhatsApp order button + trust badges (fills the
        blank space below Add to Cart) ---- */
.mbh-wa-order {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; max-width: 360px; margin: 14px 0 4px;
  padding: 12px 18px; border: 2px solid #25d366; color: #128c4b;
  border-radius: var(--radius); font-weight: 700; font-size: 15px;
  transition: background var(--transition), color var(--transition);
}
.mbh-wa-order:hover { background: #25d366; color: #fff; }
.mbh-trust-badges {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 16px; padding: 16px; background: var(--bg-light); border-radius: var(--radius);
  max-width: 460px;
}
.mbh-trust { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.mbh-trust i { color: var(--primary); font-size: 15px; width: 18px; text-align: center; }

/* ---- Related / upsell products: a touch more breathing room ---- */
.related.products, .upsells.products { margin-top: 40px; }
.related.products > h2, .upsells.products > h2 {
  font-family: Georgia, serif; font-size: 22px; margin-bottom: 20px;
}

/* ---- Cart-count bump on add ---- */
@keyframes mbhBump { 0% { transform: scale(1); } 40% { transform: scale(1.55); } 100% { transform: scale(1); } }
.cart-count.mbh-bump { animation: mbhBump 0.4s ease; }

/* ---- Slide-in cart drawer ---- */
.mbh-drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease; z-index: 3000;
}
.mbh-drawer-overlay.is-open { opacity: 1; visibility: visible; }
.mbh-cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%;
  width: 380px; max-width: 90vw; background: #fff; z-index: 3001;
  transform: translateX(100%); transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0,0,0,0.15);
}
.mbh-cart-drawer.is-open { transform: none; }
.mbh-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; background: var(--primary); color: #fff;
}
.mbh-drawer-head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.mbh-drawer-close { color: #fff; font-size: 18px; width: 32px; height: 32px; border-radius: 50%; transition: background var(--transition); }
.mbh-drawer-close:hover { background: rgba(255,255,255,0.2); }
.mbh-drawer-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.mbh-drawer-body .woocommerce-mini-cart__empty-message { color: var(--text-muted); text-align: center; padding: 30px 0; }
.mbh-drawer-body ul.cart_list li { padding: 12px 0; border-bottom: 1px solid var(--border); list-style: none; }
.mbh-drawer-body ul.cart_list li img { width: 48px; height: auto; float: right; margin-left: 10px; border-radius: 4px; }
.mbh-drawer-body .woocommerce-mini-cart__total { padding: 14px 0; font-size: 15px; border-top: 2px solid var(--border); margin-top: 8px; }
.mbh-drawer-body .woocommerce-mini-cart__total .woocommerce-Price-amount { color: var(--primary); }
.mbh-drawer-body .woocommerce-mini-cart__buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.mbh-drawer-body .woocommerce-mini-cart__buttons a {
  display: block; text-align: center; padding: 12px; border-radius: var(--radius);
  font-weight: 700; font-size: 14px;
}
.mbh-drawer-body .woocommerce-mini-cart__buttons a:first-child { background: var(--bg-light); color: var(--text); }
.mbh-drawer-body .woocommerce-mini-cart__buttons a.checkout { background: var(--primary); color: #fff; }
.mbh-drawer-body .woocommerce-mini-cart__buttons a.checkout:hover { background: var(--primary-dark); }

/* ===========================================================================
   Stage 2 — LIVE FIXES v2 (related/upsell cards, verified on production)
   =========================================================================== */

/* Related products & up-sells render <ul class="products columns-N"> WITHOUT
   our .product-grid class, so their <li> collapsed to ~60px inside the grid
   cell. Force every WooCommerce product list (except the homepage carousels)
   to a clean grid with full-width cells. */
.woocommerce ul.products:not(.products-track) {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
  margin: 0 0 32px !important;
  padding: 0 !important;
  list-style: none !important;
}
@media (min-width: 600px)  { .woocommerce ul.products:not(.products-track) { grid-template-columns: repeat(3, 1fr) !important; } }
@media (min-width: 1100px) { .woocommerce ul.products:not(.products-track) { grid-template-columns: repeat(4, 1fr) !important; } }
.woocommerce ul.products:not(.products-track) li.product {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column;
}
.woocommerce ul.products:not(.products-track) li.product .product-info { flex: 1 1 auto; }
.woocommerce ul.products:not(.products-track) li.product .button,
.woocommerce ul.products:not(.products-track) li.product .added_to_cart { margin-top: auto; }

/* Drawer buttons: guarantee the on-brand look regardless of plugin CSS order */
.mbh-drawer-body .woocommerce-mini-cart__buttons a { padding: 12px !important; border-radius: var(--radius) !important; }
.mbh-drawer-body .woocommerce-mini-cart__buttons a.checkout { background: var(--primary) !important; color: #fff !important; }
.mbh-drawer-body .woocommerce-mini-cart__buttons a:not(.checkout) { background: var(--bg-light) !important; color: var(--text) !important; }

/* ===========================================================================
   Stage 2 — LIVE FIX v3: WooCommerce's ul.products clearfix (::before/::after
   with display:table) becomes a phantom GRID CELL, pushing the first product
   card into column 2. Remove them on our grid product lists.
   =========================================================================== */
.woocommerce ul.products::before,
.woocommerce ul.products::after { content: none !important; display: none !important; }
