/* GaloMinRules front styles (cart + product)
   Scoped to module blocks to avoid theme conflicts (Warehouse, etc.)
*/

.galominrules-alert { font-size: 1rem !important; }

/* Alert containers */
.galominrules-alert-box{
  margin-top: 1rem;
  background: transparent;
  border: 1px solid #671f26;
}

/* Cart violations layout: each rule in its own "card" */
.galominrules-violations{ margin-top: 1rem; }
.galominrules-violations-head{ margin-top: .25rem; }
.galominrules-rule-card{
  background: transparent !important;
  border: 1px solid #671f26 !important;
  border-radius: 10px !important;
  padding: .75rem !important;
  margin-top: .75rem;
}
.galominrules-compact .table-responsive{ display:none; }

/* Warehouse cart: the actual affected line is marked instead of duplicated below it. */
.cart-item.galominrules-cart-item-warning{
  border: 2px solid #dc3545;
  border-radius: 10px;
  padding: .65rem;
  margin: .5rem 0;
}
.cart-item:has(.galominrules-cart-item-note){
  border: 2px solid #dc3545;
  border-radius: 10px;
  padding: .65rem;
  margin: .5rem 0;
}
.galominrules-cart-item-note{
  margin-top: .55rem;
  padding: .45rem .6rem;
  border-radius: 7px;
  background: #f8d7da;
  color: #842029;
  font-size: .9rem;
  font-weight: 600;
}
.galominrules-product-box{ margin-top: .75rem; }
.galominrules-product-alert{
  background: #1702021f;
  border: 1px solid #671f26;
  padding: .75rem;
  border-radius: 14px;
}

/* Headings */
.galominrules-title{
  font-weight: 900;
  font-size: 1.25rem;
  line-height: 1.3;
}
.galominrules-subtitle{
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.2;
  margin-top: .15rem;
}
.galominrules-title--product{ font-size: 1.15rem; line-height: 1.2; }
.galominrules-subtitle--product{ font-size: 1rem; line-height: 1.2; }

/* Small margin helpers (module-only usage) */
.galomin-mt-015{ margin-top: .15rem; }
.galomin-mt-025{ margin-top: .25rem; }
.galomin-mt-045{ margin-top: .45rem; }
.galomin-mt-05{ margin-top: .5rem; }
.galomin-mt-055{ margin-top: .55rem; }
.galomin-mt-06{ margin-top: .6rem; }
.galomin-mt-075{ margin-top: .75rem; }

/* Flex row with consistent spacing */
.galomin-flex-wrap-gap{ gap: .5rem; flex-wrap: wrap; }

/* Normalize badges inside module */
.galominrules-alert .badge{
  font-size: 1rem !important;
  padding: .35rem .55rem;
  line-height: 1.2;
}

/* Manufacturer logo badge (force white background, ignore theme colors) */
.galomin-brand-badge{
  background:#fff !important;
  background-image: none !important;
  color:#000 !important;
  border:1px solid #e5e5e5;
  border-radius:6px;
  padding:.15rem .35rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.galomin-manuf-logo{
  height:28px;
  width:auto;
  display:block;
  background: transparent !important;
}

.galomin-brand-logo-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none !important;
}

/* Min amount badge: long text wrapping (mobile-safe) */
.galomin-min-badge{
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: left;
}
.galomin-min-line1,
.galomin-min-line2{ display: inline; }
@media (max-width: 300px){
  .galomin-min-line1,
  .galomin-min-line2{ display:block; line-height:1.2; }
}
/* Visual style for product-page min-amount badge */
.galomin-min-amount-badge{
  border: 1px solid #671f26;
  background: #282b2f;
  color: #dadada;
}

/* Brand link button (module-owned style) */
.galomin-brand-link{
  display: inline-block;
  background: #282b2f !important;
  color: #dadada !important;
  border: 1px solid #671f26;
  border-radius: 6px;
  padding: .28rem .55rem;
  font-weight: 700;
  text-decoration: none !important;
  line-height: 1.2;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.galomin-brand-link:hover,
.galomin-brand-link:focus{
  background: #1f2226 !important;
  color: #ffffff !important;
  text-decoration: none !important;
}
.galomin-brand-link:active{ transform: translateY(1px); }
/* Inline variant inside text */
.galomin-brand-link--inline{
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  color: inherit !important;
  text-decoration: underline !important;
  transform: none !important;
}

/* Rule badges on product page */
.galomin-rule-badge{
  border: 1px solid #671f26;
  background: #ffffff;
  color: #000;
}
.galomin-rule-badge--transparent{
  background: transparent;
}

/* Table layout helpers */
.galominrules-alert table th,
.galominrules-alert table td{ vertical-align: middle; }

.galomin-col-thumb{ width: 60px; }
.galomin-col-nowrap{ white-space: nowrap; }
.galomin-col-center{ text-align: center; }

/* Product thumb images */
.galomin-prod-thumb{
  width: 50px;
  height: auto;
  border-radius: 6px;
  display:block;
}
.galomin-prod-thumb--product{ width: 98px; }

/* Product link + price emphasis on product page */
.galomin-prod-link{
  font-weight: 600;
  font-size: 1rem;
  color: #d7d7d7 !important;
  text-decoration: none;
}
.galomin-prod-link:hover{ text-decoration: underline; }

.galomin-prod-price{
  font-weight: 600;
  font-size: 1.2rem;
}

/* Cart table emphasis */
.galomin-price{ font-weight: 700; }
.galomin-qty{ font-weight: 800; }

/* SKU (product reference) line under product name */
.galomin-sku{
  font-size: .9rem;
  opacity: .85;
  line-height: 1.2;
  margin-top: .15rem;
}

/* SKU / reference under product name */
.galomin-sku{
  font-size: .9rem;
  opacity: .9;
  margin-top: .15rem;
}

/* --- qty/min text wrapping fixes (Warehouse theme etc.) --- */
.galominrules-alert .badge.galomin-rule-badge,
.galominrules-alert .badge.galomin-min-badge{
  white-space: normal !important;
  max-width: 100% !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: center;
}

.galominrules-alert .galomin-rule-line1{ display:block; font-weight: 700; }
.galominrules-alert .galomin-rule-line2{ display:block; margin-top: .2rem; }

/* Warehouse alphabetical brand list: volume discounts are distinct from red minimum-order badges. */
.ms-brand-card-rule-slot .galomin-brand-card-discount{
  display:block;
  width:100%;
  margin:.35rem 0 .15rem;
  padding:.32rem .45rem;
  border:1px solid #80c99a;
  border-radius:6px;
  background:#f1fbf4;
  color:#1e6c39;
  font-size:.82rem;
  font-weight:600;
  line-height:1.25;
  text-align:center;
  white-space:normal;
  overflow-wrap:anywhere;
}

/* A brand may have both an order minimum and volume discounts. Keep their
   badges in a compact vertical stack instead of squeezing them side by side. */
.ms-alphabetical-logo-cards .ms-brand-card-rule-slot{
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  gap:.24rem;
  width:100%;
}
.ms-alphabetical-logo-cards .ms-brand-card-rule-slot .ms-brand-card-rule,
.ms-alphabetical-logo-cards .ms-brand-card-rule-slot .galomin-brand-card-discount{
  display:flex;
  align-items:center;
  justify-content:center;
  align-self:stretch;
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  margin:0;
  padding:.28rem .42rem;
  text-align:center;
}

/* Volume discounts in the Warehouse cart summary. */
.galominrules-has-volume-discount .cart-voucher-area{ display:none !important; }
.galomin-volume-discounts{
  margin:.8rem 0;
  padding:.82rem;
  border:1px solid #f0cbc9;
  border-radius:10px;
  background:linear-gradient(135deg,#fff7f6 0%,#fff 100%);
  box-shadow:0 3px 10px rgba(117,39,35,.06);
  color:#612824;
}
.galomin-volume-discounts-heading{
  display:flex;
  align-items:flex-start;
  gap:.55rem;
  margin-bottom:.65rem;
}
.galomin-volume-discounts-heading-icon{
  display:inline-flex;
  flex:0 0 28px;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:50%;
  background:linear-gradient(135deg,#bd3040,#8d1724);
  color:#fff;
  font-size:.95rem;
}
.galomin-volume-discounts-title{ font-size:1rem; font-weight:700; line-height:1.2; letter-spacing:.01em; }
.galomin-volume-discounts-note{ margin-top:.14rem; color:#7a4b49; font-size:.8rem; line-height:1.28; }
.galomin-volume-brand{
  position:relative;
  margin-top:.48rem;
  padding:.62rem .68rem;
  border:1px solid #ecd8d5;
  border-radius:8px;
  background:#fff;
}
.galomin-volume-brand:before{ content:'✦'; display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; margin-right:.38rem; border-radius:50%; background:#fff0ef; color:#a61e2d; font-size:.66rem; vertical-align:middle; }
.galomin-volume-brand-name{
  display:inline-flex;
  align-items:center;
  gap:.25rem;
  color:#642622;
  font-size:.92rem;
  font-weight:700;
  text-decoration:none;
}
.galomin-volume-brand-name:hover{ color:#642622; text-decoration:underline; }
.galomin-volume-brand-arrow{ color:#a61e2d; }
.galomin-volume-applied{
  display:flex;
  justify-content:space-between;
  gap:.5rem;
  margin-top:.32rem;
  color:#842029;
  font-size:.95rem;
}
.galomin-volume-applied span{ display:inline-flex; align-items:center; gap:.25rem; }
.galomin-volume-applied span:before{ content:'✓'; display:inline-flex; align-items:center; justify-content:center; width:17px; height:17px; border-radius:50%; background:#e8f6ec; color:#237a42; font-size:.7rem; font-weight:700; }
.galomin-volume-applied strong{ color:#8a2029; }
.galomin-volume-progress{
  margin-top:.36rem;
  padding-top:.36rem;
  border-top:1px dashed #efd9d6;
  color:#6f574f;
  font-size:.82rem;
  line-height:1.3;
}
.galomin-volume-check{ color:#27834a; font-weight:700; }
.galomin-volume-catalog-link{
  display:inline-block;
  margin-top:.38rem;
  color:#842029;
  font-size:.82rem;
  text-decoration:underline;
}
