:root {
  --color-light-grey: #e0e0e0;
  --color-dark-blue: #192a44;
  --color-dark-blue-hover: #2a436b;
  --color-golden: #d4af37;
  --color-grey: #dcecfb;
  --color-grey-hover: #dee2e6;
  --section-background: linear-gradient(180deg, #f9f0e3 0%, #f0e0c8 100%);
  --text-secondary: #495057;

  /* --color-dark-blue: #121E31;
  --color-dark-blue: #121E31; */
  /* --color-dark-blue: #121E31; */
}
html {
  background-image: url("/assets/books-background-e8c76313.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
}

html::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.45);
  z-index: -1;
}

/* ── General ─────────────────────────────────────── */

main {
  margin: 0 auto;
  padding-bottom: 40px;
}
.section-paddings {
  padding-top: 30px;
  padding-left: 20px;
  padding-right: 20px;
}
@media (min-width: 781px) {
  .section-paddings {
    padding-left: 50px;
    padding-right: 50px;
  }
}

.no-paddings {
  padding: 0 !important;
}
.no-max-width {
  max-width: 100% !important;
}
.border-main {
  border: 1px solid var(--color-dark-blue);
  border-radius: 8px;
}
.header-drop-menu {
  position: absolute;
  top: 70px;
  right: 0;
  z-index: 5;
  background: #ffffff;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  height: 100dvh;
}

/* ── Shelf surface & plank ─────────────────────────── */
.shelf-surface {
  border-radius: 8px;
  min-height: 168px;
}

.shelf-surface--small {
  min-height: 128px;
}

.shelf-plank {
  height: 16px;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* -- Typography -- */
.text-gold {
  color: var(--color-golden);
}
.background-gold {
  background-color: var(--color-golden);
}
.background-light {
  background-color: var(--color-light-grey);
}

h1.heading-h1 {
  font-size: 3rem;
}
h2.heading-h2 {
  font-size: 2.5rem;
}
h3.heading-h3 {
  font-size: 2rem !important;
}
p {
  color: #253d2c;
}
p.small-font {
  font-size: 0.75rem;
}
.header-desktop,
.header-mobile {
  background-color: var(--color-dark-blue);
}

/* ── Books row ─────────────────────────────────────── */
.books-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.book-card {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  padding: 16px 10px;
  gap: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #253d2c;
  text-decoration: none;
  box-shadow:
    -2px 3px 8px rgba(0, 0, 0, 0.28),
    inset -3px 0 6px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  &:hover {
    transform: translateY(-6px);
    box-shadow:
      -2px 10px 20px rgba(0, 0, 0, 0.3),
      inset -3px 0 6px rgba(0, 0, 0, 0.12);
  }
  .book-cover {
    width: 160px;
    height: 240px;
    object-fit: cover;
    border-radius: 4px;
  }
}
.swiper-wrapper {
  gap: 20px;
  align-items: stretch;
  .swiper-slide {
    height: auto;
    .book-card {
      height: 100%;
    }
  }
}
button {
  cursor: pointer;
}
.button {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 25px;
  padding-right: 25px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  min-width: 150px;
  max-width: max-content;
  transition: 500ms;
  white-space: nowrap;
  cursor: pointer;
}
.button-primary {
  background-color: var(--color-dark-blue);
  color: #ffffff;
  border: 1px solid var(--color-dark-blue);
}
.button-primary:hover {
  background-color: var(--color-dark-blue-hover);
  color: #ffffff;
}
.button-secondary {
  background-color: var(--color-grey);
  color: var(---text-secondary);
  border: 1px solid var(--color-grey);
}
.button-secondary:hover {
  background-color: var(--color-grey-hover);
  color: #253d2c;
}

/* -- Forms -- */

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-backgroung {
  padding: 2rem 3rem;
  border: 1px solid var(--color-dark-blue);
  border-radius: 20px;
}
input:not([type="submit"]),
textarea,
select {
  height: 40px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  border: 1px solid var(--color-dark-blue);
  background: #ffffff;
  width: 100%;
}
textarea {
  height: 120px;
}

/* -- User -- */

.user-card {
  display: flex;
  gap: 2rem;
  padding: 20px 40px;
  border-radius: 30px;
  border: 1px solid var(--color-dark-blue);
  margin-bottom: 30px;
  margin-top: 30px;
}

.avatar {
  max-width: 120px;
  height: auto;
  border-radius: 50%;
  overflow: hidden;
}

.icon {
  width: 48px;
  height: 48px;
  background-image: url("/app/assets/images/books.svg");
  background-size: contain;
}

.header-item {
  font-size: 16px;
  font-weight: 300;
  color: #2c2c2c;
  @media (min-width: 870px) {
    font-size: 20px;
  }
  @media (min-width: 781px) {
    color: var(--color-light-grey);
  }
}

.wooden-panel--top {
  border-top: 30px solid #5c3d1e;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    inset 0 -2px 0 rgba(0, 0, 0, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.35);
}

/* ── Wooden frame around page content ──────────────── */
.wooden-frame {
  border-left: 30px solid #5c3d1e;
  border-right: 30px solid #5c3d1e;
  border-bottom: 30px solid #5c3d1e;
  box-shadow:
    inset 2px 0 0 rgba(255, 255, 255, 0.1),
    inset -2px 0 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 0 rgba(255, 255, 255, 0.1),
    -4px 0 10px rgba(0, 0, 0, 0.25),
    4px 0 10px rgba(0, 0, 0, 0.25),
    0 6px 14px rgba(0, 0, 0, 0.3);
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #f9f0e3 0%, #f0e0c8 100%);
}

.wood-panel--left {
  border-left: 14px solid #5c3d1e;
}
@media (min-width: 768px) {
  .wood-panel--right {
    border-right: 30px solid #5c3d1e;
    box-shadow:
      inset 2px 0 0 rgba(255, 255, 255, 0.1),
      inset -2px 0 0 rgba(255, 255, 255, 0.1),
      inset 0 -2px 0 rgba(255, 255, 255, 0.1),
      -4px 0 10px rgba(0, 0, 0, 0.25),
      4px 0 10px rgba(0, 0, 0, 0.25),
      0 6px 14px rgba(0, 0, 0, 0.3);
    border-radius: 0 0 6px 6px;
  }
}
.wood-panel--bottom {
  border-bottom: 14px solid #5c3d1e;
}

/* ── Site header ───────────────────────────────────── */

.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(46, 111, 64, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(46, 111, 64, 0.08);
}

.header-inner {
  /* max-width: 1280px; */
  margin: 0 auto;
  padding: 0 50px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo__img {
  transition: transform 0.2s ease;
}

.header-logo:hover .header-logo__img {
  transform: scale(1.08);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.header-nav .header-item a {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: #253d2c;
  text-decoration: none;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.header-nav .header-item a:hover {
  color: var(--color-dark-blue);
}

/* ── User avatar ───────────────────────────────────── */

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--color-dark-blue) var(--color-dark-blue-hover)
  );
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
  object-fit: cover;
  overflow: hidden;
  @media (min-width: 728px) {
    width: 120px;
    height: 120px;
  }
}

.user-avatar--lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

/* ── User dropdown menu ─────────────────────────────── */

.profile-wrapper {
  position: relative;
}

.profile-wrapper:hover .profile-menu {
  opacity: 1;
  display: flex;
  transform: translateY(0);
  pointer-events: all;
}

.profile-menu {
  position: absolute;
  right: 0;
  top: 100%;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  pointer-events: none;
  background: #ffffff;
  padding-top: 20px;
  z-index: 3;
  width: 100%;
  min-width: 300px;
  flex-direction: column;
  padding: 20px;
}
.color-red-700 {
  color: #b91c1c;
}

.profile-menu a,
.profile-menu p {
  display: block;
  padding: 10px 20px;
  color: #3b2a1a;
  text-decoration: none;
  font-size: 14px;
  transition: 0.5s;
}
.profile-menu a:hover {
  background: var(--color-grey);
}
.comments-block {
  margin-top: 60px;
  background-color: rgba(255, 255, 255, 0.7);

  border-radius: 24px;
  padding: 30px;
}

.tab {
  cursor: pointer;
}

.active-tab {
  border-bottom: 2px solid var(--color-dark-blue);
  color: var(--color-dark-blue);
  cursor: default;
}

.swiper-pagination {
  position: relative;
  margin-top: 12px;
}
.flash-container {
  position: fixed;
  top: 1rem;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
  pointer-events: none;
}

.flash-container .flash {
  pointer-events: auto;
}

.flash {
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-weight: 500;
}
.flash-alert {
  background: #fde2e2;
  color: #8a1f1f;
}
.flash-notice {
  background: #e2f5e3;
  color: #1f5a26;
}
