/* Scoped controls: dashboard and cart page rules must not change their layout. */
.store-offer-picker,.store-offer-editor{width:100%;min-width:0;font-family:inherit}
.store-offer-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:8px;width:100%}
.store-offer-card{display:flex;flex-direction:column;gap:6px;padding:12px;border:1px solid #dce2ea;border-radius:12px;background:#fff;color:#253348;cursor:pointer;font-family:inherit;font-size:14px;text-align:start;transition:border-color .15s,background .15s}
.store-offer-card strong{font-size:14px;font-weight:500;line-height:1.6;overflow-wrap:anywhere}
.store-offer-card span{font-size:15px;font-weight:600}
.store-offer-card small{color:#697689;font-size:12px;font-weight:400}
.store-offer-card.active{border-color:var(--secondary-color,#2563eb);background:#f6f8ff;box-shadow:inset 0 0 0 1px var(--secondary-color,#2563eb)}
.store-offer-card:hover{border-color:#879bb8}
.store-offer-card:focus-visible,.store-offer-picker select:focus-visible,.store-offer-picker button:focus-visible{outline:2px solid #2563eb;outline-offset:3px}
.store-offer-piece{display:flex;flex-wrap:wrap;gap:12px;min-width:0;margin:12px 0;padding:12px;border:1px solid #e3e8ef;border-radius:12px}
.store-offer-piece legend{padding:0 6px;font-size:13px;font-weight:500;color:#526176}
.store-offer-field{display:flex;flex:1 1 120px;flex-direction:column;gap:6px;min-width:0;font-size:13px;font-weight:400;text-align:start}
.store-offer-field select{width:100%;min-width:0;min-height:42px;margin:0;padding:9px 10px;border:1px solid #d7dfe9;border-radius:8px;background:#fff;color:#26354b;font-family:inherit;font-weight:400}
.store-offer-picker .store-offer-field>label{margin:0;padding:0;font:inherit;color:inherit;text-align:start}
.store-color-control{position:relative;min-width:0;width:100%}
.store-offer-picker .store-color-native{position:absolute!important;inset:0 auto auto 0!important;width:1px!important;height:1px!important;min-height:0!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;clip-path:inset(50%)!important;overflow:hidden!important;opacity:0!important;pointer-events:none!important}
.store-offer-picker .store-color-trigger,.store-offer-picker .store-color-option{display:flex;align-items:center;gap:8px;width:100%;min-width:0;min-height:44px;margin:0;padding:9px 10px;border:1px solid #d7dfe9;border-radius:8px;background:#fff;color:#26354b;box-sizing:border-box;box-shadow:none;font:400 14px/1.5 system-ui,sans-serif;font-family:inherit;text-align:start;cursor:pointer;transform:none}
.store-offer-picker .store-color-swatch{display:inline-block;flex:0 0 14px;width:14px;height:14px;min-width:14px;box-sizing:border-box;border:1px solid #8b96a6;border-radius:50%;box-shadow:inset 0 0 0 1px #ffffff30}
.store-offer-picker .store-color-unknown{background:linear-gradient(135deg,transparent 45%,#8b96a6 45%,#8b96a6 55%,transparent 55%)}
.store-offer-picker .store-color-name{min-width:0;font:inherit;overflow-wrap:anywhere}
.store-offer-picker .store-color-arrow{margin-inline-start:auto;color:#758195;font-size:16px}
.store-color-list{max-height:220px;overflow-y:auto;overscroll-behavior:contain;margin-top:6px;padding:4px;border:1px solid #d7dfe9;border-radius:9px;background:#fff}
.store-color-list[hidden]{display:none!important}
.store-offer-picker .store-color-option{border:0;border-radius:6px}
.store-offer-picker .store-color-option:hover,.store-offer-picker .store-color-option:focus-visible{background:#eef3fb;outline-offset:-2px}
.store-offer-picker .store-color-option[aria-selected=true]{background:#e9f0fc;box-shadow:inset 0 0 0 1px #a4bbdc}
.store-offer-picker .store-color-trigger[aria-invalid=true]{border-color:#b34d58}
body:is(.dark-mode,.dark) .store-color-list,body:is(.dark-mode,.dark) .store-offer-picker .store-color-trigger,body:is(.dark-mode,.dark) .store-offer-picker .store-color-option{background:#172033;color:#e2e8f2;border-color:#344359}
body:is(.dark-mode,.dark) .store-offer-picker .store-color-option:is(:hover,:focus-visible,[aria-selected=true]){background:#293c58}
.store-offer-field small,.store-offer-note{font-size:12px;font-weight:400;line-height:1.7;color:#758195}
.store-offer-note{margin:9px 0}
.store-offer-total{margin:14px 0 0;padding:12px;border-radius:10px;background:#f4f7fb;color:#253348;font-size:14px;line-height:1.7;font-weight:500}
.store-offer-copy{width:100%;min-height:40px;padding:9px 12px;border:1px solid #dce3ed;border-radius:9px;background:#fafbfd;color:#40546f;cursor:pointer;font-family:inherit;font-size:12px;font-weight:400}
.store-offer-picker button:disabled{opacity:.5;cursor:default}
#offersContainer.store-offer-picker{display:block!important}
.store-page-quantity [hidden],.offer-cart-quantity[hidden]{display:none!important}
.store-page-quantity button:disabled{opacity:.4;cursor:default}

/* Product offers: one full-width frame per offer; choices stay inside the open frame. */
.store-offer-cards.store-offer-accordion{grid-template-columns:minmax(0,1fr);gap:10px}
.store-offer-option{min-width:0;border:2px solid #dce2ea;border-radius:12px;background:#fff;overflow:hidden}
.store-offer-option.active{border-color:var(--secondary-color,#2563eb)}
.store-offer-option>.store-offer-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;width:100%;margin:0;border:0;border-radius:0;box-shadow:none}
.store-offer-option>.store-offer-card strong{grid-column:1;grid-row:1}
.store-offer-option>.store-offer-card>span{grid-column:2;grid-row:1;white-space:nowrap}
.store-offer-option>.store-offer-card small{grid-column:1/-1}
.store-offer-option>.store-offer-card:focus-visible{outline-offset:-3px}
.store-offer-panel{min-width:0;padding:0 12px 12px;border-top:1px solid #edf0f5}
.store-offer-panel[hidden]{display:none!important}
.store-offer-panel .store-offer-piece{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0;padding:8px 0 10px;border:0;border-bottom:1px solid #edf0f5;border-radius:0}
.store-offer-panel .store-offer-field{min-width:0;font-size:12px}
.store-offer-panel .store-offer-field select{min-width:0;font-size:14px}
.store-offer-panel .store-offer-field:only-of-type{grid-column:1/-1}
.store-offer-panel .store-offer-piece>.store-offer-note{grid-column:1/-1}
.store-offer-panel .store-offer-piece legend{padding:0;color:#7b8799;font-size:12px}
body:is(.dark-mode,.dark) .store-offer-option{background:#172033;border-color:#344359}
body:is(.dark-mode,.dark) .store-offer-option.active{border-color:var(--secondary-color,#819fc9)}

/* Merchant editor: a name and two numeric fields, with optional settings collapsed. */
#offersContainer.store-offer-editor{display:block;font-size:13px;font-weight:400;line-height:1.6;text-align:start}
#offersContainer.store-offer-editor *{box-sizing:border-box}
#offersContainer.store-offer-editor p{margin:8px 0 12px;color:#758195;font-size:12px;font-weight:400;line-height:1.7}
#offersContainer.store-offer-editor h4{margin:18px 0 10px;color:#40516a;font-size:13px;font-weight:500}
#offersContainer.store-offer-editor details{margin:12px 0 0;padding:0;border:0;background:transparent;color:#475a73}
#offersContainer.store-offer-editor summary{padding:10px 0;font-size:13px;font-weight:400;line-height:1.6;cursor:pointer}
#offersContainer.store-offer-editor summary::marker{color:#8b9ab0;font-size:11px}
#offersContainer.store-offer-editor .offer-editor-row{margin:10px 0;padding:14px;border:1px solid #e0e6ee;border-radius:12px;background:#fff;color:#34445b;box-shadow:none}
#offersContainer.store-offer-editor .offer-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
#offersContainer.store-offer-editor .offer-editor-heading>span{color:#7a879a;font-size:12px;font-weight:400}
#offersContainer.store-offer-editor .offer-editor-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:start}
#offersContainer.store-offer-editor .offer-name-field{grid-column:1/-1}
#offersContainer.store-offer-editor label{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0;color:#526176;font-size:12px;font-weight:400;text-align:start}
#offersContainer.store-offer-editor input:not([type=checkbox]),#offersContainer.store-offer-editor select{width:100%;min-width:0;min-height:42px;margin:0;padding:9px 10px;border:1px solid #dce3ec;border-radius:8px;background:#fbfcfe;color:#33435b;font:400 14px/1.5 system-ui,sans-serif;font-family:inherit;box-shadow:none}
#offersContainer.store-offer-editor input::placeholder{color:#a0a9b7;font-size:12px;font-weight:400}
#offersContainer.store-offer-editor input:focus,#offersContainer.store-offer-editor select:focus{outline:2px solid #dbe6fa;outline-offset:1px;border-color:#91add8;box-shadow:none}
#offersContainer.store-offer-editor input[type=number]{text-align:start}
#offersContainer.store-offer-editor input[type=checkbox]{flex:0 0 16px;width:16px;height:16px;min-height:0;margin:0;accent-color:#5575a5}
#offersContainer.store-offer-editor .offer-checks{display:flex;gap:8px;flex-wrap:wrap;padding:8px 0}
#offersContainer.store-offer-editor .offer-checks label{display:flex;flex-direction:row;align-items:center;gap:7px;padding:7px 10px;border:1px solid #e2e8f0;border-radius:8px;background:#fff}
#offersContainer.store-offer-editor button{display:inline-flex;align-items:center;justify-content:center;width:auto;height:auto;min-height:36px;margin:0;padding:7px 11px;border:1px solid #dce3ed;border-radius:8px;background:#f7f9fc;color:#526882;font-family:inherit;font-size:12px;font-weight:400;box-shadow:none;cursor:pointer}
#offersContainer.store-offer-editor button:hover{background:#edf2f9;transform:none}
#offersContainer.store-offer-editor .offer-editor-remove{min-width:44px;min-height:32px;padding:5px 9px;border-color:transparent;background:transparent;color:#9a6570}
#offersContainer.store-offer-editor .offer-editor-remove:hover{background:#fff3f4}
#offersContainer.store-offer-editor .offer-row-settings{border-top:1px solid #edf0f5}
#offersContainer.store-offer-editor .offer-product-settings{margin-top:12px;padding:0 12px;border:1px dashed #dce3ed;border-radius:10px;background:#fafbfd}
#offersContainer.store-offer-editor .offer-rule{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:10px;margin:10px 0;padding:10px;border:1px solid #e7ebf1;border-radius:9px;background:#fff}
#offersContainer.store-offer-editor .offer-fixed-piece>span{grid-column:1/-1;color:#7d899b;font-size:12px;font-weight:400}
#offersContainer.store-offer-editor .offer-color-rule{margin:10px 0}
#offersContainer.store-offer-editor .offer-editor-error{color:#b34d58;font-size:12px}

/* Cart cards override legacy image cropping, hover shifts and mobile centering. */
.cart-line.offer-cart-line,.cart-line.offer-cart-line:hover{display:block;width:100%;min-width:0;margin:0 0 16px;padding:16px;border:1px solid #e0e6ef;border-radius:16px;background:#fff;text-align:start;box-sizing:border-box;box-shadow:0 3px 14px #22304705;transform:none}
.cart-line.offer-cart-line .offer-cart-heading{display:grid;grid-template-columns:80px minmax(0,1fr) auto;align-items:center;gap:12px;margin:0 0 16px;padding-bottom:14px;border-bottom:1px solid #eef1f6}
.cart-line.offer-cart-line .offer-cart-image{display:flex;align-items:center;justify-content:center;width:80px;height:88px;min-width:0;margin:0;padding:6px;border:1px solid #edf0f5;border-radius:12px;background:#fafbfd;box-sizing:border-box}
.cart-line.offer-cart-line .offer-cart-image img,.cart-line.offer-cart-line .offer-cart-image img:hover{display:block;width:100%;height:100%;max-width:100%;object-fit:contain;object-position:center;margin:0;padding:0;border:0;border-radius:6px;box-shadow:none;transform:none}
.cart-line.offer-cart-line .offer-cart-title{min-width:0;color:#34445c;font-size:15px;font-weight:500;line-height:1.7;overflow-wrap:anywhere}
.cart-line.offer-cart-line .offer-cart-remove{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:36px;padding:6px 8px;border:1px solid #f0e1e3;border-radius:8px;background:#fffafb;color:#a35d6b;font-family:inherit;font-size:12px;font-weight:400;cursor:pointer}
.cart-line.offer-cart-line .offer-cart-remove:hover{background:#fff0f2}
.cart-line.offer-cart-line .store-offer-field select{margin:0;min-height:42px;font-size:14px;box-shadow:none}
.cart-line.offer-cart-line .offer-cart-quantity{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding-top:14px;border-top:1px solid #eef1f6}
.offer-cart-quantity-label{font-size:13px;font-weight:400;color:#758195}
.offer-cart-stepper{display:inline-flex;direction:ltr;align-items:center;border:1px solid #dae2ed;border-radius:10px;overflow:hidden;background:#fbfcfe}
.offer-cart-stepper button{display:flex;align-items:center;justify-content:center;width:42px;height:42px;padding:0;border:0;border-radius:0;background:transparent;color:#50688a;font-family:inherit;font-size:21px;font-weight:400;cursor:pointer}
.offer-cart-stepper button:hover:not(:disabled){background:#edf2f9}
.offer-cart-stepper button:disabled{color:#b3bdcb;cursor:default}
.offer-cart-stepper output{min-width:40px;padding:0 8px;text-align:center;font-size:15px;font-weight:500;color:#34445c}
.offer-cart-stepper button:focus-visible,.offer-cart-remove:focus-visible{outline:2px solid #819fc9;outline-offset:-3px}
body:is(.dark-mode,.dark) .store-offer-card,body:is(.dark-mode,.dark) .store-offer-piece,body:is(.dark-mode,.dark) .store-offer-field select,body:is(.dark-mode,.dark) .cart-line.offer-cart-line{background:#172033;color:#e2e8f2;border-color:#344359}
body:is(.dark-mode,.dark) .store-offer-total,body:is(.dark-mode,.dark) .offer-cart-stepper{background:#202d41;color:#e2e8f2}
body:is(.dark-mode,.dark) .store-offer-note,body:is(.dark-mode,.dark) .store-offer-field small,body:is(.dark-mode,.dark) .offer-cart-title,body:is(.dark-mode,.dark) .offer-cart-stepper output{color:#c5cfe0}
@media(max-width:480px){
  #offersContainer.store-offer-editor .offer-editor-row{padding:12px}
  #offersContainer.store-offer-editor .offer-editor-grid{gap:10px}
  .cart-line.offer-cart-line,.cart-line.offer-cart-line:hover{padding:12px;border-radius:13px}
  .cart-line.offer-cart-line .offer-cart-heading{grid-template-columns:68px minmax(0,1fr) auto;gap:9px}
  .cart-line.offer-cart-line .offer-cart-image{width:68px;height:78px}
  .cart-line.offer-cart-line .offer-cart-title{font-size:14px}
  .store-offer-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .store-offer-piece{gap:10px;padding:10px}
  .store-offer-field{flex-basis:100px}
}
@media(max-width:360px){
  .store-offer-cards{grid-template-columns:1fr}
  .store-offer-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}
  .store-offer-card small{grid-column:1/-1}
  .store-offer-field{flex-basis:100%}
}
