/* Sitewide finish — all customer routes, without altering price or checkout logic. */
:root{--gc-focus:#a86c25;--gc-shadow:0 8px 26px rgba(50,30,12,.10)}
html{scroll-behavior:smooth;scroll-padding-top:95px}
#shopRoot{min-height:35vh}
#shopRoot :is(h1,h2,h3){text-wrap:balance}
#shopRoot :is(p,li){overflow-wrap:break-word}
#shopRoot :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){max-width:100%;min-height:44px;border-radius:9px;font:inherit}
#shopRoot textarea{min-height:110px}
#shopRoot :is(button,.button,input[type="submit"]){min-height:44px;touch-action:manipulation}
#shopRoot :is(button,.button,a,input,textarea,select):focus-visible,
.siteHeader :is(a,button):focus-visible,
.cartDrawer :is(button,a,input):focus-visible{outline:3px solid var(--gc-focus);outline-offset:3px}
#shopRoot :is(button,input[type="submit"]):disabled{opacity:.6;cursor:not-allowed}
#shopRoot img{max-width:100%;height:auto}
#shopRoot :is(.card,.panel,article){overflow-wrap:anywhere}
#shopStatus:not(:empty){max-width:1100px;margin:12px auto;padding:12px 16px;border-radius:10px;line-height:1.5}
#shopRoot label{line-height:1.5}
#shopRoot :is(form,.actions){max-width:100%}
#shopRoot :is(.notice,[role="alert"]){border-radius:10px;line-height:1.5}
.cartDrawer{width:min(100%,560px);max-height:94dvh;overflow-y:auto;border-radius:16px}
.cartDrawer::backdrop{background:rgba(27,18,12,.64)}
.cartDrawer .drawerHeader{position:sticky;top:0;z-index:3;background:#fff8ed;padding-block:10px}
.siteFooter a{min-height:34px;display:inline-flex;align-items:center}
@media(max-width:720px){
  html{scroll-padding-top:70px}
  .siteHeader{gap:10px}
  #shopRoot{padding-inline:max(0px,env(safe-area-inset-left))}
  #shopRoot :is(.actions,.buttonGroup){flex-wrap:wrap;gap:9px}
  #shopRoot :is(.grid,.cards){max-width:100%}
  .cartDrawer{margin:0;max-width:100%;width:100%;max-height:92dvh;border-radius:16px 16px 0 0;align-self:end}
  .siteFooter{row-gap:28px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{scroll-behavior:auto!important}}

/* Patch gallery: designs first, filtering second. */
#shopRoot .patchGalleryIntro{margin:.25rem 0 1.1rem;color:#685344;font-size:1.05rem}
#shopRoot .patchGalleryControls{display:grid;grid-template-columns:minmax(260px,1fr) minmax(165px,230px) auto;align-items:end;gap:12px;padding:15px;background:#fffaf1;border:1px solid #d9c4a4;border-radius:14px;margin:0 0 10px;box-shadow:0 4px 16px #3a240b0a}
#shopRoot :is(.patchSearchGroup,.patchCategoryGroup){display:flex;flex-direction:column;gap:5px;min-width:0}
#shopRoot :is(.patchSearchGroup,.patchCategoryGroup) label{font-weight:700;font-size:.9rem;color:#453328}
#shopRoot :is(.patchSearchGroup,.patchCategoryGroup) :is(input,select){width:100%;margin:0;background:#fff;border:1px solid #bfa88a;color:#2d241d;padding:10px 12px}
#shopRoot .patchClearFilters{padding:9px 14px;white-space:nowrap;background:transparent;color:#60452f;border:1px solid #c7aa80}
#shopRoot .patchPreviewOptions{margin:0 0 8px;padding:0 4px;border:0;background:transparent}
#shopRoot .patchPreviewOptions summary{display:inline-block;cursor:pointer;color:#624a33;font-size:.9rem;text-decoration:underline;text-underline-offset:3px;padding:7px 0}
#shopRoot .patchPreviewFields{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:12px;background:#f8efdf;border-radius:10px}
#shopRoot .patchPreviewFields select{max-width:240px}
#shopRoot .patchPreviewFields p{flex-basis:100%;margin:0}
#shopRoot .patchResultCount{font-size:.9rem;color:#705741;margin:6px 0 12px}
#shopRoot .patchGalleryGrid{margin-top:0}
#shopRoot .patchNoResults{grid-column:1/-1;padding:34px 18px;text-align:center;border:1px dashed #c8b293;border-radius:12px;background:#fffaf2}
#shopRoot .patchNoResults h2{margin-top:0}
@media(max-width:700px){#shopRoot .patchGalleryControls{grid-template-columns:1fr 1fr;gap:9px;padding:12px}#shopRoot .patchSearchGroup{grid-column:1/-1}#shopRoot .patchClearFilters{align-self:end}#shopRoot .patchGalleryIntro{font-size:.98rem}}
@media(max-width:400px){#shopRoot .patchGalleryControls{grid-template-columns:1fr}#shopRoot .patchSearchGroup{grid-column:auto}}

/* Ready-made patch gallery hero: matching builder aesthetic, deliberately compact. */
#shopRoot .premadeHero{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(250px,.7fr);gap:24px;align-items:center;background:linear-gradient(110deg,#fbf6eb,#f0e2ce);border:1px solid #d9bb94;border-radius:12px;padding:clamp(22px,3.2vw,44px);margin-bottom:24px;overflow:hidden}
#shopRoot .premadeHero h1{margin:0 0 14px;font:700 clamp(2.3rem,4.1vw,4.4rem)/1.07 Georgia,serif;letter-spacing:-.035em;color:#2e2119}
#shopRoot .premadeHero h1 span{display:block}
#shopRoot .premadeHero .premadeHeroScript{font-family:Allura,"Brush Script MT",Georgia,serif;font-weight:400;letter-spacing:0;color:#87502d;font-size:1.22em;line-height:1.05}
#shopRoot .premadeHeroCopy>p{font-size:clamp(1rem,1.3vw,1.15rem);line-height:1.55;max-width:47ch;color:#483427;margin:0 0 20px}
#shopRoot .premadeHeroActions{display:flex;flex-wrap:wrap;gap:10px}
#shopRoot .premadeHeroActions a{display:inline-flex;align-items:center;justify-content:center;padding:10px 16px;text-decoration:none;border-radius:5px;text-align:center}
#shopRoot .premadeHeroArtwork{display:flex;align-items:center;justify-content:center;min-height:190px;padding:12px 0 12px 12px}
#shopRoot .premadeHeroExample{width:37%;max-width:150px;flex:0 0 37%;aspect-ratio:1;display:grid;place-items:center;padding:9px;background:#fffaf1;border:1px solid #cba97d;box-shadow:0 7px 16px #3c231526;border-radius:7px}
#shopRoot .premadeHeroExample+ .premadeHeroExample{margin-left:-12%}
#shopRoot .premadeHeroExample0{transform:rotate(-8deg) translateY(7px)}
#shopRoot .premadeHeroExample1{transform:rotate(4deg) translateY(-13px);z-index:1}
#shopRoot .premadeHeroExample2{transform:rotate(9deg) translateY(10px)}
#shopRoot .premadeHeroExample img{width:100%;height:100%;object-fit:contain;border-radius:3px}
#shopRoot #patchGallery{scroll-margin-top:24px}
@media(max-width:800px){#shopRoot .premadeHero{grid-template-columns:1fr;gap:10px}#shopRoot .premadeHeroArtwork{min-height:125px;max-height:170px;justify-content:flex-start;padding-left:20px}#shopRoot .premadeHeroExample{max-width:124px;flex-basis:25%}}
@media(max-width:480px){#shopRoot .premadeHero{padding:20px}#shopRoot .premadeHeroArtwork{min-height:90px;max-height:125px}#shopRoot .premadeHeroActions a{flex:1 1 100%}#shopRoot .premadeHeroExample{flex-basis:32%;max-width:100px}}

/* My Designs: concise gallery, one clear primary action, optional management. */
#shopRoot .myDesignsIntro{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 20px;padding:18px 24px;border-radius:12px;background:linear-gradient(110deg,#f4e5cc,#fbf6eb);border:1px solid #dac09a}
#shopRoot .myDesignsIntro p{margin:0;max-width:64ch;color:#513b2b}
#shopRoot .myDesignsIntro .button{white-space:nowrap}
#shopRoot .myDesignsTools{display:flex;flex-direction:column;gap:7px;max-width:520px;margin-bottom:8px}
#shopRoot .myDesignsTools label{font-weight:700}
#shopRoot .myDesignsTools input{width:100%;background:#fff;border:1px solid #c9ad85;padding:10px 13px}
#shopRoot .myDesignsCount{margin:8px 0 14px;font-size:.9rem;color:#775b43}
#shopRoot .designGroups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:start}
#shopRoot .designGroupCard{display:flex;flex-direction:column;gap:10px;padding:15px;min-height:0;background:#fffaf4}
#shopRoot .designGroupCard h2{font-family:Georgia,serif;font-size:1.3rem;line-height:1.25;margin:0;min-height:0;overflow-wrap:anywhere}
#shopRoot .designGroupMeta{margin:0;color:#735a42;font-size:.83rem}
#shopRoot .designCardPreview{display:grid;place-items:center;background:#fff;border:1px solid #eee2cf;border-radius:10px;aspect-ratio:4/3;overflow:hidden}
#shopRoot .designCardPreview>img{width:100%;height:100%;max-height:255px;object-fit:contain;border-radius:0;background:white}
#shopRoot .designVersionLabel{font-size:.85rem;color:#5f4936;margin:0}
#shopRoot .designGroupCard .versionStrip{gap:7px;padding:3px 2px;overflow-x:auto}
#shopRoot .designGroupCard .versionStrip button{flex:0 0 62px;width:62px;min-width:62px;height:62px;margin:1px;background:white;padding:3px;border-radius:7px;border:1px solid #dfc8a9}
#shopRoot .designGroupCard .versionStrip img{width:100%;height:100%;object-fit:contain}
#shopRoot .designPrimaryActions{display:flex;flex-wrap:wrap;gap:9px}
#shopRoot .designPrimaryActions button,#shopRoot .designPrimaryActions a{flex:1 1 135px;margin:0;text-align:center;min-height:46px}
#shopRoot .designPrimaryActions button:first-child{background:#bd8734;color:#291b10;border-color:#a86e27;font-weight:800}
#shopRoot .designCardMore{margin-top:3px;padding-top:12px;border-top:1px solid #e3d0b4}
#shopRoot .designCardMore summary{cursor:pointer;color:#694a31;font-weight:700;font-size:.9rem;padding:6px 0}
#shopRoot .designManageInner{padding:12px 0 4px;display:grid;gap:12px}
#shopRoot .designManageInner>label{font-weight:700;font-size:.85rem}
#shopRoot .designManageInner .groupRename{display:flex;align-items:center;gap:8px}
#shopRoot .designManageInner .groupRename input{flex:1 1 auto;width:100%;min-width:0}
#shopRoot .designManageInner .groupRename button{flex:0 0 auto}
#shopRoot .designRemoveActions{display:flex;flex-wrap:wrap;gap:8px}
#shopRoot .designRemoveActions button{margin:0;border:1px solid #bba28c;background:#fdf7ef;color:#743e29;font-size:.86rem}
#shopRoot .myDesignsEmpty{grid-column:1/-1;padding:36px;border:1px dashed #cbb08a;border-radius:12px;text-align:center;background:#fffaf4}
#shopRoot .myDesignsTrash{margin:24px 0;padding:15px;border:1px solid #d9c4a2;border-radius:9px}
#shopRoot .myDesignsTrash summary{cursor:pointer;font-weight:700}
#shopRoot .myDesignsTrashRow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid #e4d2b8}
@media(max-width:1000px){#shopRoot .designGroups{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){#shopRoot .designGroups{grid-template-columns:1fr}#shopRoot .myDesignsIntro{align-items:stretch;flex-direction:column;padding:17px}#shopRoot .designCardPreview{aspect-ratio:5/3}#shopRoot .designPrimaryActions{flex-direction:column}}

/* My Designs: compact icon controls instead of form-style cards */
#shopRoot .designGroupCard{position:relative;gap:11px}
#shopRoot .designCardHead{display:flex;align-items:start;justify-content:space-between;gap:10px;min-height:62px}
#shopRoot .designCardName{flex:1 1 auto;min-width:0}
#shopRoot .designCardTools{display:flex;gap:6px;align-items:center;flex:0 0 auto}
#shopRoot .designEditIcon,#shopRoot .designIconMenu>summary{display:grid;place-items:center;width:40px;height:40px;min-width:40px;min-height:40px;margin:0!important;padding:0!important;background:#fff9f0;border:1px solid #d8b990;border-radius:9px;color:#53371f;font-size:24px;cursor:pointer;line-height:1;list-style:none}
#shopRoot .designIconMenu>summary::-webkit-details-marker{display:none}
#shopRoot .designIconMenu>summary::marker{content:""}
#shopRoot .designIconMenu>summary:hover,#shopRoot .designEditIcon:hover{background:#e8d4b4}
#shopRoot .designIconMenu{position:relative!important;margin:0!important;padding:0!important;border:0!important}
#shopRoot .designIconMenu[open]>summary{background:#ead5b3}
#shopRoot .designIconMenu .designManageInner{position:absolute;right:0;top:47px;width:min(280px,75vw);z-index:10;background:#fffaf2;border:1px solid #cfb28b;border-radius:11px;box-shadow:0 12px 32px #36201330;padding:10px;gap:7px}
#shopRoot .designIconMenu .designManageInner :is(button,a){display:block;width:100%;min-height:40px;padding:9px 10px;text-align:left;margin:0;font-size:.88rem;color:#402b1c;background:transparent;border:0;border-radius:6px;text-decoration:none;white-space:normal}
#shopRoot .designIconMenu .designManageInner :is(button,a):hover{background:#f0e2cc}
#shopRoot .designRemoveActions{display:grid;border-top:1px solid #e4d2b8;padding-top:7px}
#shopRoot .designIconMenu .designRemoveActions button{color:#8c3e2c}
#shopRoot .designRenamePanel{background:#f5ead7;border:1px solid #ddc39e;border-radius:9px;padding:12px}
#shopRoot .designRenamePanel[hidden]{display:none!important}
#shopRoot .designRenamePanel label{display:block;font-size:.85rem;font-weight:700;margin-bottom:6px}
#shopRoot .designRenamePanel .groupRename{display:flex;align-items:center;gap:6px}
#shopRoot .designRenamePanel .groupRename input{flex:1;min-width:0;font-size:.9rem}
#shopRoot .designRenamePanel .groupRename button{white-space:nowrap;margin:0}
#shopRoot .designPrimaryActions button:first-child{width:100%;flex:1 1 100%}
@media(max-width:480px){#shopRoot .designCardHead{gap:6px}#shopRoot .designCardTools{gap:4px}}

/* Hat gallery: photo-first cards, stable action row, and compact filters. */
#shopRoot .hatGalleryIntro{color:#604a37;margin:0 0 16px;max-width:64ch}
#shopRoot .hatGalleryTools{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:0 0 16px}
#shopRoot .hatGalleryTools>a{color:#704724;font-size:.94rem}
#shopRoot .hatChosenDesign{display:flex;align-items:center;gap:9px;padding:6px 12px;background:#f5e9d6;border:1px solid #dfc8a5;border-radius:9px;color:#493524;font-size:.9rem}
#shopRoot .hatChosenDesign img{width:48px;height:48px;object-fit:contain;background:white;border-radius:6px}
#shopRoot .hatFilterBar{display:flex;justify-content:space-between;align-items:end;flex-wrap:wrap;gap:10px;margin:0 0 15px;padding:12px 15px;background:#fffaf2;border:1px solid #dac5a4;border-radius:12px}
#shopRoot .hatFilterBar label{font-weight:700}
#shopRoot .hatFilterBar select{max-width:360px;min-width:210px;background:white}
#shopRoot .hatResultsCount{margin:0;color:#745840;font-size:.9rem}
#shopRoot .hatGalleryGrid{gap:18px;align-items:stretch}
#shopRoot .hatGalleryCard{display:flex;flex-direction:column;gap:0;padding:12px;border-radius:13px;box-shadow:0 5px 15px #3925140d;background:#fffaf4}
#shopRoot .hatGalleryImage{display:grid;place-items:center;background:#fff;border-radius:9px;overflow:hidden;aspect-ratio:1.12}
#shopRoot .hatGalleryImage img{width:100%;height:100%;object-fit:contain;max-height:none;background:#fff}
#shopRoot .hatCardInfo{padding:12px 3px 8px;flex:1 1 auto}
#shopRoot .hatCardInfo h2{font-family:Georgia,serif;font-size:clamp(1rem,1.3vw,1.18rem);line-height:1.3;min-height:2.6em;margin:0 0 8px}
#shopRoot .hatPrice{font-weight:750;font-size:1.04rem;color:#382519;margin:0 0 10px}
#shopRoot .hatAvailability{font-size:.82rem;line-height:1.4;margin:0;padding:8px 10px;border-radius:7px}
#shopRoot .hatAvailability.inStock{background:#ecf3e8;color:#31512d}
#shopRoot .hatAvailability.backorder{background:#faeee1;color:#8a3e27}
#shopRoot .hatCardActions{display:flex;align-items:center;gap:12px;padding:9px 3px 3px}
#shopRoot .hatCardActions button{margin:0;flex:1 1 auto;min-width:0;font-weight:800}
#shopRoot .hatCardActions a{flex:0 0 auto;font-size:.9rem;color:#6d4931}
@media(max-width:760px){#shopRoot .hatGalleryGrid{grid-template-columns:repeat(2,minmax(0,1fr))}#shopRoot .hatCardActions{flex-wrap:wrap}#shopRoot .hatCardInfo h2{min-height:0}}
@media(max-width:480px){#shopRoot .hatGalleryGrid{grid-template-columns:1fr}#shopRoot .hatFilterBar select{min-width:0;width:100%}#shopRoot .hatFilterBar{align-items:stretch;flex-direction:column}#shopRoot .hatGalleryImage{aspect-ratio:1.4}}

/* Review step: one primary action, quiet edit links. */
#shopRoot .reviewPrimaryActions{display:flex;align-items:center;margin-top:18px;gap:10px}
#shopRoot .reviewPrimaryActions .reviewAddToCart{background:#b98532;border:1px solid #9d6b20;color:#21170e;font-weight:800;font-size:1.04rem;padding:13px 26px;min-width:225px;min-height:52px}
#shopRoot .reviewPrimaryActions .reviewAddToCart:hover{background:#d3a34e}
#shopRoot .reviewSecondaryActions{display:flex;gap:18px;margin:12px 0 24px}
#shopRoot .reviewSecondaryActions a{display:inline-flex;align-items:center;min-height:40px;padding:6px 0;background:transparent;border:0;box-shadow:none;color:#745034;text-decoration:underline;text-underline-offset:3px;font-size:.93rem}
@media(max-width:540px){#shopRoot .reviewPrimaryActions .reviewAddToCart{width:100%}}
