@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap");
:root {
  --yellow: #ffb900;
  --dark: #222;
  --light: #f7f7f7;
  --border: #dedede;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: #202020;
  background: #f7f7f7;
  font:
    14px/1.6 Montserrat,
    Arial,
    sans-serif;
}
a {
  text-decoration: none;
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
img {
  max-width: 100%;
}
.ms-container {
  width: min(1190px, calc(100% - 50px));
  margin: auto;
}
.site-header {
  background: #222;
  color: #fff;
}
.header-top {
  display: flex;
  align-items: center;
  gap: 45px;
  min-height: 65px;
}
.brand,
.footer-brand {
  font-size: 25px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -1px;
  color: #fff;
  white-space: nowrap;
}
.custom-logo {
  max-height: 48px;
  width: auto;
}
.ms-search {
  display: flex;
  flex: 1;
  max-width: 470px;
  margin: auto;
}
.ms-search input {
    width: 100%;
    height: 34px;
    background: #fff;
    color: #222;
    border: 0;
    padding: 5px 12px;
    border-radius: 0;
    margin-right: 2px;
}
.ms-search button,
.btn-yellow {
  background: var(--yellow);
  color: #111;
  font-weight: 700;
  border: 0;
  padding: 9px 16px;
}
.ms-search button {
  font-size: 10px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}
.header-actions a {
  position: relative;
}
.header-actions svg {
  width: 22px;
  height: 22px;
}
.ms-count {
  position: absolute;
  top: -11px;
  right: -13px;
  min-width: 16px;
  border-radius: 30px;
  padding: 0 4px;
  background: var(--yellow);
  color: #111;
  text-align: center;
  font-size: 10px;
}
.main-nav {
  background: var(--yellow);
  color: #111;
}
.nav-links,
.ms-wp-menu {
  min-height: 39px;
  display: flex;
  gap: 40px;
  align-items: center;
}
.ms-wp-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-weight: 700;
  font-size: 13px;
}
.breadcrumbs {
  font-size: 11px;
  padding: 15px 0 26px;
  color: #555;
}
.breadcrumbs a:hover,
.ms-card-title:hover {
  color: #b17c00;
}
.site-footer {
  background: #242424;
  color: white;
  margin-top: 75px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding: 45px 0 28px;
}
.footer-inner p {
  margin: 12px 0;
  font-size: 12px;
}
.footer-brand {
  display: block;
  margin-bottom: 24px;
  font-size: 23px;
}
.footer-links {
  padding-top: 46px;
}
.footer-phone {
  font-weight: 600;
}
.copyright {
  grid-column: 1/-1;
  font-size: 10px;
  color: #bbb;
  margin-top: 10px;
}
.front-hero {
  background: linear-gradient(110deg, #222, #454545);
  color: white;
  min-height: 350px;
  display: flex;
  align-items: center;
  padding: 55px 70px;
}
.front-hero h1 {
  font-size: 46px;
  letter-spacing: 2px;
  margin: 0;
}
.front-hero p {
  margin-bottom: 30px;
}
.front-collections,
.related-products {
  padding: 45px 0;
}
.front-collections h2,
.related-products h2 {
  text-align: center;
  margin: 5px 0 35px;
  font-size: 19px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.category-grid a {
  background: white;
  border: 1px solid #e3e3e3;
  padding: 30px 22px;
  font-weight: 700;
}
.category-grid span {
  float: right;
  color: #d39200;
}
.collection-banner {
  height: 230px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: end;
  padding: 25px;
  color: var(--yellow);
  text-shadow: 1px 1px #111;
}
.catalog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 20px;
}
.catalog-heading h1 {
  font-size: 25px;
}
.catalog-heading select {
  padding: 10px 25px 10px 8px;
  border: 1px solid #ddd;
  background: #fff;
}
.catalog-heading label {
  font-size: 12px;
}
.collection-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 25px;
}
.collection-pills a {
  border: 1px solid #ddd;
  padding: 8px 16px;
  background: #fff;
  font-size: 12px;
}
.ms-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.ms-card {
  background: white;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px #00000012;
  display: flex;
  flex-direction: column;
}
.ms-card-image {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #fff;
}
.ms-card-image img {
  object-fit: contain;
  width: 100%;
  height: 100%;
}
.ms-photo-empty {
  color: #bbb;
  font-weight: 600;
  text-align: center;
}
.ms-card-body {
  padding: 15px 17px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.ms-card-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  min-height: 57px;
}
.ms-sku {
  font-size: 11px;
  color: #555;
  margin: 8px 0 2px;
}
.ms-price {
  font-size: 13px;
  font-weight: 700;
}
.ms-card-add {
  margin: 16px -17px -15px;
  padding: 12px;
  background: #fbfbfb;
  border: 0;
  border-top: 1px solid #e4e4e4;
  font-size: 11px;
  font-weight: 800;
}
.ms-card-add span {
  color: #e9a900;
  font-size: 19px;
  vertical-align: middle;
  float: right;
  line-height: 14px;
}
.ms-pagination {
  text-align: center;
  margin: 30px;
}
.page-numbers {
  padding: 6px;
}
.product-hero {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: 24px;
  background: #fff;
  padding: 10px 5px 30px;
}
.product-photos {
  display: flex;
  min-height: 350px;
  gap: 15px;
}
.product-thumbs {
  width: 70px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}
.ms-thumb {
  width: 64px;
  height: 64px;
  border: 1px solid #ddd;
  background: white;
  padding: 4px;
}
.ms-thumb.is-active {
  border: 2px solid var(--yellow);
}
.ms-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-main-photo {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-main-photo img {
  width: 100%;
  max-height: 430px;
  object-fit: contain;
}
.product-buy {
  padding: 20px 25px 0 0;
}
.product-buy h1 {
  font-size: 25px;
  line-height: 1.25;
  margin: 0 0 10px;
}
.product-price {
  margin: 22px 0;
}
.product-price s {
  font-size: 13px;
  color: #888;
  display: block;
}
.product-price strong {
  font-size: 21px;
}
.buy-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}
.ms-quantity {
  display: flex;
  border: 1px solid #bbb;
  height: 37px;
}
.ms-quantity button {
  border: 0;
  background: white;
  width: 29px;
}
.ms-quantity input {
  width: 40px;
  text-align: center;
  border: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}
.ms-quantity input::-webkit-inner-spin-button {
  appearance: none;
}
.btn-dark {
  background: #101010;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 11px 20px;
  border: 0;
}
.product-details {
  background: #fff;
  margin: 28px 0 0;
  padding: 25px 35px;
}
.product-details h2 {
  font-size: 18px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
}
.detail-columns {
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 30px;
}
.detail-columns h3 {
  font-size: 13px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ddd;
}
.manual-file {
  background: #f7f7f7;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  width: 230px;
  font-size: 12px;
}
.manual-file span {
  font-size: 20px;
}
.ms-accordions details {
  border-bottom: 1px solid #d8d8d8;
}
.ms-accordions summary {
  list-style: none;
  padding: 10px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.ms-accordions summary::-webkit-details-marker {
  display: none;
}
.ms-accordions summary:after {
  content: "+";
  float: right;
}
.ms-accordions details[open] summary:after {
  content: "−";
}
.accordion-content {
  padding: 5px 0 20px;
  font-size: 12px;
  line-height: 1.7;
}
.accordion-content ul {
  padding-left: 20px;
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}
.spec-grid div {
  padding: 8px;
  border: 1px solid #ccc;
}
.spec-grid strong {
  display: block;
}
.cart-section {
  min-height: 370px;
  padding: 35px 0;
}
.cart-header,
.cart-row {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr 1fr 35px;
  align-items: center;
  gap: 15px;
  background: white;
  padding: 15px;
}
.cart-header {
  font-weight: 600;
  font-size: 13px;
}
.cart-row {
  border-top: 1px solid #eee;
  font-size: 12px;
}
.cart-item-product {
  display: flex;
  align-items: center;
  gap: 20px;
}
.cart-item-product img {
  width: 80px;
  height: 75px;
  object-fit: contain;
}
.cart-item-product strong {
  max-width: 230px;
}
.cart-row .ms-quantity {
  width: 95px;
  height: 27px;
}
.cart-row .ms-quantity button {
  width: 25px;
}
.cart-row .ms-quantity input {
  width: 36px;
}
.cart-delete {
  background: none;
  border: 0;
  font-size: 20px;
  color: #777;
}
.cart-totals {
  text-align: right;
  margin: 24px 0;
}
.cart-totals p {
  font-weight: 700;
}
.cart-empty {
  padding: 40px;
  text-align: center;
  background: white;
}
.cart-empty a {
  color: #b27d00;
}
.ms-modal[hidden],
.cart-empty[hidden] {
  display: none;
}
.ms-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
}
.ms-modal-shade {
  position: absolute;
  inset: 0;
  background: #0009;
}
.ms-modal-panel {
  position: relative;
  background: white;
  width: min(560px, 100%);
  padding: 35px 55px;
  box-shadow: 0 10px 35px #0005;
}
.modal-close {
  position: absolute;
  top: 9px;
  right: 15px;
  font-size: 30px;
  border: 0;
  background: none;
}
.ms-modal h2 {
  color: #e8a700;
  font-size: 19px;
  margin: 0 0 17px;
}
.ms-modal h2:after,
.yellow-line {
  content: "";
  display: block;
  background: var(--yellow);
  width: 57px;
  height: 2px;
  margin-top: 8px;
}
.ms-modal label {
  display: block;
  font-weight: 600;
  font-size: 11px;
  margin-bottom: 12px;
}
.ms-modal label input,
.ms-modal textarea {
  display: block;
  margin-top: 4px;
  width: 100%;
  padding: 9px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 12px;
}
.ms-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-required {
  font-size: 10px;
}
.submit-enquiry {
  display: block;
  margin-left: auto;
  min-width: 125px;
}
.ms-form-error {
  color: #a40000;
}
.thank-you {
  min-height: 300px;
  text-align: center;
  padding: 60px 0;
}
.thank-you h1 {
  font-size: 30px;
  letter-spacing: 2px;
  color: #e4a400;
}
.thank-you .yellow-line {
  margin: 10px auto 19px;
}
.thank-you p {
  font-weight: 600;
  margin-bottom: 35px;
}
.page-generic {
  min-height: 400px;
  padding: 35px 0;
}
.page-body {
  background: white;
  padding: 30px;
}
.ms-toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #242424;
  color: white;
  padding: 13px 20px;
  box-shadow: 0 8px 20px #0003;
  z-index: 99999;
  display: none;
}
.ms-toast.is-visible {
  display: block;
}
.sr-only {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  width: 1px;
  overflow: hidden;
}
.btn-yellow:hover,
.ms-search button:hover {
  background: #e4a400;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #cc8500;
  outline-offset: 2px;
}
@media (max-width: 800px) {
  .ms-grid,
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-hero {
    grid-template-columns: 1fr;
  }
  .product-buy {
    padding: 15px;
  }
  .detail-columns {
    grid-template-columns: 1fr;
  }
  .header-top {
    gap: 15px;
  }
  .nav-links,
  .ms-wp-menu {
    gap: 18px;
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .footer-inner {
    gap: 20px;
  }
  .cart-header,
  .cart-row {
    grid-template-columns: 2fr 1fr 1fr 1fr 25px;
    gap: 6px;
  }
  .cart-item-product {
    gap: 6px;
  }
}
@media (max-width: 520px) {
  .ms-container {
    width: calc(100% - 28px);
  }
  .header-top {
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .brand {
    font-size: 21px;
  }
  .header-actions {
    margin-left: auto;
  }
  .ms-search {
    order: 2;
    flex-basis: 100%;
    max-width: none;
  }
  .nav-links,
  .ms-wp-menu {
    gap: 15px;
  }
  .nav-links a {
    font-size: 11px;
  }
  .ms-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .ms-card-image {
    height: 135px;
  }
  .ms-card-body {
    padding: 10px;
  }
  .ms-card-title {
    font-size: 11px;
    min-height: 65px;
  }
  .ms-card-add {
    margin: 10px -10px -10px;
    font-size: 9px;
    padding: 10px;
  }
  .ms-card-add span {
    font-size: 14px;
  }
  .product-photos {
    min-height: 240px;
  }
  .product-thumbs {
    width: 52px;
  }
  .ms-thumb {
    width: 49px;
    height: 49px;
  }
  .product-buy h1 {
    font-size: 21px;
  }
  .product-details {
    padding: 15px;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .footer-inner > div:nth-child(3) {
    grid-column: 1/-1;
  }
  .footer-links {
    padding-top: 40px;
  }
  .front-hero {
    padding: 25px;
    min-height: 240px;
  }
  .front-hero h1 {
    font-size: 29px;
  }
  .cart-header {
    display: none;
  }
  .cart-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .cart-item-product {
    grid-column: 1/-1;
  }
  .cart-row .cart-delete {
    grid-column: 2;
    grid-row: 3;
  }
  .ms-modal-panel {
    padding: 28px 18px;
  }
  .thank-you h1 {
    font-size: 23px;
  }
}

/* Full-width MasterSpec product mega navigation */
.main-nav {
  position: relative;
  z-index: 100;
  background: #c89000;
  color: #111;
}
.main-nav .nav-links {
  display: flex;
  align-items: stretch;
  gap: clamp(20px, 4.8vw, 82px);
  min-height: 54px;
}
.main-nav .nav-links > a,
.ms-products-trigger {
  font:
    700 16px/1.2 Montserrat,
    Arial,
    sans-serif;
  color: #111;
  display: flex;
  align-items: center;
  position: relative;
  background: none;
  border: 0;
  padding: 0;
  white-space: nowrap;
}
.ms-products-trigger {
  height: 100%;
  cursor: pointer;
}
.ms-products-nav {
  display: flex;
  align-items: stretch;
}
.ms-products-nav.is-open .ms-products-trigger:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: calc(50% - 32px);
  border-left: 32px solid transparent;
  border-right: 32px solid transparent;
  border-bottom: 12px solid white;
  z-index: 3;
}
.ms-mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  color: #111;
  box-shadow: 0 8px 14px #00000012;
  display: none;
  padding: 30px 0 38px;
  min-height: 220px;
}
.ms-products-nav.is-open .ms-mega-menu {
  display: block;
}
.ms-mega-layout {
  position: relative;
  display: block;
}
.ms-mega-group {
  width: 255px;
  min-height: 39px;
}
.ms-mega-category {
  display: block;
  padding: 5px 20px;
  font-size: 16px;
  line-height: 29px;
  font-weight: 500;
}
.ms-mega-group.is-active > .ms-mega-category {
  background: #f3f3f3;
  font-weight: 800;
}
.ms-mega-children {
  display: none;
  position: absolute;
  top: 0;
  left: 285px;
  min-height: 192px;
  border-left: 1px solid #eee;
  padding-left: 35px;
  width: calc(100% - 285px);
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.ms-mega-group.is-active > .ms-mega-children {
  display: flex;
}
.ms-mega-children > a {
  font-size: 16px;
  line-height: 39px;
  font-weight: 500;
}
.ms-mega-children > a:hover,
.ms-mega-category:hover {
  color: #ad7800;
}
.ms-mobile-chevron {
  display: none;
}
@media (max-width: 800px) {
  .main-nav .nav-links {
    gap: 20px;
    min-height: 48px;
  }
  .main-nav .nav-links > a,
  .ms-products-trigger {
    font-size: 13px;
  }
  .ms-mega-group {
    width: 190px;
  }
  .ms-mega-category,
  .ms-mega-children > a {
    font-size: 13px;
  }
  .ms-mega-children {
    left: 205px;
    width: calc(100% - 205px);
    padding-left: 20px;
  }
}
@media (max-width: 520px) {
  .main-nav .nav-links {
    padding: 9px 0;
    gap: 16px;
    min-height: 44px;
    align-items: center;
    flex-wrap: wrap;
  }
  .ms-products-nav {
    position: static;
  }
  .ms-products-trigger {
    min-height: 26px;
  }
  .ms-mobile-chevron {
    display: inline;
    padding-left: 6px;
  }
  .ms-products-nav.is-open .ms-products-trigger:after {
    display: none;
  }
  .ms-mega-menu {
    top: 100%;
    padding: 10px 0 20px;
    min-height: 0;
  }
  .ms-mega-group {
    width: 43%;
    min-height: 37px;
  }
  .ms-mega-category {
    font-size: 11px;
    line-height: 25px;
    padding: 6px 5px;
  }
  .ms-mega-children {
    left: 43%;
    width: 57%;
    padding-left: 12px;
    min-height: 0;
  }
  .ms-mega-children > a {
    font-size: 11px;
    line-height: 27px;
  }
  .main-nav .nav-links > a,
  .ms-products-trigger {
    font-size: 11px;
  }
}

.header-actions .ms-account-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
}

.header-actions .ms-account-icon svg {
    width: 22px;
    height: 22px;
}

.header-actions .ms-account-icon:hover {
    color: #ffb900;
}
/* Related Product Title - Maximum 3 Lines */
.related-products .ms-card-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;

    overflow: hidden;
    text-overflow: ellipsis;

    line-height: 1.4;
    max-height: 4.2em;
}


/* ==========================================
   MASTERSPEC RELATED PRODUCT CARD
========================================== */

.related-products .ms-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.ms-related-tile {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
    overflow: hidden;
}

/* Product image */

.ms-related-tile-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 165px;
    padding: 12px;
    background: #ffffff;
}

.ms-related-tile-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Content */

.ms-related-tile-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 8px 20px 20px;
}

/* Title - exactly 3 lines maximum */

.ms-related-tile-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #111111;
    text-decoration: none;

    height: 3.65em;
    margin-bottom: 24px;
}

.ms-related-tile-title:hover {
    color: #e5a000;
}

/* Bottom section */

.ms-related-tile-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.ms-related-tile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ms-related-tile-sku {
    font-size: 12px;
    font-weight: 400;
    color: #333333;
}

.ms-related-tile-rrp {
    font-size: 12px;
    color: #333333;
}

.ms-related-tile-price {
    font-size: 14px;
    font-weight: 700;
    color: #111111;
}

/* Circular yellow cart button */

.related-products .ms-related-cart,
.related-products .ms-card-add.ms-related-cart {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: none !important;
    border-radius: 50% !important;

    background: #ffb700 !important;
    color: #ffffff !important;

    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.related-products .ms-related-cart:hover {
    background: #e8a500 !important;
    transform: scale(1.06);
}

.related-products .ms-related-cart svg {
    display: block;
    flex-shrink: 0;
}

/* Responsive */

@media (max-width: 1024px) {
    .related-products .ms-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .related-products .ms-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ms-related-tile-image {
        height: 140px;
        padding: 8px;
    }

    .ms-related-tile-content {
        padding: 8px 10px 14px;
    }

    .ms-related-tile-title {
        font-size: 12px;
    }

    .related-products .ms-related-cart {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
    }
}

/* =========================================
   MASTERSPEC UNIFIED PRODUCT CARDS
   Products, Collections, Related Products
========================================= */

/* Product grid */
:is(
    .post-type-archive-ms_product,
    .tax-ms_collection,
    .related-products
) .ms-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
    align-items: stretch;
}

/* Card container */
.ms-related-tile {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0;
    background: #ffffff !important;
    border: 1px solid #dddddd !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12) !important;
    overflow: hidden;
}

/* Product image */
.ms-related-tile .ms-related-tile-image {
    display: flex !important;
    justify-content: center;
    align-items: center;
    height: 185px !important;
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    background: #ffffff;
}

.ms-related-tile .ms-related-tile-image img {
    width: 100% !important;
    height: 100% !important;
    max-height: 170px;
    object-fit: contain !important;
}

/* Card content */
.ms-related-tile .ms-related-tile-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1;
    padding: 12px 18px 18px !important;
}

/* Product title - maximum 3 lines */
.ms-related-tile .ms-related-tile-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;

    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    height: 4.05em !important;

    color: #111111 !important;
    text-decoration: none;
    margin-bottom: 24px !important;
}

/* Bottom section */
.ms-related-tile .ms-related-tile-footer {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    gap: 10px;
    margin-top: auto !important;
}

/* SKU and price */
.ms-related-tile .ms-related-tile-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px;
    min-width: 0;
}

.ms-related-tile .ms-related-tile-sku {
    display: block;
    font-size: 12px !important;
    color: #444444;
}

.ms-related-tile .ms-related-tile-rrp {
    display: block;
    font-size: 12px !important;
}

.ms-related-tile .ms-related-tile-price {
    display: block;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #111111;
}

/* Yellow circular cart button */
.ms-related-tile button.ms-related-cart,
.ms-related-tile button.ms-card-add.ms-related-cart {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;

    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;

    padding: 0 !important;
    margin: 0 !important;

    background: #ffb700 !important;
    border: none !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    cursor: pointer;
}

.ms-related-tile .ms-related-cart svg {
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    stroke: #ffffff !important;
}

.ms-related-tile .ms-related-cart:hover {
    background: #e8a500 !important;
}

/* Tablet */
@media (max-width: 1024px) {
    :is(
        .post-type-archive-ms_product,
        .tax-ms_collection,
        .related-products
    ) .ms-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Mobile */
@media (max-width: 600px) {
    :is(
        .post-type-archive-ms_product,
        .tax-ms_collection,
        .related-products
    ) .ms-grid {
        gap: 10px !important;
    }

    .ms-related-tile .ms-related-tile-image {
        height: 145px !important;
        padding: 8px;
    }

    .ms-related-tile .ms-related-tile-content {
        padding: 10px !important;
    }

    .ms-related-tile .ms-related-tile-title {
        font-size: 12px !important;
    }

    .ms-related-tile button.ms-related-cart {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
    }
}

