.qbv-body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--arkay-bg);
  color: var(--arkay-text);
  font-family: var(--font-body);
}

.qbv-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.qbv-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 2rem;
  background: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--arkay-border);
}

.qbv-logo {
  width: 95px;
}

.qbv-topbar__controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.qbv-icon-btn {
  position: relative;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--arkay-border);
  border-radius: 999px;
  background: var(--arkay-white);
  color: var(--arkay-text);
  font-size: 1rem;
  cursor: pointer;
  transition: all 160ms ease;
  display: grid;
  place-items: center;
}

.qbv-icon-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 24px rgba(46, 38, 30, 0.18);
  transform: translateY(-1px);
}

.qbv-icon-btn:focus-visible {
  outline: 2px solid #0f2449;
  outline-offset: 2px;
}

.qbv-icon {
  width: 18px;
  height: 18px;
  display: block;
  background-color: currentColor;
  -webkit-mask: var(--qbv-icon) no-repeat center / contain;
  mask: var(--qbv-icon) no-repeat center / contain;
}

.qbv-icon--download {
  --qbv-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M12 3a1 1 0 0 1 1 1v8.59l2.3-2.3a1 1 0 1 1 1.4 1.42l-4.01 4.01a1 1 0 0 1-1.4 0L7.28 11.7a1 1 0 1 1 1.41-1.42L11 12.6V4a1 1 0 0 1 1-1Zm-7 14a1 1 0 0 1 1 1v1h12v-1a1 1 0 1 1 2 0v2a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1Z'/></svg>");
}

.qbv-icon--share {
  --qbv-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M18 8a3 3 0 1 0-2.82-4H9a1 1 0 1 0 0 2h6.18A3 3 0 0 0 18 8ZM6 11a3 3 0 1 0 2.82 4H15a1 1 0 1 0 0-2H8.82A3 3 0 0 0 6 11Zm12 5a3 3 0 0 0-2.82 2H9a1 1 0 1 0 0 2h6.18A3 3 0 1 0 18 16Z'/></svg>");
}

.qbv-icon--cart {
  --qbv-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M6.2 6h13.1a1 1 0 0 1 .98 1.2l-1.5 7.5a2 2 0 0 1-1.96 1.6H9a2 2 0 0 1-1.96-1.6L5.3 6.8 4.4 4H3a1 1 0 0 1 0-2h2.2a1 1 0 0 1 .96.74L6.2 6Zm3.2 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Zm8 0a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z'/></svg>");
}

.qbv-icon--menu {
  --qbv-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M4 6a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Zm0 6a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1Zm1 5a1 1 0 0 0 0 2h14a1 1 0 1 0 0-2H5Z'/></svg>");
}

.qbv-icon--chevron-left {
  --qbv-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M15.7 5.3a1 1 0 0 1 0 1.4L10.4 12l5.3 5.3a1 1 0 0 1-1.4 1.4l-6-6a1 1 0 0 1 0-1.4l6-6a1 1 0 0 1 1.4 0Z'/></svg>");
}

.qbv-icon--chevron-right {
  --qbv-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M8.3 18.7a1 1 0 0 1 0-1.4L13.6 12 8.3 6.7a1 1 0 0 1 1.4-1.4l6 6a1 1 0 0 1 0 1.4l-6 6a1 1 0 0 1-1.4 0Z'/></svg>");
}

.qbv-icon--trash {
  --qbv-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 3a1 1 0 0 0-1 1v1H5a1 1 0 1 0 0 2h1l1 12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-12h1a1 1 0 1 0 0-2h-3V4a1 1 0 0 0-1-1H9Zm2 4a1 1 0 0 1 2 0v9a1 1 0 1 1-2 0V7Zm-3 0a1 1 0 0 1 2 0v9a1 1 0 1 1-2 0V7Zm7 0a1 1 0 0 1 2 0v9a1 1 0 1 1-2 0V7Z'/></svg>");
}

.qbv-icon--check {
  --qbv-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9.2 16.2 4.9 11.9a1 1 0 1 1 1.4-1.4l2.9 2.9 8.5-8.5a1 1 0 0 1 1.4 1.4l-9.9 9.9a1 1 0 0 1-1.4 0Z'/></svg>");
}

.qbv-topbar__counter {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #e9ecf1;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 0.5rem;
}

.qbv-page-input {
  width: 2rem;
  padding: 0.05rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  color: #e9ecf1;
}

.qbv-page-input:focus {
  outline: none;
  border-color: #0f2449;
}
/* The original letter-spacing and font-size from .qbv-topbar__counter were removed as they are now defined in the new .qbv-topbar__counter block. */

.qbv-cart-badge {
  position: absolute;
  top: -0.2rem;
  right: -0.2rem;
  min-width: 1.3rem;
  height: 1.3rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #0c1f3e;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.3rem;
}

.qbv-stage {
  flex: 1;
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: stretch;
}

.qbv-book {
  position: relative;
  padding: 1rem 0 1.2rem;
}

.qbv-spread-surface {
  max-width: 1120px;
  margin: 0 auto 1.25rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-radius: 1.4rem;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(46, 38, 30, 0.25);
  perspective: 2000px;
  position: relative;
}

.qbv-spread-surface::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 40px;
  background: linear-gradient(to right, 
    rgba(0,0,0,0.15) 0%, 
    rgba(0,0,0,0.05) 45%, 
    transparent 50%, 
    rgba(0,0,0,0.05) 55%, 
    rgba(0,0,0,0.15) 100%);
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.qbv-spread-surface::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(0,0,0,0.25);
  transform: translateX(-50%);
  z-index: 11;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  pointer-events: none;
}

.qbv-spread-surface.is-flipping-next {
  animation: qbv-fold-out-next 0.4s ease-in forwards;
}
.qbv-spread-surface.is-flipping-prev {
  animation: qbv-fold-out-prev 0.4s ease-in forwards;
}
.qbv-spread-surface.is-entering-next {
  animation: qbv-fold-in-next 0.4s ease-out forwards;
}
.qbv-spread-surface.is-entering-prev {
  animation: qbv-fold-in-prev 0.4s ease-out forwards;
}

@keyframes qbv-fold-out-next {
  0% { transform: scale(1) rotateY(0); opacity: 1; }
  100% { transform: scale(0.95) rotateY(-15deg) translateX(-10%); opacity: 0; }
}
@keyframes qbv-fold-in-next {
  0% { transform: scale(0.95) rotateY(15deg) translateX(10%); opacity: 0; }
  100% { transform: scale(1) rotateY(0) translateX(0); opacity: 1; }
}
@keyframes qbv-fold-out-prev {
  0% { transform: scale(1) rotateY(0); opacity: 1; }
  100% { transform: scale(0.95) rotateY(15deg) translateX(10%); opacity: 0; }
}
@keyframes qbv-fold-in-prev {
  0% { transform: scale(0.95) rotateY(-15deg) translateX(-10%); opacity: 0; }
  100% { transform: scale(1) rotateY(0) translateX(0); opacity: 1; }
}

.qbv-page {
  position: relative;
  background: var(--arkay-white);
}

.qbv-page__frame {
  position: relative;
  aspect-ratio: 0.75 / 1;
}

.qbv-page__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qbv-page-number {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  min-width: 1.75rem;
  padding: 0.25rem 0.45rem;
  border-radius: 0.5rem;
  background: rgba(11, 12, 16, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e9ecf1;
  font-weight: 700;
}

.qbv-hotspot-layer {
  position: absolute;
  inset: 0;
}

.qbv-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  background: var(--arkay-accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(166, 124, 82, 0.6);
  animation: qbv-pulse 2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.qbv-hotspot:hover {
  box-shadow: 0 14px 30px rgba(12, 21, 42, 0.28);
  transform: translate(-50%, -50%) scale(1.08);
}

.qbv-hotspot__icon {
  width: 18px;
  height: 18px;
  background-color: #fff;
  -webkit-mask: var(--qbv-icon) no-repeat center / contain;
  mask: var(--qbv-icon) no-repeat center / contain;
  --qbv-icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M6.2 6h13.1a1 1 0 0 1 .98 1.2l-1.5 7.5a2 2 0 0 1-1.96 1.6H9a2 2 0 0 1-1.96-1.6L5.3 6.8 4.4 4H3a1 1 0 0 1 0-2h2.2a1 1 0 0 1 .96.74L6.2 6Zm3.2 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Zm8 0a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z'/></svg>");
}

@keyframes qbv-pulse {
  0% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(166, 124, 82, 0.7); }
  70% { transform: translate(-50%, -50%) scale(1.3); box-shadow: 0 0 0 20px rgba(166, 124, 82, 0); }
  100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(166, 124, 82, 0); }
}

.qbv-hotspot__tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(11, 12, 16, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
  z-index: 10;
}

.qbv-hotspot__tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(11, 12, 16, 0.9);
}

.qbv-hotspot:hover .qbv-hotspot__tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.qbv-hotspot__tooltip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.qbv-nav {
  border: 0;
  background: rgba(255, 255, 255, 0.7);
  font-size: 2.4rem;
  cursor: pointer;
  color: #1e1a15;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  margin: auto;
  box-shadow: 0 10px 24px rgba(41, 34, 26, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.qbv-nav:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px rgba(41, 34, 26, 0.22);
}

.qbv-floating-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}

.qbv-size-dropdown,
.qbv-cart-preview {
  position: absolute;
  pointer-events: auto;
  background: rgba(253, 251, 247, 0.98);
  backdrop-filter: blur(10px);
  border: 1px solid var(--arkay-border);
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(74, 62, 55, 0.15);
}

.qbv-size-dropdown {
  min-width: 140px;
  width: max-content;
  overflow: hidden;
}

.qbv-size-option {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  text-align: left;
  color: #e9ecf1;
  font-size: 0.95rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease;
}

.qbv-size-option:hover {
  background: rgba(255, 255, 255, 0.6);
}

.qbv-size-option:focus-visible,
.qbv-menu-link:focus-visible,
.qbv-toc-item:focus-visible {
  outline: 2px solid #0f2449;
  outline-offset: -2px;
}

.qbv-cart-preview {
  right: 1.5rem;
  top: 4.9rem;
  width: min(420px, calc(100vw - 2rem));
  padding: 1.2rem;
}

.qbv-cart-preview__head {
  font-weight: 700;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.qbv-cart-preview__subtotal,
.qbv-cart-summary > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.qbv-qty {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.qbv-qty button {
  border: 0;
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
}

.qbv-drawer,
.qbv-modal {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 60;
}

.qbv-drawer.is-open,
.qbv-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.qbv-drawer::before,
.qbv-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(18, 16, 14, 0.22);
}

.qbv-drawer__panel,
.qbv-modal__sheet {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(470px, 100vw);
  background: var(--arkay-bg);
  box-shadow: -24px 0 48px rgba(74, 62, 55, 0.15);
  color: var(--arkay-text);
}

.qbv-drawer__panel {
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.qbv-drawer__head,
.qbv-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.qbv-drawer__head--center h2 {
  margin-inline: auto;
}

.qbv-close-btn {
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}

.qbv-menu-links,
.qbv-toc-list,
.qbv-cart-body {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
}

.qbv-menu-link,
.qbv-toc-item {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  text-align: left;
  padding: 0.85rem 0.2rem;
  font-size: 1rem;
  color: #e9ecf1;
  cursor: pointer;
}

.qbv-cart-item {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.qbv-cart-item__photo {
  width: 86px;
  height: 110px;
  object-fit: cover;
  border-radius: 0.9rem;
}

.qbv-cart-item__copy h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display, "Space Grotesk", sans-serif);
  font-size: 0.98rem;
}

.qbv-cart-item__copy p {
  margin: 0.2rem 0;
  color: #625a51;
}

.qbv-cart-item__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.8rem;
}

.qbv-icon-link {
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.qbv-inline-icon {
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: var(--qbv-icon) no-repeat center / contain;
  mask: var(--qbv-icon) no-repeat center / contain;
}

.qbv-cart-summary {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(47, 42, 36, 0.08);
}

.qbv-cart-summary__actions {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.qbv-cart-empty {
  padding: 2rem 0;
}

.qbv-modal__sheet {
  top: 50%;
  left: 50%;
  bottom: auto;
  width: min(520px, calc(100vw - 2rem));
  padding: 1.25rem;
  transform: translate(-50%, -50%);
  border-radius: 1.3rem;
}

.qbv-modal__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7f756a;
  font-size: 0.75rem;
}

.qbv-lead-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.qbv-lead-form label {
  display: grid;
  gap: 0.5rem;
}

.qbv-lead-form input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  color: #e9ecf1;
}

.qbv-toast {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(16, 26, 54, 0.92);
  color: #fff;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  z-index: 45;
}

@media (max-width: 900px) {
  .qbv-stage {
    grid-template-columns: 46px 1fr 46px;
  }

  .qbv-spread-surface {
    grid-template-columns: 1fr;
    margin-inline: 0.75rem;
    border-radius: 1rem;
    box-shadow: 0 15px 35px rgba(63, 53, 43, 0.12);
  }

  .qbv-page__frame {
    aspect-ratio: auto;
    min-height: 60vh;
  }

  .qbv-logo {
    width: 104px;
  }

  .qbv-topbar__counter {
    min-width: 5rem;
    font-size: 0.92rem;
  }

  .qbv-cart-item {
    grid-template-columns: 72px 1fr;
  }

  .qbv-cart-item__actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}


/* UNIFIED NAVIGATION FOR CATALOG */
.qbv-topbar .nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0 auto;
}

.qbv-topbar .nav-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.qbv-topbar .nav-link:hover {
    color: white;
}

