﻿:root {
  --bg: #f7f4ed;
  --paper: #fffdf8;
  --ink: #1d2a2a;
  --muted: #5e6a68;
  --line: #dfd7c8;
  --brand: #0f766e;
  --brand-deep: #0a4f4a;
  --accent: #a16207;
  --radius: 14px;
  --shadow: 0 12px 24px rgba(29, 42, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, #efe7d4 0%, transparent 35%),
    linear-gradient(#f7f4ed, #f7f4ed);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.6;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -44px;
  z-index: 1500;
  background: #ffffff;
  color: var(--brand-deep);
  border: 1px solid var(--brand);
  border-radius: 8px;
  padding: 0.45rem 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 10px;
}

.container {
  width: min(1160px, 92%);
  margin-inline: auto;
}

.top-strip {
  background: var(--brand-deep);
  color: #e6faf8;
  font-size: 0.9rem;
}

.top-strip-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0;
  flex-wrap: wrap;
}

.top-strip-inner p {
  margin: 0;
}

.top-strip a { color: #c6f3ef; }

.shop-branding {
  display: none;
}

.shop-branding-inner {
  padding: 0.45rem 0;
}

.shop-branding-logo {
  width: min(680px, 100%);
  height: auto;
  display: block;
}

.nav-wrap {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.55rem 0 1rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
  width: 100%;
  min-height: 94px;
}

.brand::before {
  content: "";
  display: block;
  width: min(520px, 70vw);
  height: 94px;
  background: url("../img/islamic-kutab-logo.webp") no-repeat center center / contain;
  flex: 0 0 auto;
}

/* Safety: nav row me agar koi stray direct link inject ho jaye (e.g. extra Home), hide it */
.nav-wrap > a:not(.brand) {
  display: none !important;
}

@media (min-width: 941px) {
  .main-nav > a[href="index.html"] {
    display: none !important;
  }
}

.brand-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.brand strong {
  display: block;
  font-size: 1.72rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
  font-family: "Cormorant Garamond", serif;
}

.brand small {
  color: var(--muted);
  line-height: 1.2;
}

.brand-mark {
  display: none;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
  width: 100%;
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
  position: relative;
}

.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.nav-cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-inline-start: 0.28rem;
  padding: 0 0.42rem;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.main-nav a:hover { color: var(--brand); }

.nav-submenu {
  position: relative;
}

.nav-submenu summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
}

.nav-submenu summary::-webkit-details-marker {
  display: none;
}

.nav-submenu summary::after {
  content: " ▾";
  font-size: 0.8em;
  color: var(--muted);
}

.nav-submenu-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.12);
  display: grid;
  gap: 0.12rem;
  z-index: 1300;
}

.nav-submenu-list a {
  padding: 0.42rem 0.48rem;
  border-radius: 7px;
}

.nav-submenu-list a:hover {
  background: #f4fbfa;
}

.breadcrumb-wrap {
  display: none !important;
}

.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0.45rem 0.1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.breadcrumb-list li + li::before {
  content: "/";
  color: #9f9582;
  margin-right: 0.1rem;
}

.breadcrumb-list a {
  color: var(--brand-deep);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb-list span {
  color: var(--ink);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin-left: 0;
  margin-top: 0.35rem;
}

.user-session-badge {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.25rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #cbd5e1;
  color: #0f172a;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.86rem;
}

.user-session-badge.is-logged-in .user-avatar {
  background: var(--brand);
  color: #fff;
}

.user-session-copy {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.user-session-copy:hover strong {
  color: var(--brand);
}

.user-session-copy strong {
  font-size: 0.92rem;
  line-height: 1.1;
}

.user-session-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.1;
}

.user-session-logout {
  margin-left: auto;
  min-height: 36px;
  padding: 0.32rem 0.72rem;
}

.lang-switcher-btn {
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand);
  border-radius: 999px;
  padding: 0.33rem 0.75rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  margin-inline-start: auto;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.header-search input {
  width: 220px;
  padding: 0.55rem 0.7rem;
  border-radius: 999px;
}

.header-search button {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 0.52rem 0.8rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.header-search-advanced {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem;
  position: relative;
}

.header-search-advanced .search-grid {
  grid-template-columns: 2fr 1fr 1fr;
}

.advanced-filter-grid {
  margin-top: 0.55rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.advanced-filter-grid .btn {
  width: 100%;
  text-align: center;
  padding: 0.72rem 0.7rem;
}

.header-search-advanced .muted {
  margin: 0.45rem 0 0 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1rem;
  margin-top: 0.4rem;
  align-items: start;
}

.hero-copy, .hero-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy { padding: 2rem 1.7rem; }
.hero-card { padding: 1.4rem; }

.hero-ad-slider {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.hero-ad-track-wrap {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.hero-ad-track {
  display: flex;
  transition: transform 0.35s ease;
}

.hero-ad-slide {
  min-width: 100%;
}

.hero-ad-slide a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.hero-ad-slide img {
  width: 100%;
  display: block;
  object-fit: cover;
  background: #eee4d1;
}

.hero-ad-caption {
  padding: 0.55rem 0.7rem;
}

.hero-ad-caption h3 {
  font-size: 1.2rem;
  margin: 0;
}

.hero-ad-dots {
  display: flex;
  justify-content: center;
  gap: 0.36rem;
}

.hero-ad-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: #c9c9c9;
  cursor: pointer;
}

.hero-ad-dot.active {
  background: var(--brand);
}

.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1.1;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 3.3vw, 3.2rem);
  margin-top: 0.2rem;
}

.hero-copy p { margin-top: 0.8rem; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.68rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.section { margin-top: 1.5rem; }
.section-head { margin-bottom: 0.75rem; }
.section-head h2 { font-size: 2rem; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}

.search-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.search-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0.6rem;
  position: relative;
}

input, select {
  width: 100%;
  border: 1px solid #d8cfbd;
  border-radius: 10px;
  padding: 0.78rem;
  min-height: 46px;
  font: inherit;
  background: #fff;
}

input:focus, select:focus {
  border-color: var(--brand);
  outline: 2px solid rgba(15, 118, 110, 0.2);
}

.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: min(100%, 560px);
  max-height: 420px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  z-index: 1200;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
}

.search-suggest-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #ece5d8;
  background: #fff;
  text-align: left;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.55rem;
  padding: 0.55rem 0.6rem;
  cursor: pointer;
}

.search-suggest-item:last-child {
  border-bottom: 0;
}

.search-suggest-item.active,
.search-suggest-item:hover {
  background: #f7fdfc;
}

.search-suggest-item img {
  width: 42px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #e8decb;
}

.search-suggest-copy {
  display: grid;
  gap: 0.14rem;
}

.search-suggest-copy strong {
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.2;
}

.search-suggest-copy small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.85rem;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 1rem;
}

.pagination-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pagination-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.mobile-layout-toggle {
  display: none;
}

.category-slider-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  margin-bottom: 0.9rem;
}

.category-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
}

.category-slider-head h3 {
  font-size: 1.8rem;
}

.category-view-all {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.category-slider-track-wrap {
  overflow: hidden;
}

.category-slider-track {
  display: flex;
  transition: transform 0.25s ease;
}

.category-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.mini-book {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.58rem;
}

.mini-book .book-cover {
  margin-bottom: 0.45rem;
}

.mini-book-title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.2;
}

.mini-book .meta {
  margin: 0.18rem 0;
}

.mini-book .card-actions {
  margin-top: 0.25rem;
}

.mini-book .buy-btn {
  margin-top: 0;
  font-size: 0.78rem;
  padding: 0.35rem 0.6rem;
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.slider-arrow {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.slider-dots {
  display: flex;
  gap: 0.35rem;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: #c6c6c6;
  cursor: pointer;
}

.slider-dot.active {
  background: var(--brand);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 1.36rem;
  margin-top: 0.2rem;
}

.meta {
  margin: 0.25rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.price-row {
  margin-top: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.price {
  font-weight: 800;
  color: var(--brand);
}

.pos-grand-total {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: #fff8e7;
  border: 1px solid var(--line);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  color: var(--brand-deep);
}

.stock {
  font-size: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.buy-btn {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.9rem;
  border: 1px solid var(--brand);
  color: var(--brand);
  border-radius: 999px;
  padding: 0.52rem 0.78rem;
  min-height: 42px;
  text-decoration: none;
  font-weight: 700;
}

.buy-btn:hover {
  background: var(--brand);
  color: #fff;
}

.buy-btn-solid {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.buy-btn-solid:hover {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
}

.buy-now-btn {
  background: #a16207 !important;
  border-color: #a16207 !important;
  color: #fff !important;
}

.buy-now-btn:hover {
  background: #7c4706 !important;
  border-color: #7c4706 !important;
}

.card-title-link {
  text-decoration: none;
  color: inherit;
}

.card-title-link:hover h3 {
  color: var(--brand);
}

.buy-btn-fav {
  border-color: var(--accent);
  color: var(--accent);
}

.buy-btn-fav:hover {
  background: var(--accent);
  color: #fff;
}

.buy-btn-compare {
  border-color: #334155;
  color: #334155;
}

.buy-btn-compare:hover {
  background: #334155;
  color: #fff;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
  background: #fff;
}

.compare-table th,
.compare-table td {
  border: 1px solid var(--line);
  padding: 0.6rem;
  vertical-align: top;
  text-align: left;
}

.compare-table th {
  background: #f8f6ef;
}

.review-stars {
  color: #c17b00;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.book-detail-actions {
  display: grid;
  grid-template-columns: 130px minmax(280px, 1fr);
  gap: 0.85rem;
  align-items: end;
  max-width: 680px;
  margin: 1rem 0 0.35rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.78);
}

.book-qty-field {
  display: grid;
  gap: 0.35rem;
  font-weight: 800;
}

.book-qty-field span {
  color: var(--muted);
  font-size: 0.85rem;
}

.book-qty-field input {
  min-height: 52px;
  font-size: 1rem;
  font-weight: 800;
}

.book-primary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.book-primary-actions .btn {
  min-height: 52px;
  font-size: 1rem;
  font-weight: 900;
}

.book-action-buy {
  background: #a16207;
  border-color: #a16207;
  color: #fff;
}

.book-action-buy:hover {
  background: #7c4a00;
  border-color: #7c4a00;
}

.book-secondary-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.site-footer {
  margin-top: 2.2rem;
  border-top: 1px solid var(--line);
  background: #efe8d9;
}

.trust-strip {
  margin-top: 2rem;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.04) 25%, transparent 25%) 0 0/28px 28px,
    linear-gradient(300deg, rgba(255,255,255,0.04) 25%, transparent 25%) 0 0/28px 28px,
    #053e38;
  color: #e9fff8;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  padding: 0.95rem 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.trust-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 196, 66, 0.13);
  border: 1px solid rgba(255, 196, 66, 0.45);
  color: #f8c44a;
}

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

.trust-item strong {
  display: block;
  color: #fff;
  font-size: 1rem;
}

.trust-item p {
  margin: 0;
  color: #bfe8dd;
  font-size: 0.86rem;
}

.wa-float {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 1400;
  min-width: 124px;
  height: 52px;
  padding: 0 1rem 0 0.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #25d366, #128c4a);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  font-weight: 800;
  border: 2px solid #ffffff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.23);
}

.wa-float::before {
  content: "Chat";
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.68rem;
  font-weight: 900;
}

.wa-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.25);
}

.pwa-install-btn {
  position: fixed;
  left: 14px;
  bottom: 92px;
  z-index: 1401;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.floating-cart {
  position: fixed;
  right: 18px;
  bottom: 152px;
  z-index: 1402;
  min-width: 74px;
  height: 58px;
  padding: 0 0.85rem;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
  font-weight: 800;
  border: 2px solid #ffffff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.23);
}

.floating-cart-icon {
  font-size: 0.9rem;
}

.floating-cart-count {
  position: static;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.74rem;
  border: 1px solid rgba(255, 255, 255, 0.85);
  padding: 0 5px;
}

.floating-cart:not(.has-items) .floating-cart-count {
  background: #64748b;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1.4rem 0;
}

.muted { color: var(--muted); }
a { color: var(--brand-deep); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.34);
  outline-offset: 2px;
}

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; }
  .search-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-strip {
    font-size: 0.85rem;
  }
  .top-strip-inner {
    gap: 0.45rem;
    padding: 0.55rem 0;
  }
  .nav-wrap {
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0 0.55rem;
  }
  .brand {
    flex: 1 1 auto;
    width: auto;
    justify-content: flex-start;
    min-height: 74px;
  }
  .brand::before {
    width: min(360px, 76vw);
    height: 74px;
  }

  /* Mobile me normal flow rehne dein */
  .nav-wrap > a:not(.brand) {
    display: initial !important;
  }
  .main-nav {
    width: 100%;
    gap: 0.65rem;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.35rem;
  }
  .main-nav a {
    font-size: 0.96rem;
    white-space: nowrap;
    border: 1px solid #ddd3c1;
    border-radius: 999px;
    padding: 0.36rem 0.72rem;
    background: #fff;
  }
  .nav-submenu summary {
    font-size: 0.96rem;
    white-space: nowrap;
    border: 1px solid #ddd3c1;
    border-radius: 999px;
    padding: 0.36rem 0.72rem;
    background: #fff;
  }
  .header-actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    margin-top: 0.1rem;
  }
  .user-session-badge {
    padding: 0.4rem 0.5rem;
  }
  .header-search-advanced .search-grid {
    grid-template-columns: 1fr;
  }
  .advanced-filter-grid {
    grid-template-columns: 1fr;
  }
  .header-search {
    width: 100%;
  }
  .header-search input {
    width: 100%;
  }
  .mobile-layout-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.7rem;
    flex-wrap: wrap;
  }
  .mobile-layout-toggle span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
  }
  .layout-btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    padding: 0.32rem 0.72rem;
    font: inherit;
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
  }
  .layout-btn.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
  }
  body.mobile-books-1 .book-grid {
    grid-template-columns: 1fr;
  }
  body.mobile-books-2 .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .category-slide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }
  .category-slider-head h3 {
    font-size: 1.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html,
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 520px) {
  .trust-grid { grid-template-columns: 1fr; }
  .wa-float {
    right: 12px;
    bottom: 84px;
    min-width: 62px;
    height: 48px;
    padding: 0 0.75rem;
    font-size: 0;
  }
  .wa-float::before {
    content: "WA";
    width: 30px;
    height: 30px;
    font-size: 0.72rem;
  }
  .floating-cart {
    right: 12px;
    bottom: 140px;
    min-width: 64px;
    height: 50px;
    padding: 0 0.65rem;
  }
}

@media (max-width: 520px) {
  .category-slide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.checkout-grid textarea {
  grid-column: 1 / -1;
  min-height: 92px;
  border: 1px solid #d8cfbd;
  border-radius: 10px;
  padding: 0.78rem;
  font: inherit;
  background: #fff;
}

.checkout-grid button {
  grid-column: 1 / -1;
  justify-self: start;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.7rem;
}

.card-actions-primary,
.card-actions-secondary {
  width: 100%;
  display: grid;
  gap: 0.45rem;
}

.card-actions-primary {
  grid-template-columns: 1fr;
}

.card-actions-secondary {
  grid-template-columns: 1fr 1fr;
}

.btn-icon {
  margin-inline-end: 0.35rem;
  font-size: 0.95em;
}

.card-actions-primary .buy-btn,
.card-actions-secondary .buy-btn {
  width: 100%;
  text-align: center;
  margin-top: 0;
}

button.buy-btn {
  background: transparent;
  cursor: pointer;
}

button.buy-btn.buy-btn-solid {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

button.buy-btn.buy-btn-solid:hover {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
}

.card-actions-secondary .buy-btn {
  font-size: 0.82rem;
}

@media (max-width: 940px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .header-search-advanced {
    padding: 0.5rem;
  }
}
.book-cover {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 0.65rem;
  background: #f4ecdc;
}

.book-cover-lg {
  max-width: 320px;
}

/* Admin list me image ko fixed compact size dena */
#adminList .book-cover {
  width: 140px;
  height: 190px;
  aspect-ratio: auto;
  object-fit: cover;
  display: block;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem;
}

.stat-card h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--brand-deep);
}

.stat-card p {
  margin: 0.2rem 0 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

#authUserBox .section {
  margin-top: 1rem;
  padding-top: 0.4rem;
  border-top: 1px dashed #d8cfbd;
}

.alerts-box {
  margin-top: 0.7rem;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 0.65rem;
}

.barcode-wrap {
  width: 170px;
  max-width: 100%;
}

#adminList .barcode-wrap svg {
  width: 170px;
  height: 54px;
  display: block;
}

#adminList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 0.8rem;
}

#adminList .admin-book-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.9rem;
  align-items: start;
  margin-bottom: 0 !important;
}

#adminList .admin-book-main {
  min-width: 0;
}

#adminList .admin-actions {
  grid-column: 1 / -1;
  margin-top: 0.2rem;
  align-items: center;
}

#adminList .print-qty-input {
  width: 90px;
  padding: 0.48rem 0.5rem;
}

.category-order-item.dragging {
  opacity: 0.55;
}

.category-order-item.drag-over {
  outline: 2px dashed var(--brand);
  outline-offset: 2px;
  background: #f8fefc;
}

.settings-tab-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.is-hidden {
  display: none !important;
}

@media (max-width: 700px) {
  #adminList {
    grid-template-columns: 1fr;
  }

  #adminList .admin-book-card {
    grid-template-columns: 1fr;
  }
}

.mobile-bottom-nav {
  display: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  margin-inline-start: auto;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--ink);
  display: block;
}

@media (max-width: 820px) {
  body {
    padding-bottom: 82px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 0;
    border-top: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.98);
    backdrop-filter: blur(4px);
  }

  .mobile-bottom-nav a {
    text-decoration: none;
    text-align: center;
    padding: 0.86rem 0.2rem;
    min-height: 54px;
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--ink);
    border-inline-start: 1px solid #ece3d2;
  }

  .mobile-bottom-nav a:first-child {
    border-inline-start: 0;
  }

  .mobile-bottom-nav .nav-cart-count {
    display: inline-block;
    margin-inline-start: 0.15rem;
    font-size: 0.78rem;
    color: #b42318;
  }
}

@media (max-width: 940px) {
  .book-detail-actions {
    grid-template-columns: 1fr;
  }

  .book-primary-actions {
    grid-template-columns: 1fr;
  }

  .book-secondary-actions .btn {
    flex: 1 1 150px;
    text-align: center;
  }

  .book-cover {
    height: 185px;
  }
  .nav-toggle {
    display: inline-flex;
    margin-inline-start: 0;
    flex: 0 0 44px;
  }

  .nav-wrap.nav-has-drawer {
    position: relative;
  }

  .nav-wrap.nav-has-drawer .main-nav {
    display: none;
    width: 100%;
    max-height: 72vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.6rem;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.14);
  }

  .nav-wrap.nav-has-drawer .main-nav a {
    width: 100%;
    text-align: left;
    border: 0;
    border-radius: 8px;
    padding: 0.5rem 0.45rem;
    background: transparent;
  }

  .nav-wrap.nav-has-drawer .nav-submenu summary {
    width: 100%;
    text-align: left;
    border: 0;
    border-radius: 8px;
    padding: 0.5rem 0.45rem;
    background: transparent;
    font-size: 0.96rem;
  }

  .nav-wrap.nav-has-drawer .nav-submenu-list {
    position: static;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0.2rem 0 0.2rem 0.5rem;
    min-width: 0;
  }

  .nav-wrap.nav-has-drawer.is-open .main-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }
}
.old-price {
  text-decoration: line-through;
  color: #8b8b8b;
  font-weight: 600;
  margin-inline-end: 0.35rem;
}

.discount-price {
  color: #b42318;
  font-weight: 800;
}

.sale-badge {
  display: inline-block;
  background: #b42318;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.16rem 0.45rem;
  border-radius: 999px;
  margin-bottom: 0.45rem;
}

.order-tracker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.75rem 0;
}

.order-tracker span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px dashed var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 0.42rem 0.55rem;
  font-size: 0.85rem;
  font-weight: 800;
}

.order-tracker i {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #efe8d9;
  color: var(--ink);
  font-style: normal;
  font-size: 0.78rem;
}

.order-tracker span.is-done {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand-deep);
}

.order-tracker span.is-done i {
  background: var(--brand);
  color: #fff;
}

.order-tracker.is-cancelled {
  grid-template-columns: 1fr;
}

.order-tracker.is-cancelled span {
  border-color: rgba(180, 35, 24, 0.32);
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
}

.order-tracking-admin {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 0.55rem;
  align-items: end;
  margin: 0.8rem 0;
}

.order-tracking-admin label {
  display: grid;
  gap: 0.28rem;
  font-weight: 800;
}

.order-tracking-admin label span {
  color: var(--ink);
  font-size: 0.85rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1rem;
}

.admin-sidebar {
  position: sticky;
  top: 0.7rem;
  align-self: start;
}

.admin-menu-btn {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  margin-top: 0.45rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.admin-menu-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.admin-panel.is-hidden {
  display: none;
}

.scanner-box {
  margin-top: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem;
  background: #fff;
}

.scanner-box #barcodeScannerReader,
.scanner-box #billScannerReader {
  width: min(360px, 100%);
}

.admin-login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(15, 118, 110, 0.12), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(161, 98, 7, 0.1), transparent 24%),
    linear-gradient(135deg, #f7f4ed 0%, #fffdf8 48%, #efe8d9 100%);
}

.admin-login-shell {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 5rem) 1rem;
}

.admin-login-card {
  width: min(100%, 640px);
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(223, 215, 200, 0.95);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(29, 42, 42, 0.14);
  padding: clamp(1.2rem, 4vw, 2rem);
  position: relative;
  overflow: hidden;
}

.admin-login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-deep), var(--brand), var(--accent));
}

.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.admin-login-mark {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--brand), var(--brand-deep));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.24);
}

.admin-login-brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  line-height: 1.1;
}

.admin-login-brand span span,
.admin-login-brand div > span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-login-card h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 3.6rem);
  line-height: 0.95;
}

.admin-login-copy {
  margin: 0.85rem 0 1.35rem;
  color: var(--muted);
  max-width: 36rem;
}

.admin-login-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.admin-login-field {
  display: grid;
  gap: 0.35rem;
}

.admin-login-field span {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.admin-login-field input {
  width: 100%;
  min-height: 54px;
  background: #fff;
  border-radius: 14px;
}

.admin-login-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.admin-login-actions .btn {
  min-height: 46px;
  padding-inline: 1.35rem;
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.18);
}

.admin-login-back {
  font-weight: 800;
  text-decoration: none;
}

.admin-login-back:hover {
  text-decoration: underline;
}

.admin-login-meta {
  min-height: 1.5rem;
  margin: 0.95rem 0 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }
}

@media (max-width: 700px) {
  .order-tracker {
    grid-template-columns: 1fr;
  }

  .order-tracking-admin {
    grid-template-columns: 1fr;
  }

  .admin-login-page .top-strip-inner {
    align-items: flex-start;
  }

  .admin-login-shell {
    min-height: calc(100vh - 72px);
    place-items: start center;
    padding-top: 1.4rem;
  }

  .admin-login-form {
    grid-template-columns: 1fr;
  }

  .admin-login-card h1 {
    font-size: 2.55rem;
  }
}
