/* Sales helpers (2026-10-05) — styles for ck-sales.js and the PDP Viber
   question. Palette tokens only ("Дълбок петрол"). */

/* Viber question under the buy button ----------------------------------- */
.pdp-ask {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin: 12px 0 4px;
}
.pdp-ask-viber {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(18, 62, 68, .18);
  border-radius: 12px;
  background: #E6ECE9;
  color: #123E44;
  font-size: .9rem;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.pdp-ask-viber i { font-size: 1.25rem; color: #123E44; }
.pdp-ask-viber strong { font-weight: 700; }
.pdp-ask-viber:hover { background: #fff; border-color: #1F5A61; transform: translateY(-1px); }
.pdp-ask-viber:focus-visible, .pdp-ask-tel:focus-visible { outline: 2px solid #B8955A; outline-offset: 2px; }
.pdp-ask-tel { color: #5A615F; font-size: .85rem; text-decoration: underline; text-underline-offset: 3px; }
.pdp-ask-tel:hover { color: #123E44; }

/* 1. Buy bar (phones) ---------------------------------------------------- */
.ck-buybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 860;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(246, 244, 239, .97);
  border-top: 1px solid rgba(18, 62, 68, .14);
  box-shadow: 0 -12px 30px rgba(11, 43, 48, .12);
  transform: translateY(110%);
  visibility: hidden;
  transition: transform .32s cubic-bezier(.16, .84, .3, 1), visibility 0s linear .32s;
}
.ck-buybar.is-on { transform: none; visibility: visible; transition-delay: 0s; }
.ck-buybar-img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid rgba(18, 62, 68, .10); }
.ck-buybar-img[hidden] { display: none; }
.ck-buybar-text { min-width: 0; display: grid; gap: 1px; }
.ck-buybar-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .78rem; color: #5A615F; }
.ck-buybar-price { font-family: Manrope, Inter, sans-serif; font-size: 1.05rem; font-weight: 800; color: #161A1B; }
.ck-buybar-btn {
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #C8A86E, #B8955A);
  color: #161A1B;
  font: 700 .9rem/1 Inter, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, transform .15s ease;
}
.ck-buybar-btn:active { transform: scale(.97); }
.ck-buybar-btn:focus-visible { outline: 2px solid #B8955A; outline-offset: 2px; }
.ck-buybar.is-added .ck-buybar-btn { background: #123E44; color: #fff; }
@media (min-width: 901px) { .ck-buybar { display: none; } }
@media (max-width: 360px) {
  .ck-buybar-img { display: none; }
  .ck-buybar { grid-template-columns: minmax(0, 1fr) auto; }
}
/* Nothing floating may sit on top of the bar. */
html.ck-buybar-on .ck-floating-cart { bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }
html.ck-buybar-on .ck-to-top { bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
html.ck-buybar-on body { padding-bottom: 72px; }

/* 2. Recently viewed ----------------------------------------------------- */
.ck-recent[hidden] { display: none !important; }
.ck-recent { margin: 28px 0; }
.ck-recent--band { margin: 0; padding: 28px 0 8px; }
.ck-recent-title {
  margin: 0 0 14px;
  font-family: Manrope, Inter, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #161A1B;
}
.ck-recent-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 180px);
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.ck-recent-item {
  scroll-snap-align: start;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(18, 62, 68, .10);
  border-radius: 14px;
  background: #fff;
  color: #161A1B;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.ck-recent-item:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(11, 43, 48, .10); border-color: rgba(18, 62, 68, .22); }
.ck-recent-item:focus-visible { outline: 2px solid #B8955A; outline-offset: 2px; }
.ck-recent-img { display: block; aspect-ratio: 1; border-radius: 10px; background: #F6F4EF; overflow: hidden; }
.ck-recent-img img { width: 100%; height: 100%; object-fit: contain; }
.ck-recent-name {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: .8rem;
  line-height: 1.35;
  color: #161A1B;
}

/* 3. Cart waiting -------------------------------------------------------- */
.ck-cartnote {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 870;
  width: min(460px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 16px;
  border-radius: 16px;
  background: #0B2B30;
  color: #fff;
  box-shadow: 0 22px 50px rgba(11, 43, 48, .32);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity .35s ease, transform .35s cubic-bezier(.16, .84, .3, 1);
}
.ck-cartnote.is-on { opacity: 1; transform: translate(-50%, 0); }
.ck-cartnote p { margin: 0; display: grid; gap: 2px; font-size: .82rem; color: rgba(255, 255, 255, .78); }
.ck-cartnote strong { font-size: .95rem; color: #C8A86E; }
.ck-cartnote-go {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #B8955A;
  color: #161A1B;
  font: 700 .85rem/1 Inter, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.ck-cartnote-go:hover { background: #C8A86E; }
.ck-cartnote-x {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .7);
  font-size: 1.3rem;
  cursor: pointer;
}
.ck-cartnote-x:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.ck-cartnote button:focus-visible { outline: 2px solid #C8A86E; outline-offset: 2px; }
@media (max-width: 420px) {
  .ck-cartnote { grid-template-columns: minmax(0, 1fr) auto; }
  .ck-cartnote-go { grid-column: 1 / -1; grid-row: 2; }
  .ck-cartnote-x { grid-column: 2; grid-row: 1; }
}
html.ck-calm .ck-buybar, html.ck-calm .ck-cartnote, html.ck-calm .ck-recent-item { transition: none; }

/* 4. Trust strip running on its own (phones) ------------------------------ */
@media (max-width: 640px) {
  #storefront-home-view .ck-strip.ck-strip--auto {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  }
  #storefront-home-view .ck-strip--auto .ck-strip-list {
    width: max-content;
    max-width: none;
    margin: 0;
    overflow: visible;
    scroll-snap-type: none;
    animation: ckStripRun var(--ck-strip-dur, 24s) linear infinite;
    will-change: transform;
  }
  #storefront-home-view .ck-strip--auto.is-paused .ck-strip-list { animation-play-state: paused; }
  @keyframes ckStripRun {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(calc(-1 * var(--ck-strip-shift, 50%)), 0, 0); }
  }
}
html.ck-calm #storefront-home-view .ck-strip--auto .ck-strip-list { animation: none; }
