/* ============================================================
   Product Sticky Summary Bar — Single-row layout
   ============================================================ */

/* --- Bar base ------------------------------------------------ */
.pss-bar {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 1050;
  width: 100%;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.10);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              opacity  0.28s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

/* --- Position variants --------------------------------------- */
.pss-bar--top    { top: 0; bottom: auto; box-shadow: 0 2px 16px rgba(0, 0, 0, 0.10); }
.pss-bar--bottom { bottom: 0; top: auto; }

/* --- Hidden / Visible states --------------------------------- */
.pss-bar--hidden {
  opacity: 0;
  pointer-events: none;
}
.pss-bar--top.pss-bar--hidden    { transform: translateY(-110%); }
.pss-bar--bottom.pss-bar--hidden { transform: translateY(110%); }

.pss-bar--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* --- Inner: single flex row ---------------------------------- */
.pss-bar__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 8px 24px;
  max-width: 1320px;
  margin: 0 auto;
  min-height: 60px;
  box-sizing: border-box;
}

/* --- Thumbnail ----------------------------------------------- */
.pss-bar__thumb {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
}

.pss-bar__thumb img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* --- Meta: name · separator · price (inline, one line) ------- */
.pss-bar__meta {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
}

.pss-bar__name {
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  flex-shrink: 1;
  min-width: 0;
}

.pss-bar__sep {
  flex-shrink: 0;
  opacity: 0.4;
  font-size: 0.9rem;
  line-height: 1;
}

.pss-bar__price {
  flex-shrink: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
}

.pss-bar__ref {
  flex-shrink: 0;
  font-size: 0.75rem;
  opacity: 0.55;
  white-space: nowrap;
  line-height: 1.2;
}

/* --- Add-to-cart button -------------------------------------- */
.pss-bar__action {
  flex: 0 0 auto;
  margin-left: 8px;
}

.pss-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  transition: opacity 0.18s ease, transform 0.1s ease;
  line-height: 1;
}

.pss-bar__btn:hover  { opacity: 0.85; transform: translateY(-1px); }
.pss-bar__btn:active { opacity: 1;    transform: translateY(0); }

.pss-bar__btn-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* --- Responsive --------------------------------------------- */

/* Tablet: hide ref, shorten button */
@media (max-width: 767px) {
  .pss-bar__inner { padding: 8px 16px; gap: 10px; }
  .pss-bar__ref   { display: none; }
}

/* Mobile: icon-only button, hide separator */
@media (max-width: 575px) {
  .pss-bar__inner     { padding: 7px 12px; gap: 8px; min-height: 54px; }
  .pss-bar__thumb     { flex: 0 0 40px; width: 40px; height: 40px; }
  .pss-bar__thumb img { width: 40px; height: 40px; }
  .pss-bar__sep       { display: none; }
  .pss-bar__price     { display: none; }      /* price hidden on smallest screens — name takes full space */
  .pss-bar__btn-label { display: none; }      /* icon-only button */
  .pss-bar__btn       { padding: 9px 11px; }
}
