/* CarterStore Foundation 006. Fully independent of legacy checkout CSS. */
:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#21333c;background:#f7fafb;font-size:16px;line-height:1.5}
*{box-sizing:border-box}body{margin:0;min-height:100vh}a{color:#176d6a}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.65}a:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid #175cdd;outline-offset:3px}
.carterstore-header{background:#fff;border-bottom:1px solid #e2e9ea}.carterstore-header-inner{width:min(1200px,calc(100% - 36px));margin:auto;min-height:84px;display:flex;gap:20px;align-items:center}.carterstore-logo-link{display:flex;align-items:center;justify-content:center;min-width:125px;min-height:50px;text-decoration:none}.carterstore-logo-link img{display:block;width:125px;height:auto;max-height:58px;object-fit:contain}.carterstore-logo-fallback{font-weight:750;color:#285f5d}.carterstore-header-title{display:flex;flex-direction:column;gap:0;min-width:0}.carterstore-header-title strong{font-size:1.07rem}.carterstore-header-title span,.carterstore-header-tag{color:#718088;font-size:.82rem}.carterstore-header-tag{margin-left:auto;border:1px solid #dae5e3;border-radius:100px;padding:5px 12px;background:#f5f9f8}
.carterstore-main{width:min(1200px,calc(100% - 36px));margin:28px auto 70px;min-height:56vh}.carterstore-heading{display:flex;align-items:end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:24px}.carterstore-heading h1{margin:0;font-size:clamp(1.5rem,2.9vw,2.05rem);line-height:1.2;letter-spacing:-.025em}.carterstore-eyebrow{margin:0 0 3px;color:#587b7b;text-transform:uppercase;font-weight:700;letter-spacing:.09em;font-size:.72rem}.carterstore-index-link{font-size:.84rem}
.carterstore-grid{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(290px,1fr);gap:clamp(18px,3vw,32px);align-items:start}.carterstore-basket-panel,.carterstore-summary{background:white;border:1px solid #e0e8e8;border-radius:14px;min-width:0;box-shadow:0 5px 24px rgba(12,48,55,.035)}.carterstore-basket-panel{padding:clamp(18px,2.7vw,30px)}.carterstore-summary{padding:clamp(18px,2.5vw,26px);background:#fcfefe}.carterstore-basket-panel h2,.carterstore-summary h2{margin:0 0 15px;font-size:1.16rem;letter-spacing:-.01em}.carterstore-status{min-height:1.2rem;font-size:.88rem;color:#206a62;margin:4px 0}.carterstore-status.error{color:#a62d2d}.carterstore-muted{color:#64757c;font-size:.88rem;line-height:1.5}
.carterstore-line{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 16px;padding:20px 0;border-bottom:1px solid #e7eded;align-items:start}.carterstore-line:last-child{border-bottom:0}.carterstore-line-info{min-width:0}.carterstore-line-info strong{font-size:.96rem}.line-detail{color:#687a80;font-size:.8rem;margin-top:3px}.carterstore-line-price{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}.line-controls{grid-column:1/-1;display:flex;gap:18px;align-items:center;flex-wrap:wrap}.carterstore-qty-group{display:inline-flex;align-items:stretch;border-radius:9px;overflow:hidden;border:1px solid #c3d5d1;min-height:44px;background:white}.carterstore-qty-change{border:0;border-radius:0;background:#307f7a;color:#fff;font-size:1.35rem;font-weight:650;min-width:46px;min-height:44px;margin:0;padding:0 10px}.carterstore-qty-change:hover:not(:disabled){background:#216a66}.carterstore-qty-change:disabled{background:#95aeab;opacity:1}.carterstore-qty-number{display:flex;align-items:center;justify-content:center;min-width:52px;padding:0 12px;background:white;font-weight:650;color:#172a31;font-variant-numeric:tabular-nums}.carterstore-remove{border:0;background:transparent;color:#416b6d;text-decoration:underline;text-underline-offset:3px;text-transform:none;padding:9px 4px;min-height:44px;min-width:56px;font-size:.87rem}.carterstore-remove:hover{color:#174b50}.carterstore-total:not([hidden]){display:flex;justify-content:space-between;gap:8px;border-block:1px solid #e0e8e8;padding:16px 0;margin:6px 0 14px}.carterstore-total strong{font-size:1.15rem;font-variant-numeric:tabular-nums}
.carterstore-actions{display:grid;gap:10px;margin-top:22px}.carterstore-button,.carterstore-action{display:flex;align-items:center;justify-content:center;width:100%;min-height:46px;text-decoration:none;border-radius:9px;border:0;background:#307f7a;color:#fff;padding:10px 16px;text-align:center;font-weight:620}.carterstore-button:hover,.carterstore-action:not(:disabled):hover{background:#256965}.carterstore-button.secondary{background:white;color:#225e5b;border:1px solid #bfd4d0}.carterstore-button.secondary:hover{background:#f2faf8}.carterstore-disclaimer{color:#718087;font-size:.78rem;line-height:1.5;margin:16px 0}.carterstore-pilot{border-top:1px solid #e3ebea;margin-top:22px;padding-top:20px}.carterstore-pilot h3{font-size:.94rem;margin:0}.carterstore-pilot p{margin:4px 0 14px}.carterstore-pilot form{display:grid;gap:7px}.carterstore-pilot label{font-size:.85rem;font-weight:600}.carterstore-pilot input{width:100%;min-height:44px;border:1px solid #b9cbd0;border-radius:8px;padding:8px 11px;background:white;color:#172a31}.carterstore-pilot form button{margin-top:8px}.carterstore-footer{margin:0 auto;width:min(1200px,calc(100% - 36px));border-top:1px solid #e1e7e8;padding:22px 0 35px;display:flex;justify-content:space-between;gap:15px;color:#718087;font-size:.8rem}
@media(max-width:740px){.carterstore-grid{grid-template-columns:minmax(0,1fr)}.carterstore-header-inner{min-height:72px;gap:12px}.carterstore-header-title span{display:none}.carterstore-header-tag{display:none}.carterstore-main{margin-top:22px}.carterstore-footer{flex-wrap:wrap}}

/* 007: basket-led order summary, destination and optional email */
.carterstore-breakdown{display:grid;gap:10px;margin:12px 0;padding-bottom:14px;border-bottom:1px solid #e0e8e8;font-size:.87rem}
.carterstore-breakdown>div{display:flex;justify-content:space-between;gap:12px}.carterstore-breakdown>div span:last-child{color:#667b80;text-align:right}
.carterstore-details{display:grid;gap:8px;margin-top:16px}.carterstore-details h3{font-size:.96rem;margin:15px 0 0}.carterstore-details label{font-size:.86rem;font-weight:650}
.carterstore-details select,.carterstore-details input{font:inherit;width:100%;background:white;color:#19323e;border:1px solid #b9cbd0;border-radius:9px;min-height:44px;padding:9px 12px}
.carterstore-details .carterstore-muted{margin:0 0 6px}.carterstore-separator{border-top:1px solid #e1e9e9;margin-top:17px}

/* 008 total estimate */
.carterstore-grand-total{display:flex;justify-content:space-between;gap:10px;padding:12px 0;font-weight:700;font-size:1.05rem}.carterstore-grand-total strong{font-variant-numeric:tabular-nums}
.carterstore-breakdown strong{font-size:.88rem;text-align:right;font-variant-numeric:tabular-nums}

/* 009: Primary checkout location follows the legacy cart. Disabled until wired. */
.carterstore-primary-top{margin:8px 0 20px;min-height:50px;font-weight:750}
.carterstore-summary .carterstore-total{border-top:1px solid #e0e8e8}

.carterstore-customer-type{border:0;padding:6px 0;margin:5px 0;display:grid;gap:7px}
.carterstore-customer-type legend{font-weight:650;font-size:.9rem;padding:0 0 6px}
.carterstore-customer-type label{display:flex;gap:9px;align-items:center;font-weight:400}
.carterstore-customer-type input{width:auto;min-height:initial;accent-color:#307f7a}

/* 010: compact controls and form-first totals flow */
.carterstore-header-inner{min-height:68px}
.carterstore-status:empty{display:none}
.carterstore-heading{margin-bottom:20px}
.summary-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.summary-heading small{font-size:.8rem;font-weight:400;color:#687a80}
.carterstore-qty-group{min-height:36px;border-radius:8px}
.carterstore-qty-change{display:flex;align-items:center;justify-content:center;min-height:36px;min-width:39px;height:36px;padding:0 6px;font-size:1.13rem;line-height:1;vertical-align:middle}
.carterstore-qty-number{min-width:44px;padding:0 9px;font-size:.9rem}
.carterstore-remove{min-height:36px;padding:6px 2px}
.carterstore-details{margin-top:0;gap:9px}
.carterstore-details .carterstore-total{margin:10px 0 0;border-top:1px solid #e0e8e8}
.carterstore-discount-entry{display:flex;gap:8px}
.carterstore-discount-entry input{min-width:0;flex:1}
.carterstore-discount-apply{border:0;border-radius:8px;background:#307f7a;color:#fff;min-width:52px;font-weight:650}
.carterstore-validation{color:#b33434;font-size:.82rem;min-height:0;margin:0}
.carterstore-validation:empty{display:none}
.carterstore-primary-top{margin:0 0 16px}
.carterstore-breakdown{margin:3px 0 0}
.carterstore-breakdown-row{display:flex;justify-content:space-between;gap:12px;font-size:.87rem}
.carterstore-grand-total{border-top:0}
.carterstore-actions{margin-top:18px}
.carterstore-summary button:disabled{cursor:not-allowed}

/* 011: legacy-inspired lighter rhythm and hierarchy */
:root{font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.45}
.carterstore-header-index{margin-left:auto;white-space:nowrap}
.carterstore-heading{align-items:center}
.carterstore-heading-checkout{width:auto;min-width:205px;min-height:42px;font-size:.93rem}
.carterstore-basket-panel{padding-top:22px}
.carterstore-line{padding:17px 0}
.carterstore-line:first-child{padding-top:4px}
.carterstore-line-info strong{font-weight:700}
.carterstore-line-price{font-weight:400}
.carterstore-details label{font-weight:600;font-size:.87rem}
.carterstore-customer-type{border:1px solid #c9d5d7;border-radius:7px;padding:10px 12px 12px;margin:9px 0;gap:7px}
.carterstore-customer-type legend{font-weight:600;padding:0 4px;font-size:.88rem}
.carterstore-customer-type label{font-weight:400}
.carterstore-details select,.carterstore-details input{min-height:38px;padding:7px 10px;border-radius:7px}
.carterstore-discount-apply{min-width:48px}
.carterstore-details{gap:10px}
.carterstore-details .carterstore-total{margin:0 0 7px;padding:9px 0 13px;border-top:0;border-bottom:1px solid #e0e8e8}
.carterstore-total strong{font-size:1rem}
.carterstore-grand-total{font-weight:700}
.carterstore-breakdown strong{font-weight:600}
.carterstore-breakdown-row[hidden]{display:none!important}
.carterstore-qty-change{font-family:Arial,Helvetica,sans-serif;font-size:1.12rem;font-weight:600;line-height:1;display:grid;place-items:center;padding:0 5px;transform:none}
.carterstore-qty-change:first-child{padding-bottom:2px}
.carterstore-qty-change:nth-of-type(2){padding-bottom:2px}
.carterstore-actions{margin-top:18px}
@media(max-width:550px){.carterstore-heading-checkout{min-width:0;flex:0 1 auto}.carterstore-header-index{font-size:.77rem}}

/* 011: match the legacy basket's solid action buttons. */
.carterstore-button,.carterstore-action{border-radius:5px;min-height:46px;font-weight:400;font-family:Arial,Helvetica,sans-serif;font-size:.95rem}
.carterstore-action{background:#2d827e;color:#fff}
.carterstore-action:not(:disabled):hover{background:#246c69}
.carterstore-button.secondary{background:#737373;border:1px solid #737373;color:#fff}
.carterstore-button.secondary:hover{background:#616161;color:#fff;border-color:#616161}
.carterstore-discount-apply{border-radius:5px;font-weight:600}
.carterstore-heading-checkout{min-height:42px}

/* 012 — compact legacy-inspired basket, with optional catalogue thumbnails. */
.carterstore-main{margin-top:20px}
.carterstore-header-inner{min-height:64px}
.carterstore-header-title strong{font-size:.96rem;font-weight:600}
.carterstore-basket-panel{padding:16px 22px}
.carterstore-line{padding:13px 0;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:7px}
.carterstore-line:first-child{padding-top:2px}
.carterstore-line.has-thumb{grid-template-columns:58px minmax(0,1fr) auto}
.carterstore-product-thumb{grid-row:1 / 3;grid-column:1;width:58px;height:58px;object-fit:contain;align-self:start;border-radius:4px}
.carterstore-line.has-thumb .carterstore-line-info{grid-column:2}
.carterstore-line.has-thumb .carterstore-line-price{grid-column:3}
.carterstore-line.has-thumb .line-controls{grid-column:2 / 4}
.line-controls{gap:12px}
.carterstore-line-info strong{font-size:.92rem}
.carterstore-line-price{font-size:.92rem;font-weight:400}
.carterstore-quantity-label{font-size:.83rem;color:#26383f}
.carterstore-qty-group{border:0;border-radius:0;min-height:32px;gap:5px;align-items:center}
.carterstore-qty-change,.carterstore-qty-change:first-child,.carterstore-qty-change:nth-of-type(2){font-family:Arial,Helvetica,sans-serif;display:grid;place-items:center;background:none;border:0;color:#1b2e35;padding:0;min-width:32px;min-height:32px;height:32px;font-size:1.2rem;line-height:1;transform:none;font-weight:400}
.carterstore-qty-change:hover:not(:disabled){background:#eef5f4;color:#166f6b}
.carterstore-qty-change:disabled{background:none;color:#81928f}
.carterstore-qty-number{min-width:16px;padding:0 2px;font-weight:400;font-size:.9rem}
.carterstore-remove{padding:0 4px;min-height:32px}
.carterstore-summary{padding:18px 22px}
.carterstore-summary h2{font-size:1.07rem;margin-bottom:7px}
.carterstore-details{gap:7px}
.carterstore-details label{font-weight:600;font-size:.86rem}
.carterstore-details select,.carterstore-details input{min-height:32px;padding:5px 8px;border-radius:5px;font-size:.9rem}
.carterstore-discount-apply{min-width:43px;padding:4px 10px;font-size:.87rem}
.carterstore-discount-entry{gap:7px}
.carterstore-customer-type{gap:3px;padding:7px 10px 8px;margin:8px 0 5px}
.carterstore-customer-type label{gap:7px;min-height:25px}
.carterstore-customer-type input{min-height:0}
.carterstore-details .carterstore-total{padding:4px 0 10px;margin:0 0 4px}
.carterstore-breakdown{gap:6px;padding-bottom:11px;margin:2px 0 0}
.carterstore-actions{gap:8px;margin-top:13px}
.carterstore-button,.carterstore-action{min-height:40px;padding:8px 12px}
@media(max-width:740px){.carterstore-header-title{display:none}.carterstore-main{margin-top:14px}.carterstore-basket-panel{padding:16px 17px}.carterstore-summary{padding:18px 18px}.carterstore-line{padding:13px 0}.carterstore-line.has-thumb{grid-template-columns:48px minmax(0,1fr) auto;column-gap:10px}.carterstore-product-thumb{width:48px;height:48px}.carterstore-line.has-thumb .line-controls{grid-column:1 / -1}.carterstore-header-inner{min-height:64px}}
@media(max-width:360px){.carterstore-quantity-label{font-size:.76rem}.line-controls{gap:8px}.carterstore-remove{min-width:48px}}

/* 013: system font size, consistent SVG quantity controls and line totals. */
:root{font-size:14px}
.carterstore-qty-group{display:inline-flex;align-items:center;gap:0;min-height:40px}
.carterstore-qty-change,.carterstore-qty-change:first-child,.carterstore-qty-change:nth-of-type(2){
  display:inline-flex;align-items:center;justify-content:center;
  width:40px;height:40px;min-width:40px;min-height:40px;
  padding:0;line-height:normal;vertical-align:middle;border-radius:7px;
  background:transparent;color:#223840;
}
.carterstore-qty-change svg{display:block;width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.55;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.carterstore-qty-change:focus-visible{outline-offset:-2px}
.carterstore-qty-number{display:inline-flex;align-items:center;justify-content:center;min-width:24px;min-height:40px;padding:0 2px;line-height:1;vertical-align:middle;font-size:14px}
.carterstore-quantity-label{font-size:14px;line-height:1.3}
.carterstore-line-price{display:flex;flex-direction:column;align-items:flex-end;gap:2px;font-size:14px}
.carterstore-line-extended{font-size:12px;font-weight:400;color:#63777c;line-height:1.25;white-space:nowrap}
.carterstore-line-info strong{font-size:14px}
.carterstore-details label{font-size:14px}
.carterstore-details select,.carterstore-details input{font-size:14px}
@media(max-width:740px){.carterstore-qty-change,.carterstore-qty-change:first-child,.carterstore-qty-change:nth-of-type(2){min-width:44px;min-height:44px;width:44px;height:44px}.carterstore-qty-number{min-height:44px}}

/* 016: compact anchored rows and lighter order summary. */
.carterstore-line-price{grid-row:1 / span 2;grid-column:2;align-self:start}
.carterstore-line.has-thumb .carterstore-line-price{grid-column:3;grid-row:1 / span 2}
.carterstore-line-info{grid-row:1}
.carterstore-line .line-controls{grid-row:2}
.carterstore-details .carterstore-customer-type label{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:400;line-height:1.35}
.carterstore-customer-type input[type="radio"]{flex:0 0 auto;margin:0;width:15px;height:15px;min-height:15px;align-self:center}
.carterstore-breakdown,.carterstore-breakdown-row{font-size:14px}
.carterstore-breakdown strong{font-size:14px;font-weight:400}
.carterstore-grand-total{padding:9px 0 3px}
.carterstore-button.outline{background:#fff;border:1px solid #2d827e;color:#2d827e}
.carterstore-button.outline:hover{background:#edf7f5;border-color:#216f69;color:#216f69}
@media(max-width:740px){
  .carterstore-line-price,.carterstore-line.has-thumb .carterstore-line-price{grid-row:1 / span 2}
}

/* 017-3: Product layout driven by the basket's available width, not viewport
   breakpoints. Explicitly place image, product information, price and actions.
   The price spans both rows so its optional line total never shifts actions. */
.carterstore-basket-panel{container-type:inline-size}
.carterstore-line{
  display:grid;
  grid-template-columns:minmax(0,1fr) max-content;
  grid-template-rows:auto auto;
  column-gap:12px;
  row-gap:7px;
  align-items:start;
}
.carterstore-line.has-thumb{grid-template-columns:58px minmax(0,1fr) max-content}
.carterstore-line-info,
.carterstore-line.has-thumb .carterstore-line-info{grid-column:1;grid-row:1;min-width:0}
.carterstore-line.has-thumb .carterstore-line-info{grid-column:2}
.carterstore-line-price,
.carterstore-line.has-thumb .carterstore-line-price{grid-column:2;grid-row:1 / 3;align-self:start}
.carterstore-line.has-thumb .carterstore-line-price{grid-column:3}
.carterstore-line .line-controls,
.carterstore-line.has-thumb .line-controls{
  grid-column:1;grid-row:2;
  display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;
  min-width:0;
}
.carterstore-line.has-thumb .line-controls{grid-column:2}
.carterstore-line.has-thumb .carterstore-product-thumb{
  grid-column:1;grid-row:1 / 3;align-self:start;
  width:58px;height:58px;
}
.carterstore-line .carterstore-quantity-label{white-space:nowrap;flex:0 0 auto}
.carterstore-line .carterstore-qty-group{flex:0 0 auto}
.carterstore-line .carterstore-remove{flex:0 0 auto}

/* 017-4: Use the measured basket-panel width and leave headroom for
   the full quantity + remove group. At the narrow layout the thumbnail
   occupies only row 1; controls own row 2 without overlapping it. */
@container (max-width:600px){
  .carterstore-line.has-thumb{grid-template-columns:48px minmax(0,1fr) max-content;column-gap:10px}
  .carterstore-line.has-thumb .carterstore-product-thumb{
    grid-column:1;grid-row:1;width:48px;height:48px;
  }
  .carterstore-line .line-controls,
  .carterstore-line.has-thumb .line-controls{
    grid-column:1 / -1;grid-row:2;
    justify-content:flex-start;
  }
}
