/* Kalama Omnibus – storefront */
.kom-omnibus {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .15rem .4rem;
  margin: .35rem 0 0;
  font-size: .8125rem;
  line-height: 1.45;
  color: #697573;
  font-weight: 400;
}
.kom-omnibus + .kom-omnibus { display: none; } /* never twice on one card */
.kom-omnibus__price { color: #183837; font-weight: 600; white-space: nowrap; }
.kom-omnibus__pct { color: #183837; white-space: nowrap; }
.kom-omnibus__sep { color: #c9cfce; }
.kom-omnibus__chart {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: 0; margin: 0; border: 0; background: none;
  font: inherit; color: #8b6f3d; text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer; white-space: nowrap;
}
.kom-omnibus__chart:hover, .kom-omnibus__chart:focus-visible { color: #c49316; }
.kom-omnibus__chart:focus-visible { outline: 2px solid #c49316; outline-offset: 2px; border-radius: 2px; }
.kom-omnibus__icon { flex: none; }
/* product page: placed right under the price block (theme wrapper has mb-4) */
.product__prices > .kom-omnibus--product { margin-top: 0; margin-bottom: 1.25rem; }
/* no real saving against the 30-day lowest price → hide the theme's "(Save 0%)" text */
.product__prices:has(.kom-omnibus[data-kom-nosaving]) .product__discount-percentage,
.product__prices:has(.kom-omnibus[data-kom-nosaving]) .product__discount-amount { display: none; }
.product__tax-label .kom-omnibus--product { flex-basis: 100%; }
/* listings: compact, full width under the price */
*:has(> .kom-omnibus--listing) { flex-wrap: wrap; align-items: baseline; column-gap: .5rem; }
.kom-omnibus--listing { order: 99; flex: 0 0 100%; width: 100%; margin-top: .2rem; font-size: .6875rem; line-height: 1.35; gap: 0 .3rem; }
.kom-omnibus--listing .kom-omnibus__price { font-weight: 600; }

/* modal */
.kom-modal { position: fixed; inset: 0; z-index: 1060; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.kom-modal[hidden] { display: none; }
.kom-modal__backdrop { position: absolute; inset: 0; background: rgba(5, 47, 50, .55); animation: kom-fade .15s ease-out; }
.kom-modal__dialog {
  position: relative; width: 100%; max-width: 760px; max-height: calc(100vh - 2rem); overflow: auto;
  background: #fff; color: #183837; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  padding: 1.25rem 1.25rem 1rem; animation: kom-pop .18s ease-out;
}
.kom-modal--dark .kom-modal__dialog { background: #10201f; color: #e8eeed; }
.kom-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.kom-modal__title { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.3; color: inherit; }
.kom-modal__sub { margin: .15rem 0 0; font-size: .8125rem; opacity: .75; }
.kom-modal__close {
  flex: none; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .05);
  color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.kom-modal--dark .kom-modal__close { background: rgba(255, 255, 255, .1); }
.kom-modal__close:hover { background: rgba(0, 0, 0, .1); }
.kom-modal__bar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.kom-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid rgba(0, 0, 0, .12); border-radius: 999px; overflow: hidden; }
.kom-modal--dark .kom-seg { border-color: rgba(255, 255, 255, .2); }
.kom-seg button { border: 0; background: none; color: inherit; padding: .3rem .7rem; font: inherit; font-size: .8125rem; cursor: pointer; }
.kom-seg button[aria-pressed="true"] { background: #052f32; color: #fff; }
.kom-modal--dark .kom-seg button[aria-pressed="true"] { background: #c49316; color: #10201f; }
.kom-modal__chart { position: relative; height: 320px; }
.kom-modal__state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .875rem; opacity: .75; text-align: center; padding: 1rem; }
.kom-modal__summary { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-top: .75rem; font-size: .8125rem; }
.kom-modal__summary strong { font-weight: 600; }
.kom-modal__note { margin: .5rem 0 0; font-size: .75rem; opacity: .7; }
.kom-ref-swatch { display: inline-block; width: 14px; height: 0; border-top: 2px dashed currentColor; vertical-align: middle; margin-right: .3rem; }
body.kom-modal-open { overflow: hidden; }
@keyframes kom-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kom-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 575.98px) {
  .kom-modal { align-items: flex-end; padding: 0; }
  .kom-modal__dialog { max-width: none; max-height: 92vh; border-radius: 16px 16px 0 0; padding: 1rem .9rem .9rem; }
  .kom-modal__chart { height: 260px; }
  .kom-modal__title { font-size: 1.1rem; }
  .kom-omnibus { font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) { .kom-modal__backdrop, .kom-modal__dialog { animation: none; } }
