/* The English digital books pages (src/pages/digital.mjs): the list, /digital, and each book's own
   page, /digital/{slug}. Loaded on those pages only; the Albanian page (/sq/digital) keeps main.css's
   .dbooks__* look. These began as "Digital Books 2" (/digital/v2, 2026-11-27), which the user chose
   over the first version on 2026-11-28 ("version 2 will be the one we use moving forward").

   THE LIST, /digital (the user, 2026-11-27: "Let's make this page much more simple. Let's make all
   books an easy preview and let's do 2 books per row"): a short heading, then the ten books two to a
   row at every width, each one a tile: its cover, its name, the price, Preview and Add. */

/* The heading, as compact as the book pages' (main.css .dchoose__hero), so the first books show on
   the first screen. */
.dgrid__hero { padding: clamp(98px, 13vh, 140px) 0 clamp(1.2rem, 2.8vw, 2rem); }
.dgrid__hero .phero__title { margin: 0.45rem auto 0.35rem; font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
.dgrid__hero .phero__wave { display: none; }

.dgrid { padding-block: 0 clamp(4.5rem, 9vw, 7rem); }
.dgrid__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2.2vw, 26px); max-width: 50rem; margin-inline: auto; }

/* One book. Its buttons sit at the bottom, so they line up across a row when a name takes two lines. */
.dgrid__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: clamp(14px, 2.6vw, 28px) clamp(12px, 2.4vw, 28px) clamp(14px, 2.4vw, 26px);
  border-radius: clamp(22px, 3vw, 32px);
  background: var(--tint);
  text-align: center;
  transition: box-shadow 0.6s var(--ease), translate 0.6s var(--ease);
}
.dgrid__card:hover { translate: 0 -4px; box-shadow: var(--shadow-lg); }
.dgrid__cover { display: block; width: min(88%, 13.5rem); margin-bottom: clamp(12px, 2.2vw, 22px); }
.dgrid__title { font-family: var(--font-display); font-variation-settings: 'SOFT' 100; font-size: clamp(1rem, 2.4vw, 1.45rem); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
.dgrid__price { margin-top: 0.2rem; font-family: var(--font-display); font-size: clamp(0.98rem, 2vw, 1.2rem); color: var(--ink-2); }
.dgrid__actions { display: grid; gap: 8px; width: 100%; margin-top: auto; padding-top: clamp(10px, 1.8vw, 16px); }
.dgrid__btn { justify-content: center; width: 100%; }
/* Wide enough for Preview and Add side by side. */
@media (min-width: 720px) { .dgrid__actions { grid-template-columns: 1fr 1fr; } }
/* Phones: one button above the other, a little smaller. */
@media (max-width: 700px) {
  .dgrid__btn { height: 40px; padding: 0 0.9em; gap: 0.5em; font-size: 0.9rem; }
}
.dgrid__note { margin-top: 2rem; text-align: center; color: var(--ink-2); }

/* EACH BOOK'S OWN PAGE, /digital/{slug} (its cards are main.css .vcard, the Immersive one first). */

/* Each card's Preview button sits in the middle of its column (the user, 2026-11-28: "Can we try
   centering both buttons"). The name and the line above it stay as they were. */
.page-dchoose .vcard .btn { align-self: center; }

/* The buy box under the cards (main.css .dchoose__buy keeps its white card and outline), all from the
   user, 2026-11-28: the book's cover on the left; everything else lined up on the right ("align
   everything right, except for book image"): "For both digital versions" level with the top of the
   cover, and the price just left of Add Digital Book level with its bottom ("slightly lower to align
   with bottom of book"); taller, with more room above and below ("Increase the height of it to add
   some space"). The row's margin is the least space between the words and the row. If the button has
   to drop under the price (320px phones), it still sits on the right. */
.page-dchoose .dchoose__buy { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(0.85rem, 2.4vw, 1.4rem); padding: clamp(1.5rem, 3.4vw, 2rem) clamp(0.85rem, 2.2vw, 1.2rem); }
.dbuy__cover { width: clamp(64px, 11vw, 92px); }
.dbuy__body { display: flex; flex-direction: column; justify-content: space-between; align-self: stretch; text-align: right; }
.dbuy__desc { color: var(--ink-2); line-height: 1.3; }
.dbuy__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem 0.8rem; margin-top: 0.65rem; }
.dbuy__price { line-height: 1; }
/* Under the buy box (the user, 2026-11-28: "Leave some more space below add to cart area before this
   text. Center the text. Make it two lines. Then also center the button below and make it slightly
   wider"): more room above the note, the note's two lines centered, and the All Digital Books button
   centered and a little wider. */
.page-dchoose .dchoose__note { margin-top: clamp(2.2rem, 5vw, 3rem); text-align: center; }
.page-dchoose .dchoose__back { text-align: center; }
.page-dchoose .dchoose__back .btn { min-width: 13rem; justify-content: center; }
/* Phones: a smaller button, so the price and the button share the row. */
@media (max-width: 700px) {
  .dbuy .dbooks__add { height: 44px; padding: 0 1em; gap: 0.45em; font-size: 0.9rem; }
  .dbuy__price { font-size: 1.3rem; }
}
/* Narrower phones (most Androids are 360px wide): a smaller cover, price and gaps, so the row fits. */
@media (max-width: 380px) {
  .page-dchoose .dchoose__buy { gap: 0.7rem; }
  .dbuy__cover { width: 60px; } /* tall enough for the words and the row, so the row meets its bottom */
  .dbuy__row { gap: 0.5rem; }
  .dbuy .dbooks__add { padding: 0 0.9em; }
  .dbuy__price { font-size: 1.15rem; }
}
