/*
 * Vertex Mobile Compact: desktop / laptop typography and finish (769px and up).
 * TYPOGRAPHY AND VISUAL STYLING, plus section C: vertical alignment of the text rows INSIDE product cards.
 * No column widths, card widths, image sizes/positions, products-per-row or mobile rules.
 * Mobile (768px and under) is handled by mobile.css and is not touched here.
 *
 * Where a font change would alter text width, the size is reduced slightly and line-height is pinned
 * to the ORIGINAL line box, so wrapping and vertical rhythm stay the same as before.
 */
@media (min-width: 769px) {

body.vxmc-d {
  --vxmc-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --vxmc-d-radius: 14px;
  --vxmc-d-radius-sm: 10px;
  --vxmc-title-lines: 2;     /* lines reserved for every product title (set 3 for longer names) */
  --vxmc-rating-row: 22px;   /* height reserved for the star-rating row (empty when no reviews) */
  -webkit-font-smoothing: antialiased;   /* crisper, lighter text on MacBook / Retina screens */
  -moz-osx-font-smoothing: grayscale;
}

/* =====================================================================
   A. FONT FAMILY, WEIGHT, TRACKING (only when "modern sans-serif" is on)
   Generic element rules use :where() so they only replace the theme's
   plain h1/h2/nav defaults; any class-based rule in the theme or WooCommerce still wins.
   ===================================================================== */
body.vxmc-d.vxmc-sans { font-family: var(--vxmc-sans); }

html :where(body.vxmc-d.vxmc-sans) :is(h1, h2, h3, nav) { font-family: var(--vxmc-sans); }
html :where(body.vxmc-d.vxmc-sans) .eyebrow { font-family: var(--vxmc-sans); font-weight: 600; }

/* Headings: same text footprint as Courier at the original size, line box unchanged */
html :where(body.vxmc-d.vxmc-sans) h1 {
  font-weight: 700;
  letter-spacing: .03em;
  font-size: clamp(24px, 3.15vw, 43px);        /* was clamp(28px, 3.7vw, 50px) */
  line-height: clamp(35px, 4.625vw, 62.5px);   /* = 1.25 x original size, so heights match */
}
html :where(body.vxmc-d.vxmc-sans) h2 {
  font-weight: 600;
  letter-spacing: .03em;
  font-size: clamp(20px, 2.55vw, 32px);        /* was clamp(24px, 3vw, 38px) */
  line-height: clamp(30px, 3.75vw, 47.5px);    /* = 1.25 x original size */
}
html :where(body.vxmc-d.vxmc-sans) h3 { font-weight: 600; letter-spacing: .02em; }

body.vxmc-d.vxmc-sans .section .benefits h2 {
  font-size: 18px;                              /* was 21px */
  line-height: 26.25px;                         /* = 1.25 x 21px */
  letter-spacing: .02em;
}

/* Navigation: same row, same gaps, same alignment */
body.vxmc-d.vxmc-sans .site-header nav {
  font-size: 15px;                              /* was 18px */
  font-weight: 500;
  letter-spacing: .08em;
}
body.vxmc-d.vxmc-sans .shop-links { font-weight: 500; letter-spacing: .05em; }

/* Notes and strips that were Courier */
body.vxmc-d.vxmc-sans .research-note {
  font-family: var(--vxmc-sans);
  font-size: 14px;
  line-height: 26.4px;                          /* = original 16px x 1.65 */
  font-weight: 500;
  letter-spacing: .06em;
}
body.vxmc-d.vxmc-sans .shipping-strip {
  font-family: var(--vxmc-sans);
  font-size: 14px;
  line-height: 26.4px;
  font-weight: 500;
  letter-spacing: .1em;
}
body.vxmc-d.vxmc-sans .vertex-shipping-banner { font-family: var(--vxmc-sans) !important; }

/* Category cards and Bundles panel text (already Arial: align to the same family) */
body.vxmc-d.vxmc-sans .category-grid .category-label span { font-family: var(--vxmc-sans); }
body.vxmc-d.vxmc-sans #vertex-bundles-restored .vertex-bundles-card-content :is(small, strong, span) {
  font-family: var(--vxmc-sans) !important;
}

/* Buttons: same padding and box, new type */
body.vxmc-d.vxmc-sans :is(.button, .woocommerce a.button, .woocommerce button.button,
  .woocommerce input.button, .woocommerce #respond input#submit):not(.telegram-button) {
  font-family: var(--vxmc-sans);
  font-size: 13px;                              /* was 14px */
  line-height: 19.6px;                          /* = original 14px x 1.4 */
  font-weight: 600;
  letter-spacing: .08em;
}
body.vxmc-d.vxmc-sans button { font-family: var(--vxmc-sans); }

/* Product titles inside shop grids (theme forces Arial) */
html body.vxmc-d.vxmc-d.vxmc-sans ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--vxmc-sans) !important;
}
/* Shop / category grid buttons: theme forces 12px, 0 radius */
html body.vxmc-d.vxmc-d.vxmc-sans.woocommerce-page ul.products li.product .button,
html body.vxmc-d.vxmc-d.vxmc-sans.tax-product_cat ul.products li.product .button,
html body.vxmc-d.vxmc-d.vxmc-sans.post-type-archive-product ul.products li.product .button {
  font-size: 11px !important;
  line-height: 16.8px !important;               /* = original 12px x 1.4 */
  letter-spacing: .08em !important;
}

/* =====================================================================
   B. VISUAL FINISH (same premium rounding as mobile; no size changes)
   ===================================================================== */
body.vxmc-d .button,
body.vxmc-d.woocommerce .woocommerce a.button,
body.vxmc-d .woocommerce a.button,
body.vxmc-d .woocommerce button.button,
body.vxmc-d .woocommerce input.button,
body.vxmc-d .woocommerce #respond input#submit {
  border-radius: var(--vxmc-d-radius-sm);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
html body.vxmc-d.vxmc-d.woocommerce-page ul.products li.product .button,
html body.vxmc-d.vxmc-d.tax-product_cat ul.products li.product .button,
html body.vxmc-d.vxmc-d.post-type-archive-product ul.products li.product .button {
  border-radius: var(--vxmc-d-radius-sm) !important;
}
body.vxmc-d .telegram-button { border-radius: var(--vxmc-d-radius-sm); }

body.vxmc-d .category-grid .category-card { border-radius: var(--vxmc-d-radius); }
body.vxmc-d #vertex-bundles-restored .vertex-bundles-card { border-radius: var(--vxmc-d-radius) !important; }
body.vxmc-d .reviews blockquote { border-radius: var(--vxmc-d-radius); }
body.vxmc-d .quality img { border-radius: var(--vxmc-d-radius); }

body.vxmc-d ul.products li.product { border-radius: 12px; }
body.vxmc-d ul.products li.product a img { border-radius: 12px 12px 0 0; }

body.vxmc-d input:not([type=checkbox]):not([type=radio]),
body.vxmc-d textarea,
body.vxmc-d select { border-radius: 8px; }


/* =====================================================================
   C. PRODUCT CARD ALIGNMENT (desktop grids: home, shop, categories, related)
   Standard WooCommerce loop markup:
     li.product > a.woocommerce-LoopProduct-link > img, h2.woocommerce-loop-product__title,
                  div.star-rating (only exists when reviewed), span.price
     li.product > a.button (sibling of the link)
   The link becomes a 4-row grid with FIXED row sizes, so title / stars / price always start at
   the same height, whether or not a product has reviews or a long name. Nothing about widths,
   columns or the image's own size/position changes.
   ===================================================================== */
html body.vxmc-d.vxmc-d ul.products li.product a.woocommerce-LoopProduct-link {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto var(--vxmc-rating-row) auto;   /* image | title | stars | price */
  align-content: start;
}
html body.vxmc-d.vxmc-d ul.products li.product a.woocommerce-LoopProduct-link img {
  grid-row: 1;
  grid-column: 1;
  align-self: start;
}

/* Title: same start line, equal reserved height, normal line spacing (theme forced 1.5 + min-height 45px) */
html body.vxmc-d.vxmc-d ul.products li.product .woocommerce-loop-product__title {
  grid-row: 2;
  grid-column: 1;
  align-self: start;
  line-height: 1.3 !important;
  min-height: 0 !important;
  height: calc(1.3em * var(--vxmc-title-lines)) !important;
  margin: 0 0 9px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--vxmc-title-lines);
  line-clamp: var(--vxmc-title-lines);
  overflow: hidden !important;
}

/* Stars: own fixed row, vertically centred; products without reviews keep the empty row (no fake stars) */
html body.vxmc-d.vxmc-d ul.products li.product a.woocommerce-LoopProduct-link .star-rating {
  grid-row: 3;
  grid-column: 1;
  align-self: center;
  justify-self: start;
  margin: 0 !important;
}
/* Shop / category grids give title and price 16px side padding; line the stars up with them */
html body.vxmc-d.vxmc-d.woocommerce-page ul.products li.product a.woocommerce-LoopProduct-link .star-rating,
html body.vxmc-d.vxmc-d.tax-product_cat ul.products li.product a.woocommerce-LoopProduct-link .star-rating,
html body.vxmc-d.vxmc-d.post-type-archive-product ul.products li.product a.woocommerce-LoopProduct-link .star-rating {
  margin-left: 16px !important;
}

/* Price: same row, same line box, same space below for every card */
html body.vxmc-d.vxmc-d ul.products li.product a.woocommerce-LoopProduct-link .price {
  grid-row: 4;
  grid-column: 1;
  align-self: start;
  line-height: 1.4 !important;
  margin: 0 0 18px !important;
}

/* Add to Cart: stays at the bottom of equal-height cards (theme flex + margin-top:auto);
   where cards are not stretched, the fixed rows above already put it on the same line. Size untouched. */

}

/* Narrow laptop / tablet range: nav was 15px in the theme here, so keep it from getting wider */
@media (min-width: 769px) and (max-width: 1050px) {
  body.vxmc-d.vxmc-sans .site-header nav { font-size: 13px; }
}
