/* base */
:root {
  --navy: #0D1B2A;
  --off-white: #F5F0E8;
  --gold: #C9A84C;
  --gold-hover: #b3923b;
  --charcoal: #1E1E1E;
  --slate-dark: #152232;
  --white: #FFFFFF;
  --border-color: #E2DACD;
  --muted-text: #6C757D;
  --card-bg: #FFFFFF;
  --card-shadow: 0 10px 30px rgba(13, 27, 42, 0.08);
  --card-shadow-hover: 0 18px 40px rgba(13, 27, 42, 0.16);
  --transition-fast: all 0.25s ease-in-out;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--off-white);
  color: var(--charcoal);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

a {
  color: var(--navy);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--gold);
}

/* typography */
h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
  color: var(--navy);
  font-weight: 700;
}

.text-gold {
  color: var(--gold) !important;
}

.text-navy {
  color: var(--navy) !important;
}

.text-charcoal {
  color: var(--charcoal) !important;
}

.text-off-white {
  color: var(--off-white) !important;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: var(--muted-text);
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto 2.5rem auto;
}

.pull-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--navy);
  border-left: 3px solid var(--gold);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
}

/* layout */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.main-content {
  flex: 1 0 auto;
}

.reading-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.page-header-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--slate-dark) 100%);
  color: var(--off-white);
  padding: 4rem 0 3.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header-banner h1 {
  color: var(--off-white);
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
}

.breadcrumb-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(245, 240, 232, 0.7);
}

.breadcrumb-nav a {
  color: var(--gold);
}

.breadcrumb-nav a:hover {
  color: var(--off-white);
}

/* components */
.btn-gold {
  background-color: var(--gold);
  color: var(--navy);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  border: 2px solid var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
  cursor: pointer;
}

.btn-gold:hover {
  background-color: var(--gold-hover);
  border-color: var(--gold-hover);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(201, 168, 76, 0.3);
}

.btn-outline-gold {
  background-color: transparent;
  color: var(--gold);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  border: 2px solid var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
  cursor: pointer;
}

.btn-outline-gold:hover {
  background-color: var(--gold);
  color: var(--navy);
  transform: translateY(-2px);
}

.btn-navy {
  background-color: var(--navy);
  color: var(--off-white);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  border: 2px solid var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
  cursor: pointer;
}

.btn-navy:hover {
  background-color: var(--slate-dark);
  color: var(--gold);
  border-color: var(--slate-dark);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
}

.custom-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition-fast);
}

.custom-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(201, 168, 76, 0.4);
}

.format-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.format-badge-ebook {
  background-color: rgba(13, 27, 42, 0.08);
  color: var(--navy);
  border: 1px solid rgba(13, 27, 42, 0.2);
}

.format-badge-paperback {
  background-color: rgba(201, 168, 76, 0.15);
  color: #8c7128;
  border: 1px solid rgba(201, 168, 76, 0.4);
}

.status-badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-pending {
  background-color: #FFF3CD;
  color: #856404;
}

.status-completed {
  background-color: #D4EDDA;
  color: #155724;
}

.status-cancelled {
  background-color: #F8D7DA;
  color: #721C24;
}

.custom-input {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  background-color: #FFFFFF;
  color: var(--charcoal);
  width: 100%;
  transition: var(--transition-fast);
}

.custom-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
}

.star-rating {
  display: inline-flex;
  gap: 2px;
  color: var(--gold);
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: var(--navy);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  padding: 1.1rem 0;
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  padding: 0.85rem 0;
}

.brand-logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold) !important;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo span {
  color: var(--off-white);
}

.nav-link-custom {
  color: var(--off-white);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link-custom:hover {
  color: var(--gold);
}

.nav-link-custom.active {
  color: var(--gold);
}

.nav-link-custom.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--gold);
  border-radius: 2px;
}

.cart-icon-btn {
  position: relative;
  color: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  transition: var(--transition-fast);
}

.cart-icon-btn:hover {
  color: var(--gold);
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background-color: var(--gold);
  color: var(--navy);
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-toggle-btn {
  background: none;
  border: none;
  color: var(--off-white);
  padding: 0.5rem;
  cursor: pointer;
  display: none;
}

.mobile-nav-menu {
  display: none;
  background-color: var(--navy);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
}

.mobile-nav-menu.show {
  display: block;
}

.user-dropdown-toggle {
  background: none;
  border: none;
  color: var(--off-white);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.user-dropdown-menu {
  background-color: var(--navy);
  border: 1px solid rgba(201, 168, 76, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.user-dropdown-menu .dropdown-item {
  color: var(--off-white);
  padding: 0.6rem 1.25rem;
}

.user-dropdown-menu .dropdown-item:hover {
  background-color: rgba(201, 168, 76, 0.15);
  color: var(--gold);
}

/* footer */
.site-footer {
  background-color: var(--navy);
  color: var(--off-white);
  padding-top: 4rem;
  padding-bottom: 2rem;
  border-top: 3px solid var(--gold);
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.footer-tagline {
  color: rgba(245, 240, 232, 0.75);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-icon-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.social-icon-link:hover {
  background-color: var(--gold);
  color: var(--navy);
  transform: translateY(-2px);
}

.footer-heading {
  font-family: var(--font-heading);
  color: var(--gold);
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: rgba(245, 240, 232, 0.8);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--gold);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  gap: 0.75rem;
  color: rgba(245, 240, 232, 0.8);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.footer-contact-item svg {
  flex-shrink: 0;
  color: var(--gold);
  margin-top: 2px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(245, 240, 232, 0.6);
}

.footer-bottom a {
  color: rgba(245, 240, 232, 0.6);
}

.footer-bottom a:hover {
  color: var(--gold);
}

/* pages */

/* Home Hero */
.hero-section {
  background: linear-gradient(135deg, #0D1B2A 0%, #152232 50%, #0A1420 100%);
  color: var(--off-white);
  padding: 5rem 0 6rem 0;
  position: relative;
}

.hero-title {
  font-size: 3.25rem;
  color: var(--off-white);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(245, 240, 232, 0.85);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-book-stack {
  position: relative;
  display: inline-block;
}

.hero-book-cover {
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transform: rotate(3deg);
  transition: transform 0.3s ease;
  border: 1px solid rgba(201, 168, 76, 0.3);
}

.hero-book-cover:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-book-shadow-bg {
  position: absolute;
  top: 15px;
  left: -15px;
  width: 100%;
  height: 100%;
  background-color: var(--gold);
  border-radius: 8px;
  z-index: -1;
  opacity: 0.3;
}

/* Section styling */
.section-padding {
  padding: 5rem 0;
}

.section-bg-alt {
  background-color: #EFE8DC;
}

/* Book Cards */
.book-card-cover {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background-color: #E2DACD;
}

.book-card-cover img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.custom-card:hover .book-card-cover img {
  transform: scale(1.04);
}

.book-title {
  font-size: 1.25rem;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.book-author {
  color: var(--muted-text);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.book-price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--navy);
}

/* Author spotlight */
.author-card-avatar {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  transition: border-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.author-card:hover .author-card-avatar {
  border-color: var(--gold);
  transform: scale(1.05);
}

/* Timeline Components */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background-color: var(--gold);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-item::after {
  content: '';
  display: table;
  clear: both;
}

.timeline-badge {
  position: absolute;
  top: 15px;
  left: 50%;
  width: 18px;
  height: 18px;
  background-color: var(--gold);
  border: 4px solid var(--off-white);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.timeline-content {
  width: 45%;
}

.timeline-item.left .timeline-content {
  float: left;
  text-align: right;
}

.timeline-item.right .timeline-content {
  float: right;
  text-align: left;
}

.timeline-year-tag {
  display: inline-block;
  background-color: var(--navy);
  color: var(--gold);
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Contact map container */
.map-container {
  width: 100%;
  height: 260px;
  background-color: #E2DACD;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-text);
  font-weight: 500;
  margin-top: 1.5rem;
}

/* TOC links */
.toc-box {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--gold);
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.toc-box ul {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.toc-box a {
  color: var(--navy);
  font-weight: 500;
}

.toc-box a:hover {
  color: var(--gold);
}

/* shop */
.cart-table th {
  background-color: var(--navy);
  color: var(--off-white);
  font-family: var(--font-heading);
  font-weight: 600;
  border: none;
  padding: 0.9rem 1rem;
}

.cart-table td {
  padding: 1.2rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
}

.cart-quantity-input {
  width: 70px;
  text-align: center;
  padding: 0.35rem 0.5rem;
}

.checkout-section-title {
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
}

/* auth */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
}

.auth-left-panel {
  width: 40%;
  background: linear-gradient(135deg, var(--navy) 0%, var(--slate-dark) 100%);
  color: var(--off-white);
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-left-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.auth-right-panel {
  width: 60%;
  background-color: var(--off-white);
  padding: 3.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-form-card {
  width: 100%;
  max-width: 460px;
}

.password-field-wrap {
  position: relative;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted-text);
  cursor: pointer;
  padding: 0;
}

.password-toggle-btn:hover {
  color: var(--navy);
}

/* user dashboard */
.dashboard-layout {
  display: flex;
  min-height: calc(100vh - 80px);
}

.dashboard-sidebar {
  width: 260px;
  background-color: var(--navy);
  color: var(--off-white);
  padding: 2rem 0;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.dashboard-user-block {
  padding: 0 1.5rem 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
  text-align: center;
}

.dashboard-user-avatar {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  margin-bottom: 0.75rem;
  object-fit: cover;
}

.dashboard-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dashboard-nav-item a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.5rem;
  color: rgba(245, 240, 232, 0.8);
  font-size: 0.95rem;
  font-weight: 500;
  border-left: 4px solid transparent;
  transition: var(--transition-fast);
}

.dashboard-nav-item a:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--gold);
}

.dashboard-nav-item.active a {
  background-color: rgba(201, 168, 76, 0.12);
  color: var(--gold);
  border-left-color: var(--gold);
}

.dashboard-content {
  flex: 1;
  padding: 2.5rem;
  background-color: var(--off-white);
  overflow-x: hidden;
}

.stat-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--card-shadow);
}

.stat-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background-color: rgba(201, 168, 76, 0.15);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.stat-label {
  color: var(--muted-text);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* responsive */
@media (max-width: 991.98px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .auth-wrapper {
    flex-direction: column;
  }
  
  .auth-left-panel {
    width: 100%;
    padding: 2.5rem 1.5rem;
  }
  
  .auth-right-panel {
    width: 100%;
    padding: 2.5rem 1.5rem;
  }
  
  .dashboard-layout {
    flex-direction: column;
  }
  
  .dashboard-sidebar {
    width: 100%;
    padding: 1rem 0;
  }

  .mobile-toggle-btn {
    display: block;
  }

  .desktop-nav {
    display: none;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-badge {
    left: 20px;
  }

  .timeline-content {
    width: calc(100% - 50px);
    float: right !important;
    text-align: left !important;
  }
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .section-padding {
    padding: 3rem 0;
  }

  .page-header-banner h1 {
    font-size: 2rem;
  }
}
