/**
 * Medical Diagnostic Tests Plugin - Stylesheet
 * Clean, clinical white design inspired by professional medical diagnostics.
 */

/* ─── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  --mdt-teal:         #0056AE;
  --mdt-teal-dark:    #00458B;
  --mdt-teal-light:   #EAF3FF;
  --mdt-red:          #d63752;
  --mdt-text:         #1a1a2e;
  --mdt-text-muted:   #5a6880;
  --mdt-border:       #e2e8f0;
  --mdt-bg:           #f8fafc;
  --mdt-white:        #ffffff;
  --mdt-row-alt:      #F3F8FF;
  --mdt-shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --mdt-shadow-md:    0 4px 16px rgba(0,0,0,.08);
  --mdt-radius-sm:    6px;
  --mdt-radius-md:    12px;
  --mdt-radius-pill:  999px;
  --mdt-font-main:    'Segoe UI', system-ui, -apple-system, sans-serif;
  --mdt-max-width:    1440px;
  --mdt-single-max:   1220px;
  --mdt-transition:   all .2s ease;
}

/* ─── Global Reset Scoped ────────────────────────────────────────────────────── */
.mdt-page-wrapper *,
.mdt-single-wrapper * {
  box-sizing: border-box;
}

/* ─── Page Wrapper ───────────────────────────────────────────────────────────── */
.mdt-page-wrapper {
  background: var(--mdt-bg);
  min-height: 60vh;
  padding: 32px 16px 64px;
  font-family: var(--mdt-font-main);
}

.mdt-container {
  max-width: var(--mdt-max-width);
  margin: 0 auto;
  width: 100%;
}

/* ─── Breadcrumbs ────────────────────────────────────────────────────────────── */
.mdt-breadcrumbs {
  font-size: 14px;
  color: var(--mdt-text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.mdt-breadcrumbs a {
  color: var(--mdt-teal);
  text-decoration: none;
  font-weight: 500;
  transition: var(--mdt-transition);
}

.mdt-breadcrumbs a:hover {
  color: var(--mdt-teal-dark);
  text-decoration: underline;
}

.mdt-breadcrumb-sep {
  color: var(--mdt-text-muted);
  margin: 0 2px;
}

.mdt-breadcrumb-current {
  color: var(--mdt-text);
  font-weight: 500;
}

/* ─── Page Title ─────────────────────────────────────────────────────────────── */
.mdt-page-header {
  margin-bottom: 24px;
}

.mdt-page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--mdt-text);
  margin: 0;
  line-height: 1.2;
}

/* ─── Layout: Sidebar + Content ─────────────────────────────────────────────── */
.mdt-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────────── */
.mdt-sidebar {
  background: var(--mdt-white);
  border-radius: var(--mdt-radius-md);
  box-shadow: var(--mdt-shadow-sm);
  padding: 20px 0;
  position: sticky;
  top: 24px;
}

.mdt-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mdt-category-item {
  border-left: 3px solid transparent;
  transition: var(--mdt-transition);
}

.mdt-category-item:first-child {
  margin-bottom: 8px;
}

.mdt-category-link {
  display: block;
  padding: 9px 20px;
  color: var(--mdt-text-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: var(--mdt-transition);
}

.mdt-category-item:first-child .mdt-category-link {
  color: var(--mdt-red);
  font-weight: 700;
  font-size: 16px;
}

.mdt-category-link:hover {
  color: var(--mdt-teal);
  background: var(--mdt-teal-light);
}

.mdt-category-item.is-active {
  border-left-color: var(--mdt-teal);
}

.mdt-category-item.is-active .mdt-category-link {
  color: var(--mdt-teal);
  background: var(--mdt-teal-light);
}

/* ─── Main Content Area ─────────────────────────────────────────────────────── */
.mdt-main-content {
  position: relative;
  min-height: 200px;
}


/* ─── Search + Sort Controls ───────────────────────────────────────────────── */
.mdt-shop-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.mdt-search-box {
  width: min(100%, 420px);
  position: relative;
}

.mdt-product-search {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: var(--mdt-radius-pill);
  background: #f3f4f6;
  padding: 0 58px 0 24px;
  color: var(--mdt-text);
  font-size: 16px;
  outline: none;
  box-shadow: none;
  transition: var(--mdt-transition);
}

.mdt-product-search::placeholder {
  color: #9ca3af;
}

.mdt-product-search:focus {
  background: var(--mdt-white);
  box-shadow: 0 0 0 2px rgba(0, 86, 174, .18), var(--mdt-shadow-sm);
}

.mdt-search-btn {
  position: absolute;
  top: 50%;
  right: 9px;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--mdt-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--mdt-transition);
}

.mdt-search-btn:hover {
  color: var(--mdt-teal);
  background: var(--mdt-teal-light);
}

.mdt-product-sort {
  width: min(100%, 320px);
  min-height: 52px;
  border: 0;
  border-radius: var(--mdt-radius-pill);
  background-color: #f3f4f6;
  color: var(--mdt-text-muted);
  padding: 0 44px 0 24px;
  font-size: 15px;
  outline: none;
  cursor: pointer;
  box-shadow: none;
  transition: var(--mdt-transition);
}

.mdt-product-sort:focus {
  background-color: var(--mdt-white);
  box-shadow: 0 0 0 2px rgba(0, 86, 174, .18), var(--mdt-shadow-sm);
}

/* ─── Product List ───────────────────────────────────────────────────────────── */
.mdt-product-list {
  background: var(--mdt-white);
  border-radius: var(--mdt-radius-md);
  box-shadow: var(--mdt-shadow-sm);
  overflow: hidden;
}

.mdt-product-list-header {
  display: grid;
  grid-template-columns: 1fr 140px 120px 140px;
  gap: 16px;
  padding: 12px 24px;
  background: #f1f5f9;
  border-bottom: 2px solid var(--mdt-border);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--mdt-text-muted);
}

.mdt-product-row {
  display: grid;
  grid-template-columns: 1fr 140px 120px 140px;
  gap: 16px;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--mdt-border);
  transition: background .15s ease;
}

.mdt-product-row:last-child {
  border-bottom: none;
}

.mdt-product-row:nth-child(even) {
  background: var(--mdt-row-alt);
}

.mdt-product-row:hover {
  background: #EAF3FF;
}

/* Product Name */
.mdt-product-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--mdt-text);
  line-height: 1.4;
}

.mdt-product-name a {
  color: inherit;
  text-decoration: none;
  transition: color .15s ease;
}

.mdt-product-name a:hover {
  color: var(--mdt-teal);
}

/* Turnaround */
.mdt-product-turnaround {
  font-size: 14px;
  color: var(--mdt-text-muted);
}

/* Price */
.mdt-product-price {
  font-size: 15px;
  font-weight: 600;
  color: var(--mdt-text);
}

.mdt-product-price .woocommerce-Price-amount {
  color: var(--mdt-text);
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.mdt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: var(--mdt-radius-pill);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: var(--mdt-transition);
  border: 2px solid transparent;
  text-transform: uppercase;
  white-space: nowrap;
}

.mdt-btn--primary {
  background: var(--mdt-teal);
  color: var(--mdt-white);
  border-color: var(--mdt-teal);
}

.mdt-btn--primary:hover,
.mdt-btn--primary:focus {
  background: var(--mdt-teal-dark);
  border-color: var(--mdt-teal-dark);
  color: var(--mdt-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,86,174,.28);
}

/* ─── No Products ────────────────────────────────────────────────────────────── */
.mdt-no-products {
  background: var(--mdt-white);
  border-radius: var(--mdt-radius-md);
  box-shadow: var(--mdt-shadow-sm);
  padding: 48px 24px;
  text-align: center;
  color: var(--mdt-text-muted);
  font-size: 16px;
}

/* ─── Loading Overlay ────────────────────────────────────────────────────────── */
.mdt-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.8);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--mdt-radius-md);
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.mdt-loading-overlay:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.mdt-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--mdt-border);
  border-top-color: var(--mdt-teal);
  border-radius: 50%;
  animation: mdt-spin .7s linear infinite;
}

@keyframes mdt-spin {
  to { transform: rotate(360deg); }
}

/* ─── Pagination ─────────────────────────────────────────────────────────────── */
.mdt-pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 24px 0 0;
}

.mdt-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--mdt-radius-sm);
  background: var(--mdt-white);
  border: 1px solid var(--mdt-border);
  color: var(--mdt-text-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--mdt-transition);
}

.mdt-page-link:hover {
  background: var(--mdt-teal-light);
  border-color: var(--mdt-teal);
  color: var(--mdt-teal);
}

.mdt-page-link.is-active {
  background: var(--mdt-teal);
  border-color: var(--mdt-teal);
  color: var(--mdt-white);
}

/* ─────────────────────────────────────────────────────────────────────────────
   SINGLE PRODUCT PAGE
   ───────────────────────────────────────────────────────────────────────────── */

.mdt-single-wrapper {
  background: url("https://gmd.clinic/wp-content/uploads/2026/05/Banner.jpg-scaled.webp") center center / cover no-repeat;
  padding: 32px 16px 64px;
  font-family: var(--mdt-font-main);
}

.mdt-single-container {
  max-width: var(--mdt-single-max);
  margin: 0 auto;
  width: 100%;
}

.mdt-single-card {
  background: rgba(255,255,255,.95);
  border-radius: 16px;
  box-shadow: var(--mdt-shadow-md);
  padding: 40px 48px;
  margin-top: 8px;
}

/* Breadcrumbs spacing on single page */
.mdt-single-card .mdt-breadcrumbs {
  margin-bottom: 24px;
}

/* Two-column grid */
.mdt-single-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: start;
  margin-top: 0;
}

/* LEFT: Title + Description */
.mdt-single-left {}

.mdt-single-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--mdt-text);
  line-height: 1.25;
  margin: 0 0 20px;
}

.mdt-single-description {
  font-size: 15px;
  line-height: 1.75;
  color: var(--mdt-text-muted);
}

.mdt-single-description p {
  margin: 0 0 16px;
}

.mdt-single-description p:last-child {
  margin-bottom: 0;
}

/* RIGHT: Info Rows */
.mdt-single-right {}

/* Info Rows */
.mdt-info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--mdt-border);
}

.mdt-info-row--last {
  border-bottom: none;
}

.mdt-info-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--mdt-text);
  min-width: 140px;
  flex-shrink: 0;
  padding-top: 2px;
}

.mdt-info-value {
  font-size: 14px;
  color: var(--mdt-text-muted);
  text-align: right;
  flex: 1;
}

/* Price row specifics */
.mdt-info-row--price {
  flex-wrap: wrap;
  row-gap: 12px;
  align-items: center;
}

.mdt-price-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--mdt-text);
}

.mdt-price-value .woocommerce-Price-amount {
  color: var(--mdt-text);
  font-size: inherit;
  font-weight: inherit;
}

.mdt-add-to-cart-wrap {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

/* WooCommerce Add to Cart button override */
.mdt-single-right .single_add_to_cart_button,
.mdt-single-right button.single_add_to_cart_button {
  background: var(--mdt-teal) !important;
  color: var(--mdt-white) !important;
  border: none !important;
  border-radius: var(--mdt-radius-pill) !important;
  padding: 11px 24px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: var(--mdt-transition) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.mdt-single-right .single_add_to_cart_button:hover,
.mdt-single-right button.single_add_to_cart_button:hover {
  background: var(--mdt-teal-dark) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0,86,174,.28) !important;
}

/* WooCommerce quantity wrapper */
.mdt-add-to-cart-wrap .cart {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mdt-add-to-cart-wrap .quantity {
  display: flex;
  align-items: center;
}

.mdt-add-to-cart-wrap .qty {
  width: 60px;
  padding: 8px;
  border: 1px solid var(--mdt-border);
  border-radius: var(--mdt-radius-sm);
  text-align: center;
  font-size: 15px;
}

/* Sample value icon */
.mdt-sample-value .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  color: var(--mdt-teal);
  margin-right: 4px;
}

.mdt-sample-value .mdt-sample-custom-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 6px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media ( max-width: 1100px ) {
  .mdt-product-list-header,
  .mdt-product-row {
    grid-template-columns: 1fr 120px 100px 120px;
    gap: 12px;
  }
}

@media ( max-width: 900px ) {
  .mdt-layout {
    grid-template-columns: 1fr;
  }

  .mdt-sidebar {
    position: static;
  }

  .mdt-single-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .mdt-single-card {
    padding: 28px 24px;
  }
}

@media ( max-width: 680px ) {
  .mdt-product-list-header {
    display: none;
  }

  .mdt-product-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 6px 12px;
    padding: 14px 16px;
  }

  .mdt-product-name {
    grid-column: 1 / -1;
  }

  .mdt-product-turnaround {
    font-size: 13px;
  }

  .mdt-product-price {
    font-size: 14px;
  }

  .mdt-product-action {
    grid-row: 2;
    grid-column: 2;
    align-self: end;
  }

  .mdt-page-wrapper,
  .mdt-single-wrapper {
    padding: 20px 12px 48px;
  }

  .mdt-single-title {
    font-size: 22px;
  }

  .mdt-add-to-cart-wrap .cart {
    justify-content: flex-start;
  }
}

/* ─── WooCommerce compatibility: hide default notices on our pages ───────────── */
.mdt-all-tests-page .woocommerce-notices-wrapper:empty,
.mdt-single-product-page .woocommerce-notices-wrapper:empty {
  display: none;
}

/* Ensure WooCommerce flash messages still work on single product */
.mdt-single-wrapper .woocommerce-message,
.mdt-single-wrapper .woocommerce-info,
.mdt-single-wrapper .woocommerce-error {
  max-width: var(--mdt-single-max);
  margin: 0 auto 16px;
  border-radius: var(--mdt-radius-sm);
}

/* ─── Single Product: View Cart Button ─────────────────────────────────────── */
.mdt-single-view-cart-wrap {
  margin: 0 0 14px;
}

.mdt-single-view-cart-btn {
  padding-inline: 22px;
}

/* ─── WooCommerce Cart: remove product image column ────────────────────────── */
.woocommerce-cart table.cart th.product-thumbnail,
.woocommerce-cart table.cart td.product-thumbnail,
.woocommerce-cart table.shop_table th.product-thumbnail,
.woocommerce-cart table.shop_table td.product-thumbnail {
  display: none !important;
}

/* ─── MDT Cart Flow Refinements ──────────────────────────────────────────────
   Keeps existing All Tests + Single Test UI intact, only adjusts cart controls. */
.mdt-info-row--price {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.mdt-info-row--price .mdt-info-label {
  min-width: 0;
  padding-top: 0;
}

.mdt-info-row--price .mdt-price-value {
  flex: 0 0 auto;
  text-align: left;
  white-space: nowrap;
}

.mdt-add-to-cart-wrap {
  width: auto;
  justify-content: flex-end;
}

.mdt-add-to-cart-wrap .cart,
.mdt-add-to-cart-wrap .mdt-test-cart-form {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.mdt-add-to-cart-wrap .quantity,
.mdt-add-to-cart-wrap .qty {
  display: none !important;
}

.mdt-single-right .single_add_to_cart_button,
.mdt-single-right button.single_add_to_cart_button,
.mdt-single-right .mdt-single-view-cart-btn {
  min-height: 46px !important;
  height: 46px !important;
  min-width: 132px !important;
  padding: 0 18px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  border-radius: var(--mdt-radius-pill) !important;
  font-size: 13px !important;
  white-space: nowrap !important;
  justify-content: center !important;
}

.mdt-single-right .mdt-single-view-cart-btn {
  background: var(--mdt-teal) !important;
  color: var(--mdt-white) !important;
  border: none !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  font-weight: 700 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
  transition: var(--mdt-transition) !important;
}

.mdt-single-right .mdt-single-view-cart-btn:hover {
  background: var(--mdt-teal-dark) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0,86,174,.28) !important;
}

/* Cart / Checkout page spacing */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
  margin-top: 30px;
  margin-bottom: 30px;
}

/* Cart totals should sit below the cart table, not in a side column. */
.woocommerce-cart .cart-collaterals,
.woocommerce-cart .cart-collaterals .cart_totals {
  float: none !important;
  width: 100% !important;
  clear: both !important;
}

.woocommerce-cart .cart-collaterals .cart_totals {
  margin-top: 28px !important;
}

.woocommerce-cart .cart-collaterals .cart_totals table {
  width: 100%;
}

.woocommerce-cart table.cart th.product-quantity,
.woocommerce-cart table.cart td.product-quantity,
.woocommerce-cart table.shop_table th.product-quantity,
.woocommerce-cart table.shop_table td.product-quantity {
  text-align: center;
}

@media ( max-width: 680px ) {
  .mdt-info-row--price {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .mdt-info-row--price .mdt-price-value {
    text-align: left;
  }

  .mdt-add-to-cart-wrap,
  .mdt-add-to-cart-wrap .cart,
  .mdt-add-to-cart-wrap .mdt-test-cart-form {
    justify-content: flex-start;
  }
}

/* ─── MDT Cart Page Layout Upgrade v1.0.4 ────────────────────────────────────
   Cart table stays in the first row; Cart Totals moves to a full second row.
   The cart content is vertically centered with a 100vh minimum page area. */
body.mdt-cart-page .woocommerce,
body.woocommerce-cart .woocommerce,
body.page-cart .woocommerce {
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: stretch !important;
  gap: 30px !important;
  padding-top: 30px !important;
  padding-bottom: 30px !important;
  box-sizing: border-box !important;
}

body.mdt-cart-page .woocommerce::before,
body.mdt-cart-page .woocommerce::after,
body.woocommerce-cart .woocommerce::before,
body.woocommerce-cart .woocommerce::after,
body.page-cart .woocommerce::before,
body.page-cart .woocommerce::after {
  content: none !important;
  display: none !important;
}

body.mdt-cart-page .woocommerce .woocommerce-cart-form,
body.woocommerce-cart .woocommerce .woocommerce-cart-form,
body.page-cart .woocommerce .woocommerce-cart-form {
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

body.mdt-cart-page .woocommerce .woocommerce-cart-form table.shop_table,
body.woocommerce-cart .woocommerce .woocommerce-cart-form table.shop_table,
body.page-cart .woocommerce .woocommerce-cart-form table.shop_table {
  width: 100% !important;
  max-width: 100% !important;
  margin-bottom: 0 !important;
}

body.mdt-cart-page .woocommerce .cart-collaterals,
body.woocommerce-cart .woocommerce .cart-collaterals,
body.page-cart .woocommerce .cart-collaterals {
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto !important;
}

body.mdt-cart-page .woocommerce .cart-collaterals::before,
body.mdt-cart-page .woocommerce .cart-collaterals::after,
body.woocommerce-cart .woocommerce .cart-collaterals::before,
body.woocommerce-cart .woocommerce .cart-collaterals::after,
body.page-cart .woocommerce .cart-collaterals::before,
body.page-cart .woocommerce .cart-collaterals::after {
  content: none !important;
  display: none !important;
}

body.mdt-cart-page .woocommerce .cart-collaterals .cart_totals,
body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals,
body.page-cart .woocommerce .cart-collaterals .cart_totals {
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

body.mdt-cart-page .woocommerce .cart-collaterals .cart_totals table.shop_table,
body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals table.shop_table,
body.page-cart .woocommerce .cart-collaterals .cart_totals table.shop_table {
  width: 100% !important;
}

body.mdt-cart-page .woocommerce .wc-proceed-to-checkout,
body.woocommerce-cart .woocommerce .wc-proceed-to-checkout,
body.page-cart .woocommerce .wc-proceed-to-checkout {
  margin-bottom: 0 !important;
}

@media ( max-width: 768px ) {
  body.mdt-cart-page .woocommerce,
  body.woocommerce-cart .woocommerce,
  body.page-cart .woocommerce {
    min-height: auto !important;
    justify-content: flex-start !important;
    gap: 22px !important;
    padding-top: 30px !important;
    padding-bottom: 30px !important;
  }
}


/* ─── MDT Cart Page Fine Tune v1.0.5 ─────────────────────────────────────────
   Keep Cart Totals as a normal compact card below the cart table, not full width. */
body.mdt-cart-page .woocommerce .cart-collaterals,
body.woocommerce-cart .woocommerce .cart-collaterals,
body.page-cart .woocommerce .cart-collaterals {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
  clear: both !important;
  margin-top: 30px !important;
}

body.mdt-cart-page .woocommerce .cart-collaterals .cart_totals,
body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals,
body.page-cart .woocommerce .cart-collaterals .cart_totals {
  width: min(100%, 380px) !important;
  max-width: 380px !important;
  float: none !important;
  clear: both !important;
  margin: 0 0 0 auto !important;
  box-sizing: border-box !important;
}

body.mdt-cart-page .woocommerce .cart-collaterals .cart_totals table.shop_table,
body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals table.shop_table,
body.page-cart .woocommerce .cart-collaterals .cart_totals table.shop_table {
  width: 100% !important;
}

body.mdt-cart-page table.cart td.product-quantity,
body.woocommerce-cart table.cart td.product-quantity,
body.page-cart table.cart td.product-quantity,
body.mdt-cart-page table.shop_table td.product-quantity,
body.woocommerce-cart table.shop_table td.product-quantity,
body.page-cart table.shop_table td.product-quantity {
  color: var(--mdt-text) !important;
  font-weight: 700 !important;
  text-align: center !important;
}

body.mdt-cart-page .mdt-cart-fixed-qty,
body.woocommerce-cart .mdt-cart-fixed-qty,
body.page-cart .mdt-cart-fixed-qty {
  display: inline-block !important;
  min-width: 16px;
  color: var(--mdt-text) !important;
  font-weight: 700 !important;
}

@media ( max-width: 768px ) {
  body.mdt-cart-page .woocommerce .cart-collaterals .cart_totals,
  body.woocommerce-cart .woocommerce .cart-collaterals .cart_totals,
  body.page-cart .woocommerce .cart-collaterals .cart_totals {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
  }
}


@media (max-width: 767px) {
  .mdt-shop-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .mdt-search-box,
  .mdt-product-sort {
    width: 100%;
  }
}


/* ─── v1.1.1 Search placement fix ─────────────────────────────────────────── */
.mdt-sidebar-search {
  padding: 0 14px 14px;
}

.mdt-sidebar .mdt-search-box {
  width: 100%;
}

.mdt-shop-controls {
  justify-content: flex-end;
  margin-bottom: 18px;
}

.mdt-product-search,
.mdt-product-sort {
  min-height: 44px;
  height: 44px;
  font-size: 14px;
}

.mdt-product-search {
  padding: 0 46px 0 16px;
}

.mdt-search-btn {
  right: 4px;
  width: 36px;
  height: 36px;
  background: transparent;
  color: var(--mdt-teal);
}

.mdt-search-btn .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
}

.mdt-product-sort {
  width: min(100%, 320px);
  padding-left: 20px;
  padding-right: 38px;
}

@media (max-width: 900px) {
  .mdt-sidebar-search {
    padding: 0 14px 12px;
  }

  .mdt-shop-controls {
    justify-content: stretch;
  }

  .mdt-product-sort {
    width: 100%;
  }
}


/* ─── v1.1.2 Search final placement + styling ─────────────────────────────── */
.mdt-layout {
  grid-template-columns: 276px 1fr !important;
}

.mdt-page-header {
  margin-bottom: 28px !important;
}

.mdt-page-title {
  margin-bottom: 22px !important;
}

.mdt-page-search {
  width: 100% !important;
}

.mdt-page-search .mdt-search-box {
  width: 100% !important;
  max-width: 470px !important;
  position: relative !important;
}

.mdt-page-search .mdt-product-search {
  width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
  border: 0 !important;
  outline: none !important;
  border-radius: 999px !important;
  background: #f3f4f6 !important;
  color: var(--mdt-text) !important;
  box-shadow: none !important;
  padding: 0 58px 0 26px !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  line-height: 56px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.mdt-page-search .mdt-product-search::placeholder {
  color: #aeb4bf !important;
  opacity: 1 !important;
}

.mdt-page-search .mdt-product-search:focus {
  background: #f3f4f6 !important;
  box-shadow: 0 0 0 2px rgba(0, 86, 174, .08) !important;
}

.mdt-page-search .mdt-search-btn {
  position: absolute !important;
  top: 50% !important;
  right: 16px !important;
  left: auto !important;
  transform: translateY(-50%) !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #24324a !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

.mdt-page-search .mdt-search-btn:hover,
.mdt-page-search .mdt-search-btn:focus {
  background: transparent !important;
  color: var(--mdt-teal) !important;
  box-shadow: none !important;
  outline: none !important;
}

.mdt-page-search .mdt-search-btn .dashicons {
  font-size: 24px !important;
  width: 24px !important;
  height: 24px !important;
  line-height: 24px !important;
  display: block !important;
}

.mdt-sidebar .mdt-sidebar-search {
  display: none !important;
}

.mdt-shop-controls {
  justify-content: flex-end !important;
  margin-top: 0 !important;
  margin-bottom: 18px !important;
}

.mdt-product-sort {
  height: 50px !important;
  min-height: 50px !important;
  border-radius: 999px !important;
  background-color: #f3f4f6 !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 900px) {
  .mdt-layout {
    grid-template-columns: 1fr !important;
  }

  .mdt-page-search .mdt-search-box {
    max-width: 100% !important;
  }
}


/* ─── v1.1.3 Search + sort same row ───────────────────────────────────────── */
.mdt-page-controls {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  width: 100% !important;
  margin-top: 18px !important;
  margin-bottom: 28px !important;
}

.mdt-page-search,
.mdt-page-sort {
  width: 320px !important;
  max-width: 320px !important;
  flex: 0 0 320px !important;
}

.mdt-page-search .mdt-search-box {
  width: 320px !important;
  max-width: 320px !important;
}

.mdt-page-search .mdt-product-search,
.mdt-page-sort .mdt-product-sort {
  width: 320px !important;
  max-width: 320px !important;
  height: 50px !important;
  min-height: 50px !important;
  border-radius: 999px !important;
  background: #f3f4f6 !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: 15px !important;
  line-height: 50px !important;
}

.mdt-page-search .mdt-product-search {
  padding: 0 54px 0 24px !important;
}

.mdt-page-sort .mdt-product-sort {
  padding: 0 42px 0 24px !important;
}

.mdt-page-search .mdt-search-btn {
  right: 16px !important;
  width: 24px !important;
  height: 24px !important;
  background: transparent !important;
  color: #24324a !important;
}

.mdt-page-search .mdt-search-btn .dashicons {
  font-size: 23px !important;
  width: 23px !important;
  height: 23px !important;
  line-height: 23px !important;
}

.mdt-shop-controls {
  display: none !important;
}

@media (max-width: 900px) {
  .mdt-page-controls {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
  }

  .mdt-page-search,
  .mdt-page-sort,
  .mdt-page-search .mdt-search-box,
  .mdt-page-search .mdt-product-search,
  .mdt-page-sort .mdt-product-sort {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
  }
}

/* ─── Single Test Modern Layout v1.1.4 ─────────────────────────────────────── */
.mdt-single-modern-wrapper {
  background: #eef5fb !important;
  padding: 45px 18px !important;
  font-family: Arial, sans-serif !important;
}

.mdt-single-modern-page {
  max-width: 1180px;
  margin: auto;
  width: 100%;
}

.mdt-test-wrap {
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(7, 24, 39, 0.12);
  border: 1px solid rgba(0, 87, 184, 0.12);
}

.mdt-test-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  background: linear-gradient(135deg, #071827, #073b68 58%, #0057b8);
  color: #fff;
}

.mdt-test-hero-content {
  padding: 46px 50px;
}

.mdt-test-hero .mdt-breadcrumbs {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.82) !important;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
}

.mdt-test-hero .mdt-breadcrumbs a {
  color: #fff !important;
  text-decoration: none !important;
}

.mdt-test-hero .mdt-breadcrumb-sep,
.mdt-test-hero .mdt-breadcrumb-current {
  color: rgba(255, 255, 255, 0.72) !important;
}

.mdt-test-label {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.mdt-test-title {
  margin: 0;
  max-width: 760px;
  font-family: Georgia, serif;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
  color: #fff;
  overflow-wrap: anywhere;
}

.mdt-test-price-panel {
  padding: 34px 28px;
  border-left: 1px dashed rgba(255,255,255,0.35);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mdt-test-price-panel small {
  color: rgba(255,255,255,0.75);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.mdt-test-price-panel strong,
.mdt-test-price-panel .woocommerce-Price-amount {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 24px;
  color: #fff !important;
  font-weight: 800;
}

.mdt-test-cart-wrap .cart,
.mdt-test-cart-wrap .mdt-test-cart-form,
.mdt-test-cart-wrap .mdt-single-view-cart-wrap {
  margin: 0 !important;
  display: flex !important;
}

.mdt-test-cart-wrap .quantity,
.mdt-test-cart-wrap .qty {
  display: none !important;
}

.mdt-test-cart-wrap .single_add_to_cart_button,
.mdt-test-cart-wrap button.single_add_to_cart_button,
.mdt-test-cart-wrap .mdt-single-view-cart-btn {
  width: 100% !important;
  height: 54px !important;
  min-height: 54px !important;
  border: none !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #0057b8 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  letter-spacing: 0.7px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: 0.25s ease !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 18px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.mdt-test-cart-wrap .mdt-basket-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  display: inline-block;
}

.mdt-test-cart-wrap .single_add_to_cart_button span,
.mdt-test-cart-wrap button.single_add_to_cart_button span {
  white-space: nowrap !important;
}

.mdt-test-cart-wrap .single_add_to_cart_button:hover,
.mdt-test-cart-wrap button.single_add_to_cart_button:hover,
.mdt-test-cart-wrap .mdt-single-view-cart-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 22px rgba(0,0,0,0.18) !important;
  background: #fff !important;
  color: #0057b8 !important;
}

.mdt-test-body-content {
  padding: 42px 50px 50px;
}

.mdt-simple-meta {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  padding-bottom: 34px;
  margin-bottom: 34px;
  border-bottom: 1px solid #dbe7f3;
}

.mdt-meta-item {
  min-height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.mdt-meta-item span:first-child {
  display: block;
  color: #50627a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 9px;
}

.mdt-meta-item strong {
  color: #101828;
  font-size: 16px;
  line-height: 1.5;
  display: block;
}

.mdt-meta-item .mdt-sample-value {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mdt-meta-item .mdt-sample-value .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  color: #0057b8;
  margin-right: 0;
}

.mdt-meta-item .mdt-sample-value .mdt-sample-custom-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  margin-right: 0;
}

.mdt-text-section {
  margin-bottom: 32px;
}

.mdt-text-section:last-child {
  margin-bottom: 0;
}

.mdt-text-section h2 {
  margin: 0 0 12px;
  font-size: 25px;
  color: #101828;
  font-weight: 800;
}

.mdt-text-section p,
.mdt-text-section li {
  color: #50627a;
  font-size: 17px;
  line-height: 1.85;
  max-width: 980px;
}

.mdt-text-section p {
  margin: 0 0 14px;
}

@media (max-width: 950px) {
  .mdt-simple-meta {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
}

@media (max-width: 850px) {
  .mdt-single-modern-wrapper {
    padding: 32px 14px !important;
  }

  .mdt-test-hero {
    grid-template-columns: 1fr;
  }

  .mdt-test-hero-content,
  .mdt-test-body-content {
    padding: 32px 24px;
  }

  .mdt-test-price-panel {
    border-left: none;
    border-top: 1px dashed rgba(255,255,255,0.35);
    padding: 28px 24px;
  }

  .mdt-test-title {
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.12;
  }
}

@media (max-width: 520px) {
  .mdt-single-modern-wrapper {
    padding: 24px 12px !important;
  }

  .mdt-test-wrap {
    border-radius: 22px;
  }

  .mdt-test-hero-content,
  .mdt-test-body-content {
    padding: 28px 18px;
  }

  .mdt-test-hero .mdt-breadcrumbs {
    font-size: 13px;
  }

  .mdt-test-label {
    font-size: 12px;
  }

  .mdt-test-title {
    font-size: 30px;
    line-height: 1.15;
    word-break: break-word;
  }

  .mdt-test-price-panel strong,
  .mdt-test-price-panel .woocommerce-Price-amount {
    font-size: 36px;
  }

  .mdt-simple-meta {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .mdt-meta-item {
    min-height: auto;
    padding: 16px 16px 15px;
    background: #fbfdff;
    border: 1px solid #dbe7f3;
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(7, 24, 39, 0.04);
  }

  .mdt-text-section h2 {
    font-size: 22px;
  }

  .mdt-text-section p,
  .mdt-text-section li {
    font-size: 16px;
  }
}


/* ─── Letter Filter v1.1.9 ─────────────────────────────────────────────────── */
.mdt-page-letter-filter {
  width: 100% !important;
  margin-top: 18px !important;
}

.mdt-letter-filter {
  padding: 18px 20px !important;
  border: 1px solid #dbe7f3 !important;
  border-radius: 18px !important;
  background: #fbfdff !important;
  box-shadow: 0 8px 22px rgba(7, 24, 39, 0.04) !important;
}

.mdt-letter-filter-title {
  margin: 0 0 12px !important;
  color: var(--mdt-text) !important;
  font-size: 20px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
}

.mdt-letter-grid {
  display: grid !important;
  grid-template-columns: repeat(14, minmax(34px, 1fr)) !important;
  gap: 8px !important;
}

.mdt-letter-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 36px !important;
  border: 1px solid #dbe7f3 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--mdt-text-muted) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  transition: var(--mdt-transition) !important;
}

.mdt-letter-link:first-child {
  grid-column: span 2 !important;
}

.mdt-letter-link:hover,
.mdt-letter-link:focus,
.mdt-letter-link.is-active {
  border-color: var(--mdt-teal) !important;
  background: var(--mdt-teal-light) !important;
  color: var(--mdt-teal) !important;
}

@media (max-width: 1100px) {
  .mdt-letter-grid {
    grid-template-columns: repeat(9, minmax(34px, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .mdt-page-letter-filter {
    margin-top: 16px !important;
  }

  .mdt-letter-filter {
    padding: 16px !important;
    border-radius: 16px !important;
  }

  .mdt-letter-filter-title {
    font-size: 20px !important;
  }

  .mdt-letter-grid {
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 7px !important;
  }

  .mdt-letter-link {
    min-height: 36px !important;
    border-radius: 9px !important;
  }
}

@media (max-width: 520px) {
  .mdt-letter-grid {
    grid-template-columns: repeat(5, 1fr) !important;
  }
}


/* ─── v1.1.10 Sidebar width + compact letter filter placement ─────────────── */
@media (min-width: 901px) {
  .mdt-layout {
    grid-template-columns: 414px minmax(0, 1fr) !important;
    gap: 32px !important;
  }

  .mdt-page-letter-filter {
    width: 320px !important;
    max-width: 320px !important;
    margin-top: -10px !important;
    margin-bottom: 28px !important;
  }

  .mdt-letter-filter {
    width: 320px !important;
    max-width: 320px !important;
    padding: 16px 18px !important;
  }

  .mdt-letter-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 7px !important;
  }

  .mdt-letter-link:first-child {
    grid-column: span 2 !important;
  }
}

/* ─── v1.1.11 Final All Tests letter/sidebar alignment ───────────────────── */
@media (min-width: 901px) {
  .mdt-layout {
    grid-template-columns: 414px minmax(0, 1fr) !important;
    gap: 32px !important;
    align-items: start !important;
  }

  .mdt-filter-column {
    width: 414px !important;
    max-width: 414px !important;
  }

  .mdt-page-letter-filter {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 22px 0 !important;
  }

  .mdt-letter-filter {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 16px 16px !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 22px rgba(7, 24, 39, 0.04) !important;
  }

  .mdt-letter-filter-title {
    margin: 0 0 12px !important;
    font-size: 18px !important;
    line-height: 1.2 !important;
  }

  .mdt-letter-grid {
    grid-template-columns: repeat(8, 1fr) !important;
    gap: 7px !important;
  }

  .mdt-letter-link {
    min-height: 32px !important;
    border-radius: 9px !important;
    font-size: 13px !important;
  }

  .mdt-letter-link:first-child {
    grid-column: span 2 !important;
  }

  .mdt-filter-column .mdt-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    position: sticky !important;
    top: 24px !important;
  }

  .mdt-main-content {
    margin-top: 0 !important;
  }
}

@media (max-width: 900px) {
  .mdt-filter-column {
    width: 100% !important;
  }

  .mdt-page-letter-filter {
    margin: 0 0 18px 0 !important;
  }
}

/* ─── v1.1.12 Mobile/tablet filter dropdown layout ───────────────────────── */
.mdt-mobile-filter-controls {
  display: none;
}

@media (max-width: 900px) {
  .mdt-page-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(130px, 44%) !important;
    gap: 12px 12px !important;
    align-items: center !important;
    margin-bottom: 18px !important;
  }

  .mdt-page-title {
    grid-column: 1 !important;
    grid-row: 1 !important;
    font-size: 26px !important;
    line-height: 1.2 !important;
  }

  .mdt-page-controls {
    display: contents !important;
    margin: 0 !important;
    width: auto !important;
  }

  .mdt-page-sort {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
  }

  .mdt-page-sort .mdt-product-sort {
    width: 100% !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 34px 0 16px !important;
    font-size: 13px !important;
  }

  .mdt-mobile-filter-controls {
    display: block !important;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
  }

  .mdt-mobile-filter-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .mdt-mobile-filter-toggle {
    width: 100% !important;
    min-height: 44px !important;
    border: 1px solid #dbe7f3 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: var(--mdt-text-muted) !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    box-shadow: 0 6px 16px rgba(7, 24, 39, 0.04) !important;
    transition: var(--mdt-transition) !important;
  }

  .mdt-mobile-filter-toggle:hover,
  .mdt-mobile-filter-toggle.is-open {
    border-color: var(--mdt-teal) !important;
    background: var(--mdt-teal-light) !important;
    color: var(--mdt-teal) !important;
  }

  .mdt-mobile-filter-panel {
    margin-top: 10px !important;
    width: 100% !important;
  }

  .mdt-mobile-filter-panel[hidden] {
    display: none !important;
  }

  .mdt-mobile-filter-panel .mdt-page-letter-filter {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .mdt-mobile-filter-panel .mdt-letter-filter {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px !important;
    border-radius: 14px !important;
  }

  .mdt-mobile-filter-panel .mdt-letter-filter-title {
    font-size: 17px !important;
    margin-bottom: 9px !important;
  }

  .mdt-mobile-filter-panel .mdt-letter-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 6px !important;
  }

  .mdt-mobile-filter-panel .mdt-letter-link {
    min-height: 32px !important;
    font-size: 12px !important;
    border-radius: 7px !important;
  }

  .mdt-mobile-filter-panel .mdt-letter-link:first-child {
    grid-column: span 2 !important;
  }

  .mdt-mobile-category-panel .mdt-sidebar {
    display: block !important;
    position: static !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 10px 0 !important;
    border: 1px solid #dbe7f3 !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 22px rgba(7, 24, 39, 0.04) !important;
  }

  .mdt-mobile-category-panel .mdt-category-link {
    padding: 10px 16px !important;
    font-size: 14px !important;
  }

  .mdt-page-search {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
  }

  .mdt-page-search .mdt-search-box,
  .mdt-page-search .mdt-product-search {
    width: 100% !important;
    max-width: 100% !important;
  }

  .mdt-page-search .mdt-product-search {
    height: 46px !important;
    min-height: 46px !important;
    font-size: 14px !important;
  }

  .mdt-layout {
    display: block !important;
  }

  .mdt-layout > .mdt-filter-column {
    display: none !important;
  }

  .mdt-main-content {
    width: 100% !important;
    margin-top: 0 !important;
  }
}

@media (max-width: 520px) {
  .mdt-page-wrapper {
    padding: 18px 6px 48px !important;
  }

  .mdt-page-header {
    grid-template-columns: minmax(0, 1fr) minmax(118px, 42%) !important;
    gap: 10px !important;
  }

  .mdt-page-title {
    font-size: 23px !important;
  }

  .mdt-mobile-filter-buttons {
    gap: 8px !important;
  }

  .mdt-mobile-filter-toggle {
    min-height: 40px !important;
    font-size: 12px !important;
    padding: 0 10px !important;
  }

  .mdt-page-sort .mdt-product-sort {
    height: 40px !important;
    min-height: 40px !important;
    font-size: 11px !important;
    padding-left: 12px !important;
  }

  .mdt-mobile-filter-panel .mdt-letter-grid {
    grid-template-columns: repeat(5, 1fr) !important;
  }
}


/* ─── v1.1.13 Mobile filter active close state + compact mobile buttons ───── */
@media (max-width: 900px) {
  .mdt-mobile-filter-toggle {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 0 38px 0 16px !important;
  }

  .mdt-mobile-filter-close {
    display: none !important;
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 16px !important;
    border-radius: 50% !important;
    border: 1px solid currentColor !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    text-align: center !important;
  }

  .mdt-mobile-filter-toggle.is-open .mdt-mobile-filter-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

@media (max-width: 680px) {
  .mdt-product-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto 1fr auto !important;
    gap: 10px 12px !important;
    align-items: end !important;
    min-height: 132px !important;
    padding: 16px 16px 18px !important;
  }

  .mdt-product-name {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    align-self: start !important;
  }

  .mdt-product-turnaround {
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-self: end !important;
  }

  .mdt-product-price {
    grid-column: 1 !important;
    grid-row: 3 !important;
    align-self: end !important;
    margin: 0 !important;
  }

  .mdt-product-action {
    grid-column: 2 !important;
    grid-row: 3 !important;
    align-self: end !important;
    justify-self: end !important;
  }

  .mdt-product-action .mdt-btn,
  .mdt-product-action .mdt-btn--primary {
    min-height: 42px !important;
    padding: 8px 18px !important;
    font-size: 12px !important;
    letter-spacing: .035em !important;
    box-shadow: 0 7px 15px rgba(0, 86, 174, .18) !important;
  }
}

@media (max-width: 420px) {
  .mdt-product-action .mdt-btn,
  .mdt-product-action .mdt-btn--primary {
    min-height: 40px !important;
    padding: 7px 16px !important;
    font-size: 11px !important;
  }
}

/* ─── v1.1.14 Mobile/tablet panel close + bottom aligned buttons ─────────── */
@media (max-width: 900px) {
  .mdt-mobile-filter-toggle {
    padding: 0 16px !important;
  }

  .mdt-mobile-filter-close {
    display: none !important;
  }

  .mdt-mobile-filter-panel {
    position: relative !important;
  }

  .mdt-mobile-panel-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 12px !important;
    right: 14px !important;
    z-index: 5 !important;
    width: 30px !important;
    height: 30px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--mdt-teal) !important;
    font-size: 28px !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    box-shadow: none !important;
  }

  .mdt-mobile-panel-close:hover,
  .mdt-mobile-panel-close:focus {
    color: #003f88 !important;
    outline: none !important;
  }

  .mdt-mobile-filter-panel .mdt-letter-filter,
  .mdt-mobile-category-panel .mdt-sidebar {
    padding-right: 46px !important;
  }
}

@media (max-width: 680px) {
  .mdt-product-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto auto !important;
    gap: 10px 12px !important;
    align-items: end !important;
  }

  .mdt-product-name {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }

  .mdt-product-turnaround {
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-self: start !important;
  }

  .mdt-product-price {
    grid-column: 1 !important;
    grid-row: 3 !important;
    align-self: end !important;
  }

  .mdt-product-action {
    grid-column: 2 !important;
    grid-row: 3 !important;
    align-self: end !important;
    justify-self: end !important;
  }
}


/* ─── v1.1.15 Mobile/tablet panel close icon positioning fix ─────────────── */
@media (max-width: 900px) {
  .mdt-mobile-filter-panel {
    position: relative !important;
  }

  .mdt-mobile-panel-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 20 !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--mdt-teal) !important;
    font-size: 28px !important;
    line-height: 24px !important;
    font-weight: 900 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
  }

  .mdt-mobile-panel-close:hover,
  .mdt-mobile-panel-close:focus {
    background: transparent !important;
    box-shadow: none !important;
    color: #003f88 !important;
    outline: none !important;
  }

  .mdt-mobile-filter-panel .mdt-letter-filter,
  .mdt-mobile-category-panel .mdt-sidebar {
    padding-right: 12px !important;
  }

  .mdt-mobile-category-panel .mdt-category-link {
    padding-right: 16px !important;
  }
}


/* v1.1.19: guaranteed trolley icon for the single test Add to Basket button. */
.mdt-test-cart-wrap .single_add_to_cart_button::before,
.mdt-test-cart-wrap button.single_add_to_cart_button::before {
  content: "" !important;
  width: 19px !important;
  height: 19px !important;
  flex: 0 0 19px !important;
  display: inline-block !important;
  background-color: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2Zm10 0c-1.1 0-1.99.9-1.99 2S15.9 22 17 22s2-.9 2-2-.9-2-2-2ZM7.2 14.6h7.45c.75 0 1.41-.41 1.75-1.03l3.5-6.35A1 1 0 0 0 19.02 5H5.21L4.27 3H1v2h2l3.6 7.59-1.35 2.44C4.52 16.37 5.48 18 7 18h12v-2H7l1.1-2 .1-.4Z'/%3E%3C/svg%3E") center / contain no-repeat !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2Zm10 0c-1.1 0-1.99.9-1.99 2S15.9 22 17 22s2-.9 2-2-.9-2-2-2ZM7.2 14.6h7.45c.75 0 1.41-.41 1.75-1.03l3.5-6.35A1 1 0 0 0 19.02 5H5.21L4.27 3H1v2h2l3.6 7.59-1.35 2.44C4.52 16.37 5.48 18 7 18h12v-2H7l1.1-2 .1-.4Z'/%3E%3C/svg%3E") center / contain no-repeat !important;
}

.mdt-test-cart-wrap .single_add_to_cart_button .mdt-basket-icon,
.mdt-test-cart-wrap button.single_add_to_cart_button .mdt-basket-icon {
  display: none !important;
}


/* v1.1.20: trolley icon guaranteed on both Add to Basket and View Basket buttons. */
.mdt-test-cart-wrap .single_add_to_cart_button,
.mdt-test-cart-wrap button.single_add_to_cart_button,
.mdt-test-cart-wrap .mdt-single-view-cart-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  white-space: nowrap !important;
}

.mdt-test-cart-wrap .mdt-single-view-cart-btn .mdt-basket-icon,
.mdt-test-cart-wrap .single_add_to_cart_button .mdt-basket-icon,
.mdt-test-cart-wrap button.single_add_to_cart_button .mdt-basket-icon {
  width: 19px !important;
  height: 19px !important;
  min-width: 19px !important;
  flex: 0 0 19px !important;
  display: inline-block !important;
}

.mdt-test-cart-wrap .mdt-single-view-cart-btn::before,
.mdt-test-cart-wrap .single_add_to_cart_button::before,
.mdt-test-cart-wrap button.single_add_to_cart_button::before {
  content: none !important;
  display: none !important;
}

.mdt-test-cart-wrap .mdt-single-view-cart-btn span,
.mdt-test-cart-wrap .single_add_to_cart_button span,
.mdt-test-cart-wrap button.single_add_to_cart_button span {
  white-space: nowrap !important;
  display: inline-block !important;
}

/* v1.1.21: full-page background image for single test pages. */
.mdt-single-modern-wrapper {
  background-image: url("https://gmd.clinic/wp-content/uploads/2026/05/Banner.jpg-2.jpeg") !important;
  background-repeat: no-repeat !important;
  background-position: center top !important;
  background-size: 100% 100% !important;
  min-height: 100vh !important;
}
