/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --ws-primary-color: #005a5b; /* Waterstones teal */
  --ws-dark-gray: #1a1a1a;
  --ws-light-gray: #f8f9fa;
  --ws-border-color: #e5e5e5;
  --ws-text-muted: #666666;
  --ws-accent-red: #a8201a;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--ws-dark-gray);
  background-color: #ffffff;
  font-size: 14px;
}

/* Serif font style for headings and logo */
.font-serif {
  font-family: 'Playfair Display', Georgia, serif;
}

/* --- Top Announcement Banner --- */
.top-promo-banner {
  background-color: #00c2c3; /* Bright teal */
  background-image: linear-gradient(90deg, #00b0b1 0%, #00d2d3 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  padding: 8px 0;
  letter-spacing: 0.5px;
}
.top-promo-banner a {
  color: #ffffff;
  text-decoration: underline;
}

/* --- Utility Nav Bar --- */
.utility-nav {
  font-size: 11px;
  border-bottom: 1px solid var(--ws-border-color);
  padding: 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}
.utility-nav a {
  color: var(--ws-dark-gray);
  text-decoration: none;
  transition: color 0.2s ease;
}
.utility-nav a:hover {
  color: var(--ws-primary-color);
}
.utility-nav .divider {
  color: var(--ws-border-color);
  margin: 0 8px;
}

/* --- Main Brand Header --- */
.brand-header {
  padding: 25px 0;
  border-bottom: 1px solid var(--ws-border-color);
}
.brand-logo-text {
  font-size: 46px;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--ws-dark-gray);
  text-decoration: none;
}
.brand-logo-text:hover {
  color: var(--ws-dark-gray);
}

/* --- Primary Navigation & Search --- */
.main-nav-bar {
  border-bottom: 1px solid var(--ws-border-color);
  padding: 10px 0;
}
.main-nav-links {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}
.main-nav-links a {
  color: var(--ws-dark-gray);
  text-decoration: none;
  padding: 0 10px;
  transition: color 0.2s ease;
}
.main-nav-links a:hover {
  color: var(--ws-primary-color);
}
.main-nav-links .nav-divider {
  color: var(--ws-border-color);
  font-weight: 300;
}

/* Search bar styling */
.search-container {
  max-width: 250px;
  position: relative;
}
.search-input {
  border: 1px solid #cccccc;
  border-radius: 0;
  font-size: 12px;
  padding: 6px 35px 6px 12px;
  height: 36px;
  background-color: #fcfcfc;
}
.search-input:focus {
  border-color: var(--ws-primary-color);
  box-shadow: none;
}
.search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ws-primary-color);
}

/* Basket styling */
.basket-widget {
  color: var(--ws-dark-gray);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}
.basket-icon-wrapper {
  position: relative;
  border: 1px solid var(--ws-dark-gray);
  padding: 5px 8px;
  display: inline-block;
}
.basket-count {
  font-size: 10px;
  display: block;
  text-align: center;
}

/* --- Free Delivery Promo Banner --- */
.free-delivery-banner {
  background-color: #fff9f9;
  border-bottom: 1px solid var(--ws-border-color);
  color: var(--ws-accent-red);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 6px 0;
  letter-spacing: 0.5px;
}

/* --- Main Layout --- */
.main-content {
  padding: 30px 0 60px 0;
}

.category-title {
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 30px;
  color: var(--ws-dark-gray);
}

/* Pagination */
.pagination-container {
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 20px;
}
.pagination-page-input {
  width: 30px;
  height: 24px;
  text-align: center;
  border: 1px solid var(--ws-border-color);
  font-size: 12px;
}
.pagination-arrow {
  color: var(--ws-dark-gray);
  text-decoration: none;
  font-size: 16px;
  line-height: 1;
}
.pagination-arrow.disabled {
  color: #ccc;
  pointer-events: none;
}

/* --- Book Grid --- */
.book-card {
  text-align: center;
  margin-bottom: 50px;
  transition: transform 0.2s ease;
}
.book-image-container {
  position: relative;
  display: inline-block;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  background-color: #f9f9f9;
  overflow: hidden;
}
.book-card:hover .book-image-container {
  box-shadow: 0 8px 25px rgba(0,0,0,0.18);
  transform: translateY(-5px);
}
.book-cover {
  width: 180px;
  height: 270px;
  object-fit: cover;
  display: block;
}
.book-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--ws-dark-gray);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 36px; /* consistent spacing */
  padding: 0 10px;
}
.book-title:hover {
  color: var(--ws-primary-color);
}
.book-author {
  font-size: 12px;
  color: var(--ws-primary-color);
  text-decoration: none;
  display: block;
  margin-bottom: 6px;
}
.book-author:hover {
  text-decoration: underline;
}
.book-price {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}
.book-format {
  font-size: 12px;
  color: var(--ws-text-muted);
}

/* --- Footer --- */
.site-footer {
  background-color: #2b2b2b;
  color: #ffffff;
  padding: 50px 0 20px 0;
  font-size: 12px;
}
.footer-heading {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 15px;
  letter-spacing: 0.5px;
  color: #ffffff;
  border-bottom: 1px solid #444444;
  padding-bottom: 8px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 8px;
}
.footer-links a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links a:hover {
  color: #ffffff;
}

.footer-social-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cccccc;
  text-decoration: none;
  margin-bottom: 10px;
}
.footer-social-links a:hover {
  color: #ffffff;
}
.footer-social-links i {
  font-size: 14px;
  width: 16px;
  text-align: center;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #444444;
  color: #999999;
  font-size: 11px;
  line-height: 1.6;
}
.footer-bottom a {
  color: #bbbbbb;
  text-decoration: none;
}
.footer-bottom a:hover {
  color: #ffffff;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
  .brand-logo-text {
    font-size: 36px;
  }
  .main-nav-links {
    display: none !important; /* Hide categories menu on mobile, or toggle button */
  }
  .search-container {
    max-width: 100%;
    margin-bottom: 10px;
  }
}

/* ==========================================================================
   Book Details Page Specific Styles
   ========================================================================== */

/* --- Breadcrumbs --- */
.detail-breadcrumbs {
  font-size: 11px;
  color: var(--ws-text-muted);
  line-height: 1.6;
  margin-bottom: 25px;
  padding: 0;
}
.detail-breadcrumbs p {
  margin-bottom: 8px;
}
.detail-breadcrumbs span.label {
  font-weight: 600;
  color: var(--ws-dark-gray);
  display: block;
}
.detail-breadcrumbs a {
  color: var(--ws-primary-color);
  text-decoration: underline;
}
.detail-breadcrumbs a:hover {
  color: var(--ws-dark-gray);
}

/* --- Large Cover Column --- */
.detail-cover-wrapper {
  position: relative;
  display: inline-block;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  background-color: #ffffff;
  padding: 5px;
  border: 1px solid var(--ws-border-color);
  text-align: center;
}
.detail-book-cover {
  max-width: 100%;
  height: 480px;
  object-fit: contain;
  display: block;
}
.zoom-indicator {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--ws-border-color);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ws-dark-gray);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: background-color 0.2s ease;
}
.zoom-indicator:hover {
  background-color: #ffffff;
  color: var(--ws-primary-color);
}

/* --- Details Info Column --- */
.detail-book-title {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ws-dark-gray);
  margin-bottom: 10px;
}
.detail-book-author {
  font-size: 13px;
  color: var(--ws-text-muted);
  margin-bottom: 15px;
}
.detail-book-author a {
  color: var(--ws-primary-color);
  font-weight: 600;
  text-decoration: none;
}
.detail-book-author a:hover {
  text-decoration: underline;
}

.write-review-prompt {
  font-size: 12px;
  color: var(--ws-primary-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 25px;
}
.write-review-prompt:hover {
  text-decoration: underline;
}

/* Purchase & Delivery Box Card */
.purchase-card {
  border: 1px solid var(--ws-border-color);
  background-color: #ffffff;
  padding: 20px;
  margin-bottom: 25px;
}
.purchase-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--ws-border-color);
  padding-bottom: 15px;
  margin-bottom: 15px;
}
.purchase-format-info {
  font-size: 12px;
  color: var(--ws-text-muted);
  line-height: 1.6;
}
.purchase-format-title {
  color: var(--ws-primary-color);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 3px;
}
.purchase-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--ws-dark-gray);
}

.purchase-middle-row {
  font-size: 11px;
  line-height: 1.5;
  margin-bottom: 20px;
  color: #333333;
}
.purchase-middle-row .highlight-text {
  font-weight: 600;
}

.purchase-bottom-row {
  display: flex;
  align-items: center;
  gap: 15px;
}
.quantity-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.quantity-select {
  border: 1px solid #cccccc;
  border-radius: 0;
  padding: 4px 8px;
  font-size: 12px;
  height: 38px;
  width: 55px;
  background-color: #ffffff;
}
.btn-add-basket {
  background-color: var(--ws-primary-color);
  color: #ffffff;
  border: none;
  border-radius: 0;
  padding: 8px 25px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  height: 38px;
  letter-spacing: 0.5px;
  transition: background-color 0.2s ease;
  flex-grow: 1;
  max-width: 200px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-add-basket:hover {
  background-color: #004243;
  color: #ffffff;
}

/* Actions Row (Wishlist and Share) */
.details-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.details-action-btn {
  background: none;
  border: 1px solid var(--ws-border-color);
  color: var(--ws-dark-gray);
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.details-action-btn:hover {
  border-color: var(--ws-primary-color);
  color: var(--ws-primary-color);
}
.details-actions-left {
  display: flex;
  gap: 10px;
}
.other-formats-link {
  font-size: 12px;
  color: var(--ws-primary-color);
  text-decoration: underline;
}

/* --- Tabs and Synopsis --- */
.details-tabs-header {
  border-bottom: 2px solid var(--ws-primary-color);
  margin-bottom: 20px;
  display: flex;
}
.details-tab-btn {
  background: none;
  border: none;
  color: var(--ws-primary-color);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 8px 20px 8px 0;
  letter-spacing: 0.5px;
  position: relative;
}

.details-tab-content {
  font-size: 13px;
  line-height: 1.7;
  color: #444444;
  margin-bottom: 40px;
}

/* Publisher Technical Specs Table */
.specs-box {
  background-color: #fcfcfc;
  border: 1px solid var(--ws-border-color);
  padding: 25px;
  margin-top: 30px;
}
.specs-title {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--ws-border-color);
  padding-bottom: 8px;
}
.specs-table {
  width: 100%;
  margin-bottom: 0;
}
.specs-table tr {
  border-bottom: 1px solid #f0f0f0;
}
.specs-table tr:last-child {
  border-bottom: none;
}
.specs-key {
  font-style: italic;
  color: var(--ws-text-muted);
  width: 180px;
  padding: 8px 0;
  font-size: 12px;
}
.specs-val {
  font-weight: 500;
  color: var(--ws-dark-gray);
  padding: 8px 0;
  font-size: 12px;
}

/* --- You May Also Be Interested In --- */
.related-section {
  border-top: 1px solid var(--ws-border-color);
  padding-top: 40px;
  margin-bottom: 50px;
}
.related-heading {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 25px;
  color: var(--ws-dark-gray);
}
.related-books-row {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 20px;
  padding-bottom: 15px;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}
.related-books-row::-webkit-scrollbar {
  height: 6px;
}
.related-books-row::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 3px;
}
.related-book-card-mini {
  flex: 0 0 160px;
  text-align: center;
}
.related-book-cover-mini {
  width: 120px;
  height: 180px;
  object-fit: cover;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  margin-bottom: 10px;
  transition: transform 0.2s ease;
}
.related-book-card-mini:hover .related-book-cover-mini {
  transform: translateY(-3px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.15);
}
.related-book-title-mini {
  font-size: 11px;
  font-weight: 600;
  color: var(--ws-dark-gray);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 32px;
  margin-bottom: 5px;
}
.related-book-title-mini:hover {
  color: var(--ws-primary-color);
}
.related-book-format-mini {
  font-size: 10px;
  color: var(--ws-text-muted);
  margin-bottom: 2px;
}
.related-book-price-mini {
  font-weight: 700;
  font-size: 11px;
}

/* --- Review Section --- */
.reviews-section {
  border-top: 1px solid var(--ws-border-color);
  padding-top: 40px;
  margin-bottom: 60px;
}
.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.reviews-heading {
  font-size: 18px;
  font-weight: 500;
  color: var(--ws-dark-gray);
}
.btn-write-review {
  border: 1px solid var(--ws-primary-color);
  background-color: transparent;
  color: var(--ws-primary-color);
  font-size: 11px;
  font-weight: 600;
  padding: 8px 16px;
  text-transform: uppercase;
  border-radius: 0;
  transition: all 0.2s ease;
}
.btn-write-review:hover {
  background-color: var(--ws-primary-color);
  color: #ffffff;
}
.reviews-content-box {
  background-color: #fcfcfc;
  border: 1px solid var(--ws-border-color);
  padding: 20px;
  font-size: 12px;
  color: var(--ws-text-muted);
}
.reviews-content-box a {
  color: var(--ws-primary-color);
  text-decoration: underline;
}

/* Details Page Grid Responsiveness */
@media (max-width: 767px) {
  .detail-book-cover {
    height: 350px;
    margin-bottom: 30px;
  }
  .purchase-top-row {
    flex-direction: column;
    gap: 10px;
  }
  .purchase-price {
    font-size: 24px;
  }
}

