/* SuperGumi grouped tyre offers — catalogue only. Existing card visuals stay intact. */
.sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-sg-price-row{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;width:100%!important;min-width:0!important
}
.sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-sg-price{
  display:inline-flex!important;align-items:baseline!important;flex:0 1 auto!important;min-width:0!important;white-space:nowrap!important
}
.sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-sg-price-from{
  display:inline-block!important;margin-right:3px!important;color:#c91835!important;font-size:.55em!important;font-weight:900!important;line-height:1!important;text-transform:lowercase!important
}
.sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-group-offers-trigger{
  appearance:none!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;min-height:30px!important;margin:0 0 0 auto!important;padding:5px 9px!important;border:1px solid #d6e1ec!important;border-radius:7px!important;background:#fff!important;box-shadow:none!important;color:#1e4f84!important;font-family:inherit!important;font-size:10.5px!important;font-weight:850!important;line-height:1.05!important;text-align:center!important;white-space:nowrap!important;cursor:pointer!important
}
.sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-group-offers-trigger:hover,
.sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-group-offers-trigger:focus-visible{
  border-color:#9fc0df!important;background:#f6fbff!important;color:#0f68b7!important;outline:0!important
}
.sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] button.sgc-group-add-trigger{
  appearance:none!important;font-family:inherit!important;cursor:pointer!important
}

.sgc-offer-modal{position:fixed;inset:0;z-index:999999;display:none;align-items:center;justify-content:center;padding:24px;box-sizing:border-box}
.sgc-offer-modal.is-open{display:flex}
.sgc-offer-modal__backdrop{position:absolute;inset:0;background:rgba(16,31,49,.48);backdrop-filter:blur(1px)}
.sgc-offer-modal__panel{position:relative;z-index:1;width:min(560px,calc(100vw - 32px));max-height:min(78vh,720px);overflow:auto;padding:18px;border:1px solid #dce5ee;border-radius:14px;background:#fff;box-shadow:0 24px 70px rgba(14,34,58,.28);box-sizing:border-box;color:#172c47}
.sgc-offer-modal__head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 12px}
.sgc-offer-modal__title{margin:0;color:#172c47;font-size:22px;font-weight:900;line-height:1.1}
.sgc-offer-modal__close{appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 34px;width:34px;height:34px;margin:-5px -5px 0 0;padding:0;border:0;border-radius:50%;background:transparent;color:#26394f;font-size:28px;font-weight:400;line-height:1;cursor:pointer}
.sgc-offer-modal__close:hover{background:#f0f4f8}
.sgc-offer-modal__product{padding:0 0 12px;border-bottom:1px solid #e8eef4}
.sgc-offer-modal__product-name{display:block;color:#172c47;font-size:15px;font-weight:900;line-height:1.25}
.sgc-offer-modal__product-size{display:block;margin-top:3px;color:#61738a;font-size:13px;font-weight:800}
.sgc-offer-modal__hint{margin:8px 0 0;color:#728197;font-size:12px;line-height:1.35}
.sgc-offer-modal__list{display:flex;flex-direction:column;gap:7px;margin:13px 0 15px}
.sgc-offer-option{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;min-height:52px;padding:8px 10px;border:1px solid #dde6ef;border-radius:9px;background:#fff;box-sizing:border-box;cursor:pointer;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}
.sgc-offer-option:hover{border-color:#b8cee3;background:#fbfdff}
.sgc-offer-option.is-selected{border-color:#8dbde7;background:#f3f9ff;box-shadow:0 0 0 1px rgba(43,126,197,.08)}
.sgc-offer-option input{width:18px!important;height:18px!important;margin:0!important;accent-color:#e5092c;cursor:pointer}
.sgc-offer-option__details{display:flex;align-items:center;flex-wrap:wrap;gap:5px 8px;min-width:0;color:#43566f;font-size:12px;font-weight:750;line-height:1.2}
.sgc-offer-option__truck{display:inline-flex;width:16px;height:16px;flex:0 0 16px;color:#667b92}
.sgc-offer-option__truck svg{display:block;width:16px;height:16px}
.sgc-offer-option__stock{color:#07943b;font-weight:900;white-space:nowrap}
.sgc-offer-option__dot{display:inline-flex;align-items:center;justify-content:center;min-height:23px;padding:3px 8px;border-radius:5px;color:#fff;font-size:10px;font-weight:900;line-height:1;white-space:nowrap}
.sgc-offer-option__dot.is-empty{background:#eef3f8!important;color:#607289!important;border:1px solid #d8e2ec}
.sgc-offer-option__price{justify-self:end;color:#d71937;font-size:18px;font-weight:900;line-height:1;white-space:nowrap}
.sgc-offer-modal__confirm{appearance:none;display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;margin:0;padding:0 18px;border:0;border-radius:9px;background:#e5092c!important;color:#fff!important;font-family:inherit;font-size:14px;font-weight:900;line-height:1.1;cursor:pointer}
.sgc-offer-modal__confirm:hover{background:#c80727}
.sgc-offer-modal__confirm.is-loading{opacity:.68;pointer-events:none}
body.sgc-offer-modal-open{overflow:hidden!important}

@media (max-width:767px){
  .sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-sg-price-row{gap:6px!important}
  .sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-group-offers-trigger{min-height:28px!important;padding:4px 7px!important;font-size:9.5px!important}
  .sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-sg-price-from{font-size:.68em!important}
  .sgc-offer-modal{align-items:flex-end;padding:0}
  .sgc-offer-modal__panel{width:100%;max-width:none;max-height:78vh;margin:0;padding:17px 14px calc(16px + env(safe-area-inset-bottom));border-width:1px 0 0;border-radius:18px 18px 0 0;box-shadow:0 -16px 50px rgba(14,34,58,.24)}
  .sgc-offer-modal__panel:before{content:"";display:block;width:46px;height:5px;margin:-8px auto 13px;border-radius:999px;background:#cbd5df}
  .sgc-offer-modal__title{font-size:20px}
  .sgc-offer-modal__product-name{font-size:14px}
  .sgc-offer-modal__hint{font-size:11.5px}
  .sgc-offer-option{grid-template-columns:22px minmax(0,1fr) auto;gap:7px;min-height:58px;padding:8px}
  .sgc-offer-option__details{gap:4px 6px;font-size:11.5px}
  .sgc-offer-option__price{font-size:16px}
  .sgc-offer-option__dot{min-height:21px;padding:3px 6px;font-size:9px}
  .sgc-offer-modal__confirm{min-height:50px;font-size:14px}
}

/* v0.9.467.13.13 — bind card data to the primary SKU; alternatives price excludes the current offer. */
.sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-group-offers-trigger{
  max-width:132px!important;white-space:normal!important;line-height:1.12!important
}
@media (max-width:767px){
  .sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-group-offers-trigger{max-width:118px!important}
}


/* v0.9.467.13.15 — restore the mobile Filters trigger to its original top position
   and make grouped-offer discovery more visible without changing the button colors. */
@property --sgc-offer-chase-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes sgc-offer-border-chase {
  to { --sgc-offer-chase-angle: 360deg; }
}

.sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-group-offers-trigger{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
}
.sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-group-offers-trigger::before{
  content:"";
  position:absolute;
  inset:-1px;
  z-index:1;
  padding:2px;
  border-radius:8px;
  pointer-events:none;
  background:conic-gradient(from var(--sgc-offer-chase-angle),
    transparent 0 16%,
    #e5092c 16% 25%,
    transparent 25% 66%,
    #e5092c 66% 75%,
    transparent 75% 100%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask-composite:exclude;
  animation:sgc-offer-border-chase 2.25s linear infinite;
}

@media (max-width:767px){
  body .sgc-archive-shell,
  body.woocommerce .sgc-archive-shell,
  body.woocommerce-page .sgc-archive-shell{
    row-gap:18px!important;
  }
  body .sgc-sidebar-mobile-toggle{
    position:static!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    z-index:auto!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    width:auto!important;
    min-width:0!important;
    height:auto!important;
    min-height:44px!important;
    margin:0 0 10px!important;
    padding:0 16px!important;
    border-radius:10px!important;
    box-shadow:none!important;
    transform:none!important;
    transition:background-color .18s ease,border-color .18s ease!important;
  }
  body .sgc-sidebar-mobile-toggle__icon{
    display:inline-block!important;
  }
  body .sgc-sidebar-mobile-toggle__text{
    display:block!important;
    white-space:nowrap!important;
    font-size:15px!important;
    font-weight:800!important;
    line-height:1!important;
    letter-spacing:0!important;
    transform:none!important;
  }
  body .sgc-sidebar-mobile-toggle:active{
    transform:none!important;
  }
  body.sgc-sidebar-mobile-open .sgc-sidebar-mobile-toggle{
    opacity:1!important;
    pointer-events:auto!important;
    transform:none!important;
  }
}

@media (prefers-reduced-motion:reduce){
  .sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-group-offers-trigger::before{
    animation:none!important;
  }
}

/* v0.9.467.13.15 — keep the mobile Filters button in the archive flow and
   make the grouped-offer control easier to notice without changing its colors. */
@keyframes sgc-offer-attention-pulse {
  0%, 100% { box-shadow:0 0 0 0 rgba(229,9,44,0), 0 2px 7px rgba(24,57,92,.04); }
  45% { box-shadow:0 0 0 3px rgba(229,9,44,.12), 0 3px 10px rgba(229,9,44,.08); }
}
.sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-group-offers-trigger{
  animation:sgc-offer-attention-pulse 2.8s ease-in-out infinite!important;
}
.sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-group-offers-trigger::before{
  inset:-1.5px!important;
  padding:2.5px!important;
  background:conic-gradient(from var(--sgc-offer-chase-angle),
    transparent 0 12%,
    #e5092c 12% 25%,
    transparent 25% 62%,
    #e5092c 62% 75%,
    transparent 75% 100%)!important;
  animation:sgc-offer-border-chase 1.85s linear infinite!important;
}
@media (max-width:767px){
  body .sgc-archive-sidebar{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    position:static!important;
    order:-1!important;
  }
  body .sgc-sidebar-mobile-toggle{
    display:inline-flex!important;
    position:static!important;
    width:auto!important;
    min-width:104px!important;
    height:44px!important;
    min-height:44px!important;
    margin:0 0 12px!important;
    padding:0 16px!important;
    transform:none!important;
    z-index:2!important;
  }
}
@media (prefers-reduced-motion:reduce){
  .sgc-supergumi-layout .sgc-sg-card--tyre[data-sgc-grouped="1"] .sgc-group-offers-trigger{
    animation:none!important;
  }
}


/* v0.9.467.13.16 — offer chooser rows use the same two-line logic as Product Page 0.1.72.
   Top: delivery + quantity label. Bottom: DOT + price. */
.sgc-offer-option{
  grid-template-columns:24px minmax(0,1fr)!important;
  align-items:center!important;
}
.sgc-offer-option__details{
  display:block!important;
  min-width:0!important;
}
.sgc-offer-option__topline{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:4px 7px!important;
  min-width:0!important;
  color:#43566f!important;
  font-size:12px!important;
  font-weight:750!important;
  line-height:1.25!important;
}
.sgc-offer-option__bottomline{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  width:100%!important;
  margin-top:5px!important;
}
.sgc-offer-option__dot-line{
  display:inline-flex!important;
  align-items:center!important;
  flex:0 0 auto!important;
  width:auto!important;
}
.sgc-offer-option__variant-badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:21px!important;
  margin-left:5px!important;
  padding:3px 6px!important;
  border:1px solid #d8e2ec!important;
  border-radius:5px!important;
  background:#f3f6f9!important;
  color:#40546c!important;
  font-size:9px!important;
  font-weight:900!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.sgc-offer-option__price{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  margin-left:auto!important;
  font-size:16px!important;
}
@media (max-width:767px){
  .sgc-offer-option{
    grid-template-columns:20px minmax(0,1fr)!important;
    gap:7px!important;
    min-height:60px!important;
    padding:8px!important;
  }
  .sgc-offer-option__topline{
    gap:3px 5px!important;
    font-size:10.5px!important;
    line-height:1.25!important;
  }
  .sgc-offer-option__delivery,
  .sgc-offer-option__stock{
    white-space:normal!important;
  }
  .sgc-offer-option__bottomline{margin-top:5px!important}
  .sgc-offer-option__price{font-size:14px!important}
  .sgc-offer-option__variant-badge{min-height:19px!important;padding:2px 5px!important;font-size:8px!important}
}
