:root {
  --commerce-gold: #c69b50;
  --commerce-gold-soft: #f3e8d2;
  --commerce-panel: #f3f0fb;
}

.commerce-page { background: #fbfaff; }
.commerce-main { overflow: hidden; }
.commerce-wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.commerce-narrow { width: min(930px, calc(100% - 48px)); margin-inline: auto; }

/* Boutique — hub des produits hors livres */
.shop-hero { min-height: 230px; }
.shop-hero::after { content: "BOUTIQUE"; font-size: clamp(86px, 15vw, 180px); bottom: -42px; }
.shop-hero .store-hero-inner { padding-block: 46px 50px; }
.shop-hero h1 { font-size: clamp(48px, 7vw, 76px); }
.shop-intro { display: grid; grid-template-columns: 1.2fr .8fr; gap: 55px; align-items: end; padding-block: 54px 34px; }
.shop-intro h2 { max-width: 650px; margin: 0; font-family: var(--serif); font-size: clamp(34px, 4.8vw, 52px); font-weight: 500; line-height: 1.08; letter-spacing: -.03em; }
.shop-intro p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.goodies-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; padding-bottom: 42px; }
.goodie-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 12px 28px rgba(23,20,45,.05); }
.goodie-visual { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; overflow: hidden; padding: 18px; color: #fff; background: linear-gradient(145deg, #17142d, #42238f); }
.goodie-card:nth-child(4n+2) .goodie-visual { background: linear-gradient(145deg, #29266f, #6841d7); }
.goodie-card:nth-child(4n+3) .goodie-visual { background: linear-gradient(145deg, #173d52, #3d7589); }
.goodie-card:nth-child(4n+4) .goodie-visual { background: linear-gradient(145deg, #51205e, #9a37a8); }
.goodie-visual::before { content: ""; position: absolute; width: 170px; height: 170px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 34px rgba(255,255,255,.045); }
.goodie-visual span { position: relative; max-width: 155px; font-family: var(--serif); font-size: 23px; line-height: 1.05; text-align: center; }
.goodie-visual small { position: absolute; right: 12px; bottom: 10px; color: rgba(255,255,255,.7); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.goodie-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 19px 17px 18px; }
.goodie-body h3 { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.2; }
.goodie-status { margin: 9px 0 18px; color: var(--muted); font-size: 12px; }
.goodie-action { width: 100%; min-height: 43px; display: inline-flex; align-items: center; justify-content: center; margin-top: auto; border: 1px solid var(--ink); border-radius: 6px; color: var(--ink); background: #fff; font-size: 12px; font-weight: 800; }
.goodie-action:hover { color: #fff; background: var(--ink); }
.shop-opening { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-bottom: 86px; padding: 28px 31px; border: 1px solid rgba(109,49,242,.18); border-radius: 11px; background: var(--violet-pale); }
.shop-opening strong { display: block; margin-bottom: 5px; font-family: var(--serif); font-size: 22px; }
.shop-opening p { margin: 0; color: var(--muted); font-size: 13px; }
.shop-opening a { flex: 0 0 auto; color: var(--violet-deep); font-size: 12px; font-weight: 800; }

/* Fiche générique d’un produit de la Boutique */
.product-visual { position: sticky; top: 24px; display: grid; place-items: center; min-height: 500px; color: #fff; background: linear-gradient(145deg, #17142d, #5630ad); box-shadow: 0 28px 60px rgba(23,20,45,.18); }
.product-visual span { max-width: 260px; font-family: var(--serif); font-size: 42px; line-height: 1.03; text-align: center; }
.product-visual small { position: absolute; right: 20px; bottom: 18px; color: rgba(255,255,255,.7); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.product-unavailable { margin: 28px 0 22px; padding: 17px 19px; border-left: 3px solid var(--violet-deep); color: var(--ink-soft); background: var(--violet-pale); font-size: 14px; line-height: 1.6; }
.product-choice { display: grid; gap: 8px; margin-top: 20px; }
.product-choice label { color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.product-choice select { min-height: 49px; padding-inline: 13px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.product-disabled { width: 100%; min-height: 53px; margin-top: 18px; border: 0; border-radius: 7px; color: rgba(255,255,255,.75); background: #8c879b; font-weight: 800; cursor: not-allowed; }

/* États du compte et confirmations */
.account-flow-shell { padding-block: 64px 92px; }
.account-flow-card { max-width: 660px; margin-inline: auto; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.account-flow-heading { padding: 31px 36px 26px; color: #fff; background: #17142d; }
.account-flow-heading .eyebrow { margin-bottom: 11px; }
.account-flow-heading h1 { max-width: 560px; margin: 0; font-family: var(--serif); font-size: clamp(35px, 5vw, 49px); font-weight: 500; line-height: 1.04; }
.account-flow-body { padding: 35px 36px 38px; }
.account-flow-body > p { margin: 0 0 23px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.account-flow-form { display: grid; gap: 10px; }
.account-flow-form label { color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.account-flow-form input { width: 100%; min-height: 50px; padding-inline: 14px; border: 1px solid var(--line); border-radius: 6px; }
.account-flow-form button, .account-flow-primary { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; margin-top: 7px; padding-inline: 18px; border: 0; border-radius: 6px; color: #fff; background: var(--violet-deep); font-size: 13px; font-weight: 800; cursor: pointer; }
.account-flow-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.account-flow-links a, .account-link { color: var(--violet-deep); font-size: 12px; font-weight: 800; }
button.account-link { padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.account-flow-status { display: grid; grid-template-columns: 42px 1fr; gap: 16px; align-items: start; padding: 18px; border: 1px solid rgba(109,49,242,.18); border-radius: 8px; background: var(--violet-pale); }
.account-flow-status svg { width: 42px; height: 42px; padding: 10px; border-radius: 50%; fill: none; stroke: var(--violet-deep); stroke-width: 1.8; background: #fff; }
.account-flow-status strong { display: block; margin-bottom: 4px; font-family: var(--serif); font-size: 19px; }
.account-flow-status p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.password-rules { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }

/* Pages légales */
.legal-hero { min-height: 190px; display: flex; align-items: center; color: #fff; background: linear-gradient(120deg, #17142d, #38226e); }
.legal-hero-inner { padding-block: 38px 42px; }
.legal-hero h1 { max-width: 800px; margin: 0; font-family: var(--serif); font-size: clamp(40px, 6vw, 67px); font-weight: 500; line-height: 1; letter-spacing: -.035em; }
.legal-hero p { margin: 12px 0 0; color: rgba(255,255,255,.65); font-size: 12px; }
.legal-layout { display: grid; grid-template-columns: 210px minmax(0, 760px); gap: 65px; align-items: start; padding-block: 63px 92px; }
.legal-nav { position: sticky; top: 24px; display: grid; gap: 9px; padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.legal-nav strong { margin-bottom: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .11em; }
.legal-nav a { color: var(--ink-soft); font-size: 12px; line-height: 1.35; }
.legal-nav a[aria-current="page"], .legal-nav a:hover { color: var(--violet-deep); font-weight: 800; }
.legal-body { min-width: 0; }
.legal-body h2 { margin: 43px 0 13px; font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1.2; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--ink-soft); font-size: 16px; line-height: 1.8; }
.legal-body ul { padding-left: 21px; }
.legal-body a { color: var(--violet-deep); text-decoration: underline; text-underline-offset: 3px; }
.legal-note { margin: 18px 0; padding: 16px 18px; border-left: 3px solid var(--commerce-gold); color: var(--ink-soft); background: var(--commerce-gold-soft); font-size: 13px; line-height: 1.65; }
.footer-bottom nav { line-height: 1.55; }
.footer-bottom nav a { color: inherit; }
.footer-bottom nav a:hover { color: var(--violet); }
.footer.footer-dark .footer-bottom nav a:hover { color: #fff; }

.store-hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: #17142d;
  isolation: isolate;
}
.store-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 490px;
  height: 490px;
  right: -140px;
  top: -310px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 50%;
  box-shadow: 0 0 0 76px rgba(109,49,242,.08), 0 0 0 152px rgba(109,49,242,.04);
}
.store-hero::after {
  content: "LIVRES";
  position: absolute;
  z-index: -1;
  right: 4vw;
  bottom: -58px;
  color: rgba(255,255,255,.045);
  font-family: var(--serif);
  font-size: clamp(110px, 19vw, 230px);
  line-height: 1;
  letter-spacing: -.07em;
}
.store-hero-inner { padding-block: 62px 68px; }
.store-hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(54px, 8vw, 94px); font-weight: 500; line-height: .95; letter-spacing: -.045em; }
.store-hero p:not(.eyebrow) { max-width: 610px; margin: 22px 0 0; color: rgba(255,255,255,.7); font-size: 17px; line-height: 1.7; }

.catalog-intro { max-width: 850px; padding-block: 66px 42px; }
.catalog-intro h2 { max-width: 720px; margin: 0; font-family: var(--serif); font-size: clamp(35px, 5vw, 57px); font-weight: 500; line-height: 1.09; letter-spacing: -.035em; }
.catalog-intro h2 em { color: var(--violet-deep); font-weight: 500; }
.catalog-facts { display: grid; grid-template-columns: 1fr 1fr; border-left: 1px solid var(--line); }
.catalog-facts div { padding-left: 28px; }
.catalog-facts strong { display: block; color: var(--violet-deep); font-family: var(--serif); font-size: 36px; font-weight: 500; line-height: 1; }
.catalog-facts span { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.4; text-transform: uppercase; letter-spacing: .08em; }

.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding-bottom: 38px; }
.catalog-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; box-shadow: 0 14px 32px rgba(23,20,45,.055); }
.catalog-card[hidden] { display: none; }
.catalog-cover-link { display: block; padding: 20px 20px 0; background: linear-gradient(145deg, #f3f0fb, #fbfaff); }
.cover-switch { position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; overflow: hidden; background: #17142d; box-shadow: 0 17px 32px rgba(23,20,45,.18); }
.cover-switch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .36s ease, transform .36s ease; }
.cover-switch .cover-back { opacity: 0; }
.cover-switch:hover .cover-front, .cover-switch:focus-within .cover-front { opacity: 0; transform: scale(1.015); }
.cover-switch:hover .cover-back, .cover-switch:focus-within .cover-back { opacity: 1; transform: scale(1.015); }
.catalog-card-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 23px 20px 21px; }
.catalog-badge { width: fit-content; margin-bottom: 13px; padding: 5px 9px; border-radius: 999px; color: var(--violet-deep); background: var(--violet-pale); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; }
.catalog-card h2 { margin: 0; font-family: var(--serif); font-size: 23px; font-weight: 600; line-height: 1.17; }
.catalog-author { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.catalog-author a { color: var(--violet-deep); font-weight: 750; }
.catalog-price { margin: auto 0 0; padding-top: 20px; color: var(--ink); font-family: var(--serif); font-size: 23px; font-weight: 600; }
.catalog-actions { width: 100%; display: grid; grid-template-columns: 1fr 46px; gap: 8px; margin-top: 16px; }
.catalog-detail, .catalog-add { min-height: 45px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ink); border-radius: 6px; cursor: pointer; transition: color .2s ease, background .2s ease, border-color .2s ease; }
.catalog-detail { padding-inline: 10px; color: #fff; background: var(--ink); font-size: 12px; font-weight: 800; }
.catalog-detail:hover { background: var(--violet-deep); border-color: var(--violet-deep); }
.catalog-add { color: var(--violet-deep); background: #fff; font-size: 21px; }
.catalog-add:hover, .catalog-add.is-added { color: #fff; border-color: var(--violet-deep); background: var(--violet-deep); }
.catalog-add svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 4px 0 48px; }
.pagination button { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; cursor: pointer; }
.pagination button[aria-current="page"] { color: #fff; border-color: var(--violet-deep); background: var(--violet-deep); }
.catalog-conclusion { margin-bottom: 92px; padding: 30px 0; border-block: 1px solid var(--line); border-left: 0; }
.catalog-conclusion div { padding-left: 0; }
.catalog-conclusion div + div { padding-left: 28px; border-left: 1px solid var(--line); }

.book-detail-hero { padding-block: 35px; border-bottom: 1px solid var(--line); background: #f3f0fb; }
.book-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.book-breadcrumbs a:hover { color: var(--violet-deep); }
.book-detail { display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr); gap: clamp(42px, 6vw, 76px); align-items: start; padding-block: 72px 88px; }
.book-gallery { position: sticky; top: 24px; }
.book-gallery-main { width: min(100%, 430px); margin-inline: auto; }
.book-gallery-main .cover-switch { box-shadow: 0 28px 60px rgba(23,20,45,.22); }
.gallery-hint { display: flex; justify-content: center; gap: 8px; margin: 17px 0 0; color: var(--muted); font-size: 11px; }
.gallery-hint svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.book-detail-copy { padding-top: 10px; }
.book-detail-copy h1 { margin: 0; font-family: var(--serif); font-size: clamp(45px, 5.4vw, 67px); font-weight: 500; line-height: 1.01; letter-spacing: -.045em; }
.book-byline { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 19px 0 0; color: var(--muted); font-size: 13px; }
.book-byline a { color: var(--violet-deep); font-weight: 750; }
.book-promise { margin: 29px 0 0; padding: 23px 0; border-block: 1px solid var(--line); color: var(--ink-soft); font-family: var(--serif); font-size: 20px; line-height: 1.55; }
.book-price { margin: 28px 0 22px; font-family: var(--serif); font-size: 37px; font-weight: 600; }
.purchase-row { display: grid; grid-template-columns: 92px minmax(210px, 1fr); gap: 10px; }
.quantity-control { display: grid; grid-template-columns: 30px 32px 30px; align-items: center; min-height: 54px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.quantity-control button { height: 100%; border: 0; color: var(--violet-deep); background: transparent; cursor: pointer; }
.quantity-control output { text-align: center; font-weight: 750; }
.add-to-cart-primary { min-height: 54px; border: 0; border-radius: 7px; color: #fff; background: linear-gradient(135deg, #4e2cff, #8b35ee); box-shadow: 0 13px 28px rgba(79,37,216,.24); font-weight: 800; cursor: pointer; }
.add-to-cart-primary.is-added { background: #2d2759; }
.purchase-note { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.purchase-note svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.book-meta { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 34px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.book-meta div { min-height: 82px; padding: 15px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.book-meta div:nth-child(3n) { border-right: 0; }
.book-meta div:nth-last-child(-n+3) { border-bottom: 0; }
.book-meta dt { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.book-meta dd { margin: 6px 0 0; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.35; }
.book-meta dd a { color: var(--violet-deep); }

.book-description { padding-block: 92px; background: #17142d; color: #fff; }
.book-description-grid { display: grid; grid-template-columns: .55fr 1.45fr; gap: 80px; }
.book-description h2 { position: sticky; top: 28px; margin: 0; font-family: var(--serif); font-size: clamp(40px, 5vw, 61px); font-weight: 500; line-height: 1.05; letter-spacing: -.04em; }
.book-description-copy { max-width: 730px; }
.book-description-copy p { margin: 0 0 22px; color: rgba(255,255,255,.72); font-family: var(--serif); font-size: 19px; line-height: 1.78; }
.book-description-copy p:first-child { color: #fff; font-size: 24px; line-height: 1.58; }
.book-description-copy p:last-child { margin-bottom: 0; }

.book-sharing { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-block: 34px; border-bottom: 1px solid var(--line); }
.book-sharing h2 { margin: 0; font-family: var(--serif); font-size: 25px; font-weight: 600; }
.share-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.share-actions button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; cursor: pointer; }
.share-actions button:hover { color: #fff; border-color: var(--violet-deep); background: var(--violet-deep); }
.share-actions svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.share-actions .filled { fill: currentColor; stroke: none; }
.share-feedback { min-width: 68px; color: var(--violet-deep); font-size: 12px; }

.reviews-section { padding-block: 85px 100px; }
.reviews-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: end; margin-bottom: 36px; }
.reviews-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(36px, 4.8vw, 54px); font-weight: 500; line-height: 1.08; }
.reviews-heading p { margin: 0; color: var(--muted); }
.reviews-layout { display: grid; grid-template-columns: .8fr 1.2fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.reviews-empty { min-height: 360px; display: flex; flex-direction: column; justify-content: center; padding: 45px; color: var(--muted); background: #f4f1fb; }
.reviews-empty strong { color: var(--ink); font-family: var(--serif); font-size: 26px; font-weight: 600; }
.reviews-empty p { margin: 10px 0 0; }
.review-form { display: grid; gap: 14px; padding: 42px; }
.review-form label { color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.review-form input, .review-form textarea { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #fbfaff; }
.review-form textarea { min-height: 122px; resize: vertical; }
.review-form input:focus, .review-form textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109,49,242,.1); }
.star-picker { display: flex; gap: 5px; direction: rtl; justify-content: flex-end; width: fit-content; }
.star-picker input { position: absolute; opacity: 0; pointer-events: none; }
.star-picker label { color: #cfcbd8; font-size: 27px; line-height: 1; cursor: pointer; }
.star-picker label:hover, .star-picker label:hover ~ label, .star-picker input:checked ~ label { color: var(--commerce-gold); }
.review-form button { min-height: 49px; border: 0; border-radius: 6px; color: #fff; background: var(--violet-deep); font-weight: 800; cursor: pointer; }
.review-note { margin: 0; color: var(--muted); font-size: 11px; }
.book-sequence { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 25px 0 88px; border-top: 1px solid var(--line); }
.book-sequence a { color: var(--muted); font-size: 12px; font-weight: 750; }
.book-sequence a:nth-child(2) { min-height: 43px; display: inline-flex; align-items: center; padding-inline: 16px; border: 1px solid var(--line); border-radius: 6px; color: var(--violet-deep); background: #fff; }
.book-sequence a:last-child { text-align: right; }
.book-sequence a:hover { color: var(--violet-deep); }

.utility-hero { padding-block: 54px; color: #fff; background: #17142d; }
.utility-hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(45px, 6vw, 67px); font-weight: 500; letter-spacing: -.035em; }
.utility-hero p { margin: 10px 0 0; color: rgba(255,255,255,.66); }

.cart-section { padding-block: 68px 96px; }
.cart-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr); gap: 28px; align-items: start; }
.cart-panel, .cart-summary { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.cart-panel-head { display: flex; justify-content: space-between; gap: 20px; padding: 22px 25px; border-bottom: 1px solid var(--line); }
.cart-panel-head h2, .cart-summary h2 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 600; }
.cart-panel-head span { color: var(--muted); font-size: 13px; }
.cart-items { padding: 0 25px; }
.cart-item { display: grid; grid-template-columns: 82px 1fr auto; gap: 18px; align-items: center; padding-block: 23px; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item img { width: 82px; aspect-ratio: 2 / 3; object-fit: cover; background: #eeeaf8; }
.cart-item-kind { color: var(--violet-deep); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; }
.cart-item h3 { margin: 4px 0 8px; font-family: var(--serif); font-size: 20px; line-height: 1.2; }
.cart-item p { margin: 0; color: var(--ink); font-weight: 750; }
.cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cart-quantity { display: grid; grid-template-columns: 30px 33px 30px; align-items: center; min-height: 38px; border: 1px solid var(--line); border-radius: 5px; }
.cart-quantity button { height: 100%; border: 0; color: var(--violet-deep); background: transparent; cursor: pointer; }
.cart-quantity span { text-align: center; font-size: 13px; font-weight: 800; }
.cart-remove { border: 0; padding: 0; color: var(--muted); background: transparent; font-size: 11px; text-decoration: underline; cursor: pointer; }
.cart-empty { padding: 68px 26px; text-align: center; }
.cart-empty svg { width: 44px; height: 44px; fill: none; stroke: var(--violet-deep); stroke-width: 1.5; }
.cart-empty h2 { margin: 18px 0 7px; font-family: var(--serif); font-size: 29px; }
.cart-empty p { margin: 0 0 24px; color: var(--muted); }
.cart-empty a { display: inline-flex; min-height: 47px; align-items: center; padding-inline: 19px; border-radius: 6px; color: #fff; background: var(--violet-deep); font-size: 13px; font-weight: 800; }
.cart-summary { position: sticky; top: 24px; padding: 25px; }
.summary-lines { margin-top: 20px; border-top: 1px solid var(--line); }
.summary-line { display: flex; justify-content: space-between; gap: 20px; padding-block: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.summary-line strong { color: var(--ink); }
.summary-total { font-size: 17px; }
.promo-field { margin-top: 22px; }
.promo-field label { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.promo-field div { display: grid; grid-template-columns: 1fr auto; }
.promo-field input { min-width: 0; height: 43px; padding-inline: 12px; border: 1px solid var(--line); border-radius: 5px 0 0 5px; background: #f5f3f9; }
.promo-field button { border: 0; border-radius: 0 5px 5px 0; color: #918d9d; background: #e8e5ed; font-size: 11px; font-weight: 800; }
.promo-note { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.checkout-button { width: 100%; min-height: 53px; margin-top: 22px; border: 0; border-radius: 7px; color: #fff; background: linear-gradient(135deg, #4e2cff, #8b35ee); font-weight: 850; cursor: pointer; }
.checkout-button:disabled { opacity: .45; cursor: not-allowed; }
.continue-shopping { display: block; margin-top: 15px; color: var(--violet-deep); text-align: center; font-size: 12px; font-weight: 800; }
.secure-note { display: flex; gap: 8px; margin: 19px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; }
.secure-note svg { flex: 0 0 auto; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.checkout-dialog { width: min(520px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 14px; color: var(--ink); background: #fff; box-shadow: 0 32px 90px rgba(10,7,28,.4); }
.checkout-dialog::backdrop { background: rgba(17,13,39,.72); backdrop-filter: blur(4px); }
.checkout-dialog-inner { padding: 34px; }
.checkout-dialog .catalog-badge { margin-bottom: 18px; }
.checkout-dialog h2 { margin: 0; font-family: var(--serif); font-size: 34px; line-height: 1.1; }
.checkout-dialog p { color: var(--muted); }
.checkout-dialog ul { padding-left: 19px; color: var(--ink-soft); font-size: 14px; }
.checkout-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 25px; }
.checkout-dialog-actions button, .checkout-dialog-actions a { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.checkout-dialog-actions a { color: #fff; border-color: var(--violet-deep); background: var(--violet-deep); }

.account-shell { padding-block: 72px 100px; }
.account-card { display: grid; grid-template-columns: .78fr 1.22fr; min-height: 600px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.account-aside { position: relative; padding: 50px 42px; overflow: hidden; color: #fff; background: #17142d; }
.account-aside::after { content: ""; position: absolute; width: 340px; height: 340px; right: -210px; bottom: -180px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 60px rgba(109,49,242,.1); }
.account-aside h1 { margin: 0; font-family: var(--serif); font-size: 48px; font-weight: 500; line-height: 1.04; }
.account-aside p { color: rgba(255,255,255,.67); }
.account-points { display: grid; gap: 16px; margin-top: 42px; }
.account-points span { display: flex; gap: 13px; align-items: center; color: rgba(255,255,255,.78); font-size: 13px; }
.account-points b { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(143,91,255,.28); }
.account-form-area { padding: 48px clamp(30px, 5vw, 60px); }
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 35px; border-bottom: 1px solid var(--line); }
.account-tabs button { padding: 0 0 14px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-weight: 800; cursor: pointer; }
.account-tabs button[aria-selected="true"] { color: var(--violet-deep); border-bottom-color: var(--violet-deep); }
.account-pane[hidden] { display: none; }
.account-pane h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 35px; font-weight: 600; }
.account-pane > p { margin: 0 0 28px; color: var(--muted); }
.account-form { display: grid; gap: 14px; }
.account-form label { color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.account-form input { width: 100%; height: 49px; padding-inline: 14px; border: 1px solid var(--line); border-radius: 6px; outline: 0; }
.account-form input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109,49,242,.1); }
.account-form button { min-height: 50px; margin-top: 4px; border: 0; border-radius: 6px; color: #fff; background: var(--violet-deep); font-weight: 800; cursor: pointer; }
.account-help { margin-top: 17px; color: var(--muted); font-size: 11px; }
.oauth-choice { margin-bottom: 28px; }
.oauth-choice p { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; margin: 15px 0 0; color: var(--muted); font-size: 12px; }
.oauth-choice p::before, .oauth-choice p::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.oauth-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.oauth-buttons button { min-height: 47px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.oauth-buttons button:hover { border-color: rgba(109,49,242,.45); background: #f8f6ff; }
.oauth-buttons svg { width: 18px; height: 18px; }
.dashboard-shell { padding-block: 65px 100px; }
.dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.dashboard-head h1 { margin: 0; font-family: var(--serif); font-size: clamp(45px, 6vw, 68px); font-weight: 500; line-height: 1; }
.dashboard-head p { margin: 12px 0 0; color: var(--muted); }
.dashboard-head a { color: var(--violet-deep); font-size: 12px; font-weight: 800; }
.dashboard-grid { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: 22px; align-items: start; }
.dashboard-tabs { position: sticky; top: 24px; display: grid; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.dashboard-tabs button { min-height: 47px; padding-inline: 13px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; text-align: left; font-weight: 750; cursor: pointer; }
.dashboard-tabs button[aria-selected="true"] { color: #fff; background: var(--violet-deep); }
.dashboard-panel { min-height: 460px; padding: clamp(28px, 5vw, 50px); border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.dashboard-panel[hidden] { display: none; }
.dashboard-panel h2 { margin: 0; font-family: var(--serif); font-size: 34px; font-weight: 600; }
.dashboard-panel > p { color: var(--muted); }
.dashboard-empty { display: grid; place-items: center; min-height: 270px; margin-top: 28px; padding: 30px; border: 1px dashed rgba(109,49,242,.25); border-radius: 9px; background: #f8f6ff; text-align: center; }
.dashboard-empty svg { width: 38px; height: 38px; fill: none; stroke: var(--violet-deep); stroke-width: 1.5; }
.dashboard-empty strong { display: block; margin-top: 15px; font-family: var(--serif); font-size: 23px; }
.dashboard-empty p { max-width: 430px; margin: 7px 0 18px; color: var(--muted); font-size: 13px; }
.dashboard-empty a { color: var(--violet-deep); font-size: 12px; font-weight: 800; }
.profile-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 28px; }
.profile-form label { color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.profile-form input { width: 100%; height: 48px; margin-top: 6px; padding-inline: 13px; border: 1px solid var(--line); border-radius: 6px; }
.profile-form label:last-of-type { grid-column: 1 / -1; }
.profile-form button { width: fit-content; min-height: 46px; padding-inline: 18px; border: 0; border-radius: 6px; color: #fff; background: var(--violet-deep); font-weight: 800; }

.footer.footer-dark { color: rgba(255,255,255,.6); background: #17142d; }
.footer.footer-dark .footer-about h2, .footer.footer-dark .footer-links strong { color: #fff; }
.footer.footer-dark .footer-links a { color: rgba(255,255,255,.72); }
.footer.footer-dark .footer-links a:hover { color: #fff; }
.footer.footer-dark .footer-bottom { border-top-color: rgba(255,255,255,.12); }

@media (max-width: 980px) {
  .shop-intro { grid-template-columns: 1fr; gap: 15px; }
  .goodies-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-layout { grid-template-columns: 1fr; gap: 28px; }
  .legal-nav { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-nav strong { grid-column: 1 / -1; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-detail { grid-template-columns: minmax(250px, .7fr) minmax(0, 1.3fr); gap: 40px; }
  .book-detail-copy h1 { font-size: 48px; }
  .book-meta { grid-template-columns: 1fr 1fr; }
  .book-meta div:nth-child(3n) { border-right: 1px solid var(--line); }
  .book-meta div:nth-child(2n) { border-right: 0; }
  .book-meta div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .book-meta div:nth-last-child(-n+2) { border-bottom: 0; }
  .book-description-grid { grid-template-columns: 1fr 2fr; gap: 50px; }
  .cart-grid { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}

@media (max-width: 720px) {
  .commerce-wrap, .commerce-narrow { width: min(100% - 32px, 1120px); }
  .store-hero { min-height: 205px; }
  .store-hero-inner { padding-block: 32px 37px; }
  .store-hero h1 { font-size: 48px; }
  .store-hero p:not(.eyebrow) { margin-top: 13px; font-size: 14px; line-height: 1.5; }
  .shop-hero { min-height: 178px; }
  .shop-hero .store-hero-inner { padding-block: 31px 35px; }
  .shop-hero h1 { font-size: 46px; }
  .shop-intro { padding-block: 34px 25px; }
  .shop-intro h2 { font-size: 32px; }
  .shop-opening { align-items: flex-start; flex-direction: column; margin-bottom: 65px; padding: 23px; }
  .product-visual { position: static; min-height: 390px; }
  .legal-hero { min-height: 160px; }
  .legal-hero-inner { padding-block: 30px 33px; }
  .legal-layout { padding-block: 38px 72px; }
  .catalog-intro { padding-block: 34px 24px; }
  .catalog-intro h2 { font-size: 31px; line-height: 1.13; }
  .catalog-facts { border-left: 0; }
  .catalog-facts div { padding-left: 0; }
  .catalog-conclusion { padding-block: 24px; }
  .catalog-conclusion div + div { padding-left: 20px; }
  .catalog-grid { gap: 12px; }
  .catalog-cover-link { padding: 13px 13px 0; }
  .catalog-card-body { padding: 18px 14px 16px; }
  .catalog-card h2 { font-size: 20px; }
  .catalog-price { font-size: 20px; }
  .catalog-actions { grid-template-columns: 1fr 42px; }
  .book-detail-hero { padding-block: 26px; }
  .book-detail { grid-template-columns: 1fr; padding-block: 48px 65px; }
  .book-gallery { position: static; width: min(74vw, 390px); margin-inline: auto; }
  .book-detail-copy { padding-top: 0; }
  .book-detail-copy h1 { font-size: 47px; }
  .book-promise { font-size: 19px; }
  .book-description { padding-block: 70px; }
  .book-description-grid { grid-template-columns: 1fr; gap: 32px; }
  .book-description h2 { position: static; font-size: 43px; }
  .book-description-copy p { font-size: 18px; }
  .book-sharing { align-items: flex-start; flex-direction: column; }
  .reviews-heading, .reviews-layout { grid-template-columns: 1fr; }
  .reviews-heading { gap: 13px; }
  .reviews-empty { min-height: 260px; }
  .account-card { grid-template-columns: 1fr; }
  .account-aside { padding: 28px 26px 25px; }
  .account-aside .eyebrow { margin-bottom: 10px; }
  .account-aside h1 { max-width: 430px; font-size: 31px; }
  .account-aside > p:not(.eyebrow) { margin: 10px 0 0; font-size: 14px; line-height: 1.5; }
  .account-points { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-tabs { position: static; grid-template-columns: repeat(5, minmax(max-content, 1fr)); overflow-x: auto; }
  .dashboard-tabs button { text-align: center; }
}

@media (max-width: 520px) {
  .goodies-grid { grid-template-columns: 1fr; }
  .goodie-card { display: grid; grid-template-columns: 38% 62%; }
  .goodie-visual { height: 100%; aspect-ratio: auto; min-height: 185px; }
  .goodie-visual span { font-size: 20px; }
  .account-flow-shell { padding-block: 38px 65px; }
  .account-flow-heading { padding: 25px 22px 22px; }
  .account-flow-body { padding: 27px 22px 30px; }
  .account-flow-links { flex-direction: column; }
  .legal-nav { grid-template-columns: 1fr; }
  .legal-nav strong { grid-column: auto; }
  .legal-body h2 { font-size: 25px; }
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-card { display: grid; grid-template-columns: 42% 58%; }
  .catalog-cover-link { padding: 12px; }
  .catalog-card-body { min-width: 0; }
  .catalog-card h2 { font-size: 19px; }
  .catalog-author { display: none; }
  .catalog-price { padding-top: 14px; }
  .catalog-actions { grid-template-columns: 1fr 40px; margin-top: 11px; }
  .pagination { padding-bottom: 38px; }
  .book-detail-copy h1 { font-size: 42px; }
  .purchase-row { grid-template-columns: 1fr; }
  .quantity-control { width: 92px; }
  .book-meta { grid-template-columns: 1fr 1fr; }
  .book-meta div { min-height: 76px; padding: 13px 11px; }
  .book-sharing { padding-block: 28px; }
  .share-actions { gap: 5px; }
  .share-actions button { width: 38px; height: 38px; }
  .reviews-section { padding-block: 66px 78px; }
  .reviews-empty, .review-form { padding: 27px 22px; }
  .cart-section { padding-block: 42px 75px; }
  .cart-panel-head { padding: 18px; }
  .cart-items { padding: 0 18px; }
  .cart-item { grid-template-columns: 64px 1fr; gap: 13px; }
  .cart-item img { width: 64px; }
  .cart-item-actions { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
  .checkout-dialog-inner { padding: 27px 22px; }
  .checkout-dialog-actions { grid-template-columns: 1fr; }
  .account-shell { padding-block: 45px 75px; }
  .account-form-area { padding: 34px 22px; }
  .oauth-buttons { grid-template-columns: 1fr; }
  .dashboard-head { display: block; }
  .dashboard-head a { display: inline-block; margin-top: 16px; }
  .dashboard-panel { padding: 25px 20px; }
  .profile-form { grid-template-columns: 1fr; }
  .profile-form label:last-of-type { grid-column: auto; }
  .book-sequence { grid-template-columns: 1fr 1fr; padding-bottom: 70px; }
  .book-sequence a:nth-child(2) { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .cover-switch img { transition: none; }
}
