body {
  margin: 0;
  font-family: Georgia, serif;
  background: #ffffff;
  color: #222;
  line-height: 1.6;
}

h1, h2, h3 { font-weight: normal; }
a { text-decoration: none; color: inherit; }

header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 40px 18px;
  box-sizing: border-box;
}

.header-top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 22px;
  padding-bottom: 18px;
}

.top-banner {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background-color: #243FA1;
  color: #ffffff;
  text-align: center;
  font-size: 13px;
  padding: 8px 40px;
  line-height: 1.4;
  letter-spacing: 0.3px;
  text-transform: none;
  font-family: Arial, Helvetica, sans-serif;
  position: relative;
  z-index: 1000;
}

.site-title {
  font-size: 20px;
  letter-spacing: 1px;
}

/* --- Logo in header --- */
.site-title-with-logo a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-logo {
  height: 38px;
  width: auto;
  display: block;
}

nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

nav a {
  font-size: 14px;
  color: #555;
}

nav a:hover { text-decoration: underline; }

.currency-toggle {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.currency-btn {
  border: none;
  background: transparent;
  padding: 4px 0;
  font-size: 13px;
  color: #777;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.currency-btn.active {
  color: #222;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.currency-btn:hover { color: #444; }

.basket-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 12px;
  text-decoration: none;
  color: #222;
}

.basket-icon {
  display: block;
  width: 22px;
  height: 22px;
}

#basket-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #222;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
}

#basket-count:empty {
  display: none;
}

.header-search-row {
  padding-top: 18px;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.header-search input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #999;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.header-search button {
  padding: 10px 16px;
  border: 1px solid #666;
  background: #f7f7f7;
  color: #111;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}

.header-search button:hover {
  background: #efefef;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 40px 55px;
  box-sizing: border-box;
}

.hero h1 {
  font-size: 42px;
  margin-bottom: 12px;
}

.hero p {
  font-size: 18px;
  color: #666;
  max-width: 620px;
  margin: 0 auto;
}

.shelves-root {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 40px 80px;
  box-sizing: border-box;
}

.shelf-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}

.shelf-head h2 {
  font-size: 22px;
  margin: 0;
}

.shelf-title-link:hover { text-decoration: underline; }

.shelf-link {
  font-size: 14px;
  color: #666;
}

.shelf-link:hover { text-decoration: underline; }

.carousel-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.row-carousel {
  --gap: 24px;
  display: grid;
  grid-auto-flow: column;
  gap: var(--gap);
  grid-auto-columns: calc((100% - (var(--gap) * 3)) / 4);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: none;
  padding: 6px 6px 14px;
  border-radius: 6px;
  -webkit-overflow-scrolling: touch;
}

.row-carousel {
  --gap: 24px;
  display: grid;
  grid-auto-flow: column;
  gap: var(--gap);
  grid-auto-columns: calc((100% - (var(--gap) * 3)) / 4);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: none;
  padding: 6px 6px 14px;
  border-radius: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.row-carousel::-webkit-scrollbar {
  display: none;
}

.carousel-btn {
  width: 36px;
  height: 46px;
  border: 1px solid #e5e2dc;
  background: #f8f6f2;
  color: #444;
  cursor: pointer;
  border-radius: 6px;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover { border-color: #d6d1c9; }

.book {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

.book:hover h3 { text-decoration: underline; }

.cover-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  margin-bottom: 12px;
  background: #ddd;
}

.cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: #ddd;
  margin-bottom: 12px;
}

.book h3 {
  font-size: 16px;
  margin: 4px 0;
}

.author {
  margin: 0;
  font-size: 14px;
  color: #777;
}

.price {
  display: none;
}

.view-all-card {
  border: 1px solid #e5e2dc;
  border-radius: 6px;
  padding: 14px;
  justify-content: center;
}

.view-all-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  min-height: 260px;
  text-align: center;
}

.view-all-title {
  font-size: 16px;
  margin-bottom: 6px;
}

.view-all-sub {
  font-size: 13px;
  color: #777;
}

.view-all-card:hover { border-color: #d6d1c9; }

@media (max-width: 1100px) {
  header {
    padding-left: clamp(60px, 7vw, 120px);
    padding-right: clamp(60px, 7vw, 120px);
  }

  .shelves-root {
    padding-left: clamp(60px, 7vw, 120px);
    padding-right: clamp(60px, 7vw, 120px);
  }

  .row-carousel {
    grid-auto-columns: calc((100% - (var(--gap) * 2)) / 3);
  }
}

@media (max-width: 750px) {
  .row-carousel {
    grid-auto-columns: calc((100% - (var(--gap) * 1)) / 2);
  }
}

.site-footer {
  margin-top: 60px;
  padding: 30px 20px;
  border-top: 1px solid #e5e2dc;
  text-align: center;
  font-size: 14px;
  color: #666;
}

.footer-links {
  margin-bottom: 6px;
}

.footer-links a {
  margin: 0 10px;
  color: #444;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copy {
  margin-top: 14px;
  font-size: 12px;
  color: #999;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #f8f6f2;
  border-top: 1px solid #e5e2dc;
  padding: 16px;
  z-index: 9999;
  box-sizing: border-box;
}

.cookie-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.cookie-inner p {
  margin: 0;
  font-size: 14px;
  color: #333;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-actions button {
  border: 1px solid #222;
  background: transparent;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
}

.cookie-actions button:hover {
  background: #222;
  color: #fff;
}

.hidden {
  display: none;
}

/* --- Header logo --- */
.site-title-with-logo a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-logo {
  height: 38px;
  width: auto;
  display: block;
}

/* --- Mobile header controls --- */
.mobile-header,
.mobile-market-row,
.mobile-search-panel {
  display: none;
}

.mobile-icon-button {
  border: none;
  background: transparent;
  padding: 6px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #222;
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-market-row {
  margin-top: 10px;
  text-align: center;
}

.mobile-market-row select {
  max-width: 280px;
  width: 100%;
  padding: 7px 10px;
  font-size: 14px;
  font-family: inherit;
}

.mobile-search-panel {
  padding: 12px 0 0;
}

.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #999;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.mobile-search button {
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #222;
}

#basket-count-mobile {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #222;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
}

#basket-count-mobile:empty {
  display: none;
}

@media (max-width: 600px) {
  .header-top {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 12px;
  }

  header {
    padding: 14px 18px 12px;
  }

  .top-banner {
    padding: 8px 24px;
    line-height: 1.4;
  }

  .desktop-header,
  .desktop-search-row {
    display: none;
  }

.mobile-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

  .mobile-site-title {
    justify-self: start;
    text-align: left;
    font-size: 16px;
    letter-spacing: 0.2px;
  }

  .mobile-site-title .site-logo {
    height: 32px;
  }

  .mobile-market-row {
  display: block;
}

.mobile-search-panel.is-open {
  display: block;
}

  nav {
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .header-search {
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding: 28px 18px 35px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .shelves-root {
    padding: 0 18px 60px;
  }

  .carousel-btn {
    display: none;
  }

  .row-carousel {
    --gap: 12px;
    gap: var(--gap);
    grid-auto-columns: calc((100% - var(--gap)) / 2);
  }

  .footer-links a {
    display: inline-block;
    margin: 4px 8px;
  }

  .cookie-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-actions {
    width: 100%;
  }
}

.slider {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 40px;
}

.slider-container {
  position: relative;
}

.slide img {
  width: 100%;
  height: auto;
  display: block;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
}

.prev { left: 10px; }
.next { right: 10px; }

.controls {
  text-align: center;
  margin-top: 10px;
}

.dot {
  height: 10px;
  width: 10px;
  margin: 0 5px;
  display: inline-block;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
}

.dot.active {
  background: #333;
}

#market-selector {
  width: auto !important;
  height: auto !important;
  padding: 6px 10px !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
}

.basket-market-warning {
  margin: 0 0 24px;
  padding: 16px 18px;
  border: 1px solid #e0c97f;
  background: #fff8e1;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
}

.basket-market-warning strong {
  font-size: 16px;
}

.basket-market-hint {
  font-size: 14px;
  color: #666;
}

.basket-checkout-warning {
  margin: 16px 0 10px;
  font-size: 14px;
  color: #444;
}

/* --- First-visit market selector tip --- */
.market-selector-tip {
  position: absolute;
  z-index: 10000;
  width: min(300px, calc(100vw - 24px));
  padding: 16px 18px 15px;
  background: #fff;
  border: 1px solid #d8d2c8;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
}

.market-selector-tip::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 1px solid #d8d2c8;
  border-top: 1px solid #d8d2c8;
  transform: translateX(-50%) rotate(45deg);
}

.market-tip-close {
  position: absolute;
  top: 7px;
  right: 9px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #777;
  padding: 0;
}

.market-tip-close:hover {
  color: #222;
}

.market-tip-title {
  padding-right: 22px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
  margin-bottom: 6px;
}

.market-tip-text {
  font-size: 13px;
  line-height: 1.45;
  color: #555;
  margin-bottom: 12px;
}

.market-tip-button {
  border: 1px solid #222;
  background: #111;
  color: #fff;
  padding: 8px 13px;
  font-size: 13px;
  cursor: pointer;
}

.market-tip-button:hover {
  background: #333;
}

@media (max-width: 600px) {
  .market-selector-tip {
    width: calc(100vw - 36px);
    text-align: left;
  }
}

.market-tooltip {
  position: absolute;
  z-index: 9999;
  width: 280px;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-radius: 8px;
  padding: 0;
}

.market-tooltip-content {
  padding: 16px 18px;
}

.market-tooltip strong {
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
  color: #222;
}

.market-tooltip-text {
  font-size: 14px;
  line-height: 1.55;
  color: #555;
  margin-bottom: 14px;
}

.market-tooltip-close {
  border: 1px solid #111;
  background: #111;
  color: #fff;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
}

.market-tooltip-close:hover {
  background: #333;
}

.market-tooltip-arrow {
  position: absolute;
  top: -8px;
  left: 42px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 1px solid #ddd;
  border-top: 1px solid #ddd;
  transform: rotate(45deg);
}
