/* Stennings site kit: page layout for the shop's product page (kpd-) and the cart (kct-).
   Parts live in kit.css (k-); this file only arranges these two pages. Sizes in px, never rem
   (the site sets 1rem = 10px). Loaded after kit.css by shop_product.html and cart.html.
   Two columns from 700px; the phone layout is everything under 700px. */

/* ==========================================================================
   Product page (app/templates/public/shop_product.html)
   ========================================================================== */
.kpd-page{background:var(--k-cream);color:var(--k-ink)}
.kpd-page *,.kpd-page *::before,.kpd-page *::after,.kpd-rel *,.kpd-reviews *{box-sizing:border-box}
.kpd-wrap{padding-top:18px;padding-bottom:80px}
.kpd-grid{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:64px;align-items:start}
.kpd-gal,.kpd-buy{min-width:0}

/* gallery: stays in view while the buy column scrolls. The site header is fixed (81px on a PC,
   65px below 1024px), so the gallery sticks under it. */
.kpd-gal{position:sticky;top:105px}
.kpd-hero{position:relative;aspect-ratio:1/1;max-height:max(360px,calc(100vh - 235px));overflow:hidden;border:1px solid var(--k-hair);border-radius:var(--k-r-card);background:#fff}
.kpd-zoom{appearance:none;-webkit-appearance:none;display:block;width:100%;height:100%;padding:0;border:0;border-radius:0;background:transparent;cursor:zoom-in}
.kpd-zoom img{display:block;width:100%;height:100%;object-fit:contain}
.kpd-zoom:focus-visible{outline:2px solid var(--k-ink);outline-offset:-4px}
.kpd-ph{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:14px;color:var(--k-quiet)}
.kpd-flip{position:absolute;left:14px;top:14px;z-index:2;background:rgba(253,252,247,.96);border-color:transparent;box-shadow:0 6px 14px -8px rgba(24,21,16,.5)}
.kpd-flip button{height:34px;font-size:13.5px}
.kpd-cap{margin:10px 0 0;font-size:14px;line-height:1.4;color:var(--k-quiet);text-align:center}
.kpd-cap:empty{display:none}
.kpd-thumbs{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}

/* buy column */
.kpd-line{display:inline-block;font-size:14.5px;line-height:1.3;color:var(--k-muted);text-decoration:none;padding:14px 0;margin:-14px 0}
.kpd-line:hover{color:var(--k-ink)}
.kpd-buy .k-h1{margin-top:8px}
.kpd-shoprating{margin:10px 0 0;font-size:15px;line-height:1.3;color:var(--k-muted)}
.kpd-shoprating .k-stars{margin-right:2px}
.kpd-price-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:12px}
.kpd-price{font:600 30px/1 var(--k-display);font-variant-numeric:tabular-nums;color:var(--k-ink)}
.kpd-rating{display:inline-flex;align-items:center;gap:6px;min-height:44px;font-size:14px;line-height:1.3;color:var(--k-muted);text-decoration:none}
.kpd-rating:hover{color:var(--k-ink)}
.kpd-eta{margin-top:4px}

/* a choice group: label row, then the tiles or dots */
.kpd-grp{margin-top:26px}
.kpd-grp__head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px}
.kpd-grp__r{font-size:14px;line-height:1.3;color:var(--k-muted)}
.kpd-grp__r b{font-weight:600;color:var(--k-ink)}
.kpd-grp__note{margin-top:8px}
.kpd-grp.k-fgroup .k-label{display:block}
.k-label__opt{font-weight:400;color:var(--k-muted)}
.kpd-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.kpd-tiles--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.kpd-tile__top{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;min-width:0;padding-right:12px}
.kpd-tile__n{display:block;min-width:0}
.kpd-tile__w{font:400 14px/1.3 var(--k-body);color:var(--k-muted)}
.kpd-tile__tag{height:24px;padding:0 8px}
.kpd-age{margin-top:12px}
.kpd-sizes{display:grid;grid-template-columns:repeat(auto-fit,minmax(48px,1fr));gap:8px}
.kpd-names{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px}
.kpd-names .k-tile--sm{height:auto;min-height:52px;padding:8px 14px;text-align:center}
/* the main button pointed here: the tiles take the ink border, the line says what to pick */
.kpd-grp.is-nudge .k-tile:not(.is-on){border-color:var(--k-ink)}
.kpd-nudge{margin-top:10px}

/* main button block */
.kpd-cta{margin-top:26px}
.kpd-addrow{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.kpd-addrow.is-added{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.kpd-addrow .k-btn{padding-left:16px;padding-right:16px}
.kpd-cartmsg{margin-top:10px}
.kpd-logo-line{margin:14px 0 0;font-size:15px;line-height:1.4;color:var(--k-muted)}
.kpd-logo-line a{display:inline-block;font-weight:600;color:var(--k-ink);text-decoration:none;padding:13px 0;margin:-13px 0}
.kpd-logo-line a:hover{text-decoration:underline;text-underline-offset:3px}
.kpd-promises{margin-top:22px}

/* under the button: description, detail rows, the design's other garments */
.kpd-desc{margin:28px 0 0;max-width:58ch;font-size:16px;line-height:1.6;color:var(--k-muted)}
.kpd-desc p{margin:0}
.kpd-desc .k-link{margin-top:0}
.kpd-rows{margin-top:26px}
.kpd-row__b{margin:0 0 18px;max-width:58ch;font-size:16px;line-height:1.6;color:var(--k-muted)}
.kpd-row__a{display:inline-block;color:var(--k-ink);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px;padding:11px 0;margin:-11px 0}
.kpd-also{margin-top:26px}
.kpd-also .k-label{margin:0 0 10px}
.kpd-also__l{display:flex;flex-wrap:wrap;gap:8px}
.kpd-also .k-pill{height:auto;min-height:44px;padding:10px 14px;line-height:1.25}

/* reviews */
.kpd-rev-note{margin-top:14px}
.kpd-rev-count{margin:0 0 16px}
.kpd-rev-band{display:grid;grid-template-columns:minmax(0,260px) minmax(0,1fr);gap:24px;align-items:center;max-width:760px;margin:0 0 24px}
.kpd-rev-band--one{grid-template-columns:minmax(0,1fr)}
.kpd-dist{display:grid;gap:6px;font-size:14px;line-height:1.2;color:var(--k-muted)}
.kpd-dist__row{display:grid;grid-template-columns:28px minmax(0,1fr) 28px;align-items:center;gap:10px}
.kpd-dist__bar{display:block;height:8px;overflow:hidden;border-radius:4px;background:var(--k-hover)}
.kpd-dist__bar span{display:block;height:100%;border-radius:4px;background:var(--k-ink)}
.kpd-dist__ct{text-align:right;font-variant-numeric:tabular-nums}
.kpd-quote{margin:0;padding:22px 24px;border:1px solid var(--k-hair);border-radius:var(--k-r-card);background:#fff}
.kpd-quote__q{margin:0;font-size:17px;line-height:1.55;color:var(--k-ink)}
.kpd-quote__m{margin:10px 0 0;font-size:14px;line-height:1.45;color:var(--k-quiet)}
.kpd-rev-tools{display:flex;justify-content:flex-start;max-width:760px;margin:0 0 16px}
.kpd-rev-sort{display:flex;align-items:center;gap:12px}
.kpd-rev-sort select.k-field{width:auto;min-width:210px}
.kpd-rev-list{display:grid;gap:12px;max-width:760px}
.kpd-rev-more{max-width:760px;margin-top:20px}

/* more from the shop */
.kpd-rack{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}

/* phone bottom bar: room at the foot of the page while it shows */
.kpd-bar .k-btn{flex:none;max-width:62%;overflow:hidden;text-overflow:ellipsis}
.kpd-bar .k-btn span{overflow:hidden;text-overflow:ellipsis}

@media (min-width:700px) and (max-width:1023px){
  .kpd-gal{top:89px}
}
@media (min-width:700px) and (max-width:899px){
  .kpd-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:32px}
  .kpd-rack{gap:16px}
}
@media (max-width:699px){
  .kpd-wrap{padding-top:12px;padding-bottom:56px}
  .kpd-grid{grid-template-columns:minmax(0,1fr);gap:22px}
  .kpd-gal{position:static}
  .kpd-hero{max-height:none}
  .kpd-flip button{height:44px;font-size:14px}
  .kpd-thumbs{flex-wrap:nowrap;gap:8px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .kpd-thumbs::-webkit-scrollbar{display:none}
  .kpd-price{font-size:28px}
  .kpd-rev-band{grid-template-columns:minmax(0,1fr)}
  .kpd-rev-sort{width:100%}
  .kpd-rev-sort select.k-field{flex:1;min-width:0}
  .kpd-rack{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 14px}
  html.kpd-bar-on body{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
}
@media (hover:none){
  .kpd-flip button{height:44px;font-size:14px}
}

/* ==========================================================================
   Cart (app/templates/public/cart.html)
   Two columns from 900px: the pieces with order notes under them, and the
   summary in the lifted card. Under 900px one column: pieces, notes, summary.
   ========================================================================== */
.kct-page{background:var(--k-cream);color:var(--k-ink)}
.kct-page *,.kct-page *::before,.kct-page *::after{box-sizing:border-box}
.kct-wrap{padding-top:26px;padding-bottom:88px}
.kct-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,432px);gap:56px;align-items:start}
.kct-grid--solo{grid-template-columns:minmax(0,1fr)}
.kct-main,.kct-summary{min-width:0}

/* title row: the way back, the title, the piece count */
.kct-head{margin-bottom:20px}
.kct-titlerow{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-top:8px}
.kct-count{font-size:15px;line-height:1.3;color:var(--k-muted);white-space:nowrap}
.kct-count b{font-weight:600;color:var(--k-ink)}
.kct-note{display:flex;margin-bottom:12px}
.kct-loading{margin:0;padding:24px 0;font-size:16px;color:var(--k-muted)}
.kct-loaderr{max-width:560px}
.kct-loaderr__t{margin:0;font:600 18px/1.3 var(--k-body)}
.kct-loaderr__s{margin:6px 0 18px;font-size:16px;line-height:1.5;color:var(--k-muted)}

/* the pieces, then order notes and the gift box */
.kct-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.kct-editerr{margin-top:12px}
.kct-extras{display:grid;gap:10px;margin-top:16px;padding:20px 24px}
.kct-extras textarea.k-field{display:block;min-height:92px;resize:vertical}
.kct-extras textarea.kct-giftmsg{min-height:72px}
.kct-fieldfoot{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.kct-count-n{flex:none;font-variant-numeric:tabular-nums}
.kct-gift{margin:-2px 0}

/* summary: groups down the lifted card; it stays in view on a tall screen */
.kct-sum{display:grid;gap:22px}
.kct-optin{margin:-4px 0 -10px}
.kct-intl{display:grid;gap:8px}
.kct-rate{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.kct-rate .k-btn{padding:0 20px}
.kct-shipto{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.kct-shipto__lbl{margin:0 0 2px;font:600 14px/1.4 var(--k-body);color:var(--k-ink)}
.kct-shipto__txt{margin:0;font-size:15px;line-height:1.45;color:var(--k-muted)}
.kct-promo{display:grid;gap:8px;margin-top:-8px}
.kct-promo>.k-link{justify-self:start}
.kct-applied{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0;font-size:15px;line-height:1.4;color:var(--k-muted)}
.kct-applied b{font-weight:600;color:var(--k-ink)}
.kct-pay{display:grid;gap:14px;margin-top:-6px}
.kct-acct{margin:0;font-size:14px;line-height:1.5;color:var(--k-muted)}
.kct-acct strong{font-weight:600;color:var(--k-ink)}
.kct-acct .k-link{font-size:inherit;color:var(--k-ink)}

/* empty cart: the words, a design in progress if there is one, the two ways on, four pieces */
.kct-empty{padding-top:6px}
.kct-empty__t{margin:0;font:600 22px/1.25 var(--k-body);color:var(--k-ink)}
.kct-empty__s{margin:8px 0 0;font-size:16px;line-height:1.5;color:var(--k-muted)}
.kct-empty__btns{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px}
.kct-wip-wrap{max-width:680px}
.kct-wip{display:flex;align-items:center;gap:18px;margin-top:16px;padding:16px}
.kct-wip__pic{flex:none;display:grid;place-items:center;width:96px;height:96px;overflow:hidden;border:1px solid var(--k-hair);border-radius:var(--k-r-ctl);background:#fff}
.kct-wip__pic img{display:block;width:100%;height:100%;object-fit:cover}
.kct-wip__text{flex:1;min-width:0}
.kct-wip__kick{margin:0;font-size:14px;line-height:1.3;color:var(--k-muted)}
.kct-wip__name{margin:4px 0 0;font:600 17px/1.3 var(--k-body);color:var(--k-ink);overflow-wrap:anywhere}
.kct-wip__meta{margin:4px 0 0;font-size:14px;line-height:1.45;color:var(--k-muted);overflow-wrap:anywhere}
.kct-wip__go{flex:none}
.kct-wip-note{margin:12px 0 0;font-size:14px;line-height:1.5;color:var(--k-muted)}
.kct-picks{margin-top:56px}
.kct-picks .k-kicker{margin-bottom:16px}
.kct-rack{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}

/* phone bar: the same checkout, while the page's own button is off screen */
.kct-bar .k-btn{flex:none}

@media (min-width:900px) and (min-height:860px){
  .kct-summary{position:sticky;top:105px}
}
@media (min-width:900px) and (max-width:1023px){
  .kct-grid{grid-template-columns:minmax(0,1fr) minmax(0,380px);gap:32px}
  .kct-summary{top:89px}
}
@media (max-width:899px){
  .kct-wrap{max-width:688px}
  .kct-grid{grid-template-columns:minmax(0,1fr);gap:20px}
}
@media (max-width:699px){
  .kct-wrap{padding-top:16px;padding-bottom:56px}
  .kct-extras{padding:16px}
  .kct-fieldfoot{gap:12px}
  .kct-empty__btns .k-btn{width:100%}
  .kct-wip{flex-wrap:wrap;gap:14px}
  .kct-wip__pic{width:76px;height:76px}
  .kct-wip__go{flex:1 1 100%}
  .kct-picks{margin-top:40px}
  .kct-rack{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 14px}
  html.kct-bar-on body{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
}
