:root {
  --ink: #f7f1e6;
  --muted: #c6bda9;
  --line: rgba(214, 162, 69, 0.32);
  --paper: #f3eadb;
  --surface: #fffaf0;
  --navy: #081326;
  --navy-2: #0f2038;
  --gold: #d6a245;
  --gold-2: #f1c36a;
  --bronze: #8f5b24;
  --green: #2f6f52;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

/* ── Topbar ─────────────────────────────────── */

.topbar {
  position: fixed;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  width: 100%;
  min-height: 86px;
  padding: 14px clamp(22px, 4vw, 64px);
  background: linear-gradient(180deg, rgba(3, 9, 20, 0.94), rgba(3, 9, 20, 0.74));
  border-bottom: 1px solid rgba(214, 162, 69, 0.16);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
  color: var(--gold-2);
}

.brand-mark {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: transparent;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  display: grid;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 0.94;
  text-transform: uppercase;
}

.brand-name small {
  margin-top: 6px;
  color: #fff7df;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  letter-spacing: 0.42em;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 34px);
  color: #fff8ec;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav a {
  position: relative;
  padding: 8px 0;
}

.nav a::after {
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  content: "";
  background: var(--gold);
  transition: width 160ms ease;
}

.nav a:hover,
.nav a.active {
  color: var(--gold-2);
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button {
  display: inline-grid;
  min-width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold-2);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold-2);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.whatsapp-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid #f4c772;
  border-radius: 5px;
  background: linear-gradient(180deg, #f4c56c, #b87824);
  color: #14100a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.42), 0 12px 24px rgba(0, 0, 0, 0.24);
}

.whatsapp-header:hover {
  filter: brightness(1.08);
}

/* ── Shared buttons ──────────────────────────── */

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.primary-button {
  border-color: #f4ca78;
  background: linear-gradient(180deg, #f3c86f, #a86717);
  color: #17100a;
}

.primary-button:hover {
  filter: brightness(1.08);
}

.secondary-button {
  background: rgba(5, 14, 28, 0.5);
  color: #fff5df;
  border-color: var(--gold);
}

.full {
  width: 100%;
}

.add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin-top: auto;
  border: 0;
  border-radius: 5px;
  background: linear-gradient(180deg, #f1c36a, #a86717);
  color: #15100a;
  font-weight: 900;
  cursor: pointer;
}

.add-button:hover {
  filter: brightness(1.08);
}

/* ── Eyebrow ─────────────────────────────────── */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  color: var(--gold-2);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before,
.eyebrow::after {
  width: 58px;
  height: 1px;
  content: "";
  background: var(--gold);
}

/* ── Pills & ratings ─────────────────────────── */

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f3e2bd;
  color: #7b4c16;
  font-size: 12px;
  font-weight: 900;
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #9a641c;
  font-weight: 900;
}

.book-author {
  margin: -6px 0 0;
  color: #5f5140;
  font-size: 14px;
  font-weight: 800;
}

/* ── Inner page wrapper ──────────────────────── */

.inner-page {
  padding-top: 86px;
  background: #f4ecdd;
  color: #172033;
}

/* ── Catalog page ────────────────────────────── */

.catalog-page {
  background: #f4ecdd;
}

.catalog-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 26px;
  padding: 76px clamp(18px, 5vw, 72px) 34px;
  background:
    radial-gradient(circle at 86% 18%, rgba(214, 162, 69, 0.22), transparent 24%),
    linear-gradient(135deg, #fffaf0, #ead6ad);
  color: #172033;
}

.catalog-hero h1 {
  margin-bottom: 14px;
  color: #0d172a;
  font-size: clamp(44px, 6vw, 78px);
}

.catalog-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: #51483d;
  font-size: 18px;
  line-height: 1.65;
}

.catalog-hero .eyebrow {
  color: #9a621f;
}

.catalog-hero .eyebrow::before,
.catalog-hero .eyebrow::after {
  background: #c58c35;
}

.catalog-section {
  padding: 28px clamp(18px, 5vw, 72px) 64px;
}

.catalog-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
  gap:35px;
}

.catalog-card{
  background:#fff;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 12px 35px rgba(0,0,0,.12);
  transition:.35s;
  display:flex;
  flex-direction:column;
}

.catalog-card:hover{
  transform:translateY(-8px);
  box-shadow:0 20px 50px rgba(0,0,0,.18);
}

.catalog-image{
  height:430px;
  overflow:hidden;
}

.catalog-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:.5s;
}

.catalog-card:hover img{
  transform:scale(1.05);
}

.catalog-content{
  padding:25px;
  display:flex;
  flex-direction:column;
  height:100%;
}

.catalog-category{
  display:inline-block;
  background:#D6A245;
  color:white;
  padding:6px 14px;
  border-radius:30px;
  font-size:13px;
  margin-bottom:18px;
  font-weight:bold;
}

.catalog-content h2{
  margin-bottom:8px;
  font-size:27px;
  color:#0B1933;
}

.catalog-author{
  font-size:16px;
  color:#8A6A3A;
  font-weight:bold;
  margin-bottom:18px;
}

.catalog-description{
  color:#666;
  line-height:1.7;
  display:-webkit-box;
  line-clamp:3;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  margin-bottom:25px;
}

.catalog-footer{
  margin-top:auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.catalog-price{
  font-size:28px;
  font-weight:bold;
  color:#0B1933;
}

.catalog-button{
  background:#D6A245;
  color:white;
  padding:12px 22px;
  border-radius:8px;
  font-weight:bold;
  transition:.3s;
}

.catalog-button:hover{
  background:#B78128;
}

.coming-soon{
  font-weight:bold;
  color:#999;
  font-size:17px;
}

/* ── Modal ───────────────────────────────────── */

.modal {
  width: min(94vw, 440px);
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.catalog-modal {
  width: min(94vw, 980px);
}

.modal::backdrop {
  background: rgba(2, 7, 16, 0.7);
}

.modal-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: 6px;
  background: #fffaf0;
  color: #172033;
}

.catalog-card {
  max-height: min(86vh, 760px);
  overflow: auto;
}

.modal-card h2 {
  color: #0d172a;
}

.modal-card label {
  display: grid;
  gap: 7px;
  color: #4f4538;
  font-size: 13px;
  font-weight: 800;
}

.login-card input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffaf0;
  color: #172033;
  padding: 0 12px;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: #efe1c6;
  cursor: pointer;
}

.fine-print {
  margin: 0;
  color: #6a5f50;
  font-size: 13px;
}

/* ── Toast ───────────────────────────────────── */

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  max-width: min(360px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 6px;
  background: #071225;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: 160ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ── Footer ──────────────────────────────────── */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 1px solid rgba(214, 162, 69, 0.28);
  background: #071225;
  color: #fff;
}

.footer p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-contact {
  color: var(--gold-2);
  font-weight: 800;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Responsive ──────────────────────────────── */

@media (max-width: 1180px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
  }
}

@media (max-width: 820px) {
  .topbar {
    min-height: 74px;
    padding: 10px 18px;
  }

  .brand {
    min-width: 0;
  }

  .brand-name {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
    margin-left: auto;
  }

  .header-actions {
    display: none;
  }

  .nav {
    display: none;
    order: 4;
    width: 100%;
    padding: 8px 0 2px;
    border-top: 1px solid rgba(214, 162, 69, 0.18);
  }

  .topbar.menu-open .nav {
    display: grid;
    gap: 0;
  }

  .nav a {
    padding: 13px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav a::after {
    display: none;
  }

  .catalog-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .catalog-item {
    grid-template-columns: 84px 1fr;
  }

  .catalog-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

