/* ===== Header: real app.js markup ===== */
#site-header{position:relative;z-index:60}
#site-header .topbar{background:var(--ink);color:var(--paper);border-bottom:1px solid rgba(255,255,255,.08)}
#site-header .topbar-inner{max-width:1160px;margin:0 auto;padding:12px 24px;display:flex;align-items:center;gap:18px}
#site-header .brand{display:inline-flex;align-items:center;gap:9px;color:var(--paper);font-family:Fraunces,Georgia,serif;font-size:1.3rem;font-weight:600;letter-spacing:.01em;flex:0 0 auto}
#site-header .brand:hover{color:#fff}
#site-header .brand-glyph{width:24px;height:24px;max-width:24px;max-height:24px;flex:0 0 auto;color:var(--brass)}
#site-header .brand-word{white-space:nowrap}
#site-header .desk-nav{display:flex;align-items:center;gap:6px;flex:1 1 auto;min-width:0}
#site-header .nav-group{position:relative}
#site-header .nav-toggle{background:none;border:0;color:var(--paper);font:500 .9rem/1 Inter,sans-serif;padding:9px 12px;border-radius:3px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
#site-header .nav-toggle:hover,#site-header .nav-toggle[aria-expanded="true"]{background:rgba(255,255,255,.08);color:#fff}
#site-header .nav-toggle span{font-size:.7rem;color:var(--brass);transition:transform .18s ease}
#site-header .nav-toggle[aria-expanded="true"] span{transform:rotate(180deg)}
#site-header .nav-menu{position:absolute;top:calc(100% + 6px);left:0;min-width:250px;margin:0;padding:8px;list-style:none;background:var(--paper);border:1px solid var(--rule);border-radius:4px;box-shadow:0 14px 34px rgba(22,35,58,.18);display:none;z-index:70}
#site-header .nav-toggle[aria-expanded="true"] + .nav-menu{display:block}
#site-header .nav-menu li{margin:0}
#site-header .nav-menu a{display:block;padding:9px 12px;border-radius:3px;color:var(--ink);font-size:.88rem;font-weight:500;line-height:1.35}
#site-header .nav-menu a:hover{background:var(--sand);color:var(--ink)}
#site-header .topbar-right{display:flex;align-items:center;gap:14px;flex:0 0 auto;margin-left:auto}
#site-header .desk-search{display:block}
#site-header .search{display:flex;align-items:stretch;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);border-radius:3px;overflow:hidden}
#site-header .search input{background:transparent;border:0;color:var(--paper);font:400 .86rem Inter,sans-serif;padding:8px 12px;width:190px;outline:none}
#site-header .search input::placeholder{color:rgba(251,248,243,.6)}
#site-header .search input:focus{background:rgba(255,255,255,.06)}
#site-header .search button{background:var(--brass);border:0;color:#fff;font:600 .8rem Inter,sans-serif;padding:0 14px;cursor:pointer;letter-spacing:.02em}
#site-header .search button:hover{background:#8f6a32}
#site-header .cart-link{display:inline-flex;align-items:center;gap:7px;color:var(--paper);font-size:.86rem;font-weight:500;padding:8px 10px;border-radius:3px;white-space:nowrap}
#site-header .cart-link:hover{background:rgba(255,255,255,.08);color:#fff}
#site-header .cart-link svg{color:var(--brass)}
#site-header .menu-btn{display:none;background:transparent;border:1px solid rgba(255,255,255,.25);color:var(--paper);font-size:1.1rem;line-height:1;padding:7px 10px;border-radius:3px;cursor:pointer}
#site-header .menu-btn:hover{background:rgba(255,255,255,.08)}
#site-header .mobile-search{display:none;padding:0 24px 12px;background:var(--ink)}
#site-header .mobile-search .search{width:100%}
#site-header .mobile-search .search input{width:100%;flex:1 1 auto}
#site-header .visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* Mobile drawer */
#site-header .drawer{position:fixed;inset:0 auto 0 0;width:min(86vw,340px);background:var(--paper);color:var(--ink);z-index:120;display:flex;flex-direction:column;box-shadow:0 0 0 100vmax rgba(22,35,58,.45);transform:translateX(0);animation:drawerIn .22s ease}
#site-header .drawer[hidden]{display:none}
@keyframes drawerIn{from{transform:translateX(-14px);opacity:.6}to{transform:none;opacity:1}}
#site-header .drawer-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid var(--rule);font-family:Fraunces,Georgia,serif;font-size:1.15rem;font-weight:600;color:var(--ink)}
#site-header .drawer-close{background:none;border:0;font-size:1.1rem;color:var(--ink);cursor:pointer;padding:4px 8px;border-radius:3px}
#site-header .drawer-close:hover{background:var(--sand)}
#site-header .drawer-body{padding:10px 12px 24px;overflow-y:auto;flex:1 1 auto}
#site-header .acc{border-bottom:1px solid var(--rule)}
#site-header .acc-btn{width:100%;display:flex;align-items:center;justify-content:space-between;background:none;border:0;padding:14px 8px;font:600 .95rem Inter,sans-serif;color:var(--ink);cursor:pointer;text-align:left}
#site-header .acc-btn span{color:var(--brass);font-size:1.1rem;line-height:1}
#site-header .acc-panel{list-style:none;margin:0;padding:0 0 10px}
#site-header .acc-panel[hidden]{display:none}
#site-header .acc-panel a{display:block;padding:9px 8px 9px 18px;color:var(--ink);font-size:.9rem;border-radius:3px}
#site-header .acc-panel a:hover{background:var(--sand)}
body.drawer-open{overflow:hidden}

/* ===== Footer: real app.js markup ===== */
#site-footer{background:var(--ink);color:var(--sand);padding:var(--pad) 0 0;margin-top:0}
#site-footer .footer-inner{max-width:1160px;margin:0 auto;padding:0 24px 28px;display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr 1.1fr;gap:32px 28px;align-items:start}
#site-footer .footer-brand{display:flex;flex-direction:column;gap:10px}
#site-footer .footer-brand .brand{color:var(--paper);font-family:Fraunces,Georgia,serif;font-size:1.25rem;font-weight:600;display:inline-flex;align-items:center;gap:9px}
#site-footer .footer-brand .brand-glyph{width:22px;height:22px;max-width:22px;max-height:22px;color:var(--brass);flex:0 0 auto}
#site-footer .footer-brand p{margin:0;font-size:.86rem;line-height:1.55;color:#C9CFD8;max-width:30ch}
#site-footer .footer-note{font-size:.76rem!important;color:#8E97A4!important}
#site-footer .footer-col h3{font-family:Fraunces,Georgia,serif;font-size:.95rem;font-weight:600;color:var(--paper);margin:0 0 12px;letter-spacing:.01em}
#site-footer .footer-col ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
#site-footer .footer-col a{color:var(--sand);font-size:.84rem;line-height:1.4;display:inline-block}
#site-footer .footer-col a:hover{color:#fff;text-decoration:underline;text-underline-offset:3px}
#site-footer .footer-contact p{margin:0 0 8px;font-size:.82rem;color:#C9CFD8;line-height:1.5}
#site-footer .footer-contact em{color:#8E97A4;font-style:normal;font-size:.76rem}
#site-footer .paypal-note{font-size:.76rem!important;color:#8E97A4!important}
#site-footer .footer-bottom{max-width:1160px;margin:0 auto;padding:16px 24px;border-top:1px solid rgba(255,255,255,.1);display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;font-size:.76rem;color:#8E97A4}

/* ===== Motion / product image sequence: tighten empty space ===== */
.motion-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:16px;margin:1em 0 0;align-items:start}
.motion-row .product-card{background:#fff;border:1px solid var(--rule);border-radius:4px;overflow:hidden;display:flex;flex-direction:column;animation:rise .7s ease both}
.motion-row .product-card img{width:100%;aspect-ratio:4/5;object-fit:contain;background:var(--paper);padding:8px;margin:0}
.motion-row .product-card .pc-body{padding:10px 12px 12px;gap:2px}
.motion-row .product-card h3{font-size:.88rem;line-height:1.3;margin:0}
.motion-row .product-card .price{font-size:.85rem}
.motion-row .product-card .sku{font-size:.68rem}
.motion-row .product-card:nth-child(2){animation-delay:.08s}
.motion-row .product-card:nth-child(3){animation-delay:.16s}
.motion-row .product-card:nth-child(4){animation-delay:.24s}
@media (prefers-reduced-motion:reduce){.motion-row .product-card{animation:none}}

/* ===== Responsive header/footer ===== */
@media (max-width:1024px){
  #site-header .desk-search{display:none}
  #site-header .search input{width:150px}
}
@media (max-width:860px){
  #site-header .topbar-inner{padding:10px 18px;gap:12px;flex-wrap:wrap}
  #site-header .menu-btn{display:inline-flex;align-items:center;justify-content:center;order:-1}
  #site-header .desk-nav{display:none}
  #site-header .desk-search{display:none}
  #site-header .mobile-search{display:block;padding:0 18px 12px}
  #site-header .topbar-right{gap:8px}
  #site-header .cart-link span{display:none}
  #site-header .cart-link{padding:8px}
  #site-footer .footer-inner{grid-template-columns:1fr 1fr;gap:24px 20px;padding:0 18px 22px}
  #site-footer .footer-brand{grid-column:1 / -1}
  #site-footer .footer-brand p{max-width:none}
  #site-footer .footer-bottom{padding:14px 18px;flex-direction:column;gap:6px}
}
@media (max-width:520px){
  #site-header .brand{font-size:1.15rem}
  #site-header .brand-glyph{width:20px;height:20px;max-width:20px;max-height:20px}
  #site-footer{padding-top:28px}
  #site-footer .footer-inner{grid-template-columns:1fr 1fr;gap:20px 16px}
  #site-footer .footer-col h3{font-size:.88rem;margin-bottom:8px}
  #site-footer .footer-col a{font-size:.8rem}
  #site-footer .footer-col ul{gap:6px}
  #site-footer .footer-contact{grid-column:1 / -1}
  .motion-row{grid-template-columns:repeat(2,1fr);gap:12px}
}

/* codex-card-layout-20261112 */
/* Shop cards have direct card-frame/name/price children, not card-body. */
.product-grid > .product-card { min-width: 0; }
.product-grid > .product-card > .card-frame { display: block; flex: none; width: 100%; }
.product-grid > .product-card > .card-frame img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain;
}
.product-grid > .product-card > .card-name {
  display: block; -webkit-line-clamp: unset; overflow: visible; overflow-wrap: anywhere;
  padding: 12px 14px 0; font-size: 14px; line-height: 1.35;
}
.product-grid > .product-card > .card-price { display: block; margin-top: auto; padding: 8px 14px 14px; }
@media (max-width: 420px) {
  .product-grid[data-grid] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid > .product-card { flex-direction: column; align-items: stretch; }
  .product-grid > .product-card > .card-name { padding: 10px 10px 0; }
  .product-grid > .product-card > .card-price { padding: 8px 10px 12px; }
}
