/*
Theme Name: Astra Child — অগ্নিক মার্ট
Theme URI: https://agnikmart.com
Description: Custom child theme for Agnik Mart — Bangladesh seed shop. Holds all custom CSS, template overrides, and functionality so parent (Astra) updates never wipe customizations.
Author: BiswasHost
Author URI: https://biswashost.com
Template: astra
Version: 1.1.1
Text Domain: astra-child
*/

/* ===== Bengali typography ===== */
:root {
  --agm-green: #119726;
  --agm-green-dark: #0d7a1f;
  --agm-gold: #D34D49;
  --agm-cream: #fdf4f3;
  --agm-text: #1f2933;
  --agm-muted: #6b7280;
}

body, button, input, select, textarea {
  font-family: 'Anek Bangla', 'Hind Siliguri', 'Noto Sans Bengali', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 500;
  letter-spacing: 0.1px;
}
p { font-size: 16px; line-height: 1.75; }
h1, h2, h3, h4, h5, h6, .ast-site-title, .site-title {
  font-family: 'Baloo Da 2', 'Anek Bangla', 'Hind Siliguri', sans-serif;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Menu items — readable, slightly bigger, medium weight */
.main-header-menu .menu-item > a,
.ast-builder-menu .menu-item > a,
.menu-item > a,
.ast-mobile-popup-content .menu-item > a {
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0.2px;
}

/* Tighten spacing between desktop menu items so cart pill stays inline */
@media (min-width: 922px) {
  .main-header-menu > .menu-item > a,
  .ast-builder-menu .menu-item > a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .agm-cart-menu .agm-cart-link {
    padding: 6px 12px !important;
  }
}

/* Topbar text */
.agm-topbar { font-size: 14px; font-weight: 500; }

/* Buttons */
.button, .wp-block-button__link, .woocommerce a.button, .woocommerce button.button {
  font-size: 15px;
}

/* ===== Brand polish ===== */
.site-header {
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  position: sticky !important;
  top: 0;
  /* Stay below WP admin bar (99999) so its dropdown menu renders above our header */
  z-index: 9999;
  background: var(--agm-cream);
}
/* Force product gallery + WooCommerce flexslider below the sticky header */
.woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper,
.woocommerce div.product div.images,
.flex-viewport,
.flex-control-nav { z-index: 1 !important; }
/* (no z-index on topbar — it scrolls away normally; high z-index would conflict with WP admin bar dropdowns) */
/* Make room for WP admin bar when logged in (desktop only — WP hides admin bar on mobile) */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  /* WP admin bar is hidden on mobile, so don't offset the sticky header — keeps it flush at top:0 */
  .admin-bar .site-header { top: 0 !important; }
}
.ast-primary-header-bar { background: var(--agm-cream); }

.button, .wp-block-button__link, .ast-custom-button,
.woocommerce a.button, .woocommerce button.button,
.woocommerce input.button, .woocommerce #respond input#submit {
  background: var(--agm-green);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
}
.button:hover, .wp-block-button__link:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover {
  background: var(--agm-green-dark);
  color: #fff;
}

/* Price */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--agm-green);
  font-weight: 700;
}

/* Product card */
.woocommerce ul.products li.product {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.woocommerce ul.products li.product:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(45,122,62,.12);
}

/* Sale badge */
.woocommerce span.onsale {
  background: var(--agm-gold);
  color: #1f2933;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
}

/* Top contact bar */
.agm-topbar {
  background: var(--agm-green);
  color: #fff;
  font-size: 14px;
  padding: 6px 0;
  text-align: center;
}
.agm-topbar a { color: #fff; text-decoration: none; margin: 0 10px; display: inline-flex; align-items: center; gap: 5px; }
.agm-topbar a:hover { text-decoration: underline; }
.agm-topbar .agm-topbar-promo { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; }
.agm-ico { flex-shrink: 0; vertical-align: -2px; }

/* Footer contact icons — inline + spaced */
.agm-foot-contact li {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.agm-foot-contact .agm-ico { flex-shrink: 0; }

/* Section headings */
.agm-section-title {
  text-align: center;
  font-size: clamp(22px, 3vw, 32px);
  margin-bottom: 8px;
  color: var(--agm-green-dark);
}
.agm-section-sub {
  text-align: center;
  color: var(--agm-muted);
  margin-bottom: 28px;
}

/* Category tile */
.agm-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.agm-cat-tile {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #fff;
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
  border: 1px solid #ececec;
  text-decoration: none;
  color: var(--agm-text);
  transition: all .2s ease;
}
/* Make Elementor HTML widget around the tile fill its column cleanly */
.elementor-widget-html:has(.agm-cat-tile) {
  height: 100%;
}
.elementor-widget-html:has(.agm-cat-tile) .elementor-widget-container {
  height: 100%;
}

/* Mobile: 2-column grid for category tiles (instead of Elementor's default 1-column stack) */
@media (max-width: 767px) {
  .elementor-section:has(.agm-cat-tile) > .elementor-container,
  .elementor-element:has(> .elementor-container .agm-cat-tile) > .elementor-container {
    flex-wrap: wrap !important;
    display: flex !important;
  }
  .elementor-section:has(.agm-cat-tile) > .elementor-container > .elementor-column {
    width: 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding-left: 6px;
    padding-right: 6px;
    box-sizing: border-box;
  }
  /* Tighten tile padding on mobile so text fits at 50% width */
  .agm-cat-tile { padding: 16px 10px !important; }
  .agm-cat-tile .ico { font-size: 32px !important; }
  .agm-cat-tile .ttl { font-size: 15px !important; }
  .agm-cat-tile .sub { font-size: 11px !important; }
}

/* Tighten hero on home — Elementor section default padding was making it too tall */
.home .elementor-section:first-of-type,
body.home .elementor-element:first-child .elementor-container {
  padding-top: 40px !important;
  padding-bottom: 40px !important;
}
.home .elementor-section:first-of-type .elementor-heading-title {
  margin-bottom: 12px !important;
}
.agm-cat-tile:hover {
  border-color: var(--agm-green);
  background: var(--agm-cream);
  transform: translateY(-3px);
}
.agm-cat-tile .ico { font-size: 42px; display: block; margin-bottom: 8px; }
.agm-cat-tile .ttl { display: block; font-weight: 700; font-size: 18px; color: var(--agm-green-dark); margin-bottom: 6px; }
.agm-cat-tile .sub { display: block; font-size: 13px; color: var(--agm-muted); }

/* USP grid */
.agm-usp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .agm-usp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .agm-usp-grid { grid-template-columns: 1fr; } }
.agm-usp {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  border: 1px solid #ececec;
}
.agm-usp .ico { font-size: 32px; }
.agm-usp h4 { margin: 8px 0 4px; color: var(--agm-green-dark); }
.agm-usp p { color: var(--agm-muted); font-size: 14px; margin: 0; }

/* Hero */
.agm-hero {
  background: linear-gradient(135deg, #119726 0%, #0d7a1f 100%);
  color: #fff;
  border-radius: 18px;
  padding: 48px 32px;
  text-align: center;
  margin: 24px 0;
}
.agm-hero h1 {
  color: #fff;
  font-size: clamp(28px, 5vw, 46px);
  margin-bottom: 12px;
}
.agm-hero p { color: #f5fff7; font-size: 18px; max-width: 640px; margin: 0 auto 22px; }
.agm-hero .btn {
  background: var(--agm-gold);
  color: #1f2933;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
}
.agm-hero .btn:hover { background: #e09718; }

/* CTA strip */
.agm-cta {
  background: var(--agm-cream);
  border: 2px dashed var(--agm-green);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  margin: 28px 0;
}
.agm-cta strong { color: var(--agm-green-dark); font-size: 20px; }

/* Header cart menu item */
.agm-cart-menu .agm-cart-link {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  position: relative;
  padding: 6px 14px !important;
  background: var(--agm-green) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-weight: 600;
  text-decoration: none !important;
}
.agm-cart-menu .agm-cart-link:hover { background: var(--agm-green-dark) !important; color: #fff !important; }
.agm-cart-ico { font-size: 16px; line-height: 1; }
.agm-cart-count {
  background: var(--agm-gold);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 8px;
  min-width: 22px;
  text-align: center;
  line-height: 1.5;
}

/* Hide WooCommerce "View cart" link below add-to-cart button (we use toast) */
.woocommerce a.added_to_cart,
.woocommerce-loop-add-to-cart .added_to_cart,
.wp-block-woocommerce-product-collection a.added_to_cart { display: none !important; }

/* Toast notification */
.agm-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 30px);
  background: var(--agm-green);
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0,0,0,.22);
  font-weight: 600;
  font-size: 15px;
  z-index: 99999;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  max-width: 92vw;
  text-align: center;
}
.agm-toast.show { opacity: 1; transform: translate(-50%, 0); }
.agm-toast a {
  color: #D34D49 !important;
  margin-left: 10px;
  text-decoration: underline !important;
  font-weight: 700;
}

/* Hide Astra default footer (we render our own via astra_footer hook) */
.site-footer,
.ast-small-footer,
.ast-small-footer-wrap,
.ast-builder-footer-grid-columns,
.footer-sml-layout-1,
.footer-sml-layout-2 { display: none !important; }

/* Custom branded footer */
.agm-footer {
  background: linear-gradient(180deg, #1f2933 0%, #0f1820 100%);
  color: #d1d5db;
  padding: 50px 20px 0;
  margin-top: 50px;
}
.agm-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.agm-footer h4 {
  color: #D34D49;
  font-size: 17px;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.agm-footer p { color: #b8bdc4; font-size: 14px; line-height: 1.7; }
.agm-footer ul { list-style: none; padding: 0; margin: 0; }
.agm-footer ul li { padding: 4px 0; font-size: 14px; }
.agm-footer a {
  color: #d1d5db;
  text-decoration: none;
  transition: color .15s ease;
}
.agm-footer a:hover { color: #D34D49; }
.agm-foot-contact li { line-height: 1.7; }
.agm-foot-pay {
  margin-top: 18px;
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: 10px;
  padding: 12px 14px;
}
.agm-footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 0 18px 90px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #888f97;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 900px) {
  .agm-footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 540px) {
  .agm-footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .agm-footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 18px 20px 18px 90px;
  }
}

/* Force WooCommerce cart table to stay as a real horizontal table on mobile
   (WC's shop_table_responsive default converts it to stacked label/value cards). */
@media (max-width: 768px) {
  body .woocommerce table.shop_table.shop_table_responsive,
  body .woocommerce-page table.shop_table.shop_table_responsive,
  body table.shop_table_responsive {
    display: table !important;
    table-layout: auto;
    width: 100% !important;
    font-size: 13px;
  }
  body table.shop_table_responsive thead,
  body .woocommerce table.shop_table_responsive thead {
    display: table-header-group !important;
  }
  body table.shop_table_responsive tbody,
  body .woocommerce table.shop_table_responsive tbody {
    display: table-row-group !important;
  }
  body table.shop_table_responsive tr,
  body .woocommerce table.shop_table_responsive tr,
  body .woocommerce-page table.shop_table_responsive tbody tr,
  body .woocommerce-page table.shop_table_responsive thead tr {
    display: table-row !important;
    border: 0 !important;
    margin: 0 !important;
  }
  body table.shop_table_responsive td,
  body table.shop_table_responsive th,
  body .woocommerce table.shop_table_responsive tr td,
  body .woocommerce-page table.shop_table_responsive tr td {
    display: table-cell !important;
    padding: 8px 6px !important;
    text-align: center !important;
    border: 0 !important;
    border-bottom: 1px solid #eee !important;
    width: auto !important;
  }
  /* Hide the data-title pseudo-label WC injects on mobile */
  body table.shop_table_responsive td::before,
  body .woocommerce table.shop_table_responsive td::before,
  body .woocommerce-page table.shop_table_responsive td::before {
    display: none !important;
    content: "" !important;
  }
  /* Tighter column widths on mobile (high specificity to beat Astra defaults) */
  body.woocommerce-cart table.cart .product-remove,
  body .woocommerce table.cart .product-remove { width: 26px !important; padding: 4px 0 !important; }
  body.woocommerce-cart table.cart .product-thumbnail,
  body .woocommerce table.cart .product-thumbnail { width: 48px !important; padding: 4px !important; }
  body.woocommerce-cart table.cart .product-thumbnail img,
  body .woocommerce table.cart .product-thumbnail img,
  body.woocommerce-cart table.cart .product-thumbnail a img {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    border-radius: 4px;
    object-fit: cover;
  }
  /* Product name gets more breathing room */
  .woocommerce table.cart .product-name,
  .woocommerce-cart table.cart .product-name {
    text-align: left !important;
    word-break: keep-all;
    overflow-wrap: normal;
    padding: 6px 4px !important;
  }
  .woocommerce table.cart .product-name a {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    display: inline-block;
  }
  /* Narrow qty column */
  .woocommerce table.cart .product-quantity,
  .woocommerce-cart table.cart .product-quantity { width: 56px !important; padding: 4px 2px !important; }
  .woocommerce table.cart .quantity input.qty,
  .woocommerce-cart table.cart .quantity input.qty {
    width: 40px !important;
    height: 30px;
    padding: 2px;
    text-align: center;
    font-size: 12px;
  }
  /* Hide qty +/- spinners on small screens to save room */
  .woocommerce table.cart .quantity .qib-button-wrapper { display: none !important; }
  /* Price + Subtotal compact */
  .woocommerce table.cart .product-price,
  .woocommerce table.cart .product-subtotal {
    font-size: 12px !important;
    padding: 6px 2px !important;
    white-space: nowrap;
  }
  .woocommerce table.cart .product-remove a.remove {
    width: 20px; height: 20px; line-height: 20px; font-size: 12px;
  }
  /* Header row tight */
  .woocommerce table.cart thead th,
  .woocommerce-cart table.cart thead th {
    font-size: 11px !important;
    padding: 6px 2px !important;
    text-transform: uppercase;
  }
}

/* BH COD checkout summary table — same tightening so it matches the cart layout */
@media (max-width: 768px) {
  .bhcod-summary-table { font-size: 12px; }
  .bhcod-summary-table thead th,
  .bhcod-summary-table tbody td {
    padding: 6px 3px !important;
    font-size: 11px;
  }
  .bhcod-summary-table .bhcod-product-cell {
    flex-direction: row;
    gap: 6px;
    text-align: left;
  }
  .bhcod-summary-table .bhcod-product-cell img {
    width: 36px !important;
    height: 36px !important;
    flex-shrink: 0;
  }
  .bhcod-summary-table .bhcod-product-cell span {
    font-size: 12px;
    line-height: 1.3;
    word-break: keep-all;
    overflow-wrap: normal;
  }
  .bhcod-summary-table .bhcod-qty-input,
  .bhcod-summary-table input.bhcod-checkout-qty {
    width: 40px !important;
    height: 28px;
    padding: 2px;
    font-size: 12px;
    text-align: center;
  }
  /* Hide # column on mobile */
  .bhcod-summary-table thead th:first-child,
  .bhcod-summary-table tbody td:first-child { display: none !important; }
}

/* WooCommerce notice — give left padding so tick icon doesn't overlap text */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notice {
  padding-left: 3.5em !important;
  position: relative;
}
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
  left: 1em !important;
  top: 50% !important;
  transform: translateY(-50%);
  margin: 0 !important;
}
/* Notice "View cart"/"অর্ডার করুন" button on right */
.woocommerce-message .button,
.woocommerce-message a.button {
  background: var(--agm-green) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}
.woocommerce-message .button:hover {
  background: var(--agm-green-dark) !important;
}

/* No underline on homepage links (category tiles, product titles, hero CTA, etc.) */
.home a,
.home a:hover,
.home a:focus,
.home a:visited,
.agm-cat-tile,
.agm-cat-tile *,
.agm-hero a,
.agm-cta a,
.wp-block-woocommerce-product-collection a,
.wp-block-woocommerce-product-collection .wp-block-post-title a {
  text-decoration: none !important;
}

/* Single product: keep qty + add-to-cart + COD button on one inline row */
.woocommerce div.product form.cart {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch;
  gap: 10px;
}
.woocommerce div.product form.cart .quantity { margin: 0 !important; display: flex; }
.woocommerce div.product form.cart .quantity input.qty {
  height: 48px;
  min-height: 48px;
  width: 70px;
  padding: 0 8px;
  box-sizing: border-box;
  font-size: 16px;
  border: 1px solid #d6d8db;
  border-radius: 8px;
}
.woocommerce div.product form.cart .single_add_to_cart_button,
.bhcod-cod-button-inline,
.bhcod-buttons-wrap.bhcod-inline,
.bhcod-buttons-wrap.bhcod-inline .bhcod-cod-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  height: 48px;
  min-height: 48px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  box-sizing: border-box;
}

/* Cart icon before "কার্টে যোগ করুন" text on the Add-to-cart button */
.woocommerce div.product form.cart .single_add_to_cart_button {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding-left: 18px;
  padding-right: 18px;
}
.woocommerce div.product form.cart .single_add_to_cart_button::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='9' cy='21' r='1.6'/><circle cx='18' cy='21' r='1.6'/><path d='M3 3h2l2.4 12.2a2 2 0 0 0 2 1.6h8.5a2 2 0 0 0 2-1.5L22 7H6'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
}

/* Push WhatsApp/Call inline buttons to their own row (under qty+ATC+COD) */
.woocommerce div.product form.cart .bhcod-contact-btns,
.woocommerce div.product form.cart .bhcod-buttons-wrap .bhcod-contact-btns,
form.cart .bhcod-contact-btns {
  flex: 1 0 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  margin-top: 14px !important;
  order: 99 !important;
}
.woocommerce div.product form.cart .bhcod-contact-btns > *,
form.cart .bhcod-contact-btns > * {
  flex: 1 1 0 !important;
  height: 48px !important;
  min-height: 48px !important;
}

/* If BH-COD wrap has display:contents, also force the inline COD wrapper to stay on row 1 */
.woocommerce div.product form.cart .bhcod-buttons-wrap.bhcod-inline {
  display: contents !important;
}

/* Mobile: allow wrap but keep qty + add-to-cart on one row, COD goes to row 2 */
@media (max-width: 480px) {
  .woocommerce div.product form.cart { flex-wrap: wrap !important; }
  .woocommerce div.product form.cart .single_add_to_cart_button { flex: 1 1 auto; }
  .woocommerce div.product form.cart .bhcod-cod-button-inline,
  .woocommerce div.product form.cart .bhcod-buttons-wrap.bhcod-inline { flex: 1 0 100%; }
}

/* Hide entry title on front page (we use hero instead) */
.home .entry-header,
.home .entry-title,
.home .ast-archive-title,
.home .ast-no-thumbnail .entry-content > .post-thumb-img-content { display: none !important; }
.home .entry-content { padding-top: 0 !important; }
.home .ast-container, .home #primary { padding-top: 0; }

/* Hide Astra site title beside logo (we use logo only) */
.ast-site-title-wrap .site-title,
.ast-site-identity .site-title,
.ast-site-identity p.site-description,
.site-header .site-title { display: none !important; }

/* Block-style WooCommerce product buttons — match brand */
.wp-element-button,
.wp-block-button__link,
.wc-block-components-product-button .wp-block-button__link,
.wc-block-grid__product .wp-block-button__link,
.wp-block-woocommerce-product-collection .wp-block-button__link {
  background: var(--agm-green) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  border: none !important;
}
.wp-element-button:hover,
.wp-block-button__link:hover,
.wc-block-components-product-button .wp-block-button__link:hover {
  background: var(--agm-green-dark) !important;
}

/* Block product card titles */
.wp-block-woocommerce-product-collection .wp-block-post-title a {
  color: var(--agm-text);
  font-weight: 600;
}
.wp-block-woocommerce-product-collection .wp-block-post-title a:hover { color: var(--agm-green); }
.wp-block-woocommerce-product-collection .wc-block-components-product-price {
  color: var(--agm-green);
  font-weight: 700;
  text-align: center;
}

/* Sale badges in block product collection */
.wc-block-components-product-sale-badge {
  background: var(--agm-gold) !important;
  color: #1f2933 !important;
  border-radius: 999px !important;
  padding: 2px 10px !important;
  font-weight: 700 !important;
}

/* Section title spacing (after we hide page title) */
.home .agm-section-title { margin-top: 50px; }
.home .agm-hero { margin-top: 0; }

/* Topbar mobile */
@media (max-width: 768px) {
  .agm-hero { padding: 32px 18px; margin-top: 24px; }
  .home #primary,
  .home .ast-container,
  .home .site-content > .ast-container { padding-top: 20px; }

  /* Single product page — push content below sticky header on mobile */
  .single-product .ast-container,
  .single-product #primary,
  .single-product div.product,
  .single-product .woocommerce-notices-wrapper { padding-top: 20px; }
  .single-product .woocommerce-product-gallery { margin-top: 8px; }

  /* Sale! badge — extra top spacing on mobile (Astra renames .onsale to .ast-onsale-card) */
  .single-product .woocommerce-product-gallery span.onsale,
  .single-product div.product span.onsale,
  .single-product .ast-onsale-card,
  .single-product .ast-on-card-button {
    top: 36px !important;
    left: 24px !important;
  }

  .agm-topbar { font-size: 13px; padding: 8px 10px; line-height: 1.4; }
  .agm-topbar a { margin: 0 4px; gap: 0; }
  /* First 3 items: show ONLY icon (text hidden, link still works) */
  .agm-topbar a:nth-of-type(-n+3) {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    justify-content: center;
    overflow: hidden;
    text-indent: -9999px;
    padding: 0;
  }
  .agm-topbar a:nth-of-type(-n+3) .agm-ico { text-indent: 0; }
  /* Hide separators between icon-only links */
  .agm-topbar a + span,
  .agm-topbar span + span { display: none !important; }
  /* Keep last item (promo) full text */
  .agm-topbar .agm-topbar-promo { display: inline-flex; margin-left: 4px; }
  .agm-topbar .agm-topbar-promo + span { display: none !important; }
  .agm-topbar a + span:last-of-type { display: inline !important; }
}

/* Mobile cart icon (injected before hamburger toggle) */
.agm-mobile-cart {
  display: none; /* shown only on mobile */
  position: relative;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: var(--agm-green);
  border-radius: 8px;
  margin-right: 10px;
  text-decoration: none !important;
}
.agm-mobile-cart:hover { background: var(--agm-green-dark); }
.agm-mobile-cart .agm-cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--agm-gold);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
  line-height: 1.3;
}

/* Mobile header layout: cart-left ↔ logo-center ↔ hamburger-right */
@media (max-width: 921px) {
  .agm-mobile-cart { display: inline-flex !important; }
  /* Center the logo in the mobile header */
  .ast-mobile-header-wrap .site-branding,
  .ast-builder-grid-row-mobile .site-branding,
  .main-header-bar .site-branding {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    flex: 1;
  }
  .ast-mobile-header-wrap .site-branding .custom-logo-link img,
  .main-header-bar .site-branding .custom-logo-link img {
    margin: 0 auto;
  }
  /* Hide the in-menu cart pill on mobile (we use the floating one now) */
  .ast-mobile-popup-content .agm-cart-menu,
  .menu-toggle ~ .agm-cart-menu,
  .main-navigation .agm-cart-menu { display: none !important; }
}
