/* Bookstore (/shop) */
.shop-wrap { max-width: 1080px; margin: 0 auto; padding: 8px 16px 110px; }
.shop-head { text-align: center; padding: 34px 10px 6px; }
.shop-head h1 { margin: 0 0 8px; }
.shop-head p { margin: 0 auto; max-width: 640px; color: var(--muted); line-height: 1.6; }
.shop-perks { display: flex; gap: 10px 22px; justify-content: center; flex-wrap: wrap; margin: 16px 0 6px; font-size: 13.5px; color: var(--indigo); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; margin-top: 26px; }
.shop-card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.shop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.shop-cover { position: relative; aspect-ratio: 4 / 5; background: linear-gradient(135deg, #f4efe3, #ece4d1); display: flex; align-items: center; justify-content: center; font-size: 64px; }
.shop-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-level { position: absolute; top: 10px; left: 10px; background: var(--indigo-dark); color: #fff; border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 700; }
.shop-off { position: absolute; top: 10px; right: 10px; background: var(--vermillion); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.shop-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.shop-body h3 { margin: 0; font-size: 16.5px; line-height: 1.3; }
.shop-sub { font-size: 12.5px; color: var(--muted); }
.shop-desc { font-size: 13.5px; color: var(--indigo); opacity: .85; line-height: 1.5; margin: 2px 0 4px; }
.shop-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 6px; }
.shop-price strong { font-size: 22px; color: var(--indigo-dark); }
.shop-price s { color: var(--muted); font-size: 14px; }
.shop-stock { font-size: 12px; color: #b3261e; font-weight: 600; }
.shop-add { width: 100%; margin-top: 8px; border: 0; border-radius: 12px; padding: 12px; font: inherit; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--vermillion), var(--vermillion-dark)); cursor: pointer; }
.shop-add.added { background: #1f8f4e; }
.shop-add[disabled] { background: #c9c3b4; cursor: not-allowed; }
.shop-none { text-align: center; padding: 60px 10px; color: var(--muted); }
.shop-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; display: none; justify-content: center; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--border); box-shadow: 0 -6px 24px rgba(0,0,0,.08); }
.shop-bar.on { display: flex; }
.shop-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; max-width: 1080px; }
.shop-bar-in span { font-weight: 700; color: var(--indigo-dark); }
.shop-btn { border: 0; border-radius: 12px; padding: 12px 22px; font: inherit; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--vermillion), var(--vermillion-dark)); cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.shop-btn.alt { background: #fff; color: var(--indigo-dark); border: 1px solid var(--border); }
.shop-btn[disabled] { opacity: .5; cursor: not-allowed; }
.shop-panel { position: fixed; inset: 0; z-index: 1000; background: rgba(15,15,35,.55); display: none; align-items: flex-end; justify-content: center; }
.shop-panel.on { display: flex; }
.shop-sheet { background: #fff; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); animation: shopUp .22s ease; }
@keyframes shopUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.shop-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.shop-sheet-head h2 { margin: 0; font-size: 19px; }
.shop-x { border: 0; background: #f1ede2; border-radius: 50%; width: 34px; height: 34px; font-size: 20px; cursor: pointer; }
.shop-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.shop-line-img { width: 48px; height: 60px; border-radius: 8px; background: #f4efe3; display: flex; align-items: center; justify-content: center; font-size: 24px; overflow: hidden; flex: none; }
.shop-line-img img { width: 100%; height: 100%; object-fit: cover; }
.shop-line-info { flex: 1; min-width: 0; font-size: 14.5px; }
.shop-line-amt { font-weight: 700; white-space: nowrap; }
.shop-step { display: inline-flex; align-items: center; gap: 8px; background: #f6f2e8; border-radius: 999px; padding: 3px 6px; }
.shop-step button { border: 0; background: #fff; width: 28px; height: 28px; border-radius: 50%; font-size: 17px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.shop-step span { min-width: 18px; text-align: center; font-weight: 700; }
.shop-totals { padding-top: 10px; font-size: 14.5px; }
.shop-totals > div { display: flex; justify-content: space-between; padding: 3px 0; }
.shop-total { font-size: 18px; font-weight: 800; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px !important; color: var(--indigo-dark); }
.shop-hint { color: #8a5a00; font-size: 12.5px; background: #fff3d6; border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.shop-problems { margin-top: 10px; font-size: 13px; color: #a5352a; background: #fdeceb; border-radius: 10px; padding: 8px 12px; }
.shop-empty { text-align: center; color: var(--muted); padding: 24px 0; }
/* checkout + order pages */
.shop-narrow { max-width: 560px; margin: 24px auto 60px; padding: 0 16px; }
.shop-box { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px 22px; margin-bottom: 18px; box-shadow: 0 8px 30px rgba(22,35,59,.05); }
.shop-box h2 { margin: 0 0 12px; font-size: 18px; }
.shop-form label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 12px 0 5px; }
.shop-form input, .shop-form select, .shop-form textarea { width: 100%; box-sizing: border-box; }
.shop-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .shop-row2 { grid-template-columns: 1fr; } .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .shop-body { padding: 10px 11px 12px; } .shop-body h3 { font-size: 14.5px; } .shop-desc { display: none; } .shop-cover { font-size: 44px; } }
.shop-err { background: #fdeceb; color: #a5352a; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.shop-status { display: inline-block; border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: 13px; background: #fff3d6; color: #8a5a00; }
.shop-status.ok { background: #e3f4e8; color: #1a7a43; }
.shop-status.bad { background: #fdeceb; color: #a5352a; }
.shop-steps { display: flex; justify-content: space-between; margin: 18px 0 4px; gap: 4px; }
.shop-steps div { flex: 1; text-align: center; font-size: 11.5px; color: var(--muted); position: relative; }
.shop-steps div i { display: block; width: 24px; height: 24px; line-height: 24px; border-radius: 50%; margin: 0 auto 4px; font-style: normal; font-weight: 700; background: #ece7d9; color: var(--muted); }
.shop-steps div.done i { background: #1f8f4e; color: #fff; }
.shop-steps div.now i { background: var(--vermillion); color: #fff; }
.shop-steps div.done, .shop-steps div.now { color: var(--indigo-dark); font-weight: 600; }
