/* Buy microchips page (B01, choose microchip boxes).

   Values follow the PCE Web design spec: 1440 frame, 1176 content, 32/64 page
   padding with 32 between sections, a 776 product card and a 360 order
   summary with a 40 gap.

   Page-specific only. Design tokens, base styles, header and footer live in
   pce-chrome.css (app_pce_web), which the page loads first. Every class is
   prefixed shop- so nothing collides with the other PCE pages. */

.shop-main{padding:32px 0 64px}
.shop-stack{display:flex;flex-direction:column;gap:32px}

/* ---------- breadcrumb ---------- */
.shop-crumb{font-weight:400;font-size:13px;line-height:20px;color:var(--ink-soft)}
.shop-crumb ol{list-style:none;display:flex;flex-wrap:wrap;gap:4px}
.shop-crumb li+li::before{content:"/";margin-right:4px}
.shop-crumb a{color:var(--ink-soft)}

/* ---------- introduction ---------- */
.shop-intro{display:flex;flex-direction:column;gap:12px}
.shop-title{font-family:var(--f-display);font-weight:400;font-size:44px;line-height:50px;color:var(--ink)}
.shop-lede{font-weight:400;font-size:17px;line-height:26px;color:var(--ink-soft)}

/* ---------- purchase steps ---------- */
.shop-steps{list-style:none;display:flex;flex-wrap:wrap;align-items:center;gap:16px}
.shop-step{display:flex;align-items:center;gap:14px;width:220px;min-height:40px}
.shop-step-n{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:16px;border:1.5px solid var(--rule);background:var(--white);color:var(--ink-soft);font-weight:600;font-size:14px;line-height:20px}
.shop-step-label{font-weight:400;font-size:16px;line-height:24px;color:var(--ink-soft)}
.shop-step.is-current .shop-step-n{background:var(--registry);border-color:var(--registry);color:#fff}
.shop-step.is-current .shop-step-label{font-weight:600;color:var(--ink)}

/* ---------- columns ---------- */
.shop-columns{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:40px;align-items:start}
.shop-card{background:var(--white);border:1px solid var(--rule);border-radius:2px}
.shop-rule{width:100%;height:1px;margin:0;border:0;background:var(--rule)}

/* ---------- product card ---------- */
.shop-product{display:flex;flex-direction:column;gap:24px;padding:32px}

.shop-product-head{display:flex;align-items:center;gap:24px}
.shop-symbol{flex:none;display:grid;place-items:center;width:112px;height:112px;background:#EAF1FB;border:1px solid var(--rule);border-radius:2px;color:var(--registry)}
.shop-symbol svg{width:56px;height:56px}
.shop-product-id{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.shop-pack-name{font-family:var(--f-display);font-weight:400;font-size:32px;line-height:40px;color:var(--ink)}
.shop-pack-size{font-weight:500;font-size:20px;line-height:30px;color:var(--ink)}
.shop-iso{font-family:var(--f-mono);font-weight:500;font-size:13px;line-height:20px;color:var(--registry)}
.shop-product-desc{font-weight:400;font-size:17px;line-height:26px;color:var(--ink-soft)}

.shop-price-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.shop-unit-label{font-weight:500;font-size:16px;line-height:24px;color:var(--ink-soft)}
.shop-unit-price{font-weight:600;font-size:32px;line-height:48px;color:var(--ink);text-align:right}

.shop-qty-row{display:flex;align-items:center;gap:24px}
.shop-qty-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.shop-qty-label{font-weight:600;font-size:16px;line-height:24px;color:var(--ink)}
.shop-qty-help{font-weight:400;font-size:14px;line-height:21px;color:var(--ink-soft)}

/* Box quantity: 52 decrease, 80 value, 52 increase. */
.shop-stepper{flex:none;display:flex;align-items:center;width:184px;height:52px;background:var(--white);border:1px solid var(--rule);border-radius:2px}
.shop-stepper:focus-within{border-color:var(--registry);box-shadow:0 0 0 3px rgba(9,77,176,.16)}
.shop-stepper-btn{flex:none;display:grid;place-items:center;width:52px;height:100%;color:var(--registry);transition:background .16s}
.shop-stepper-btn svg{width:20px;height:20px}
.shop-stepper-btn:hover:not(:disabled){background:var(--paper)}
.shop-stepper-btn:disabled{color:var(--rule);cursor:not-allowed}
.shop-stepper-value{flex:1;min-width:0;height:100%;border:0;background:transparent;text-align:center;font-family:var(--f-sans);font-weight:500;font-size:18px;line-height:27px;color:var(--ink);-moz-appearance:textfield;appearance:textfield}
.shop-stepper-value::-webkit-outer-spin-button,
.shop-stepper-value::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.shop-stepper-value:focus{outline:none}

.shop-count{font-weight:500;font-size:14px;line-height:21px;color:var(--ink-soft)}

.shop-delivery{display:flex;align-items:center;gap:12px}
.shop-delivery svg{flex:none;width:24px;height:24px;color:var(--seal)}
.shop-delivery-head{font-weight:500;font-size:16px;line-height:24px;color:var(--ink)}
.shop-delivery-time{margin-top:4px;font-weight:400;font-size:14px;line-height:21px;color:var(--ink-soft)}

/* ---------- order summary ---------- */
.shop-summary{display:flex;flex-direction:column;gap:24px;padding:24px}
.shop-summary-title{font-family:var(--f-display);font-weight:400;font-size:26px;line-height:32px;color:var(--ink)}

.shop-pack{display:flex;align-items:center;gap:12px}
.shop-mark{flex:none;display:grid;place-items:center;width:56px;height:56px;background:var(--paper);border:1px solid var(--rule);border-radius:2px;color:var(--registry)}
.shop-mark svg{width:28px;height:28px}
.shop-pack-title{font-weight:600;font-size:16px;line-height:24px;color:var(--ink)}
.shop-pack-detail{margin-top:4px;font-weight:400;font-size:14px;line-height:21px;color:var(--ink-soft)}

.shop-lines{display:flex;flex-direction:column;gap:24px}
.shop-line{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;line-height:21px}
.shop-line dt{font-weight:400;color:var(--ink-soft)}
.shop-line dd{font-weight:500;color:var(--ink);text-align:right}

.shop-total{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--ink)}
.shop-total-label{font-weight:600;font-size:18px;line-height:27px}
.shop-total-amount{font-weight:600;font-size:26px;line-height:39px;text-align:right}

.shop-cta{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;padding:14px 16px;border-radius:2px;background:var(--seal);color:#fff;font-weight:600;font-size:16px;line-height:24px;text-align:center;transition:background .16s}
.shop-cta:hover{background:var(--seal-d)}
.shop-timing{font-weight:400;font-size:13px;line-height:20px;color:var(--ink-soft)}

/* ---------- responsive ---------- */
@media (max-width:1080px){
  .shop-columns{grid-template-columns:1fr;gap:24px}
}
@media (max-width:720px){
  .shop-main{padding:24px 0 48px}
  .shop-stack{gap:24px}
  .shop-title{font-size:34px;line-height:40px}
  .shop-steps{flex-direction:column;align-items:flex-start;gap:8px}
  .shop-step{width:auto}
  .shop-product,.shop-summary{padding:24px 20px}
  .shop-product-head{gap:16px}
  .shop-symbol{width:72px;height:72px}
  .shop-symbol svg{width:40px;height:40px}
  .shop-pack-name{font-size:26px;line-height:32px}
  .shop-pack-size{font-size:17px;line-height:26px}
  .shop-unit-price{font-size:26px;line-height:39px}
  .shop-qty-row{flex-wrap:wrap;gap:12px}
}

/* ---------- checkout: delivery and order review (B02) ----------

   Values follow the PCE Web design spec: same frame as B01, a 776 contact
   and delivery card (padding 32, 24 between the back link, sections,
   divider and actions) beside the 360 order summary. Sections stack their
   28/34 title and fields 20 apart; a field is a 14/20 label, 8, then a 52
   tall input; two-up rows sit 24 apart. */

.shop-step-n svg{width:20px;height:20px}
.shop-step.is-done .shop-step-n{background:var(--seal);border-color:var(--seal);color:#fff}
.shop-step.is-done .shop-step-label{font-weight:400;color:var(--ink)}

.shop-details{display:flex;flex-direction:column;gap:24px;padding:32px}
.shop-back{align-self:flex-start;display:inline-flex;align-items:center;gap:8px;min-height:44px;font-weight:500;font-size:14px;line-height:20px;color:var(--registry)}
.shop-back svg{flex:none;width:20px;height:20px}

.shop-form{display:flex;flex-direction:column;gap:24px}
.shop-form-section{display:flex;flex-direction:column;gap:20px}
.shop-form-title{font-family:var(--f-display);font-weight:400;font-size:28px;line-height:34px;color:var(--ink)}
.shop-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.shop-field{display:flex;flex-direction:column;gap:8px;min-width:0}
.shop-label{font-weight:500;font-size:14px;line-height:20px;color:var(--ink)}
.shop-input{width:100%;min-height:52px;padding:12px 16px;border:1px solid var(--rule);border-radius:2px;background:var(--white);color:var(--ink);font-family:var(--f-sans);font-weight:400;font-size:16px;line-height:24px}
.shop-input:focus{outline:none;border-color:var(--registry);box-shadow:0 0 0 3px rgba(9,77,176,.16)}
.shop-select{-webkit-appearance:none;appearance:none;padding-right:48px;cursor:pointer;background:var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%233B4C5E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 16px center/20px 20px}
.shop-hint{font-weight:400;font-size:13px;line-height:20px;color:var(--ink-soft)}
/* Errors per B07: 2px #B32129 border (padding shrinks by 1 to keep 52 tall)
   and a 13/20 helper in the same red. */
.shop-error{display:none;font-weight:400;font-size:13px;line-height:20px;color:#B32129}
.shop-field.has-error .shop-input{border:2px solid #B32129;padding:11px 15px}
.shop-field.has-error .shop-select{padding-right:47px}
.shop-field.has-error .shop-error{display:block}
.shop-field.has-error .shop-hint{display:none}

.shop-submit{display:flex;flex-direction:column;gap:12px}
.shop-submit-hint{font-weight:400;font-size:13px;line-height:20px;color:var(--ink-soft)}
.shop-notice{padding:12px 16px;background:#FDF3DC;color:#6B4E00;font-weight:600;font-size:14px;line-height:21px}
.shop-notice:focus{outline:none}

@media (max-width:720px){
  .shop-details{padding:24px 20px}
  .shop-form-title{font-size:24px;line-height:30px}
}

/* ---------- payment: wallets and card (B03) ----------

   Values follow the PCE Web design spec: same frame and card as B02. Wallet
   and card titles 24/30; two 52 tall wallet buttons 16 apart; an
   "or pay with a card" divider 14/21; the summary adds Deliver to 14/21
   and a 48 tall Change link 15/20. */

.shop-pay-title{font-family:var(--f-display);font-weight:400;font-size:24px;line-height:30px;color:var(--ink)}

.shop-wallets{display:flex;flex-direction:column;gap:16px}
.shop-wallet-buttons{display:flex;gap:16px}
.shop-wallet-slot{flex:1 1 0;min-width:0;height:52px}
.shop-wallet-google{border-radius:2px;overflow:hidden}
.shop-wallet-google > div,.shop-wallet-google button{width:100%!important;height:52px!important}
.shop-wallet-apple apple-pay-button{display:block;width:100%;--apple-pay-button-width:100%;--apple-pay-button-height:52px;--apple-pay-button-border-radius:4px;--apple-pay-button-padding:0;--apple-pay-button-box-sizing:border-box}

.shop-or{display:flex;align-items:center;gap:16px;font-weight:400;font-size:14px;line-height:21px;color:var(--ink-soft)}
.shop-or::before,.shop-or::after{content:"";flex:1 1 0;height:1px;background:var(--rule)}

.shop-deliver-title{font-weight:600;font-size:14px;line-height:21px;color:var(--ink)}
.shop-deliver-address{font-style:normal;font-weight:400;font-size:14px;line-height:21px;color:var(--ink-soft)}
.shop-linkbtn{display:flex;align-items:center;justify-content:center;min-height:48px;font-weight:500;font-size:15px;line-height:20px;color:var(--registry);text-align:center}
.shop-linkbtn:hover{text-decoration:underline;text-underline-offset:3px}

@media (max-width:620px){
  .shop-wallet-buttons{flex-direction:column}
  .shop-wallet-slot{flex:none;width:100%}
}

/* ---------- payment states: processing, received, unsuccessful (B04 to B06)
   and delivery review (B07) ----------

   Same frame and cards as B03. Each state stacks its content 24 apart; the
   processing card uses 40 padding. Titles are Newsreader 36/42, body copy
   17/26, the processing notice sits on #EAF1FB and the unsuccessful panel
   and review notice on #FBEFD8. */

.shop-view{display:flex;flex-direction:column;gap:24px}
.shop-details.is-processing{padding:40px}

.shop-step-tick{display:none}
.shop-step.is-done .shop-step-num{display:none}
.shop-step.is-done .shop-step-tick{display:block}

.shop-state-title{font-family:var(--f-display);font-weight:400;font-size:36px;line-height:42px;color:var(--ink)}
.shop-processing-head{display:flex;align-items:center;gap:16px}
.shop-spinner{flex:none;width:28px;height:28px;border:3px solid var(--rule);border-top-color:var(--registry);border-radius:50%;animation:shop-spin .8s linear infinite}
@keyframes shop-spin{to{transform:rotate(360deg)}}
/* pce-chrome.css freezes animations for reduced motion, so show a plain ring. */
@media (prefers-reduced-motion:reduce){
  .shop-spinner{animation:none;border-top-color:var(--registry);opacity:.6}
}
.shop-state-title:focus,.shop-failure-title:focus,.shop-pay-title:focus{outline:none}
.shop-state-text{font-weight:400;font-size:17px;line-height:26px;color:var(--ink-soft)}
.shop-info{padding:16px;background:#EAF1FB;border:1px solid var(--rule);border-radius:2px;font-weight:600;font-size:16px;line-height:24px;color:var(--ink)}

.shop-received{display:flex;align-items:center;gap:14px;font-weight:400;font-size:16px;line-height:24px;color:var(--ink)}
.shop-received-mark{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:16px;background:var(--seal);color:#fff}
.shop-received-mark svg{width:20px;height:20px}
.shop-test-note{align-self:flex-start;padding:8px 12px;background:#FDF3DC;color:#6B4E00;font-weight:600;font-size:13px;line-height:20px}

.shop-facts{display:flex;flex-direction:column;gap:24px}
.shop-fact{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:16px;line-height:24px}
.shop-fact dt{font-weight:400;color:var(--ink-soft)}
.shop-fact dd{text-align:right;color:var(--ink)}
.shop-fact-ref{font-family:var(--f-mono);font-weight:500}
.shop-fact-status{font-weight:600;color:var(--registry)!important}

.shop-next{display:flex;flex-direction:column;gap:16px}
.shop-next-title{font-weight:500;font-size:18px;line-height:27px;color:var(--ink)}
.shop-next-text{font-weight:400;font-size:16px;line-height:24px;color:var(--ink-soft)}

.shop-actions{display:flex;flex-direction:column;gap:12px}
a.shop-cta:hover{text-decoration:none}
.shop-linkbtn-lg{font-size:16px;line-height:24px}

.shop-failure{display:flex;flex-direction:column;gap:16px;padding:20px;background:#FBEFD8;border:1px solid var(--rule);border-radius:2px}
.shop-failure-title{font-family:var(--f-display);font-weight:400;font-size:26px;line-height:32px;color:var(--ink)}
.shop-failure-text{font-weight:400;font-size:16px;line-height:24px;color:var(--ink-soft)}

/* B07 delivery validation notice */
.shop-alert{padding:16px;background:#FBEFD8;border:1px solid var(--rule);border-radius:2px;font-weight:600;font-size:16px;line-height:24px;color:var(--ink)}
.shop-alert:focus{outline:none}

@media (max-width:720px){
  .shop-details.is-processing{padding:24px 20px}
  .shop-state-title{font-size:28px;line-height:34px}
  .shop-failure-title{font-size:22px;line-height:28px}
}
@media (max-width:620px){
  .shop-row{grid-template-columns:1fr}
}
