/* Pravda Books — Pass G storefront UX */

:root {
  --mobile-dock-height: 56px;
  --pdp-sticky-height: 56px;
}

@media (max-width: 1023px) {
  body:not(.page-txn) {
    padding-bottom: calc(var(--mobile-dock-height) + env(safe-area-inset-bottom, 0px));
  }

  body.book-detail-page.has-pdp-sticky:not(.page-txn) {
    padding-bottom: calc(var(--mobile-dock-height) + var(--pdp-sticky-height) + env(safe-area-inset-bottom, 0px));
  }
}

.mobile-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  display: none;
  align-items: stretch;
  justify-content: space-around;
  min-height: var(--mobile-dock-height);
  padding: 0.25rem 0 calc(0.25rem + env(safe-area-inset-bottom, 0px));
  background: var(--color-paper, #FDFBF8);
  border-top: 1px solid rgba(32, 31, 28, 0.08);
  box-shadow: 0 -4px 16px rgba(32, 31, 28, 0.06);
}

@media (max-width: 1023px) {
  body:not(.page-txn) .mobile-dock {
    display: flex;
  }

  body:not(.page-txn) .whatsapp-float {
    bottom: calc(var(--mobile-dock-height) + 0.625rem + env(safe-area-inset-bottom, 0px));
  }
}

.mobile-dock__link,
.mobile-dock__button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.35rem 0.25rem;
  border: 0;
  background: transparent;
  color: rgba(32, 31, 28, 0.62);
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.mobile-dock__link svg,
.mobile-dock__button svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
}

.mobile-dock__link--active,
.mobile-dock__button.mobile-dock__link--active {
  color: var(--color-burgundy, #941238);
}

.mobile-dock__badge {
  position: absolute;
  top: 0.2rem;
  right: calc(50% - 1.1rem);
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--color-burgundy, #941238);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
}

.mobile-dock__icon-wrap {
  position: relative;
  display: inline-flex;
}

.store-search__recent-item {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.store-search__recent {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(32, 31, 28, 0.08);
}

.store-search__recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  color: rgba(32, 31, 28, 0.62);
}

.store-search__recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-recovery {
  padding: 0.75rem 0;
}

.search-recovery__title {
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.search-recovery__text {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: rgba(32, 31, 28, 0.62);
}

.search-recovery__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.home-smart-module {
  padding: 1rem 0;
}

.home-smart-module[hidden] {
  display: none !important;
}

.home-smart-module__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--color-paper, #FDFBF8);
  border: 1px solid rgba(32, 31, 28, 0.08);
  border-radius: 10px;
}

.home-smart-module__title {
  margin: 0 0 0.15rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.home-smart-module__text {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(32, 31, 28, 0.62);
}

.home-recently-viewed__track {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.25rem;
}

.home-recently-viewed__track .book-card {
  flex: 0 0 140px;
  scroll-snap-align: start;
}

.pdp-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--mobile-dock-height) + env(safe-area-inset-bottom, 0px));
  z-index: 115;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--pdp-sticky-height);
  padding: 0.5rem 1rem;
  background: rgba(253, 251, 248, 0.96);
  border-top: 1px solid rgba(32, 31, 28, 0.08);
  box-shadow: 0 -4px 16px rgba(32, 31, 28, 0.08);
  transform: translateY(110%);
  transition: transform 0.2s ease;
}

@media (min-width: 1024px) {
  .pdp-sticky-bar {
    display: none !important;
  }
}

.pdp-sticky-bar--visible {
  transform: translateY(0);
}

.pdp-sticky-bar__info {
  flex: 1;
  min-width: 0;
}

.pdp-sticky-bar__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdp-sticky-bar__price {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(32, 31, 28, 0.72);
}

.pdp-sticky-bar__btn {
  flex-shrink: 0;
  min-height: 44px;
}

.book-detail__trust {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(32, 31, 28, 0.08);
}

.book-detail__trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: rgba(32, 31, 28, 0.72);
}

.book-detail__whatsapp-order {
  margin-top: 0.75rem;
}

.book-detail__share-btn[data-native-share][hidden] {
  display: none;
}

.book-detail__release-date {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: rgba(32, 31, 28, 0.72);
}

@media (prefers-reduced-motion: reduce) {
  .pdp-sticky-bar {
    transition: none;
  }
}

/* --- Book Finder (homepage + catalogue) --- */
.book-finder {
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
}
.book-finder--home {
  background-color: #F8F6F1;
  padding: calc(clamp(3rem, 4vw, 3.5rem) - 0.6875rem) 0 clamp(3rem, 4.5vw, 3.875rem);
}
.book-finder--home::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #F8F6F1;
  background-image: url('../images/backgrounds/book-finder-kerala-bg.webp');
  background-repeat: no-repeat;
  background-position: center 42%;
  background-size: cover;
  opacity: 0.9;
  filter: brightness(1.08) saturate(0.88);
}
.book-finder--home::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 88% 70% at 50% 36%,
    rgba(255, 252, 244, 0.74) 0%,
    rgba(255, 252, 244, 0.5) 35%,
    rgba(255, 252, 244, 0.13) 60%,
    rgba(255, 252, 244, 0) 77%
  );
}
.book-finder--home .book-finder__inner {
  max-width: 780px;
  z-index: 2;
  padding-top: 0.6875rem;
}
.book-finder--home .book-finder__eyebrow {
  color: #B88A3B;
  margin-top: 0;
}
.book-finder--home .book-finder__title {
  color: #201F1C;
}
.book-finder--home .book-finder__lead {
  color: #5F5A52;
}
.book-finder--home .book-finder__whatsapp {
  background: rgba(253, 251, 248, 0.84);
  border: 1px solid rgba(184, 138, 59, 0.14);
}
.book-finder__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}
.book-finder__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pravda-burgundy);
  text-align: center;
}
.book-finder__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 4vw, 2.125rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--pravda-charcoal);
}
.book-finder__lead {
  margin: 0 0 1rem;
  font-size: clamp(0.9375rem, 2.5vw, 1rem);
  line-height: 1.5;
  text-align: center;
  color: var(--color-gray-600);
}
.book-finder__search {
  margin-bottom: 0.875rem;
  position: relative;
  z-index: 4;
}
.book-finder__form,
.book-finder .store-search__form {
  width: 100%;
}
.book-finder__bar,
.book-finder .store-search__bar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 56px;
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  background: rgba(253, 251, 248, 0.96);
  border: 1px solid rgba(32, 31, 28, 0.1);
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(32, 31, 28, 0.07);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.book-finder__bar:focus-within,
.book-finder .store-search__bar:focus-within {
  border-color: rgba(148, 18, 56, 0.28);
  box-shadow: 0 0 0 3px rgba(148, 18, 56, 0.1), 0 10px 32px rgba(32, 31, 28, 0.08);
}
.book-finder__search-icon,
.book-finder__bar .store-search__icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  max-width: 22px;
  min-width: 22px;
  color: var(--pravda-burgundy);
}
.book-finder__input,
.book-finder__bar .store-search__input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border: none;
  background: transparent;
  font-size: 1rem;
  padding: 0.75rem 0;
  outline: none;
}
.book-finder__input::placeholder,
.book-finder__bar .store-search__input::placeholder {
  color: var(--color-gray-400);
}
.book-finder__input:focus,
.book-finder__bar .store-search__input:focus {
  outline: none;
}
.book-finder__submit {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0.625rem 1.125rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-white);
  background: var(--pravda-burgundy);
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.book-finder__submit:hover {
  background: #7a1030;
}
@media (max-width: 359px) {
  .book-finder__submit {
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
  }
}
.book-finder__whatsapp {
  padding: 0.75rem 0.875rem;
  text-align: center;
  background: rgba(253, 251, 248, 0.72);
  border: 1px solid rgba(49, 84, 73, 0.1);
  border-radius: 0.875rem;
}
.book-finder__whatsapp-label {
  margin: 0 0 0.2rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}
.book-finder__whatsapp-text {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-gray-600);
}
.book-finder__whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.375rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2F6B4F;
  text-decoration: none;
  border-radius: 999px;
  transition: background var(--transition);
}
.book-finder__whatsapp-link svg {
  width: 1.125rem;
  height: 1.125rem;
}
.book-finder__whatsapp-link:hover {
  background: rgba(47, 107, 79, 0.08);
}
.book-finder__whatsapp--compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.625rem;
  padding: 0.75rem 1rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(184, 138, 59, 0.16);
  border-radius: 0.875rem;
}
.book-finder__whatsapp-main {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  flex: 1 1 auto;
  min-width: 0;
}
.book-finder__whatsapp-main > svg {
  width: 1.375rem;
  height: 1.375rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  color: #2F6B4F;
}
.book-finder__whatsapp-copy {
  min-width: 0;
}
.book-finder__whatsapp--compact .book-finder__whatsapp-label {
  margin: 0 0 0.15rem;
  text-align: left;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #5F5A52;
}
.book-finder__whatsapp--compact .book-finder__whatsapp-text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #81786C;
  text-align: left;
}
.book-finder__whatsapp-number {
  flex-shrink: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2F6B4F;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition);
}
.book-finder__whatsapp-number:hover {
  color: #245a42;
}
@media (max-width: 768px) {
  .book-finder__whatsapp--compact {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
  }
  .book-finder__whatsapp-number {
    align-self: flex-end;
  }
}
@media (max-width: 480px) {
  .book-finder__whatsapp-number {
    align-self: flex-start;
  }
}
.book-finder--catalogue {
  background: var(--pravda-ivory);
  padding: 0.75rem 0 1rem;
}
.book-finder--catalogue .book-finder__inner {
  max-width: 100%;
}
.book-finder--catalogue .book-finder__eyebrow {
  text-align: left;
  margin-bottom: 0.5rem;
}
.book-finder--catalogue .book-finder__bar {
  min-height: 52px;
}
@media (max-width: 639px) {
  .book-finder--home {
    padding: calc(2.5rem - 0.6875rem) 0 2.625rem;
  }
  .book-finder__bar,
  .book-finder .store-search__bar {
    gap: 0.5rem;
    padding: 0.35rem 0.35rem 0.35rem 0.75rem;
  }
  .book-finder__input,
  .book-finder__bar .store-search__input {
    min-width: 0;
    flex: 1 1 auto;
  }
  .book-finder__submit {
    flex-shrink: 0;
    padding-inline: 0.875rem;
  }
  .book-finder--home::before {
    background-position: center 40%;
    background-size: cover;
    opacity: 0.88;
    filter: brightness(1.1) saturate(0.86);
  }
  .book-finder--home::after {
    background: radial-gradient(
      ellipse 94% 76% at 50% 34%,
      rgba(255, 252, 244, 0.8) 0%,
      rgba(255, 252, 244, 0.54) 33%,
      rgba(255, 252, 244, 0.15) 55%,
      rgba(255, 252, 244, 0) 73%
    );
  }
  .book-finder--home .book-finder__lead {
    margin-bottom: 0.875rem;
  }
  .book-finder--home .book-finder__title {
    font-size: clamp(1.5rem, 5vw, 1.75rem);
  }
}

/* --- Editorial store footer (Kerala / Kathakali) --- */
.footer--editorial {
  --footer-gold: #CDA752;
  --footer-gold-muted: #C9A24D;
  --footer-gold-bright: #DDBB67;
  --footer-text: #F5F0E6;
  --footer-text-secondary: rgba(245, 240, 230, 0.8);
  --footer-text-muted: rgba(245, 240, 230, 0.58);
  --footer-divider: rgba(190, 150, 60, 0.22);
  position: relative;
  overflow: hidden;
  background: #071A17;
  color: var(--footer-text-secondary);
  padding: clamp(2.25rem, 4vw, 3rem) 0 1.25rem;
  border-top: 1px solid var(--footer-divider);
}

.footer__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #071A17;
  background-image:
    linear-gradient(rgba(4, 17, 15, 0.18), rgba(4, 17, 15, 0.3)),
    url('../images/footer/footer-kerala-bg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.footer__kathakali {
  position: absolute;
  right: calc(-3rem + 4.25rem);
  bottom: 2.75rem;
  width: clamp(320px, 25vw, 470px);
  height: auto;
  opacity: 0.17;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.footer__shell {
  position: relative;
  z-index: 2;
  width: min(94vw, 1560px);
  max-width: 1560px;
  margin-inline: auto;
  padding: 0 clamp(1rem, 2.5vw, 2rem);
}

.footer__layout {
  display: grid;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}
.footer__glass-panel {
  padding: clamp(1.5rem, 2vw, 2rem);
  background: rgba(6, 25, 21, 0.62);
  border: 1px solid rgba(190, 150, 60, 0.35);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.footer__glass-panel--brand {
  grid-column: 1 / -1;
}
@media (min-width: 640px) {
  .footer__layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.875rem 1rem;
  }
  .footer__glass-panel--brand,
  .footer__glass-panel--publish {
    grid-column: 1 / -1;
  }
}
@media (min-width: 1024px) {
  .footer__layout {
    grid-template-columns: 1.35fr 0.75fr 0.85fr 1.35fr;
    gap: 1rem 1.125rem;
    align-items: start;
  }
  .footer__glass-panel--brand,
  .footer__glass-panel--publish {
    grid-column: auto;
  }
}

.footer__logo {
  height: 42px;
  width: auto;
  margin-bottom: 1rem;
}
.footer__tagline {
  margin: 0 0 1.25rem;
  max-width: 26rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--footer-text-muted);
}

.footer__contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--footer-text-secondary);
}
.footer__contact-item svg {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  color: var(--footer-gold);
}
.footer__contact-item a {
  color: inherit;
  text-decoration: none;
  word-break: break-word;
}
.footer__contact-item a:hover {
  color: var(--footer-text);
}
.footer__contact-item--stack {
  align-items: flex-start;
}
.footer__contact-lines {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.footer__contact-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--footer-gold-muted);
}

.footer--editorial .footer__heading {
  margin: 0 0 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--footer-gold-muted);
}
.footer__heading--spaced {
  margin-top: 1.625rem;
}

.footer--editorial .footer__link {
  display: block;
  padding: 0.375rem 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: rgba(245, 240, 230, 0.78);
  text-decoration: none;
  transition: color var(--transition), transform var(--transition);
}
.footer__glass-panel--publish .footer__link {
  line-height: 1.5;
}
.footer--editorial .footer__link:hover {
  color: var(--footer-text);
  transform: translateX(2px);
}

.footer__trust {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.125rem 0;
  border-top: 1px solid var(--footer-divider);
  margin-bottom: 0;
}
@media (min-width: 768px) {
  .footer__trust {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer__payment-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer__payment-icon svg {
  display: block;
  width: 46px;
  height: 22px;
  border-radius: 4px;
}

.footer__secure {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(245, 240, 230, 0.72);
}
.footer__secure svg {
  width: 1rem;
  height: 1rem;
  color: #5A9E65;
  flex-shrink: 0;
}

.footer--editorial .footer__bottom {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 1rem;
  margin-top: 0;
  border-top: 1px solid var(--footer-divider);
  font-size: 0.8125rem;
  color: rgba(245, 240, 230, 0.62);
}
@media (min-width: 640px) {
  .footer--editorial .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
@media (max-width: 639px) {
  .footer--editorial {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }
  .footer__glass-panel {
    padding: 1.25rem 1.125rem;
  }
  .footer__kathakali {
    width: clamp(220px, 58vw, 280px);
    right: calc(-4.5rem + 2.5rem);
    bottom: 6.5rem;
    opacity: 0.08;
  }
  .footer__bg {
    background-position: center;
  }
}
