/* styles.css - Complete */
:root {
  --primary-gold: #FFD700; /* deep gold */
  --primary-black: #000000;
  --primary-white: #FFFFFF;
  --light-gray: #F5F5F5;
  --dark-text: #333333;
  --shadow: 0 8px 30px rgba(0,0,0,0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--primary-gold);
  color: var(--primary-black);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary-gold);
  color: var(--primary-black);
}

.btn-primary:hover {
  background: var(--primary-white);
  color: var(--primary-black);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-black);
  color: var(--primary-black);
}

.btn-outline:hover {
  background: var(--primary-gold);
  color: var(--primary-black);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}

.full-width {
  width: 100%;
}

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 3rem;
  color: var(--primary-black);
}

/* Header */
.header {
  background: var(--primary-black);
  color: var(--primary-white);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--primary-black);
  flex-direction: column;
  padding: 1.5rem 0;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideDown 0.3s ease-out;
}

.mobile-nav a {
  color: var(--primary-white);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
}

.mobile-nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-nav .btn {
  margin: 0.5rem 1.5rem;
  text-align: center;
}

.logo {
  font-size: 2.1rem;
  color: var(--primary-white);
  margin: 0;
}

.tagline {
  font-size: 0.95rem;
  color: var(--primary-white);
  margin-top: 0.2rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav a {
  color: var(--primary-white);
  text-decoration: none;
  font-weight: 500;
}

.nav a:hover {
  color: var(--primary-gold);
}

.nav .btn-primary {
  background: var(--primary-gold);
  color: var(--primary-black);
}

.nav .btn-contact {
  background: transparent;
  border: 1px solid var(--primary-white);
  color: var(--primary-white);
}

.nav .btn-contact:hover {
  background: var(--primary-white);
  color: var(--primary-black);
}

/* Hero */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  color: rgb(255, 255, 255);
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.85), var(--primary-gold)),
              url('Books Images/bckg.jpg') center/cover no-repeat;
  z-index: -1;
  opacity: 2.5;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta .btn {
  margin: 0.6rem;
}

/* Cards (What We Offer, Our Schools) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--primary-white);
  color: var(--dark-text);
  border: 1px solid var(--primary-black);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: var(--primary-gold);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--dark-text);
}

/* Shop Section */
.shop-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0 3rem;
  gap: 1.5rem;
}

.category-filter {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.category-title {
  font-weight: 600;
  color: var(--primary-black);
  font-size: 1.1rem;
}

#categoryLinks {
  display: flex;
  list-style: none;
  gap: 0.5rem;
}

.category-link {
  display: block;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  color: var(--primary-black);
  background-color: var(--primary-white);
  border: 1px solid var(--primary-black);
  transition: all 0.3s ease;
}

.category-link:hover {
  background-color: var(--primary-gold);
  color: var(--primary-black);
}

.category-link.active {
  background-color: var(--primary-gold);
  color: var(--primary-black);
  font-weight: 600;
}

/* Mobile category select (hidden on desktop) */
#mobileCategorySelect {
  display: none;
}

.search-bar {
  padding: 1rem 1.6rem;
  font-size: 1.1rem;
  border: 2px solid var(--primary-black);
  border-radius: 60px;
  width: 100%;
  max-width: 580px;
  margin: 0 auto 2.5rem;
  display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  background-color: var(--primary-white);
  color: var(--dark-text);
}

.search-bar:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 4px 16px rgba(212,175,55,0.2);
}

/* Accessible focus states for keyboard users */
:focus-visible {
  outline: 2px solid var(--primary-gold);
  outline-offset: 2px;
}

.shop-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

.books-main {
  min-height: 600px;
}

.cart-sidebar {
  position: sticky;
  top: 2rem;
}

.cart-sidebar .cart-summary {
  position: static;
  margin: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.book-card {
  background: var(--primary-white);
  color: var(--dark-text);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  transition: all 0.32s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.book-card img, .book-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.book-card:hover img {
  transform: scale(1.05);
}

.book-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.book-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  color: var(--dark-text);
}

.book-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-gold);
  margin-bottom: 1rem;
}

.book-card .btn {
  margin-top: auto;
  width: 100%;
}

.book-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.14);
}

.book-content {
  padding: 1.4rem;
  text-align: center;
}

.book-title {
  font-size: 1.28rem;
  margin-bottom: 0.7rem;
  color: var(--dark-text);
  line-height: 1.35;
}

.book-price {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--primary-black);
  margin: 0.8rem 0 1.2rem;
}

.select-btn {
  padding: 0.75rem 1.6rem;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
}

.select-btn.select {
  background: var(--primary-black);
  color: var(--primary-white);
}

.select-btn.selected {
  background: #2e7d32; /* green confirmation */
  color: white;
}

.select-btn:hover {
  transform: translateY(-2px);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pagination button {
  padding: 0.8rem 1.6rem;
  border-radius: 50px;
  border: none;
  background: var(--primary-white);
  color: var(--dark-text);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.25s ease;
  min-width: 110px;
}

.pagination button:disabled {
  background: #f0f0f0;
  color: #aaa;
  cursor: not-allowed;
  opacity: 0.65;
}

.pagination button:not(:disabled):hover {
  background: var(--primary-gold);
  color: var(--primary-black);
  transform: translateY(-1px);
}

.page-number {
  padding: 0.6rem 1.1rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 36px;
  text-align: center;
}

.page-number.active {
  background: var(--primary-gold);
  color: var(--primary-black);
}

.page-number:hover:not(.active) {
  background: #f0e8d0;
}

/* Cart Summary */
.cart-summary {
  background: var(--primary-white);
  color: var(--dark-text);
  border: 1px solid var(--primary-black);
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  min-width: 320px;
  max-width: 400px;
}

.cart-summary.hidden {
  display: none;
}

.cart-summary h3 {
  margin-bottom: 1rem;
  color: var(--dark-text);
}

#cart-items {
  list-style: none;
  margin-bottom: 1.2rem;
}

#cart-items li {
  margin-bottom: 0.5rem;
  font-size: 0.98rem;
}

.total {
  font-size: 1.3rem;
  margin: 1.2rem 0;
  text-align: right;
}

.cart-summary .btn {
  padding-top: 1rem;
  padding-bottom: 1rem;
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* Impact Section */
.impact-section {
  background: var(--primary-white);
  color: var(--primary-black);
  text-align: center;
}

.donate-section {
  text-align: center;
}

.impact-counter {
  margin-top: 2.5rem;
  font-size: 4rem;
  font-weight: 700;
  color: var(--primary-black);
}

/* Footer */
.footer {
  background: var(--primary-black);
  color: var(--primary-white);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer a {
  color: var(--primary-white);
  text-decoration: none;
}

.social-section h3 {
  margin-bottom: 1rem;
  color: var(--primary-white);
}

.social-icons {
  display: flex;
  gap: 1.4rem;
  margin-top: 1.2rem;
  justify-content: center;
}

.social-icons a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-white);
  color: var(--primary-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  transform: translateY(-4px);
  background: var(--primary-gold);
  color: var(--primary-black);
}

.copyright {
  text-align: center;
  border-top: 1px solid var(--primary-white);
  padding-top: 2rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--primary-white);
}

/* Scroll Animations */
.fade-in, .slide-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.9s ease-out;
}

.fade-in.visible, .slide-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Ready Bag Catalogue Section */
.ready-bags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.ready-bag-card {
  background: var(--primary-white);
  color: var(--dark-text);
  border: 1px solid var(--primary-black);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.ready-bag-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.ready-bag-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.ready-bag-content {
  padding: 1.5rem;
}

.ready-bag-title {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  color: var(--dark-text);
}

.ready-bag-description {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--dark-text);
}

.dropdown {
  position: relative;
  margin-bottom: 1rem;
}

.dropdown-toggle {
  width: 100%;
  padding: 0.8rem 1.2rem;
  background: var(--primary-white);
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  color: var(--dark-text);
}

.dropdown-menu {
  display: none;
  list-style: none;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  background: var(--primary-white);
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu li {
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
}

.ready-bag-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-black);
  margin-bottom: 1.5rem;
}

.ready-bag-buttons {
  display: flex;
  gap: 1rem;
}

/* Center utility */
.center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.book-index {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--primary-gold);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  z-index: 1;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--primary-white);
  color: var(--dark-text);
  padding: 2.5rem;
  border-radius: 16px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-overlay:not(.hidden) .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: #f0f0f0;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.modal-close-btn:hover {
  background: #e0e0e0;
  color: #333;
  transform: scale(1.1);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

#current-bag-list,
#available-books-list {
  list-style: none;
  padding: 0;
  max-height: 400px;
  overflow-y: auto;
}

#current-bag-list li,
#available-books-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
  border-bottom: 1px solid #eee;
}

#current-bag-list button,
#available-books-list button {
  padding: 0.3rem 0.7rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: var(--primary-gold);
  color: var(--primary-black);
}

#modal-search {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--primary-gold);
  border-radius: 5px;
  margin-bottom: 1rem;
  background-color: var(--primary-white);
  color: var(--dark-text);
}

.modal-footer {
  text-align: right;
  margin-top: 2rem;
}

#modal-total {
  font-weight: bold;
}

/* Professional Modal Form Styles */
.modal-form-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
}

.form-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.modal-form-header h2 {
  color: var(--primary-black);
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
  font-weight: 700;
}

.modal-form-header p {
  color: #666;
  font-size: 1rem;
  margin: 0;
  font-weight: 400;
}

.professional-form {
  max-width: 100%;
}

.form-section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
}

.section-title {
  color: var(--primary-black);
  font-size: 1.3rem;
  margin: 0 0 1.5rem 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-black);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group label i {
  color: var(--primary-gold);
  width: 16px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e1e1e1;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
  transform: translateY(-1px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #aaa;
  font-style: italic;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.select-wrapper {
  position: relative;
}

.select-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: none;
}

.input-focus-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gold);
  transition: width 0.3s ease;
}

.form-group input:focus ~ .input-focus-line,
.form-group textarea:focus ~ .input-focus-line,
.form-group select:focus ~ .input-focus-line {
  width: 100%;
}

.delivery-notice {
  margin-top: 1rem;
}

.notice-box {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border: 1px solid #f1c40f;
  border-radius: 8px;
  padding: 1rem;
  animation: slideIn 0.3s ease-out;
}

.notice-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.notice-content {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #8b5a00;
}

.notice-content strong {
  color: #6c4a00;
}

.book-summary-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #e8e8e8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.book-list {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 6px;
  line-height: 1.6;
}

.total-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  background: linear-gradient(135deg, var(--primary-gold) 0%, #b8860b 100%);
  color: white;
  border-radius: 8px;
  font-weight: 600;
}

.total-label {
  font-size: 1.1rem;
}

.total-amount {
  font-size: 1.4rem;
  font-weight: 700;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid #f0f0f0;
}

.btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-gold) 0%, #b8860b 100%);
  color: var(--primary-black);
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #b8860b 0%, var(--primary-gold) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsiveness for Form */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .modal-form-header h2 {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .form-section {
    padding: 1rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn-secondary,
  .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .total-section {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-success:hover {
  background: #218838;
}

.bank-details-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bank-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
}

.bank-detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: #495057;
  font-size: 0.95rem;
}

.detail-value {
  font-weight: 700;
  color: var(--dark-text);
  font-size: 0.95rem;
}

.total-row {
  background: linear-gradient(135deg, var(--primary-gold) 0%, #b8860b 100%);
  color: white;
  margin: 0 -1.5rem -1.5rem -1.5rem;
  padding: 1rem 1.5rem;
  border-radius: 0 0 12px 12px;
}

.total-row .detail-label,
.total-row .detail-value {
  color: white;
  font-weight: 700;
}

.total-amount {
  font-size: 1.2rem !important;
}

.payment-instruction {
  font-size: 0.95rem;
  color: #6c757d;
  text-align: center;
  margin: 1rem 0;
  font-style: italic;
}

/* Mobile Sticky Cart Banner */
.mobile-cart-banner {
  display: none;
  position: sticky;
  top: 88px; /* Height of header */
  z-index: 998;
  background: var(--primary-black);
  color: var(--primary-white);
  border-top: 1px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.mobile-cart-banner.hidden {
  display: none;
}

.banner-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.5rem;
}

.banner-summary {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.banner-total-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.banner-label {
  font-size: 0.85rem;
  color: #aaa;
}

.banner-amount {
  font-weight: 700;
  color: var(--primary-gold);
  font-size: 1.1rem;
}

.banner-toggle {
  background: none;
  border: none;
  color: var(--primary-white);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.banner-details {
  max-height: 0;
  overflow: hidden;
  background: #111;
  transition: max-height 0.3s ease-out;
  border-bottom: 2px solid var(--primary-gold);
}

.banner-details.open {
  max-height: 250px;
  overflow-y: auto;
}

#mobile-cart-list {
  list-style: none;
  padding: 1rem 1.5rem;
}

#mobile-cart-list li {
  font-size: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #222;
  color: #ddd;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-inner {
      padding: 1.2rem 1.2rem; /* Increased horizontal padding to prevent edge touching */
    }

    .mobile-cart-banner:not(.hidden) {
      display: block;
      margin: 15px 15px 10px 15px; /* Increased top margin and side margins for card look */
      border-radius: 12px; /* Smoother, more beautiful corners */
      border: 1px solid rgba(255, 215, 0, 0.4);
      top: 95px; /* Adjusted to account for the new margin below header */
    }

    #categoryLinks {
      display: none; /* Hide horizontal list on mobile */
    }

    #mobileCategorySelect {
      display: block; /* Show dropdown on mobile */
      width: 100%;
      padding: 0.8rem 1.2rem;
      border: 2px solid var(--primary-black);
      border-radius: 50px;
      background-color: var(--primary-white);
      color: var(--primary-black);
      font-size: 1rem;
      font-weight: 600;
      appearance: none;
      background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
      background-repeat: no-repeat;
      background-position: right 1.2rem center;
      background-size: 1em;
      cursor: pointer;
    }

    .category-filter {
      width: 100%;
      flex-direction: column;
      align-items: center;
      gap: 0.8rem;
    }

    #mobile-banner-checkout {
      padding: 0.5rem 1rem; /* Reduced width/padding */
      font-size: 0.85rem;
      width: auto;
      min-width: 100px;
    }

    .mobile-cart-btn {
      display: none !important; /* Replaced by banner */
    }

    .mobile-cart-btn.visible {
      opacity: 1;
      pointer-events: auto;
    }

    #mobile-cart-count {
      position: absolute;
      top: -5px;
      right: -5px;
      background: #e74c3c;
      color: white;
      font-size: 0.8rem;
      padding: 2px 6px;
      border-radius: 10px;
      font-weight: bold;
      border: 2px solid white;
    }

.bank-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
}

.bank-detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: #495057;
  font-size: 0.95rem;
}

.detail-value {
  font-weight: 700;
  color: var(--dark-text);
  font-size: 0.95rem;
}

.total-row {
  background: linear-gradient(135deg, var(--primary-gold) 0%, #b8860b 100%);
  color: white;
  margin: 0 -1.5rem -1.5rem -1.5rem;
  padding: 1rem 1.5rem;
  border-radius: 0 0 12px 12px;
}

.total-row .detail-label,
.total-row .detail-value {
  color: white;
  font-weight: 700;
}

.total-amount {
  font-size: 1.2rem !important;
}

.payment-instruction {
  font-size: 0.95rem;
  color: #6c757d;
  text-align: center;
  margin: 1rem 0;
  font-style: italic;
}

.order-summary-list {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.order-summary-list li {
  margin-bottom: 0.5rem;
}

.order-total {
  font-size: 1.2rem;
  margin: 1rem 0;
  text-align: center;
}

.modal-body.order-form {
  display: block;
  gap: 0;
  margin-top: 0;
}

/* New Modal Styles */
.modal-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem 0;
}

.modal-header h2 {
  color: var(--primary-black);
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
  font-weight: 700;
}

.modal-body-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  padding: 2rem 0;
}

.success-icon, .payment-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
}

.success-message, .payment-message {
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 1rem 0;
  color: #333;
  max-width: 400px;
}

.contact-message {
  font-size: 1.1rem;
  color: #666;
  margin: 0.5rem 0;
  max-width: 400px;
}

.thank-you, .thank-you-payment {
  font-weight: 700;
  color: var(--primary-black);
  margin: 1rem 0;
  font-size: 1.1rem;
}

.whatsapp-link {
  margin: 2rem 0;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white !important;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  transition: all 0.3s ease;
}

.whatsapp-btn:hover {
  background: linear-gradient(135deg, #128c7e 0%, #25d366 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.review-intro {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #555;
  font-weight: 500;
}

.rating-group {
  margin-bottom: 2rem;
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.star-rating input {
  display: none;
}

.star-rating label {
  font-size: 2.5rem;
  color: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 8px;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: #ffd700;
  transform: scale(1.1);
  filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.3));
}

.star-rating input:checked ~ label {
  color: #ffd700;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .modal-content {
    padding: 1.5rem;
    max-width: 95%;
  }

  .modal-form-header h2 {
    font-size: 1.6rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .form-section {
    padding: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn-secondary,
  .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .total-section {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .modal-header h2 {
    font-size: 1.6rem;
  }

  .success-icon, .payment-icon {
    font-size: 3rem;
  }

  .success-message, .payment-message {
    font-size: 1rem;
  }

  .star-rating label {
    font-size: 2rem;
  }

  /* Shop Layout Mobile */
  .shop-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .books-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .book-title {
    font-size: 1rem;
  }

  .book-price {
    font-size: 1.1rem;
  }

  .cart-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    top: auto;
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .cart-sidebar.active {
    transform: translateY(0);
  }

  .cart-sidebar .cart-summary {
    border-radius: 20px 20px 0 0;
    max-width: 100%;
    width: 100%;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
    padding: 1.2rem;
    border: none;
    border-top: 2px solid var(--primary-gold);
  }

  #cart-items {
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 0.8rem;
  }

  .cart-summary .total {
    margin: 0.5rem 0;
    font-size: 1.1rem;
  }

  .mobile-nav.active {
    display: flex;
  }

  /* Mobile Navigation */
  .nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }
}
}