/* ===== BookMart - Styles ===== */

/* ----- Import Google Font ----- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ----- CSS Custom Properties (3-Color System) ----- */
:root {
  --navy: #0B1B3F;
  --sky: #2D9CDB;
  --sky-dark: #2488c4;
  --orange: #F2994A;
  --orange-dark: #d4823a;
  --text-primary: #0B1B3F;
  --text-secondary: #5a6a7a;
  --text-muted: #8e9eae;
  --bg-body: #f5f7fa;
  --bg-white: #ffffff;
  --border: #e2e6ea;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ----- Navbar ----- */
.navbar {
  background: var(--navy);
  color: #fff;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(11, 27, 63, 0.25);
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity var(--transition);
}

.navbar .logo::before {
  content: "\1F4DA";
  font-size: 1.3rem;
}

.navbar .logo:hover {
  opacity: 0.85;
}

.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar .nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition), color var(--transition);
  position: relative;
}

.navbar .nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background-color: var(--sky);
  border-radius: 2px;
  transition: transform var(--transition);
}

.navbar .nav-links a:hover::after,
.navbar .nav-links a.active::after {
  transform: translateX(-50%) scaleX(1);
}

.navbar .nav-links a:hover {
  background-color: rgba(45, 156, 219, 0.12);
  color: var(--sky);
}

.navbar .nav-links a.active {
  background-color: rgba(45, 156, 219, 0.15);
  color: var(--sky);
}

/* Search Container */
.navbar .search-container {
  display: flex;
  align-items: center;
  margin-left: 0.75rem;
}

.navbar .search-container input {
  padding: 0.5rem 1rem;
  border: 2px solid transparent;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 0.88rem;
  width: 220px;
  outline: none;
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  transition: background-color var(--transition), border-color var(--transition), width var(--transition);
}

.navbar .search-container input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.navbar .search-container input:focus {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: var(--sky);
  width: 260px;
}

.navbar .search-container button {
  padding: 0.5rem 1.1rem;
  background-color: var(--sky);
  color: #fff;
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background-color var(--transition), transform 0.15s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.navbar .search-container button::before {
  content: "\1F50D";
  font-size: 0.8rem;
}

.navbar .search-container button:hover {
  background-color: var(--sky-dark);
}

.navbar .search-container button:active {
  transform: scale(0.95);
}

/* Cart Link */
.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.cart-link::before {
  content: "\1F6D2";
  font-size: 0.95rem;
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -6px;
  background-color: var(--orange);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(242, 153, 74, 0.4);
  animation: badgePop 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.cart-badge.visible {
  display: flex;
}

@keyframes badgePop {
  0% {
    transform: scale(0);
  }
  60% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* ----- Container ----- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  flex: 1;
  width: 100%;
}

/* ----- Hero Section ----- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--sky) 100%);
  color: #fff;
  text-align: center;
  padding: 3.5rem 2.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero h1 {
  font-size: 2.3rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ----- Section Header ----- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
}

/* ===== Filter Section ===== */
.filters {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 35px 0;
}

.category-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid rgba(11, 27, 63, 0.15);
  background: #ffffff;
  color: #0B1B3F;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 110px;
  box-shadow: 0 6px 16px rgba(11, 27, 63, 0.08);
}

.filter-btn:hover {
  background: #0B1B3F;
  color: #ffffff;
  border-color: #0B1B3F;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: #2D9CDB;
  color: #ffffff;
  border-color: #2D9CDB;
  box-shadow: 0 8px 22px rgba(45, 156, 219, 0.35);
}

/* Price Filter Dropdown */
.price-filter {
  height: 54px;
  min-width: 220px;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 14px;
  border: 2px solid rgba(11, 27, 63, 0.15);
  background: #ffffff;
  color: #0B1B3F;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(11, 27, 63, 0.08);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  appearance: auto;
  outline: none;
}

.price-filter:hover {
  border-color: #2D9CDB;
}

.price-filter:focus {
  outline: none;
  border-color: #2D9CDB;
  box-shadow: 0 0 0 4px rgba(45, 156, 219, 0.18);
}

/* Result Count */
.result-count {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: right;
}

/* Rating Stars */
.stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--orange);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.stars .rating-number {
  margin-left: 0.4rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ===== Products Grid Section ===== */
.products-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.book-grid-section {
  margin: 1.5rem 0 1rem;
}

/* ===== Product Card ===== */
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
}

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

.product-card:active {
  transform: translateY(-2px);
}

.product-card-content {
  flex: 1;
}

/* Sale Badge */
.product-card .sale-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(242, 153, 74, 0.3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Card Image */
.product-card .card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background-color: #eef1f4;
  border-bottom: 1px solid var(--border);
  transition: transform 0.4s ease;
}

.product-card:hover .card-image {
  transform: scale(1.05);
}

.product-card .card-image-wrapper {
  overflow: hidden;
  height: 220px;
}

/* Card Body */
.product-card .card-body {
  padding: 1rem 1rem 0.8rem;
  display: flex;
  flex-direction: column;
}

.product-card .card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.3rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .card-author {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.product-card .card-rating {
  margin-bottom: 0.5rem;
}

/* Card Prices */
.product-card .card-prices {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.2rem;
}

.product-card .old-price {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card .new-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--orange);
}

/* Card Add to Cart Button */
.add-to-cart-btn {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--sky);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.15s, box-shadow var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
  margin-top: auto;
}

.add-to-cart-btn:hover {
  background: var(--sky-dark);
  box-shadow: 0 4px 12px rgba(45, 156, 219, 0.35);
}

.add-to-cart-btn:active {
  transform: scale(0.96);
}

/* No Results */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3.5rem 1.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.no-results p:first-child {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

/* ===== Product Detail Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 27, 63, 0.55);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(11, 27, 63, 0.25);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 10;
  line-height: 1;
}

.modal-close:hover {
  background: var(--orange);
  color: #fff;
  transform: rotate(90deg);
}

/* Product Detail Table */
.product-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.product-detail-table .detail-title-row {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 1.1rem 1.2rem;
  text-align: center;
  letter-spacing: 0.5px;
  background: var(--navy);
}

.product-detail-table .detail-value {
  color: var(--text-primary);
  padding: 0.6rem 1rem 0.6rem 0;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.modal-body {
  padding: 0;
  overflow: hidden;
}

.modal-body .product-detail-table {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.product-detail-table .detail-image-cell {
  width: 180px;
  padding: 0.8rem;
  vertical-align: middle;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.product-detail-table .detail-image {
  width: 130px;
  height: 185px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(11, 27, 63, 0.15);
  background-color: #eef1f4;
}

.product-detail-table .detail-description {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.88rem;
  padding: 0.8rem 1rem;
  border-bottom: none;
}

.product-detail-table tr:last-child td {
  border-bottom: none;
}

.product-detail-table .detail-old-price {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 0.85rem;
  margin-right: 0.5rem;
}

.product-detail-table .detail-new-price {
  color: var(--orange);
  font-weight: 700;
  font-size: 1.1rem;
}

.product-detail-table .detail-category-tag {
  display: inline-block;
  background: rgba(45, 156, 219, 0.1);
  color: var(--sky);
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Modal Add to Cart button cell */
.product-detail-table .modal-add-cell {
  padding: 0.8rem 1rem;
  text-align: center;
  border-bottom: none;
}

.modal-add-btn {
  width: 100%;
  max-width: 280px;
  padding: 0.7rem 1.5rem;
  background: var(--sky);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.15s, box-shadow var(--transition), background var(--transition);
}

.modal-add-btn:hover {
  background: var(--sky-dark);
  box-shadow: 0 4px 14px rgba(45, 156, 219, 0.35);
  transform: translateY(-1px);
}

.modal-add-btn:active {
  transform: scale(0.96);
}

/* ----- Cart Page ----- */
.cart-page h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cart-page h1::before {
  content: "\1F6D2";
  font-size: 1.5rem;
}

/* ----- Cart Table ----- */
.cart-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}

.cart-table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.cart-table-wrapper::-webkit-scrollbar-track {
  background: #f5f7fa;
  border-radius: 0 0 10px 10px;
}

.cart-table-wrapper::-webkit-scrollbar-thumb {
  background: #c4c9ce;
  border-radius: 8px;
}

.cart-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #a0a7ae;
}

.cart-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-white);
  font-size: 0.88rem;
  min-width: 600px;
}

.cart-table th,
.cart-table td {
  padding: 1rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.cart-table thead th {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  border-bottom: none;
}

.cart-table .cart-table-heading {
  background: linear-gradient(135deg, var(--navy) 0%, var(--sky) 100%);
  color: var(--orange);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 1.5px;
  padding: 1rem;
  text-transform: none;
  border-bottom: none;
}

/* Column widths */
.col-book { width: 38%; }
.col-price { width: 15%; }
.col-qty { width: 20%; }
.col-subtotal { width: 17%; }
.col-remove { width: 10%; }

/* Book cell */
.cart-book-cell {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-table-cover {
  width: 50px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background-color: #eef1f4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.cart-book-info {
  min-width: 0;
}

.cart-book-title {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}

.cart-book-author {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Price cell */
.cart-price-cell {
  font-weight: 600;
  color: var(--text-secondary);
}

/* Quantity controls */
.cart-qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background-color: var(--bg-body);
  border-radius: var(--radius-sm);
  padding: 0.2rem;
}

.cart-qty-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: var(--bg-white);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--transition);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.cart-qty-btn:hover {
  color: var(--sky);
  box-shadow: 0 2px 8px rgba(45, 156, 219, 0.15);
}

.cart-qty-btn:active {
  transform: scale(0.9);
}

.cart-qty-value {
  font-size: 0.95rem;
  font-weight: 600;
  min-width: 28px;
  text-align: center;
  color: var(--text-primary);
}

/* Subtotal cell */
.cart-subtotal-cell {
  font-weight: 700;
  color: var(--orange);
  font-size: 0.95rem;
}

/* Remove button */
.cart-remove-item {
  width: 34px;
  height: 34px;
  border: 2px solid var(--border);
  background: var(--bg-white);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-remove-item:hover {
  border-color: var(--orange);
  color: var(--orange);
  background-color: rgba(242, 153, 74, 0.05);
  box-shadow: 0 2px 8px rgba(242, 153, 74, 0.15);
}

.cart-remove-item:active {
  transform: scale(0.9);
}

/* Table row striping & hover */
.cart-table tbody tr:nth-child(even) {
  background-color: #f8f9fb;
}

.cart-table tbody tr:hover {
  background-color: rgba(45, 156, 219, 0.04);
}

.cart-table tbody tr:last-child td {
  border-bottom: none;
}

/* Total row */
.cart-total-row td {
  border-top: 2px solid var(--navy);
  padding: 1.2rem 1rem;
}

.cart-total-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  text-align: right;
}

.cart-total-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--orange);
}

/* Actions row */
.cart-actions-row td {
  padding: 1rem;
  border-bottom: none;
}

.cart-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Clear cart button */
.clear-cart-btn {
  padding: 0.65rem 1.5rem;
  background-color: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}

.clear-cart-btn:hover {
  background-color: var(--orange);
  color: #fff;
  box-shadow: 0 3px 10px rgba(242, 153, 74, 0.25);
}

.clear-cart-btn:active {
  transform: scale(0.96);
}

/* Checkout button in cart */
.cart-actions .checkout-btn {
  padding: 0.7rem 2rem;
  background: var(--sky);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.15s, box-shadow var(--transition), background var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cart-actions .checkout-btn::before {
  content: "\2705";
  font-size: 0.85rem;
}

.cart-actions .checkout-btn:hover {
  background: var(--sky-dark);
  box-shadow: 0 4px 14px rgba(45, 156, 219, 0.35);
  transform: translateY(-1px);
}

.cart-actions .checkout-btn:active {
  transform: scale(0.96);
}

/* ----- Empty Cart ----- */
.empty-cart {
  text-align: center;
  padding: 5rem 2rem;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.empty-cart .empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1.2rem;
  display: block;
}

.empty-cart h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.empty-cart p {
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  font-size: 0.95rem;
}

.empty-cart .browse-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 2rem;
  background: var(--sky);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.empty-cart .browse-link::before {
  content: "\1F4D6";
  font-size: 0.9rem;
}

.empty-cart .browse-link:hover {
  background: var(--sky-dark);
  box-shadow: 0 4px 14px rgba(45, 156, 219, 0.35);
  transform: translateY(-2px);
}

/* ----- Toast Notification ----- */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--sky);
  color: #fff;
  padding: 1rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.92rem;
  box-shadow: 0 6px 24px rgba(45, 156, 219, 0.35);
  transform: translateY(120px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast::before {
  content: "\2713";
  font-size: 1.1rem;
  font-weight: 700;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ----- Footer ----- */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 1.8rem 2rem;
  font-size: 0.88rem;
  margin-top: auto;
  letter-spacing: 0.3px;
}

.footer p {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== Responsive Styles ===== */

/* Tablet */
@media (max-width: 992px) {
  .products-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small tablet / large mobile */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    height: auto;
    padding: 0.7rem 1.2rem;
    gap: 0.6rem;
  }

  .navbar .logo {
    font-size: 1.3rem;
  }

  .navbar .nav-links {
    flex: 1;
    justify-content: flex-end;
    gap: 0.3rem;
  }

  .navbar .nav-links a {
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
  }

  .navbar .search-container {
    width: 100%;
    order: 3;
    margin-left: 0;
  }

  .navbar .search-container input {
    width: 100%;
    flex: 1;
  }

  .navbar .search-container input:focus {
    width: 100%;
  }

  .container {
    padding: 1.5rem 1.2rem;
  }

  .hero {
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .section-header h2 {
    font-size: 1.3rem;
  }

  /* Filter responsive */
  .filters {
    gap: 12px;
    justify-content: center;
  }

  .filter-btn {
    padding: 12px 22px;
    font-size: 15px;
    min-width: auto;
  }

  .price-filter {
    width: 100%;
    max-width: 320px;
  }

  .product-card .card-image,
  .product-card .card-image-wrapper {
    height: 180px;
  }

  .product-card .card-body {
    padding: 0.8rem 0.8rem 0.5rem;
  }

  .add-to-cart-btn {
    padding: 0.55rem 0.8rem;
  }

  .product-card .card-title {
    font-size: 0.88rem;
  }

  .product-card .new-price {
    font-size: 1rem;
  }

  .modal-content {
    max-width: 95vw;
    border-radius: var(--radius-md);
  }

  .product-detail-table {
    font-size: 0.82rem;
  }

  .product-detail-table .detail-title-row {
    font-size: 1rem;
    padding: 0.9rem 1rem;
  }

  .product-detail-table .detail-image {
    width: 100px;
    height: 140px;
  }

  .product-detail-table .detail-image-cell {
    width: 130px;
    padding: 0.6rem;
  }

  .product-detail-table .detail-value {
    padding: 0.5rem 0.8rem 0.5rem 0;
    font-size: 0.8rem;
  }

  .product-detail-table .detail-description {
    font-size: 0.82rem;
    padding: 0.6rem 0.8rem;
  }

  .cart-table th,
  .cart-table td {
    padding: 0.7rem 0.75rem;
    font-size: 0.82rem;
  }

  .cart-table-cover {
    width: 40px;
    height: 56px;
  }

  .cart-book-title {
    font-size: 0.85rem;
  }

  .cart-qty-btn {
    width: 26px;
    height: 26px;
    font-size: 0.85rem;
  }

  .cart-total-value {
    font-size: 1.1rem;
  }

  .cart-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .clear-cart-btn,
  .cart-actions .checkout-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    padding: 0.85rem 1.2rem;
    font-size: 0.85rem;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .products-container {
    grid-template-columns: 1fr;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .navbar .logo {
    font-size: 1.1rem;
  }

  .navbar .logo::before {
    font-size: 1rem;
  }

  .navbar .nav-links {
    gap: 0.2rem;
  }

  .navbar .nav-links a {
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
  }

  .navbar .search-container input {
    font-size: 0.82rem;
    padding: 0.4rem 0.8rem;
  }

  .navbar .search-container button {
    font-size: 0.82rem;
    padding: 0.4rem 0.8rem;
  }

  .navbar .search-container button::before {
    content: '';
  }

  .container {
    padding: 1rem 0.8rem;
  }

  .hero {
    padding: 1.8rem 1rem;
    border-radius: var(--radius-md);
  }

  .hero h1 {
    font-size: 1.4rem;
  }

  .hero p {
    font-size: 0.85rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-btn {
    padding: 10px 18px;
    font-size: 14px;
    min-width: auto;
  }

  .price-filter {
    height: 48px;
    min-width: 100%;
    font-size: 14px;
    padding: 0 14px;
  }

  .product-card .card-image,
  .product-card .card-image-wrapper {
    height: 200px;
  }

  .product-detail-table .detail-image {
    width: 80px;
    height: 115px;
  }

  .product-detail-table .detail-image-cell {
    width: 100px;
    padding: 0.5rem;
  }

  .product-detail-table .detail-value {
    padding: 0.4rem 0.6rem 0.4rem 0;
    font-size: 0.75rem;
  }

  .cart-page h1 {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
  }

  .cart-table-wrapper {
    border-radius: var(--radius-sm);
  }

  .empty-cart {
    padding: 3rem 1.5rem;
  }

  .empty-cart .empty-icon {
    font-size: 2.5rem;
  }

  .footer {
    padding: 1.2rem;
    font-size: 0.8rem;
  }
}
