:root {
  --ink: #132238;
  --primary: #6c4df6;
  --primary-dark: #5137d8;
  --accent: #ffcf5c;
  --bg: #f7f8fc;
  --muted: #667085;
  --white: #fff;
  --border: #e4e7ec;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
}
a {
  color: inherit;
  text-decoration: none;
}
.container {
  width: min(1120px, 92%);
  margin: auto;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.55rem;
  font-weight: 900;
}
.logo span {
  color: var(--primary);
}
.main-nav {
  display: flex;
  gap: 22px;
  align-items: center;
}
.main-nav a:hover {
  color: var(--primary);
}
.cart-link {
  background: var(--ink);
  color: #fff !important;
  padding: 9px 14px;
  border-radius: 10px;
}
.nav-toggle {
  display: none;
  border: 0;
  background: none;
  font-size: 1.5rem;
}
.hero {
  background: linear-gradient(135deg, #f1efff, #fff8e5);
  padding: 86px 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 60px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.7rem, 6vw, 5rem);
  line-height: 1.02;
  margin: 12px 0 20px;
  max-width: 760px;
}
.hero p {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 640px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--primary);
}
.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}
.btn,
.small-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  border-radius: 10px;
  padding: 13px 20px;
}
.btn:hover,
.small-btn:hover {
  background: var(--primary-dark);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.hero-card {
  background: var(--ink);
  color: #fff;
  padding: 38px;
  border-radius: 24px;
  box-shadow: 0 25px 60px #45506b35;
}
.floating-book {
  height: 190px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--primary), #9f88ff);
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 18px 18px 0 var(--accent);
  margin-bottom: 36px;
}
.section {
  padding: 76px 0;
}
.muted {
  background: var(--bg);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 32px;
}
.section-heading h2,
.page-banner h1 {
  font-size: 2.25rem;
  margin: 4px 0;
}
.category-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.category-card,
.stats-grid > div {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: 0.2s;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px #20304a12;
}
.category-card h3 {
  margin: 0;
}
.category-card p {
  color: var(--muted);
  margin: 4px 0;
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.book-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}
.book-card img {
  width: 100%;
  height: auto;
  display: block;
  background: #f3f4f6;
}
.book-info {
  padding: 20px;
}
.book-info > span {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 800;
}
.book-info h3 {
  margin: 6px 0;
}
.book-info p {
  margin: 0;
  color: var(--muted);
}
.book-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
}
.small-btn {
  padding: 8px 12px;
  font-size: 0.82rem;
}
.newsletter {
  padding: 60px 0;
}
.newsletter-box {
  background: var(--ink);
  color: #fff;
  border-radius: 24px;
  padding: 42px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
}
.newsletter form,
.filter-bar {
  display: flex;
  gap: 10px;
}
.newsletter input,
.filter-bar input,
.filter-bar select,
label input,
label select,
label textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  background: #fff;
}
.newsletter input {
  min-width: 300px;
}
.site-footer {
  background: #0c1728;
  color: #cbd5e1;
  padding-top: 54px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.footer-grid a {
  display: block;
  margin: 7px 0;
}
.light {
  color: #fff;
}
.copyright {
  text-align: center;
  border-top: 1px solid #263244;
  margin-top: 40px;
  padding: 18px;
}
.page-banner {
  background: var(--bg);
  padding: 45px 0;
}
.filter-bar {
  margin-bottom: 30px;
}
.filter-bar input {
  flex: 1;
}
.product-layout {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 60px;
}
.product-cover img {
  width: 100%;
  border-radius: 20px;
}
.product-details h1 {
  font-size: 3rem;
  line-height: 1.1;
  margin: 10px 0;
}
.author {
  color: var(--muted);
}
.product-meta {
  display: flex;
  gap: 30px;
  margin: 24px 0;
}
.product-meta div {
  display: flex;
  flex-direction: column;
}
.price {
  font-size: 2rem;
  font-weight: 900;
  margin: 22px 0;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
th,
td {
  text-align: left;
  padding: 15px;
  border-bottom: 1px solid var(--border);
}
.cart-product {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cart-product img {
  width: 54px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}
.qty {
  width: 65px;
  padding: 8px;
}
.link-btn {
  border: 0;
  background: none;
  color: #d92d20;
  cursor: pointer;
}
.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-top: 28px;
}
.cart-summary > div {
  width: 320px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 24px;
  background: var(--bg);
  border-radius: 14px;
}
.cart-summary .btn {
  grid-column: 1/-1;
}
.empty-state,
.success-box {
  text-align: center;
  padding: 60px 20px;
}
.auth-section {
  min-height: 70vh;
  background: var(--bg);
  padding: 70px 0;
}
.auth-card,
.form-card,
.payment-card {
  width: min(540px, 92%);
  margin: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px;
}
.auth-card form,
.form-card {
  display: grid;
  gap: 16px;
}
label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}
.error,
.alert {
  padding: 13px 16px;
  border-radius: 9px;
  margin: 16px 0;
}
.error {
  background: #fee4e2;
  color: #b42318;
}
.alert {
  background: #ecfdf3;
  color: #027a48;
}
.checkout-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.checkout-item,
.checkout-total {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.checkout-total {
  font-size: 1.2rem;
}
.success-icon {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #ecfdf3;
  color: #027a48;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  margin: auto;
}
.download-list {
  display: grid;
  gap: 10px;
  max-width: 520px;
  margin: 30px auto;
}
.download-list a {
  padding: 14px;
  background: var(--bg);
  border-radius: 10px;
  color: var(--primary);
  font-weight: 800;
}
.faq-list details {
  border-bottom: 1px solid var(--border);
  padding: 18px;
}
.faq-list summary {
  font-weight: 800;
  cursor: pointer;
}
.admin-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
}
.stats-grid {
  margin: 25px 0;
}
.stats-grid span {
  display: block;
  color: var(--muted);
}
.stats-grid strong {
  font-size: 2rem;
}
.admin-form {
  width: 100%;
  margin: 20px 0 35px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.checkbox {
  display: flex;
  align-items: center;
}
.checkbox input {
  width: auto;
}
.inline {
  display: inline;
}
.contact-grid .form-card {
  width: 100%;
  margin: 0;
}
@media (max-width: 850px) {
  .nav-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 20px;
    flex-direction: column;
    border-bottom: 1px solid var(--border);
  }
  .main-nav.open {
    display: flex;
  }
  .hero-grid,
  .product-layout,
  .checkout-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .category-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .newsletter-box {
    display: block;
  }
  .newsletter form {
    margin-top: 20px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .book-grid,
  .category-grid,
  .stats-grid,
  .footer-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 55px 0;
  }
  .hero h1 {
    font-size: 2.7rem;
  }
  .newsletter form,
  .filter-bar {
    flex-direction: column;
  }
  .newsletter input {
    min-width: 0;
  }
  .section {
    padding: 52px 0;
  }
  .product-details h1 {
    font-size: 2.2rem;
  }
  .cart-summary {
    display: block;
  }
  .cart-summary > div {
    width: 100%;
    margin-top: 18px;
  }
}

.media-tabs {
  margin-top: 42px;
}
.tab-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tab-button {
  border: 1px solid var(--border);
  background: #fff;
  padding: 11px 16px;
  border-radius: 9px;
  font-weight: 800;
  cursor: pointer;
}
.tab-button.active {
  background: var(--ink);
  color: #fff;
}
.media-panel {
  display: none;
}
.media-panel.active {
  display: block;
}
.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #111;
}
.media-frame iframe,
.media-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.preview-note {
  padding: 12px 15px;
  background: #fff8e5;
  border: 1px solid #f4d98b;
  border-radius: 10px;
  margin-bottom: 14px;
}
.format-access {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 28px 0;
}
.access-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  text-align: left;
}
.access-card h3 {
  margin-top: 0;
}
.locked-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(transparent 55%, rgba(0, 0, 0, 0.9));
  color: #fff;
  text-align: center;
  padding: 20px;
  pointer-events: none;
}
.admin-help {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
}
@media (max-width: 560px) {
  .format-access {
    grid-template-columns: 1fr;
  }
}

.reader-shell {
  min-height: 100vh;
  background: #eef1f6;
  padding: 34px 0 70px;
}
.reader-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}
.reader-heading h1 {
  margin: 5px 0;
}
.reader-heading p {
  margin: 0;
  color: var(--muted);
}
.reader-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.self-flipbook {
  margin: 22px auto;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}
.self-flipbook .page {
  background: #fff;
  overflow: hidden;
}
.self-flipbook canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.reader-loading {
  min-height: 420px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 15px;
}
.reader-loading[hidden] {
  display: none;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #d0d5dd;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.reader-buy {
  text-align: center;
  margin-top: 28px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
:fullscreen.reader-shell {
  overflow: auto;
  background: #eef1f6;
}
.format-access {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
@media (max-width: 760px) {
  .reader-heading {
    align-items: start;
    flex-direction: column;
  }
  .reader-actions .btn {
    padding: 9px 11px;
    font-size: 0.82rem;
  }
}

.legacy-section {
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.legacy-intro {
  margin: -8px 0 24px;
  color: var(--muted);
  max-width: 780px;
}
.legacy-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.legacy-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
}
.legacy-card img {
  width: 100%;
  height: auto;
  display: block;
  background: #edf2f7;
  filter: saturate(0.95);
}
.legacy-info {
  padding: 14px;
}
.legacy-info h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.25;
}
.legacy-info p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--muted);
}
.legacy-price {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #344054;
}
.legacy-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fef3f2;
  color: #b42318;
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
@media (max-width: 1100px) {
  .legacy-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 760px) {
  .legacy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .legacy-grid {
    grid-template-columns: 1fr;
  }
}

.section {
  padding: 72px 0;
  background: #e7e3df;
}
.container.product-layout {
  max-width: 760px;
  background: #f1f0ee;
  border: 1px solid #d8d2cd;
  border-radius: 18px;
  padding: 26px 28px;
  box-shadow: 0 20px 36px rgba(17, 24, 39, 0.07);
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 26px;
  align-items: center;
  position: relative;
}
.container.product-layout::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -18px;
  height: 22px;
  background: rgba(17, 17, 17, 0.06);
  filter: blur(18px);
  border-radius: 50%;
  z-index: -1;
}
.product-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8px;
}
.product-cover::before {
  content: "";
  position: absolute;
  inset: 20px 8px 6px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.04);
}
.product-cover img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 420px;
  border-radius: 12px;
  box-shadow:
    0 18px 28px rgba(17, 24, 39, 0.18),
    0 14px 22px rgba(17, 24, 39, 0.08);
  transform: rotate(-1deg) translateY(-4px);
}
.product-details {
  padding: 8px 8px 4px;
}
.product-details .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 800;
  color: #1d1d1d;
  opacity: 0.75;
}
.product-details h1 {
  margin: 12px 0 10px;
  font-size: clamp(2.2rem, 3vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.07em;
  font-weight: 900;
  color: #1d1d1d;
}
.product-details .author {
  margin: 0 0 16px;
  font-size: 1rem;
  color: #4d4d4d;
  font-weight: 600;
}
.product-details p {
  margin: 0 0 18px;
  color: #3b3b3b;
}
.product-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 17, 17, 0.12);
}
.product-meta div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.product-meta small {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4f4f4f;
}
.product-meta strong {
  font-size: 0.98rem;
  color: #1b1b1b;
}
.price {
  font-size: 1.2rem;
  font-weight: 900;
  color: #1d1d1d;
  margin-bottom: 18px;
}
.preview-card {
  margin: 16px 0 20px;
  padding: 18px 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
}
.preview-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}
.preview-card p {
  margin: 0 0 12px;
}
.checkout-form .btn {
  border-radius: 999px;
  padding: 15px 18px;
  width: 100%;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #65c9a4;
  color: #fff;
  border: 1px solid #65c9a4;
  box-shadow: 0 10px 18px rgba(101, 201, 164, 0.2);
}
.form-feedback {
  font-size: 0.82rem;
  color: #555;
  margin-top: 10px;
}
@media (max-width: 760px) {
  .container.product-layout {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }
  .product-cover img {
    max-width: 320px;
  }
  .section {
    padding: 40px 0;
  }
}

.home-bookstore {
  position: relative;
  min-height: 100vh;
  background: #f4f4f4;
  color: #121212;
  padding-bottom: 56px;
  font-family: Arial, Helvetica, sans-serif;
}
.hero-banner {
  position: relative;
  height: calc(clamp(340px, 23vw, 640px) + 30px);
  overflow: hidden;
  background: linear-gradient(180deg, #dfe7ef 0%, #c7d0d8 38%, #e9ecef 100%);
  border-radius: 0 0 54% 54% / 0 0 18% 18%;
}
.hero-banner::after {
  content: "";
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -100px;
  height: 180px;
  background: #f4f4f4;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hero-slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #aeb7bd;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.7s ease,
    visibility 0.7s ease;
}
.hero-slide.active {
  opacity: 1;
  visibility: visible;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(9, 20, 28, 0.02),
    rgba(9, 20, 28, 0.1)
  );
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-slide:nth-child(2) img {
  transform: scale(1.08) translateX(-3%);
}
.hero-slider-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(15, 25, 35, 0.48);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}
.hero-slider-control:hover {
  background: rgba(15, 25, 35, 0.75);
  transform: translateY(-50%) scale(1.06);
}
.hero-slider-prev {
  left: 24px;
}
.hero-slider-next {
  right: 24px;
}
.hero-slider-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 24px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}
.hero-slider-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}
.hero-slider-dot.active {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}
.book-shelf {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  transform: translateY(18px);
}
.book-shelf-one .book-cover:nth-child(odd) {
  transform: translateY(14px) rotate(-3deg);
}
.book-shelf-one .book-cover:nth-child(even) {
  transform: translateY(-8px) rotate(3deg);
}
.book-shelf-two .book-cover:first-child {
  transform: translateY(10px) rotate(-2deg);
}
.book-shelf-two .book-cover:last-child {
  transform: translateY(-10px) rotate(2deg);
}
.book-cover {
  position: relative;
  width: 170px;
  height: 200px;
  border-radius: 10px 10px 4px 4px;
  box-shadow:
    0 18px 26px rgba(0, 0, 0, 0.18),
    0 2px 0 rgba(255, 255, 255, 0.2);
  overflow: hidden;
  background: #d8d8d8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
  text-transform: uppercase;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.book-cover:hover {
  transform: translateY(-6px) rotate(0deg);
  box-shadow: 0 24px 30px rgba(0, 0, 0, 0.22);
}
.book-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14),
    rgba(0, 0, 0, 0.18)
  );
}
.book-cover span,
.cover-text {
  position: relative;
  z-index: 1;
  display: block;
  line-height: 1.1;
  font-size: 1.05rem;
}
.c1 {
  background: linear-gradient(180deg, #9ec1d7, #264a78);
}
.c2 {
  background: linear-gradient(180deg, #d3b0d4, #7e4b67);
}
.c3 {
  background: linear-gradient(180deg, #d3d1da, #494e66);
}
.c4 {
  background: linear-gradient(180deg, #d8b164, #7b4f2b);
}
.c5 {
  background: linear-gradient(180deg, #f3a5b6, #c15e66);
}
.c6 {
  background: linear-gradient(180deg, #a1dbda, #3e8d99);
}
.hero-header {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.store-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #111;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}
.meta-count {
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.08);
}
.hero-header h1 {
  margin: 0;
  font-size: 5.2rem;
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: #111;
}
.catalog-wrap {
  position: relative;
  z-index: 3;
  width: min(1100px, 92%);
  margin: -12px auto 0;
}
.catalog-title {
  position: relative;
  padding: 16px 0 12px;
  font-size: 1.2rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: #1f1f1f;
  text-align: center;
  text-transform: uppercase;
}
.catalog-title::before {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(17, 17, 17, 0.18);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 42px;
  padding: 34px 12px 0;
  align-items: start;
}
.product-card {
  background: transparent;
  padding: 8px 8px 16px;
  border-radius: 20px;
  transition:
    transform 0.35s ease,
    filter 0.35s ease;
  cursor: default;
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-8px) scale(1.01);
  filter: drop-shadow(0 18px 24px rgba(17, 24, 39, 0.12));
}
.product-cover {
  position: relative;
  width: 100%;
  max-width: 195px;
  height: 238px;
  margin: 0 auto;
  border-radius: 12px 12px 10px 10px;
  box-shadow:
    0 18px 28px rgba(17, 24, 39, 0.18),
    0 4px 0 rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-1deg) translateY(0);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}
.product-card:nth-child(even) .product-cover {
  transform: rotate(1.1deg);
}
.product-card:hover .product-cover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow:
    0 28px 40px rgba(17, 24, 39, 0.2),
    0 6px 0 rgba(0, 0, 0, 0.05);
}
.product-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14),
    rgba(0, 0, 0, 0.18)
  );
  z-index: 1;
}
.cover-blue {
  background: linear-gradient(180deg, #355c96, #0d223f);
}
.cover-red {
  background: linear-gradient(180deg, #c46a5a, #7b1d1d);
}
.cover-warm {
  background: linear-gradient(180deg, #c97b5e, #7a3520);
}
.cover-soft {
  background: linear-gradient(180deg, #8e6bbf, #3d2575);
}
.cover-sky {
  background: linear-gradient(180deg, #3a9ec2, #0e4f6e);
}
.cover-forest {
  background: linear-gradient(180deg, #4aaa72, #1a5c3a);
}
/* card background tints matching the cover color */
.product-card:nth-child(6n + 1) {
  background: linear-gradient(180deg, #dce8f5, #edf3fb);
}
.product-card:nth-child(6n + 2) {
  background: linear-gradient(180deg, #fae0dc, #fdf0ee);
}
.product-card:nth-child(6n + 3) {
  background: linear-gradient(180deg, #fde8dc, #fef5f0);
}
.product-card:nth-child(6n + 4) {
  background: linear-gradient(180deg, #ede0f7, #f7f0fd);
}
.product-card:nth-child(6n + 5) {
  background: linear-gradient(180deg, #d8f0fa, #ecf8fd);
}
.product-card:nth-child(6n + 0) {
  background: linear-gradient(180deg, #d4f0e2, #eaf8f1);
}
.cover-text {
  position: relative;
  z-index: 2;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #fff;
  text-transform: uppercase;
  line-height: 1.05;
  text-align: center;
  font-size: 1.05rem;
}
.cover-text.vertical {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 1.35rem;
  letter-spacing: 0.14em;
}
.product-info {
  padding: 18px 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.product-tag {
  display: block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #181818;
  opacity: 0.7;
}
.product-info h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #1d1d1d;
}
.product-author {
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: #4b5563;
  font-weight: 600;
}
.price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.price-old {
  font-size: 1rem;
  color: #404040;
  text-decoration: line-through;
  font-weight: 700;
}
.price-new {
  font-size: 1.05rem;
  font-weight: 900;
  color: #1d1d1d;
}
.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}
.add-cart,
.details {
  border-radius: 999px;
  border: 1px solid #3a3a3a;
  font-weight: 800;
  padding: 10px 0;
  text-align: center;
  cursor: pointer;
  font-size: 0.77rem;
  letter-spacing: 0.08em;
  transition: all 0.2s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.add-cart {
  background: #5bc795;
  color: #fff;
  border-color: #5bc795;
  box-shadow: 0 8px 14px rgba(91, 199, 149, 0.25);
}
.details {
  background: transparent;
  color: #1d1d1d;
}
.add-cart:hover {
  background: #45ae7f;
  transform: translateY(-1px);
}
.details:hover {
  background: #eaeaea;
}
.empty-catalog {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
  color: #4b5563;
  font-weight: 700;
}
.floating-chat {
  position: fixed;
  right: 24px;
  bottom: 26px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(180deg, #0c1b2a, #233c5b);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  z-index: 12;
  overflow: visible;
  transition: transform 0.25s ease;
}
.floating-chat:hover {
  transform: translateY(-4px) scale(1.04);
}
.floating-chat::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 12px;
  height: 12px;
  background: #32d583;
  border: 3px solid #fff;
  border-radius: 50%;
}
.chat-icon {
  display: block;
  color: #fff;
  font-size: 1.5rem;
  transform: translateY(-1px);
}
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .hero-header h1 {
    font-size: 4rem;
  }
}
@media (max-width: 720px) {
  .hero-banner {
    border-radius: 0 0 40% 40% / 0 0 18% 18%;
  }
  .hero-slider-control {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .hero-slider-prev {
    left: 12px;
  }
  .hero-slider-next {
    right: 12px;
  }
  .hero-slider-dots {
    bottom: 16px;
  }
  .meta-pill {
    padding: 5px 8px;
    font-size: 9px;
  }
  .hero-header h1 {
    font-size: 2.8rem;
  }
  .product-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-left: 0;
    padding-right: 0;
  }
  .product-actions {
    grid-template-columns: 1fr 1fr;
  }
  .catalog-title {
    letter-spacing: 0.12em;
    font-size: 1rem;
  }
}
