/*
 * bookside.st — APP COMPONENTS
 * Everything the web app adds on top of the original index.html look.
 * Uses the tokens from bookside.css (--bs-brand, --bs-navy, ...).
 */

/* ── Base tweaks ── */
a.book-card { color: inherit; text-decoration: none; }
a.book-card:hover { color: inherit; }
.book-card.is-sold-out .book-image-content img { opacity: .55; filter: grayscale(.4); }
.header-icon-btn { text-decoration: none; color: inherit; display: inline-flex; align-items: center; justify-content: center; }
.header-icon-btn.is-active { color: var(--bs-brand); }
a.early-signup-btn { text-decoration: none; }
.search-input::-webkit-search-cancel-button { cursor: pointer; }
.mobile-header-content { gap: 10px; }
.mobile-search { position: relative; display: flex; }
.mobile-search .search-input { padding: 9px 44px 9px 14px; font-size: 13px; }
.mobile-search .search-btn { width: 32px; height: 32px; }
.quick-icon-item { text-decoration: none; }
.category-card { text-decoration: none; display: block; }
.bs-page { padding: 24px 0 48px; min-height: 55vh; }
.muted { color: var(--bs-muted); }

/* ── Search suggestions ── */
.suggest-panel {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 1100;
    background: #fff; border: 1px solid var(--bs-line); border-radius: 14px;
    box-shadow: 0 12px 32px rgba(26, 35, 50, .12); overflow: hidden;
}
.suggest-item { display: flex; gap: 12px; align-items: center; padding: 10px 14px; text-decoration: none; color: var(--bs-navy); }
.suggest-item:hover, .suggest-item.is-active { background: var(--bs-page); }
.suggest-item img { width: 36px; height: 48px; object-fit: cover; border-radius: 4px; background: var(--bs-soft); }
.suggest-item .s-title { font-size: 13px; font-weight: 700; line-height: 1.3; }
.suggest-item .s-meta { font-size: 11px; color: var(--bs-muted); }
.suggest-item .s-price { margin-left: auto; font-size: 13px; font-weight: 800; }
.suggest-all { display: block; padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--bs-brand); border-top: 1px solid var(--bs-soft); text-decoration: none; }

/* ── Buttons / forms ── */
.bs-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--bs-brand); color: #fff; border: none; border-radius: 10px;
    padding: 11px 20px; font-weight: 700; font-size: 14px; text-decoration: none; transition: all .2s; cursor: pointer;
}
.bs-btn:hover { background: var(--bs-brand-dark); color: #fff; transform: translateY(-1px); }
.bs-btn:disabled, .bs-btn.is-disabled { background: var(--bs-faint); cursor: not-allowed; transform: none; }
.bs-btn-outline { background: #fff; color: var(--bs-brand); border: 1.5px solid var(--bs-brand); }
.bs-btn-outline:hover { background: var(--bs-brand-soft); color: var(--bs-brand-dark); }
.bs-btn-amber { background: var(--bs-amber); }
.bs-btn-amber:hover { background: #D97706; }
.bs-btn .material-icons, .bs-btn .material-icons-outlined { font-size: 18px; }
.bs-field { margin-bottom: 14px; }
.bs-field label { display: block; font-size: 13px; font-weight: 600; color: var(--bs-ink); margin-bottom: 6px; }
.bs-input, .bs-select, .bs-textarea {
    width: 100%; padding: 11px 14px; border: 1px solid var(--bs-line); border-radius: 10px;
    font-size: 14px; background: #fff; font-family: inherit; transition: border-color .2s, box-shadow .2s;
}
.bs-input:focus, .bs-select:focus, .bs-textarea:focus { outline: none; border-color: var(--bs-brand); box-shadow: 0 0 0 3px var(--bs-brand-soft); }
.bs-hp { position: absolute !important; left: -9999px !important; }
.form-msg { font-size: 13px; margin-top: 10px; min-height: 18px; }
.form-msg.is-error { color: var(--bs-red); }
.form-msg.is-ok { color: var(--bs-green); }
.newsletter-msg { color: #fff; margin: 12px 0 0; font-size: 14px; min-height: 20px; }

/* ── Page header / breadcrumbs ── */
.bs-crumbs { font-size: 12px; color: var(--bs-muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bs-crumbs a { color: var(--bs-muted); text-decoration: none; }
.bs-crumbs a:hover { color: var(--bs-brand); }
.bs-crumbs .sep { color: var(--bs-faint); }
.bs-page-title { font-size: 26px; font-weight: 800; color: var(--bs-navy); margin: 0 0 4px; }
.bs-page-sub { color: var(--bs-muted); font-size: 14px; margin: 0 0 20px; }

/* ── Catalog layout ── */
.catalog-layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.filter-panel { background: #fff; border: 1px solid var(--bs-line); border-radius: var(--bs-radius); padding: 18px; position: sticky; top: 90px; }
.filter-panel h4 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--bs-navy); margin: 18px 0 10px; }
.filter-panel h4:first-child { margin-top: 0; }
.filter-list { list-style: none; padding: 0; margin: 0; max-height: 280px; overflow-y: auto; }
.filter-list a { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 8px; font-size: 13px; color: var(--bs-ink); text-decoration: none; }
.filter-list a:hover { background: var(--bs-page); }
.filter-list a.is-active { background: var(--bs-brand-soft); color: var(--bs-brand-dark); font-weight: 700; }
.filter-list .cnt { color: var(--bs-faint); font-size: 12px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { padding: 6px 12px; border: 1px solid var(--bs-line); border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--bs-ink); text-decoration: none; background: #fff; }
.filter-chip:hover { border-color: var(--bs-brand); color: var(--bs-brand); }
.filter-chip.is-active { background: var(--bs-brand); border-color: var(--bs-brand); color: #fff; }
.price-range { display: flex; gap: 8px; align-items: center; }
.price-range .bs-input { padding: 8px 10px; font-size: 13px; }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.catalog-count { font-size: 14px; color: var(--bs-muted); }
.catalog-count strong { color: var(--bs-navy); }
.catalog-toolbar .bs-select { width: auto; padding: 8px 12px; font-size: 13px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.active-filter { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; background: var(--bs-brand-soft); color: var(--bs-brand-dark); border-radius: 20px; font-size: 12px; font-weight: 600; text-decoration: none; }
.active-filter .material-icons { font-size: 14px; }
.filter-toggle { display: none; }
@media (max-width: 991px) {
    .catalog-layout { grid-template-columns: 1fr; }
    .filter-panel { position: fixed; inset: 0 0 0 auto; width: min(340px, 88vw); z-index: 1200; border-radius: 0; overflow-y: auto; transform: translateX(100%); transition: transform .25s; top: 0; }
    .filter-panel.is-open { transform: translateX(0); box-shadow: -12px 0 32px rgba(0,0,0,.15); }
    .filter-toggle { display: inline-flex; }
    .filter-backdrop { position: fixed; inset: 0; background: rgba(26,35,50,.4); z-index: 1150; }
}

/* ── Pagination ── */
.bs-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.bs-pagination a, .bs-pagination span { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--bs-ink); background: #fff; border: 1px solid var(--bs-line); padding: 0 10px; }
.bs-pagination a:hover { border-color: var(--bs-brand); color: var(--bs-brand); }
.bs-pagination .is-current { background: var(--bs-brand); color: #fff; border-color: var(--bs-brand); }
.bs-pagination .is-disabled { color: var(--bs-faint); }
.bs-pagination .gap { border: none; background: none; }

/* ── Empty state ── */
.bs-empty { text-align: center; padding: 56px 20px; background: #fff; border: 1px dashed var(--bs-line); border-radius: var(--bs-radius); }
.bs-empty .material-icons-outlined { font-size: 48px; color: var(--bs-brand); }
.bs-empty h3 { font-size: 18px; font-weight: 800; color: var(--bs-navy); margin: 10px 0 6px; }
.bs-empty p { color: var(--bs-muted); font-size: 14px; margin-bottom: 18px; }

/* ── Product detail ── */
.pdp { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; background: #fff; border: 1px solid var(--bs-line); border-radius: 16px; padding: 24px; }
.pdp-gallery-main { aspect-ratio: 1 / 1; background: var(--bs-page); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pdp-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.pdp-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.pdp-thumbs button { width: 64px; height: 64px; flex: 0 0 64px; border: 2px solid transparent; border-radius: 8px; overflow: hidden; padding: 0; background: var(--bs-page); cursor: pointer; }
.pdp-thumbs button.is-active { border-color: var(--bs-brand); }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp-title { font-size: 26px; font-weight: 800; color: var(--bs-navy); line-height: 1.25; margin: 6px 0; }
.pdp-author { font-size: 15px; color: var(--bs-muted); margin-bottom: 12px; }
.pdp-author strong { color: var(--bs-ink); }
.pdp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pdp-price-box { background: var(--bs-page); border-radius: 12px; padding: 16px; margin: 16px 0; }
.pdp-price { font-size: 30px; font-weight: 900; color: var(--bs-navy); }
.pdp-price.is-sale { color: var(--bs-red); }
.pdp-price-was { font-size: 15px; color: var(--bs-faint); text-decoration: line-through; margin-left: 8px; }
.pdp-stock { font-size: 13px; font-weight: 600; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.pdp-stock .material-icons { font-size: 16px; }
.pdp-stock.in { color: var(--bs-green); }
.pdp-stock.low { color: var(--bs-amber); }
.pdp-stock.out { color: var(--bs-red); }
.pdp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pdp-actions .bs-btn { flex: 1 1 180px; padding: 13px 20px; }
.pdp-note { font-size: 12px; color: var(--bs-muted); margin-top: 8px; display: flex; gap: 6px; align-items: flex-start; }
.pdp-note .material-icons-outlined { font-size: 16px; color: var(--bs-brand); }
.pdp-seller { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--bs-line); border-radius: 12px; margin-top: 16px; text-decoration: none; color: inherit; }
.pdp-seller:hover { border-color: var(--bs-brand); color: inherit; }
.store-avatar { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 18px; flex: 0 0 44px; overflow: hidden; }
.store-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pdp-seller .name { font-weight: 800; color: var(--bs-navy); font-size: 14px; display: flex; align-items: center; gap: 4px; }
.pdp-seller .meta { font-size: 12px; color: var(--bs-muted); }
.pdp-section { background: #fff; border: 1px solid var(--bs-line); border-radius: 16px; padding: 24px; margin-top: 20px; }
.pdp-section h2 { font-size: 18px; font-weight: 800; color: var(--bs-navy); margin-bottom: 14px; }
.pdp-desc { font-size: 14px; line-height: 1.75; color: var(--bs-ink); white-space: pre-line; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 24px; }
.spec-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--bs-soft); font-size: 13px; }
.spec-row dt { color: var(--bs-muted); font-weight: 500; }
.spec-row dd { margin: 0; color: var(--bs-navy); font-weight: 600; text-align: right; }
.genre-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.genre-pill { padding: 5px 12px; background: var(--bs-brand-soft); color: var(--bs-brand-dark); border-radius: 20px; font-size: 12px; font-weight: 600; text-decoration: none; }
.genre-pill:hover { background: var(--bs-brand); color: #fff; }
@media (max-width: 991px) {
    .pdp { grid-template-columns: 1fr; padding: 16px; gap: 18px; }
    .pdp-title { font-size: 21px; }
    .pdp-price { font-size: 26px; }
}

/* ── Store pages ── */
.store-hero { border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, var(--store-color, #3FA9F5), var(--bs-navy)); color: #fff; margin-bottom: 24px; position: relative; }
.store-hero.has-banner { background-size: cover; background-position: center; }
.store-hero.has-banner::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(26,35,50,.85), rgba(26,35,50,.35)); }
.store-hero-inner { position: relative; padding: 32px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.store-hero .store-avatar { width: 76px; height: 76px; flex-basis: 76px; border-radius: 18px; font-size: 30px; background: rgba(255,255,255,.18); border: 2px solid rgba(255,255,255,.35); }
.store-hero h1 { font-size: 28px; font-weight: 900; margin: 0; display: flex; align-items: center; gap: 8px; }
.store-hero p { margin: 6px 0 0; opacity: .9; font-size: 14px; max-width: 640px; }
.store-stats { display: flex; gap: 24px; margin-left: auto; }
.store-stats div { text-align: center; }
.store-stats b { display: block; font-size: 22px; font-weight: 900; }
.store-stats span { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; opacity: .85; }
.tier-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; background: var(--bs-brand-soft); color: var(--bs-brand-dark); }
.tier-badge.official { background: #DBEAFE; color: #1D4ED8; }
.tier-badge.mall { background: #EDE9FE; color: #6D28D9; }
.tier-badge.preferred { background: #FEF3C7; color: #B45309; }
.tier-badge.verified { background: #D1FAE5; color: #047857; }
.tier-badge.community { background: var(--bs-soft); color: var(--bs-muted); }
.store-hero .tier-badge { background: rgba(255,255,255,.2); color: #fff; }
.store-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; background: #fff; border: 1px solid var(--bs-line); border-radius: var(--bs-radius); text-decoration: none; color: inherit; height: 100%; transition: all .25s; }
.store-card:hover { border-color: var(--bs-brand); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.08); color: inherit; }
.store-card-top { display: flex; gap: 12px; align-items: center; }
.store-card .name { font-weight: 800; color: var(--bs-navy); font-size: 15px; }
.store-card .meta { font-size: 12px; color: var(--bs-muted); }
.store-card .desc { font-size: 13px; color: var(--bs-ink); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.store-card-covers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: auto; }
.store-card-covers img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; background: var(--bs-soft); }
@media (max-width: 768px) {
    .store-hero-inner { padding: 22px; }
    .store-hero h1 { font-size: 22px; }
    .store-stats { margin-left: 0; width: 100%; justify-content: space-around; }
}

/* ── Genre directory ── */
.genre-block { background: #fff; border: 1px solid var(--bs-line); border-radius: var(--bs-radius); padding: 18px; height: 100%; }
.genre-block h3 { font-size: 16px; font-weight: 800; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.genre-block h3 a { color: var(--bs-navy); text-decoration: none; }
.genre-block h3 a:hover { color: var(--bs-brand); }
.genre-block h3 .cnt { margin-left: auto; font-size: 12px; color: var(--bs-faint); font-weight: 600; }
.genre-block ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 16px; }
.genre-block li { font-size: 13px; padding: 3px 0; break-inside: avoid; }
.genre-block li a { color: var(--bs-muted); text-decoration: none; }
.genre-block li a:hover { color: var(--bs-brand); }

/* ── Sell page ── */
.sell-hero { background: linear-gradient(135deg, var(--bs-brand) 0%, var(--bs-brand-dark) 60%, var(--bs-navy) 100%); color: #fff; border-radius: 20px; padding: 48px 36px; margin-bottom: 32px; }
.sell-hero h1 { font-size: 36px; font-weight: 900; margin-bottom: 10px; }
.sell-hero p { font-size: 16px; opacity: .92; max-width: 640px; }
.sell-steps { counter-reset: step; }
.sell-step { background: #fff; border: 1px solid var(--bs-line); border-radius: var(--bs-radius); padding: 22px; height: 100%; position: relative; }
.sell-step::before { counter-increment: step; content: counter(step); position: absolute; top: -14px; left: 20px; width: 30px; height: 30px; border-radius: 50%; background: var(--bs-amber); color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.sell-step h3 { font-size: 16px; font-weight: 800; color: var(--bs-navy); margin: 8px 0 6px; }
.sell-step p { font-size: 13px; color: var(--bs-muted); margin: 0; }
.bs-card { background: #fff; border: 1px solid var(--bs-line); border-radius: 16px; padding: 28px; }
@media (max-width: 768px) { .sell-hero { padding: 32px 22px; } .sell-hero h1 { font-size: 26px; } }

/* ── Toast ── */
.bs-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--bs-navy); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 2000; box-shadow: 0 10px 30px rgba(0,0,0,.2); max-width: 90vw; }
@media (min-width: 992px) { .bs-toast { bottom: 32px; } }

/* ── Home carousel using real <a> overlays ── */
.right-banner { display: block; text-decoration: none; }
.hero-empty { background: linear-gradient(135deg, var(--bs-brand), var(--bs-navy)); color: #fff; border-radius: 16px; padding: 36px; }

/* ── Header CTA (original .early-signup-btn from index.html, now "Start Selling") ── */
.early-signup-btn {
    background: linear-gradient(135deg, #3FA9F5, #2B8CD6); color: #fff; border: none; padding: 10px 20px;
    border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit;
    transition: all .2s; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.early-signup-btn:hover { background: linear-gradient(135deg, #2B8CD6, #1E78BC); transform: translateY(-1px); color: #fff; }

/* Broken/missing cover → soft branded placeholder */
.book-image-content img.is-fallback, .pdp-gallery-main img.is-fallback { object-fit: contain; padding: 18%; background: var(--bs-brand-soft); }

/* ── Phase 2: account / cart / checkout ── */
.header-account { display: inline-flex; align-items: center; gap: 6px; color: var(--bs-navy); font-weight: 700; font-size: 14px; text-decoration: none; padding: 6px 10px; border-radius: 10px; }
.header-account:hover { background: var(--bs-page); color: var(--bs-brand); }
.header-account .material-icons-outlined { font-size: 24px; }
.header-icon-btn { position: relative; }
.icon-badge[hidden], .bottom-nav-badge[hidden] { display: none !important; }
.bs-flashes { padding-top: 14px; }
.bs-flash { padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.bs-flash.success { background: #D1FAE5; color: #065F46; }
.bs-flash.error { background: #FEE2E2; color: #991B1B; }
.bs-flash.info { background: #DBEAFE; color: #1E40AF; }
.auth-wrap { max-width: 460px; margin: 0 auto; }
.auth-card { background: #fff; border: 1px solid var(--bs-line); border-radius: 18px; padding: 28px; }
.auth-card h1 { font-size: 24px; font-weight: 900; color: var(--bs-navy); margin: 0 0 6px; }
.auth-sub { color: var(--bs-muted); font-size: 14px; margin-bottom: 20px; }
.auth-pb-note { display: flex; gap: 10px; align-items: flex-start; background: var(--bs-brand-soft); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: #1E3A5F; margin-bottom: 18px; }
.auth-pb-note .material-icons-outlined { color: var(--bs-brand); font-size: 20px; }
.auth-switch { text-align: center; font-size: 14px; margin-top: 18px; color: var(--bs-muted); }
.auth-switch a, .link-b { color: var(--bs-brand); font-weight: 700; text-decoration: none; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--bs-ink); padding: 12px 14px; border: 1px solid var(--bs-line); border-radius: 12px; cursor: pointer; }
.check-row input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--bs-brand); flex: 0 0 18px; }
.check-row b { color: var(--bs-navy); }
.cart-group { background: #fff; border: 1px solid var(--bs-line); border-radius: 16px; margin-bottom: 18px; overflow: hidden; }
.cart-group-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--bs-soft); background: var(--bs-page); }
.cart-group-head .name { font-weight: 800; color: var(--bs-navy); text-decoration: none; }
.cart-group-head .store-avatar { width: 32px; height: 32px; flex-basis: 32px; border-radius: 8px; font-size: 14px; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--bs-soft); align-items: center; }
.cart-line img { width: 64px; height: 84px; object-fit: cover; border-radius: 8px; background: var(--bs-soft); }
.cart-line .t { font-weight: 700; color: var(--bs-navy); text-decoration: none; font-size: 14px; line-height: 1.3; }
.cart-line .m { font-size: 12px; color: var(--bs-muted); margin-top: 2px; }
.cart-line .p { font-weight: 800; color: var(--bs-navy); text-align: right; }
.cart-line .problem { color: var(--bs-red); font-size: 12px; font-weight: 700; margin-top: 4px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--bs-line); border-radius: 10px; overflow: hidden; margin-top: 8px; }
.qty button { background: #fff; border: none; width: 30px; height: 30px; font-size: 16px; font-weight: 700; color: var(--bs-ink); cursor: pointer; }
.qty button:hover { background: var(--bs-page); }
.qty span { min-width: 30px; text-align: center; font-weight: 700; font-size: 14px; }
.link-remove { background: none; border: none; color: var(--bs-faint); font-size: 12px; font-weight: 600; margin-left: 10px; cursor: pointer; }
.link-remove:hover { color: var(--bs-red); }
.cart-group-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; flex-wrap: wrap; }
.cart-group-foot .sum { font-size: 14px; color: var(--bs-muted); }
.cart-group-foot .sum b { font-size: 18px; color: var(--bs-navy); }
.ship-note { font-size: 12px; color: var(--bs-muted); display: flex; gap: 6px; align-items: center; }
.ship-note .material-icons-outlined { font-size: 16px; color: var(--bs-brand); }
.co-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.co-box { background: #fff; border: 1px solid var(--bs-line); border-radius: 16px; padding: 20px; margin-bottom: 18px; }
.co-box h2 { font-size: 16px; font-weight: 800; color: var(--bs-navy); margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.co-box h2 .num { width: 24px; height: 24px; border-radius: 50%; background: var(--bs-brand); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.opt { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--bs-line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; }
.opt:hover { border-color: var(--bs-brand); }
.opt input { margin-top: 3px; accent-color: var(--bs-brand); width: 18px; height: 18px; flex: 0 0 18px; }
.opt.is-disabled { opacity: .5; cursor: not-allowed; }
.opt .opt-main { flex: 1; font-size: 14px; }
.opt .opt-main b { color: var(--bs-navy); }
.opt .opt-side { font-weight: 800; color: var(--bs-navy); }
.opt:has(input:checked) { border-color: var(--bs-brand); background: var(--bs-brand-soft); }
.sum-row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; color: var(--bs-ink); }
.sum-row.total { border-top: 1px solid var(--bs-line); margin-top: 8px; padding-top: 12px; font-size: 18px; font-weight: 900; color: var(--bs-navy); }
.mini-line { display: flex; gap: 10px; padding: 8px 0; font-size: 13px; }
.mini-line img { width: 40px; height: 54px; object-fit: cover; border-radius: 6px; }
@media (max-width: 991px) { .co-grid { grid-template-columns: 1fr; } }
.acct-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.acct-tabs a { padding: 9px 16px; border-radius: 20px; background: #fff; border: 1px solid var(--bs-line); color: var(--bs-ink); font-weight: 700; font-size: 14px; text-decoration: none; }
.acct-tabs a.is-active { background: var(--bs-brand); border-color: var(--bs-brand); color: #fff; }
.order-card { display: block; background: #fff; border: 1px solid var(--bs-line); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; text-decoration: none; color: inherit; }
.order-card:hover { border-color: var(--bs-brand); color: inherit; }
.order-card .top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--bs-muted); }
.order-card .top b { color: var(--bs-navy); font-size: 15px; }
.order-card .covers { display: flex; gap: 6px; margin-top: 10px; }
.order-card .covers img { width: 40px; height: 54px; object-fit: cover; border-radius: 6px; background: var(--bs-soft); }
.st-pill { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 800; }
.st-pill.amber { background: #FEF3C7; color: #B45309; } .st-pill.blue { background: #DBEAFE; color: #1D4ED8; } .st-pill.green { background: #D1FAE5; color: #047857; }
.st-pill.purple { background: #EDE9FE; color: #6D28D9; } .st-pill.grey { background: #F1F5F9; color: #475569; } .st-pill.red { background: #FEE2E2; color: #B91C1C; }
.next-step { border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; background: linear-gradient(135deg, var(--bs-brand), var(--bs-brand-dark)); color: #fff; }
.next-step h2 { font-size: 18px; font-weight: 900; margin: 0 0 6px; }
.next-step p { margin: 0; opacity: .95; font-size: 14px; }
.next-step.wait { background: linear-gradient(135deg, #F59E0B, #D97706); }
.next-step.done { background: linear-gradient(135deg, #10B981, #047857); }
.next-step.stop { background: linear-gradient(135deg, #6B7280, #374151); }
.pay-method { border: 1px solid var(--bs-line); border-radius: 12px; padding: 14px; margin-bottom: 10px; display: flex; gap: 14px; align-items: flex-start; }
.pay-method img { width: 120px; height: 120px; object-fit: contain; border: 1px solid var(--bs-line); border-radius: 8px; background: #fff; }
.pay-method .acct { font-size: 18px; font-weight: 900; color: var(--bs-navy); letter-spacing: .5px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: 5px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--bs-brand); }
.timeline li::after { content: ''; position: absolute; left: 9px; top: 16px; bottom: 0; width: 1px; background: var(--bs-line); }
.timeline li:last-child::after { display: none; }
.timeline .when { color: var(--bs-faint); font-size: 12px; }
.qr-box { text-align: center; } .qr-box img { width: 240px; max-width: 100%; border: 1px solid var(--bs-line); border-radius: 12px; }

/* ── Phase 3: library / reviews / tracking / vouchers ── */
.pdp-save { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.pdp-save-btn { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--bs-line); color: var(--bs-navy); border-radius: 12px; padding: 8px 14px; font-weight: 700; font-size: 14px; cursor: pointer; }
.pdp-save-btn:hover { border-color: #EF4444; }
.pdp-save-btn .material-icons { font-size: 20px; color: #EF4444; }
.pdp-save-btn.is-saved { background: #FEF2F2; border-color: #FCA5A5; }
.pdp-save-hint { font-size: 12px; color: var(--bs-muted); }
.rv-summary { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.rv-big { font-size: 40px; font-weight: 900; color: var(--bs-navy); line-height: 1; }
.rv { border-top: 1px solid var(--bs-soft); padding: 14px 0; }
.rv-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.rv-head b { color: var(--bs-navy); }
.rv-verified { display: inline-flex; align-items: center; gap: 3px; color: #047857; font-weight: 700; font-size: 12px; }
.rv-verified .material-icons { font-size: 14px; }
.rv-text { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--bs-ink); }
.rv-imgs { display: flex; gap: 8px; margin-top: 8px; }
.rv-imgs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--bs-line); }
.rv-reply { background: var(--bs-page); border-left: 3px solid var(--bs-brand); border-radius: 8px; padding: 10px 12px; margin-top: 10px; font-size: 13px; }
.rv-reply p { margin: 4px 0 0; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lib-item { display: flex; gap: 12px; background: #fff; border: 1px solid var(--bs-line); border-radius: 14px; padding: 12px; }
.lib-item img { width: 72px; height: 100px; object-fit: cover; border-radius: 8px; background: var(--bs-soft); }
.lib-body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lib-body .t { font-weight: 800; color: var(--bs-navy); text-decoration: none; font-size: 14px; line-height: 1.3; }
.lib-body .m { font-size: 12px; color: var(--bs-muted); }
.lib-price { font-weight: 900; color: var(--bs-navy); } .lib-price s { color: var(--bs-faint); font-weight: 600; font-size: 12px; }
.lib-actions { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.progress-steps { display: flex; margin: 4px 0 18px; }
.progress-steps .ps { flex: 1; text-align: center; position: relative; font-size: 12px; font-weight: 700; color: var(--bs-faint); }
.progress-steps .ps::before { content: ''; position: absolute; top: 13px; left: -50%; width: 100%; height: 3px; background: var(--bs-line); z-index: 0; }
.progress-steps .ps:first-child::before { display: none; }
.progress-steps .ps .dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--bs-line); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.progress-steps .ps .dot .material-icons { font-size: 16px; }
.progress-steps .ps.done { color: var(--bs-navy); } .progress-steps .ps.done::before { background: var(--bs-brand); }
.progress-steps .ps.done .dot { background: var(--bs-brand); border-color: var(--bs-brand); color: #fff; }
.progress-steps .ps.current .dot { border-color: var(--bs-brand); } .progress-steps .ps.current { color: var(--bs-brand); }
.track-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--bs-brand-soft); border-radius: 12px; padding: 12px 14px; }
.track-box .num { font-size: 18px; font-weight: 900; color: var(--bs-navy); letter-spacing: .5px; }
.copy-btn { background: #fff; border: 1px solid var(--bs-line); border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.rate-item { border-top: 1px solid var(--bs-soft); padding: 14px 0; }
.star-picker { display: inline-flex; gap: 2px; }
.star-picker button { background: none; border: none; padding: 0; font-family: 'Material Icons'; font-size: 30px; color: var(--bs-line); cursor: pointer; line-height: 1; }
.star-picker button.on { color: var(--bs-amber); }
.voucher-opt { display: flex; align-items: center; gap: 10px; border: 1.5px dashed var(--bs-line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.voucher-opt .tag { width: 38px; height: 38px; border-radius: 10px; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; }
.voucher-opt .vt { flex: 1; font-size: 13px; } .voucher-opt .vt b { color: var(--bs-navy); font-size: 14px; }
.voucher-applied { display: flex; align-items: center; gap: 10px; background: #D1FAE5; color: #065F46; border-radius: 12px; padding: 10px 12px; font-weight: 700; font-size: 14px; }

/* ── Phase 4: SEO landing pages / messages / returns ── */
.seo-hero { display: flex; gap: 20px; align-items: flex-start; background: #fff; border: 1px solid var(--bs-line); border-radius: 18px; padding: 22px; margin-bottom: 18px; }
.seo-hero-img { width: 120px; height: 160px; object-fit: cover; border-radius: 12px; flex: 0 0 auto; background: var(--bs-soft); }
.seo-hero-img.round { width: 120px; height: 120px; border-radius: 50%; }
.seo-kicker { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--bs-brand); }
.seo-intro { margin-top: 10px; font-size: 14px; line-height: 1.7; color: var(--bs-ink); max-width: 760px; }
.seo-intro[data-clamp] { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.seo-intro[data-clamp].open { -webkit-line-clamp: unset; }
.seo-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; font-size: 13px; }
.seo-chips .chip { background: #fff; border: 1px solid var(--bs-line); border-radius: 20px; padding: 6px 12px; color: var(--bs-navy); font-weight: 600; text-decoration: none; }
.seo-chips .chip:hover { border-color: var(--bs-brand); color: var(--bs-brand); }
@media (max-width: 575px) { .seo-hero { flex-direction: column; align-items: center; text-align: center; } }
.az-group { margin-bottom: 18px; } .az-group h2 { font-size: 20px; font-weight: 900; color: var(--bs-navy); border-bottom: 2px solid var(--bs-brand); display: inline-block; padding-bottom: 2px; }
.az-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; margin-top: 8px; }
.az-list a { color: var(--bs-ink); text-decoration: none; font-size: 14px; } .az-list a:hover { color: var(--bs-brand); }
.pdp-author a { color: inherit; text-decoration: underline; text-decoration-color: var(--bs-line); text-underline-offset: 3px; }
.pdp-author a:hover { color: var(--bs-brand); }
.chat-box { background: #fff; border: 1px solid var(--bs-line); border-radius: 16px; display: flex; flex-direction: column; height: min(70vh, 640px); }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--bs-soft); display: flex; align-items: center; gap: 10px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bs-page); }
.msg { max-width: 78%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: var(--bs-brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; background: #fff; border: 1px solid var(--bs-line); border-bottom-left-radius: 4px; }
.msg.sys { align-self: center; background: transparent; color: var(--bs-muted); font-size: 12px; text-align: center; }
.msg .who { font-size: 11px; font-weight: 800; opacity: .8; margin-bottom: 2px; }
.msg .when { font-size: 11px; opacity: .7; margin-top: 3px; }
.msg img { max-width: 220px; border-radius: 10px; display: block; margin-top: 4px; }
.msg .ord { display: inline-block; font-size: 11px; font-weight: 800; background: rgba(0,0,0,.08); border-radius: 6px; padding: 1px 6px; margin-bottom: 4px; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--bs-soft); align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; }
.icon-badge.red { background: var(--bs-red); }
