/**
 * Glozin Refurb Suite — Phone Options  v2.1.0
 * CSS prefix: .grs-po-  /  .grs-step-  /  .grs-inline-badge
 *
 * v2.1 additions:
 * - .grs-inline-badge — numbered badge injected beside every heading.
 *   Visible on ALL screen sizes (including mobile).
 * - Green ✓ completed state, amber pulse active state, grey pending state
 *   for both the floating rail dots AND the inline badges.
 * - Desktop floating rail: unchanged behaviour, line only on desktop.
 * - Mobile: floating rail hidden, inline badges shown, no connecting line.
 */

/* =========================================================================
   Custom properties
   ========================================================================= */

:root {
  --grs-po-border:        #d9d9d9;
  --grs-po-border-strong: #111;
  --grs-po-bg:            #fff;
  --grs-po-bg-muted:      #f6f6f6;
  --grs-po-text:          #111;
  --grs-po-text-muted:    #6f6f6f;
  --grs-po-radius:        6px;

  /* Step rail active state colour */
  --grs-step-active: #f59e0b;
}

/* =========================================================================
   Desktop floating step rail
   ========================================================================= */

form.cart.grs-has-step-indicator {
  position:   relative;
  box-sizing: border-box;
}

.grs-step-indicator {
  position:       absolute;
  left:           8px;
  top:            0;
  width:          44px;
  height:         100%;
  pointer-events: none;
  z-index:        5;
}

.grs-step-indicator__line {
  position:      absolute;
  left:          20px;
  width:         2px;
  background:    #e0e0e0;
  border-radius: 999px;
  transition:    background .3s ease;
}

.grs-step-indicator__item {
  position:       absolute;
  left:           0;
  width:          44px;
  height:         44px;
  border:         0;
  background:     transparent;
  padding:        0;
  margin:         0;
  pointer-events: auto;
  cursor:         pointer;
}

.grs-step-indicator__dot {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           42px;
  height:          42px;
  border-radius:   999px;
  background:      var(--grs-step-pending);
  border:          2px solid var(--grs-step-pending);
  color:           #fff;
  font-size:       18px;
  font-weight:     700;
  line-height:     1;
  box-sizing:      border-box;
  transition:      background .25s ease, border-color .25s ease, box-shadow .25s ease;
  position:        relative;
}

/* Number always shown */
.grs-step-indicator__num { display: block; }

/* ── Active state (amber pulse) ────────────────────────────────────────── */
.grs-step-indicator__item.is-active .grs-step-indicator__dot {
  background:   var(--grs-step-active);
  border-color: var(--grs-step-active);
  box-shadow:   0 0 0 5px rgba(245,158,11,.18), 0 0 0 10px rgba(245,158,11,.07);
  animation:    grs-pulse 1.8s ease-in-out infinite;
}

@keyframes grs-pulse {
  0%,100% { box-shadow: 0 0 0 5px rgba(245,158,11,.18), 0 0 0 10px rgba(245,158,11,.07); }
  50%      { box-shadow: 0 0 0 7px rgba(245,158,11,.24), 0 0 0 14px rgba(245,158,11,.10); }
}

/* ── Complete state — stays black, keeps number ─────────────────────────── */
.grs-step-indicator__item.is-complete .grs-step-indicator__dot {
  background:   #000;
  border-color: #000;
  animation:    none;
  box-shadow:   none;
}

.grs-step-indicator__item.is-hidden-step { display: none; }

/* =========================================================================
   Main plugin layout
   ========================================================================= */

.grs-po-wrapper {
  margin:         1.75rem 0;
  display:        flex;
  flex-direction: column;
  gap:            1.9rem;
}

.grs-po-group {
  display:        flex;
  flex-direction: column;
  gap:            1rem;
}

.grs-po-group-title {
  margin:         0;
  font-size:      2rem;
  line-height:    1.1;
  font-weight:    700;
  color:          var(--grs-po-text);
  text-transform: none;
  letter-spacing: 0;
}

.grs-po-heading-info {
  width:           26px;
  height:          26px;
  border-radius:   50%;
  border:          1.5px solid #9a9a9a;
  color:           #707070;
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  font-size:       14px;
  font-weight:     700;
  line-height:     1;
  flex:            0 0 26px;
}

.grs-po-heading-link {
  color:           #6f7b8b;
  text-decoration: none;
  font-size:       1rem;
  font-weight:     500;
}

.grs-po-info-trigger {
  display:     inline-flex;
  align-items: center;
  gap:         0.55rem;
  border:      0;
  background:  transparent;
  padding:     0;
  margin:      0;
  cursor:      pointer;
}

.grs-po-info-trigger:hover .grs-po-heading-link         { text-decoration: underline; }
.grs-po-info-trigger:focus                               { outline: none; }
.grs-po-info-trigger:focus-visible .grs-po-heading-info { box-shadow: 0 0 0 3px rgba(0,0,0,.08); }

/* Heading row — title + info button on the same line */
.grs-po-heading-row {
  display:     flex;
  align-items: center;
  gap:         0.75rem;
  flex-wrap:   nowrap;
}

/* =========================================================================
   Option cards (battery + tax)
   ========================================================================= */

.grs-po-cards {
  display:               grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:                   1.15rem;
}

.grs-po-option-card {
  display: block;
  margin:  0;
  cursor:  pointer;
}

.grs-po-option-card input[type="radio"] {
  position:       absolute;
  opacity:        0;
  pointer-events: none;
}

.grs-po-card-face {
  min-height:   128px;
  background:   var(--grs-po-bg);
  border:       1.5px solid var(--grs-po-border);
  border-radius:var(--grs-po-radius);
  padding:      1.2rem 1.15rem;
  display:      flex;
  align-items:  stretch;
  justify-content:space-between;
  gap:          1rem;
  transition:   border-color .2s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}

.grs-po-option-card:hover .grs-po-card-face { border-color: #a8a8a8; }

.grs-po-option-card input[type="radio"]:checked + .grs-po-card-face {
  border-color: var(--grs-po-border-strong);
  box-shadow:   inset 0 0 0 1px var(--grs-po-border-strong);
}

.grs-po-option-card.is-disabled { cursor: not-allowed; }

.grs-po-option-card.is-disabled .grs-po-card-face,
.grs-po-option-card input[type="radio"]:disabled + .grs-po-card-face {
  background: var(--grs-po-bg-muted);
  color:      #8b8b8b;
  opacity:    .75;
  position:   relative;
  overflow:   hidden;
}

.grs-po-option-card.is-disabled .grs-po-card-face::after,
.grs-po-option-card input[type="radio"]:disabled + .grs-po-card-face::after {
  content:          "";
  position:         absolute;
  left:             -12%;
  right:            -12%;
  top:              50%;
  border-top:       2px solid rgba(160,160,160,.75);
  transform:        rotate(-10deg);
  transform-origin: center;
  pointer-events:   none;
}

.grs-po-card-main {
  display:        flex;
  flex-direction: column;
  gap:            .75rem;
}

.grs-po-card-title {
  display:     block;
  font-size:   1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color:       var(--grs-po-text);
}

.grs-po-card-description {
  display:     block;
  font-size:   .92rem;
  line-height: 1.28;
  color:       var(--grs-po-text-muted);
}

.grs-po-card-price {
  align-self:  flex-end;
  white-space: nowrap;
  font-size:   1.05rem;
  line-height: 1.2;
  font-weight: 700;
  color:       var(--grs-po-text);
}

.grs-po-card-price .woocommerce-Price-amount,
.grs-po-card-price .amount { font-weight: 700; }

.grs-po-tax-group .grs-po-card-face {
  min-height:     96px;
  padding-top:    1rem;
  padding-bottom: .9rem;
}

.grs-po-tax-group .grs-po-card-main  { gap: .2rem; }
.grs-po-tax-group .grs-po-card-price { margin-top: auto; }

/* =========================================================================
   Order summary
   ========================================================================= */

.grs-po-summary {
  display:         flex;
  justify-content: space-between;
  align-items:     flex-start;
  gap:             1.25rem;
  background:      #000;
  color:           #fff;
  border-radius:   10px;
  padding:         1.35rem;
  margin-top:      .25rem;
}

.grs-po-summary__left,
.grs-po-summary__right {
  display:        flex;
  flex-direction: column;
  gap:            .55rem;
}

.grs-po-summary__left  { min-width: 0; flex: 1 1 auto; }
.grs-po-summary__right { text-align: right; flex: 0 0 auto; }

.grs-po-summary__title {
  font-size:   1.1rem;
  line-height: 1.2;
  font-weight: 700;
  color:       #fff;
}

.grs-po-summary__tip {
  font-size:   1rem;
  line-height: 1.3;
  font-weight: 600;
  color:       #fff;
}

.grs-po-summary__condition {
  display:     flex;
  align-items: center;
  gap:         .7rem;
  flex-wrap:   wrap;
  margin-top:  .4rem;
}

.grs-po-summary__stars {
  color:          #f8df00;
  letter-spacing: 1px;
  min-width:      5.5em;
}

.grs-po-summary__condition-text {
  color:       #fff;
  font-size:   1rem;
  line-height: 1.35;
  font-weight: 500;
}

.grs-po-summary__subtotal,
.grs-po-summary__subtotal .amount,
.grs-po-summary__subtotal .woocommerce-Price-amount {
  color:       #fff;
  font-size:   1.1rem;
  font-weight: 700;
}

.grs-po-summary__stock { font-size: 1rem; line-height: 1.3; font-weight: 500; }
.grs-po-summary__stock.is-in-stock      { color: #1be21b; }
.grs-po-summary__stock.is-in-stock::before { content: '\2022 '; }
.grs-po-summary__stock.is-out-of-stock  { color: #ff8080; }

/* =========================================================================
   Modals — base
   ========================================================================= */

body.grs-po-modal-open { overflow: hidden; }

.grs-po-modal { position: fixed; inset: 0; z-index: 99999; display: none; }
.grs-po-modal.is-open { display: block; }

.grs-po-modal__overlay {
  position:   absolute;
  inset:      0;
  background: rgba(0,0,0,.55);
  cursor:     pointer;
}

.grs-po-modal__dialog {
  position:      relative;
  z-index:       2;
  width:         min(92vw, 560px);
  max-height:    88vh;
  overflow-y:    auto;
  margin:        6vh auto 0;
  background:    #fff;
  color:         #111;
  border-radius: 14px;
  padding:       1.75rem 1.6rem 1.5rem;
  box-shadow:    0 20px 60px rgba(0,0,0,.25);
  scrollbar-width: thin;
}

/* Wider dialog for condition modal (3-column grid needs more space) */
.grs-po-modal__dialog--wide {
  width: min(92vw, 660px);
}

.grs-po-modal__dialog--condition {
  width: min(96vw, 780px);
}

.grs-po-modal__close {
  position:        absolute;
  top:             .75rem;
  right:           .8rem;
  border:          0;
  background:      transparent;
  color:           #111;
  font-size:       28px;
  line-height:     1;
  cursor:          pointer;
  padding:         4px 8px;
  border-radius:   4px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  transition:      background .15s ease, color .15s ease;
}

.grs-po-modal__close:hover           { background: rgba(0,0,0,.07); }
.grs-po-modal__close:focus           { outline: none; }
.grs-po-modal__close:focus-visible   { outline: 2px solid rgba(0,0,0,.4); outline-offset: 2px; }

.grs-po-modal__title {
  margin:      0 2.5rem 1.1rem 0;
  font-size:   1.5rem;
  line-height: 1.2;
  font-weight: 700;
  color:       #111;
}

/* =========================================================================
   Modal shared content blocks
   ========================================================================= */

.grs-po-modal__content p,
.grs-po-minfo-intro {
  margin:      0 0 .85rem;
  color:       #333;
  line-height: 1.65;
  font-size:   .97rem;
}

.grs-po-minfo-block {
  margin-bottom: 1.1rem;
}

.grs-po-minfo-block__heading {
  margin:      0 0 .35rem;
  font-size:   1rem;
  font-weight: 700;
  color:       #111;
  line-height: 1.3;
}

.grs-po-minfo-block p {
  margin:      0;
  color:       #444;
  line-height: 1.65;
  font-size:   .95rem;
}

/* =========================================================================
   Modal — Note block (battery)
   ========================================================================= */

.grs-po-minfo-note {
  margin-top:    1.25rem;
  padding:       1rem 1.15rem;
  background:    #f7f7f7;
  border-radius: 8px;
  border-left:   3px solid #111;
}

.grs-po-minfo-note__label {
  margin:      0 0 .5rem;
  font-size:   1rem;
  font-weight: 700;
  color:       #111;
}

.grs-po-minfo-note__list {
  margin:      0;
  padding:     0 0 0 1.2rem;
  list-style:  disc;
}

.grs-po-minfo-note__list li {
  margin-bottom: .55rem;
  color:         #444;
  line-height:   1.6;
  font-size:     .94rem;
}

.grs-po-minfo-note__list li:last-child { margin-bottom: 0; }

/* =========================================================================
   Modal — Condition grid
   ========================================================================= */

.grs-po-minfo-condition__subtitle {
  margin:      0 0 .5rem;
  font-size:   1rem;
  font-weight: 700;
  text-align:  center;
  color:       #111;
}

.grs-po-minfo-condition-grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   .85rem;
  margin:                1.1rem 0 1.25rem;
}

.grs-po-minfo-condition-card {
  border:        1.5px solid #d0d0d0;
  border-radius: 8px;
  overflow:      hidden;
  display:       flex;
  flex-direction:column;
}

.grs-po-minfo-condition-card__header {
  background:  #111;
  color:       #fff;
  font-weight: 700;
  font-size:   .92rem;
  text-align:  center;
  padding:     .6rem .75rem;
  line-height: 1.25;
}

.grs-po-minfo-condition-card__body {
  padding:        .85rem .75rem .7rem;
  display:        flex;
  flex-direction: column;
  flex:           1;
  gap:            .65rem;
}

.grs-po-minfo-condition-card__body p {
  margin:      0;
  font-size:   .86rem;
  line-height: 1.55;
  color:       #444;
  text-align:  center;
  flex:        1;
}

.grs-po-minfo-condition-card__image {
  text-align: center;
  margin-top: auto;
}

.grs-po-minfo-condition-card__image img {
  width:         100%;
  max-width:     180px;
  height:        auto;
  display:       inline-block;
  border-radius: 4px;
}

.grs-po-minfo-condition__footer {
  margin:    .25rem 0 0;
  font-size: .93rem;
  color:     #555;
}

.grs-po-minfo-condition__link {
  color:           #111;
  text-decoration: underline;
}

.grs-po-minfo-condition__link:hover { color: #444; }

/* =========================================================================
   Modal responsive
   ========================================================================= */

@media (max-width: 640px) {
  .grs-po-minfo-condition-grid {
    grid-template-columns: 1fr;
    gap: .7rem;
  }

  /* Stack image on top, text below — image fills full card width */
  .grs-po-minfo-condition-card__body {
    flex-direction: column;
    align-items:    center;
    gap:            .65rem;
  }

  /* Image first visually — use order to push it above the text */
  .grs-po-minfo-condition-card__image {
    order:     -1;
    flex:      none;
    width:     100%;
    margin:    0;
    text-align: center;
  }

  .grs-po-minfo-condition-card__image img {
    max-width:  100%;
    width:      100%;
    height:     auto;
  }

  .grs-po-minfo-condition-card__body p {
    text-align: center;
    flex:       none;
  }

  .grs-po-modal__dialog {
    width:      calc(100vw - 24px);
    margin-top: 4vh;
    padding:    1.25rem 1rem 1rem;
  }
}

/* =========================================================================
   Inline badges — numbers left of each section title, MOBILE ONLY
   On desktop the floating rail already shows the numbers.
   ========================================================================= */

.grs-inline-badge {
  display:         none; /* hidden by default; shown only on mobile below */
  align-items:     center;
  justify-content: center;
  width:           28px;
  height:          28px;
  border-radius:   999px;
  background:      #b0b0b0;   /* pending — grey */
  color:           #fff;
  font-size:       13px;
  font-weight:     700;
  line-height:     1;
  flex-shrink:     0;
  margin-right:    0.55rem;
  vertical-align:  middle;
  transition:      background .25s ease, box-shadow .25s ease;
  box-sizing:      border-box;
}

/* Active state — amber pulse */
.grs-inline-badge.is-active {
  background: var(--grs-step-active);
  box-shadow: 0 0 0 4px rgba(245,158,11,.18), 0 0 0 8px rgba(245,158,11,.07);
  animation:  grs-badge-pulse 1.8s ease-in-out infinite;
}

@keyframes grs-badge-pulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(245,158,11,.18), 0 0 0 8px rgba(245,158,11,.07); }
  50%      { box-shadow: 0 0 0 6px rgba(245,158,11,.24), 0 0 0 12px rgba(245,158,11,.10); }
}

/* Complete state — black */
.grs-inline-badge.is-complete {
  background: #000;
  box-shadow: none;
  animation:  none;
}

/* =========================================================================
   Responsive — Desktop (floating rail visible, inline badges hidden)
   ========================================================================= */

@media (min-width: 1024px) {
  form.cart.grs-has-step-indicator {
    padding-left: 64px;
  }

  /* Ensure product summary column overflows for the rail */
  .summary,
  .product .summary { overflow: visible; }

  /* Badges are hidden on desktop — rail dots do the job */
  .grs-inline-badge { display: none !important; }
}

/* =========================================================================
   Responsive — Tablet / Mobile  (≤1023 px)
   =========================================================================
   Floating rail HIDDEN. Inline badges shown — numbers only, no line.
   ========================================================================= */

@media (max-width: 1023px) {
  /* Hide the entire floating rail */
  .grs-step-indicator { display: none !important; }

  /* Remove desktop left-padding */
  form.cart.grs-has-step-indicator { padding-left: 0 !important; }

  /* Show inline badges */
  .grs-inline-badge {
    display:      inline-flex;
    width:        26px;
    height:       26px;
    font-size:    12px;
  }

  /* Align badge + text in group titles and condition title */
  .grs-po-group-title,
  .grs-cc-title {
    display:     flex;
    align-items: center;
  }

  /* Align badge inside variation table labels */
  .variations th label {
    display:     inline-flex;
    align-items: center;
  }
}

@media (max-width: 767px) {
  .grs-po-group-title  { font-size: 1.5rem; }
  .grs-po-cards        { grid-template-columns: 1fr; }
  .grs-po-card-face    { min-height: auto; }
  .grs-po-summary      { flex-direction: column; }
  .grs-po-summary__right { text-align: left; }

  .grs-po-modal__dialog {
    width:      calc(100vw - 24px);
    margin-top: 5vh;
    padding:    1.25rem 1rem 1rem;
  }
}

/* =========================================================================
   Sticky Add-to-Cart bar  (#glozin-sticky-add-to-cart)
   Appears when the real ATC button scrolls out of viewport.
   Slides in from the bottom, matching the Glozin native sticky ATC position.
   Respects the Glozin mobile navigation bar via --gz-navigation-bar-height.
   ========================================================================= */

#glozin-sticky-add-to-cart {
  position:       fixed;
  bottom:         var(--gz-navigation-bar-height, 0px);
  left:           0;
  right:          0;
  top:            auto;
  z-index:        998;
  background:     #fff;
  border-top:     1px solid #e8e8e8;
  border-bottom:  none;
  box-shadow:     0 -3px 16px rgba(0, 0, 0, .10);

  /* Slide in from bottom */
  transform:      translateY(110%);
  transition:     transform .28s cubic-bezier(.4, 0, .2, 1),
                  opacity   .28s ease;
  opacity:        0;
  pointer-events: none;
  will-change:    transform;
}

#glozin-sticky-add-to-cart.is-visible {
  transform:      translateY(0);
  opacity:        1;
  pointer-events: auto;
}

/* ── Inner layout ─────────────────────────────────────────────────────────── */

.grs-sticky-bar__inner {
  display:         flex;
  align-items:     center;
  gap:             16px;
  padding:         10px 24px;
  max-width:       1400px;
  margin:          0 auto;
  box-sizing:      border-box;
  min-height:      64px;
}

/* ── Product info (left) ─────────────────────────────────────────────────── */

.grs-sticky-bar__product {
  display:     flex;
  align-items: center;
  gap:         12px;
  flex:        1 1 0;
  min-width:   0;
}

.grs-sticky-bar__thumb {
  flex-shrink:  0;
  width:        46px;
  height:       46px;
  border-radius: 8px;
  overflow:     hidden;
  border:       1px solid #f0f0f0;
  background:   #fafafa;
}

.grs-sticky-bar__thumb img {
  width:       100%;
  height:      100%;
  object-fit:  cover;
  display:     block;
}

.grs-sticky-bar__info {
  min-width: 0;
}

.grs-sticky-bar__title {
  font-weight:     700;
  font-size:       .95rem;
  line-height:     1.3;
  color:           var(--gz-color-dark, #111);
  white-space:     nowrap;
  overflow:        hidden;
  text-overflow:   ellipsis;
  max-width:       320px;
}

.grs-sticky-bar__meta {
  display:     flex;
  align-items: center;
  gap:         5px;
  margin-top:  3px;
  font-size:   .8rem;
  color:       #888;
  line-height: 1.2;
  white-space: nowrap;
}

.grs-sticky-bar__sep {
  color:      #ccc;
  font-size:  .75rem;
}

.grs-sticky-bar__condition,
.grs-sticky-bar__tax {
  max-width:    120px;
  overflow:     hidden;
  text-overflow: ellipsis;
}

/* ── Action (right) ──────────────────────────────────────────────────────── */

.grs-sticky-bar__action {
  display:     flex;
  align-items: center;
  gap:         14px;
  flex-shrink: 0;
}

.grs-sticky-bar__price {
  font-size:    1.15rem;
  font-weight:  700;
  color:        var(--gz-color-dark, #111);
  white-space:  nowrap;
  line-height:  1;
  min-width:    56px;
  text-align:   right;
}

/* Inherit WooCommerce price amount styles */
.grs-sticky-bar__price .woocommerce-Price-amount { font-size: inherit; font-weight: inherit; }

/* ── ATC button ──────────────────────────────────────────────────────────── */

.grs-sticky-bar__btn {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  gap:             8px;
  padding:         11px 24px;
  background:      var(--gz-color-dark, #111);
  color:           #fff !important;
  border:          none;
  border-radius:   var(--gz-button-radius, 4px);
  font-size:       .88rem;
  font-weight:     700;
  letter-spacing:  .04em;
  text-transform:  uppercase;
  cursor:          pointer;
  line-height:     1;
  white-space:     nowrap;
  transition:      background .18s ease, opacity .18s ease;
  text-decoration: none !important;
}

.grs-sticky-bar__btn:hover:not(.is-disabled) {
  background: #333;
  color:      #fff !important;
}

.grs-sticky-bar__btn:focus-visible {
  outline:        2px solid var(--gz-color-dark, #111);
  outline-offset: 2px;
}

.grs-sticky-bar__btn.is-disabled,
.grs-sticky-bar__btn[disabled] {
  opacity:  .45;
  cursor:   not-allowed;
}

/* Loading state (WC adds .loading) */
.grs-sticky-bar__btn.loading {
  opacity:  .7;
  cursor:   wait;
}

.grs-sticky-bar__btn-icon {
  flex-shrink:  0;
  width:        15px;
  height:       15px;
  margin-top:   -1px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

/* Tablet: hide thumbnail */
@media (max-width: 900px) {
  .grs-sticky-bar__thumb { display: none; }
  .grs-sticky-bar__title { max-width: 220px; }
}

/* Mobile: single tight row — info left, price+button right, never wraps */
@media (max-width: 639px) {
  .grs-sticky-bar__inner {
    flex-wrap:   nowrap;
    align-items: center;
    gap:         0;
    padding:     0 0 0 14px;  /* no right padding — button edge-to-edge */
  }

  /* Left: product info takes all remaining space */
  .grs-sticky-bar__product {
    flex:     1 1 0;
    min-width: 0;
    gap:       8px;
  }

  .grs-sticky-bar__thumb { display: none; }

  .grs-sticky-bar__title {
    max-width:     none;
    font-size:     .85rem;
    white-space:   nowrap;
    overflow:      hidden;
    text-overflow: ellipsis;
  }

  .grs-sticky-bar__meta {
    font-size:  .72rem;
    gap:        4px;
    flex-wrap:  nowrap;
    overflow:   hidden;
  }

  .grs-sticky-bar__condition,
  .grs-sticky-bar__tax {
    max-width:     80px;
    overflow:      hidden;
    text-overflow: ellipsis;
    white-space:   nowrap;
  }

  /* Right: price + button, no gap between them, button flush to edge */
  .grs-sticky-bar__action {
    display:     flex;
    align-items: stretch;
    gap:         0;
    flex-shrink: 0;
    height:      100%;
  }

  .grs-sticky-bar__price {
    font-size:   .95rem;
    min-width:   0;
    padding:     0 10px;
    display:     flex;
    align-items: center;
    white-space: nowrap;
    text-align:  right;
  }

  /* Button: tall touch target, square-ish, matches Glozin mobile ATC style */
  .grs-sticky-bar__btn {
    display:         flex;
    align-items:     center;
    justify-content: center;
    padding:         0 18px;
    min-height:      56px;
    font-size:       .82rem;
    gap:             6px;
    border-radius:   0;    /* flush to bar edges on mobile */
  }

  /* Keep icon on mobile — it helps identify the button at a glance */
  .grs-sticky-bar__btn-icon {
    width:  14px;
    height: 14px;
  }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  #glozin-sticky-add-to-cart {
    transition: opacity .15s ease;
    transform:  none !important;
  }
  #glozin-sticky-add-to-cart:not(.is-visible) { opacity: 0; pointer-events: none; }
}

/* ── Missing-selection shake (triggered from sticky ATC validation) ────────── */

@keyframes grs-shake {
  0%, 100% { transform: translateX(0); }
  18%       { transform: translateX(-6px); }
  36%       { transform: translateX(6px); }
  54%       { transform: translateX(-4px); }
  72%       { transform: translateX(4px); }
  90%       { transform: translateX(-2px); }
}

.grs-sticky-missing {
  animation:    grs-shake .55s ease both;
  outline:      2px solid #c00;
  outline-offset: 4px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .grs-sticky-missing {
    animation: none;
    outline:   2px solid #c00;
  }
}
