/*
 * The Bookishmate - Main Stylesheet
 */

:root {
  --tbm-primary: #C85A32;
  --tbm-primary-hover: #B3522E;
  --tbm-amazon-amber: #F2A94C;
  --tbm-amazon-amber-hover: #E0963B;
  --tbm-bg: #FAF7F2;
  --tbm-surface: #FFFFFF;
  --tbm-surface-soft: #F5EFE6;
  --tbm-text-primary: #2A2421;
  --tbm-text-secondary: #4A4542;
  --tbm-text-muted: #7A7571;
  --tbm-border: #EFECE6;
  --tbm-border-subtle: #E5E0D8;
  --tbm-success: #2D7D46;
  --tbm-success-bg: #EAF5EE;
  --tbm-warning: #C27803;
  --tbm-warning-bg: #FEF6E7;
  --tbm-font-heading: 'Playfair Display', Georgia, serif;
  --tbm-font-body: 'Hind', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --tbm-radius-sm: 6px;
  --tbm-radius-md: 12px;
  --tbm-radius-lg: 16px;
  --tbm-shadow-sm: 0 2px 4px rgba(42, 36, 33, 0.04);
  --tbm-shadow-md: 0 8px 24px rgba(42, 36, 33, 0.08);
  --tbm-shadow-3d: 6px 10px 20px rgba(42, 36, 33, 0.18), 0 2px 4px rgba(42, 36, 33, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--tbm-bg);
  color: var(--tbm-text-secondary);
  font-family: var(--tbm-font-body);
  font-size: 1.05rem;
  line-height: 1.75;
}

h1, h2, h3, h4 {
  font-family: var(--tbm-font-heading);
  color: var(--tbm-text-primary);
  line-height: 1.3;
}

a {
  color: var(--tbm-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--tbm-primary-hover);
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.text-center {
  text-align: center;
}

/* Header */
.tbm-header {
  background-color: var(--tbm-surface);
  border-bottom: 1px solid var(--tbm-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.tbm-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.tbm-logo a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--tbm-font-heading);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--tbm-text-primary);
}

.tbm-logo svg {
  color: var(--tbm-primary);
  width: 28px;
  height: 28px;
}

.tbm-nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.tbm-nav-desktop a {
  color: var(--tbm-text-primary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4rem 0.2rem;
  position: relative;
}

.tbm-nav-desktop a:hover,
.tbm-nav-desktop .current-menu-item > a {
  color: var(--tbm-primary);
}

.tbm-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tbm-search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.tbm-search-input {
  background: var(--tbm-bg);
  border: 1px solid var(--tbm-border-subtle);
  border-radius: 20px;
  padding: 0.45rem 2.2rem 0.45rem 1rem;
  font-size: 0.875rem;
  font-family: var(--tbm-font-body);
  color: var(--tbm-text-primary);
  outline: none;
  width: 170px;
  transition: width 0.3s ease, border-color 0.2s;
}

.tbm-search-input:focus {
  width: 220px;
  border-color: var(--tbm-primary);
  background: #FFFFFF;
}

.tbm-search-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--tbm-text-muted);
  display: flex;
  align-items: center;
}

.tbm-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--tbm-text-primary);
}

/* Mobile Drawer */
.tbm-mobile-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: #FFFFFF;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  z-index: 999;
  transition: right 0.3s ease;
  padding: 1.5rem;
}

.tbm-mobile-drawer.open {
  right: 0;
}

.tbm-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--tbm-border);
}

.tbm-drawer-title {
  font-family: var(--tbm-font-heading);
  font-size: 1.25rem;
  font-weight: bold;
}

.tbm-drawer-close {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.tbm-mobile-nav {
  list-style: none;
}

.tbm-mobile-nav li {
  margin-bottom: 1rem;
}

.tbm-mobile-nav a {
  color: var(--tbm-text-primary);
  font-size: 1.1rem;
  font-weight: 500;
  display: block;
  padding: 0.5rem 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--tbm-radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.btn-primary {
  background-color: var(--tbm-primary);
  color: #FFFFFF !important;
}

.btn-primary:hover {
  background-color: var(--tbm-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(200, 90, 50, 0.25);
}

.btn-amazon {
  background-color: var(--tbm-amazon-amber);
  color: #2A2421 !important;
}

.btn-amazon:hover {
  background-color: var(--tbm-amazon-amber-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(242, 169, 76, 0.35);
}

.btn-outline {
  background-color: transparent;
  color: var(--tbm-text-primary) !important;
  border: 1.5px solid var(--tbm-border-subtle);
}

.btn-outline:hover {
  border-color: var(--tbm-primary);
  color: var(--tbm-primary) !important;
  background-color: #FFFFFF;
}

/* Hero Section */
.tbm-hero {
  padding: 4.5rem 0 3.5rem 0;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--tbm-bg) 100%);
  border-bottom: 1px solid var(--tbm-border);
}

.tbm-hero-title {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.tbm-hero-subtitle {
  font-size: 1.15rem;
  color: var(--tbm-text-muted);
  max-width: 600px;
  margin: 0 auto 2rem auto;
}

.tbm-hero-search {
  max-width: 540px;
  margin: 0 auto 1.5rem auto;
  display: flex;
  gap: 0.5rem;
}

.tbm-hero-search input {
  flex: 1;
  padding: 0.8rem 1.25rem;
  border-radius: 30px;
  border: 1.5px solid var(--tbm-border-subtle);
  font-size: 1rem;
  outline: none;
  background: #FFFFFF;
}

.tbm-hero-search input:focus {
  border-color: var(--tbm-primary);
}

.tbm-hero-search button {
  border-radius: 30px;
  padding: 0.8rem 1.75rem;
}

.tbm-category-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill {
  background: var(--tbm-surface);
  border: 1px solid var(--tbm-border-subtle);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--tbm-text-secondary);
  font-weight: 500;
  transition: all 0.2s ease;
}

.pill:hover {
  background: var(--tbm-primary);
  color: #FFFFFF;
  border-color: var(--tbm-primary);
}

/* Sections */
.tbm-section {
  padding: 4rem 0;
}

.tbm-section-alt {
  background: var(--tbm-surface);
  border-top: 1px solid var(--tbm-border);
  border-bottom: 1px solid var(--tbm-border);
}

.tbm-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
}

.tbm-section-header h2 {
  font-size: 2rem;
  margin: 0;
}

.tbm-section-header p {
  color: var(--tbm-text-muted);
  font-size: 1rem;
  margin-top: 0.25rem;
}

/* Book Card Grid */
.tbm-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.tbm-book-card {
  background: var(--tbm-surface);
  border: 1px solid var(--tbm-border);
  border-radius: var(--tbm-radius-md);
  overflow: hidden;
  box-shadow: var(--tbm-shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.tbm-book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tbm-shadow-md);
}

.tbm-card-cover-wrap {
  background: var(--tbm-surface-soft);
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
}

.tbm-card-img {
  max-height: 180px;
  width: auto;
  border-radius: 4px;
  box-shadow: var(--tbm-shadow-3d);
}

.tbm-cover-placeholder {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--tbm-text-muted);
  text-align: center;
}

.tbm-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tbm-card-rating {
  font-size: 0.85rem;
  color: var(--tbm-amazon-amber);
  margin-bottom: 0.4rem;
}

.tbm-card-title {
  font-size: 1.25rem;
  margin: 0 0 0.25rem 0;
}

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

.tbm-card-excerpt {
  font-size: 0.9rem;
  color: var(--tbm-text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

/* Article Grid */
.tbm-article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.tbm-article-card {
  background: var(--tbm-surface);
  border: 1px solid var(--tbm-border);
  border-radius: var(--tbm-radius-md);
  overflow: hidden;
  box-shadow: var(--tbm-shadow-sm);
  display: flex;
  flex-direction: column;
}

.tbm-article-thumb img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.tbm-article-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tbm-article-meta {
  font-size: 0.85rem;
  color: var(--tbm-text-muted);
  margin-bottom: 0.4rem;
}

.tbm-article-title {
  font-size: 1.2rem;
  margin: 0 0 0.6rem 0;
}

.tbm-article-excerpt {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex: 1;
}

.tbm-read-more {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Single Review Page */
.tbm-main-content {
  padding: 2.5rem 1.25rem 4rem 1.25rem;
  max-width: 860px;
}

.tbm-breadcrumbs {
  font-size: 0.875rem;
  color: var(--tbm-text-muted);
  margin-bottom: 1.5rem;
}

.tbm-breadcrumbs a {
  color: var(--tbm-text-muted);
}

.tbm-article-header {
  margin-bottom: 2rem;
}

.tbm-single-title {
  font-size: 2.5rem;
  margin-bottom: 0.6rem;
}

.tbm-single-meta {
  font-size: 0.9rem;
  color: var(--tbm-text-muted);
}

.tbm-product-box {
  background: var(--tbm-surface);
  border: 1px solid var(--tbm-border);
  border-radius: var(--tbm-radius-lg);
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--tbm-shadow-md);
  position: relative;
  overflow: hidden;
}

.tbm-editor-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--tbm-primary);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.35rem 1.25rem;
  border-bottom-left-radius: var(--tbm-radius-sm);
}

.tbm-product-box-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 2rem;
  align-items: center;
}

.tbm-book-cover-3d img {
  border-radius: 4px;
  box-shadow: var(--tbm-shadow-3d);
  width: 100%;
}

.tbm-product-info h3 {
  font-size: 1.6rem;
  margin: 0 0 0.3rem 0;
}

.tbm-product-author {
  font-size: 0.95rem;
  color: var(--tbm-text-muted);
  margin-bottom: 0.6rem;
}

.tbm-rating {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--tbm-amazon-amber);
  font-weight: 700;
  margin-bottom: 1rem;
}

.tbm-fast-facts {
  list-style: none;
  margin-bottom: 1.5rem;
}

.tbm-fast-facts li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.tbm-fast-facts li::before {
  content: '•';
  color: var(--tbm-primary);
  font-size: 1.4rem;
  position: absolute;
  left: 0;
  top: -4px;
}

.tbm-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Formats Comparison */
.tbm-formats-box {
  background: var(--tbm-surface);
  border: 1px solid var(--tbm-border);
  border-radius: var(--tbm-radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

.tbm-formats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.tbm-format-card {
  border: 1px solid var(--tbm-border-subtle);
  border-radius: var(--tbm-radius-sm);
  padding: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tbm-format-icon {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.tbm-format-price {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--tbm-text-primary);
  margin: 0.2rem 0;
}

.tbm-body-content {
  font-size: 1.1rem;
  line-height: 1.8;
  margin: 2.5rem 0;
}

.tbm-body-content p {
  margin-bottom: 1.5rem;
}

/* Pros & Cons */
.tbm-pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.tbm-pros-box {
  background: var(--tbm-surface);
  border: 1.5px solid #C3E6CB;
  border-radius: var(--tbm-radius-md);
  padding: 1.5rem;
}

.tbm-pros-box h4 {
  color: var(--tbm-success);
  font-size: 1.15rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--tbm-success-bg);
}

.tbm-cons-box {
  background: var(--tbm-surface);
  border: 1.5px solid #FEE3B8;
  border-radius: var(--tbm-radius-md);
  padding: 1.5rem;
}

.tbm-cons-box h4 {
  color: var(--tbm-warning);
  font-size: 1.15rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--tbm-warning-bg);
}

.tbm-pros-box ul,
.tbm-cons-box ul {
  list-style: none;
}

.tbm-pros-box li,
.tbm-cons-box li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.tbm-pros-box li::before {
  content: '✓';
  color: var(--tbm-success);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.tbm-cons-box li::before {
  content: 'ℹ';
  color: var(--tbm-warning);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Shop Layout */
.tbm-shop-header {
  text-align: center;
  margin-bottom: 3rem;
}

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

.tbm-filter-group {
  background: var(--tbm-surface);
  border: 1px solid var(--tbm-border);
  border-radius: var(--tbm-radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.tbm-filter-group h4 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--tbm-border);
}

.tbm-checkbox-label,
.tbm-radio-label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
}

.tbm-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tbm-shop-card {
  background: var(--tbm-surface);
  border: 1px solid var(--tbm-border);
  border-radius: var(--tbm-radius-md);
  overflow: hidden;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.tbm-shop-cover img {
  max-height: 150px;
  width: auto;
  margin: 0 auto 1rem auto;
  box-shadow: var(--tbm-shadow-3d);
  border-radius: 3px;
}

.tbm-shop-title {
  font-size: 1.1rem;
  margin: 0.4rem 0 0.2rem 0;
}

.tbm-shop-price {
  font-size: 1.15rem;
  font-weight: bold;
  color: var(--tbm-text-primary);
  margin: 0.5rem 0 1rem 0;
}

/* Sticky Mobile Bar */
.tbm-mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--tbm-surface);
  padding: 0.75rem 1.25rem;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
  border-top: 1px solid var(--tbm-border);
  z-index: 99;
  justify-content: space-between;
  align-items: center;
}

/* Responsive */
@media (max-width: 900px) {
  .tbm-card-grid,
  .tbm-article-grid,
  .tbm-shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tbm-shop-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tbm-nav-desktop-wrap,
  .tbm-search-form {
    display: none;
  }
  .tbm-menu-toggle {
    display: block;
  }
  .tbm-hero-title {
    font-size: 2.2rem;
  }
  .tbm-card-grid,
  .tbm-article-grid,
  .tbm-shop-grid,
  .tbm-footer-grid,
  .tbm-pros-cons-grid,
  .tbm-formats-grid,
  .tbm-product-box-grid {
    grid-template-columns: 1fr;
  }
  .tbm-mobile-sticky-bar {
    display: flex;
  }
  .tbm-book-cover-3d {
    max-width: 150px;
    margin: 0 auto;
  }
}

/* Footer */
.tbm-footer {
  background: #1C1917;
  color: #D6D3D1;
  padding-top: 3.5rem;
  margin-top: 4rem;
  border-top: 4px solid var(--tbm-primary);
}

.tbm-footer a {
  color: #D6D3D1;
}

.tbm-footer a:hover {
  color: #FFFFFF;
}

.tbm-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.tbm-footer h4 {
  color: #FFFFFF;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.tbm-footer ul {
  list-style: none;
}

.tbm-footer li {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.tbm-footer-bottom {
  border-top: 1px solid #292524;
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: #A8A29E;
  text-align: center;
}

.tbm-affiliate-note {
  max-width: 800px;
  margin: 0 auto 0.75rem auto;
  line-height: 1.6;
}


/* ==========================================================================
   Enhanced Curated Bookshelf / Shop Styles
   ========================================================================== */
.tbm-shop-container {
  max-width: 1200px;
}

.tbm-shop-banner {
  background: linear-gradient(135deg, #FAF4EB 0%, #F5E8D6 100%);
  border: 1px solid var(--tbm-border);
  border-radius: var(--tbm-radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--tbm-shadow-sm);
  position: relative;
  overflow: hidden;
}

.tbm-banner-tag {
  display: inline-block;
  background: var(--tbm-primary);
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tbm-shop-banner h2 {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
  color: var(--tbm-text-primary);
}

.tbm-shop-banner p {
  font-size: 1.05rem;
  color: var(--tbm-text-secondary);
  max-width: 700px;
  margin-bottom: 1rem;
}

.tbm-shop-stats {
  font-size: 0.9rem;
  color: var(--tbm-text-muted);
  font-weight: 600;
}

.tbm-shop-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  background: var(--tbm-surface);
  padding: 1.25rem 1.5rem;
  border-radius: var(--tbm-radius-md);
  border: 1px solid var(--tbm-border);
  box-shadow: var(--tbm-shadow-sm);
}

.tbm-shop-search-wrap {
  flex: 1;
}

.tbm-shop-search-input {
  width: 100%;
  padding: 0.7rem 1.25rem;
  border-radius: 25px;
  border: 1.5px solid var(--tbm-border-subtle);
  font-size: 0.95rem;
  outline: none;
  background: var(--tbm-bg);
  transition: all 0.2s ease;
}

.tbm-shop-search-input:focus {
  border-color: var(--tbm-primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(200, 90, 50, 0.1);
}

.tbm-shop-meta-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tbm-books-count {
  font-size: 0.9rem;
  color: var(--tbm-text-muted);
  white-space: nowrap;
}

.tbm-shop-sort-select {
  padding: 0.6rem 1rem;
  border-radius: var(--tbm-radius-sm);
  border: 1.5px solid var(--tbm-border-subtle);
  font-size: 0.9rem;
  color: var(--tbm-text-primary);
  background: #FFFFFF;
  outline: none;
  cursor: pointer;
}

.tbm-mobile-filter-btn {
  display: none;
  padding: 0.6rem 1rem;
  border-radius: var(--tbm-radius-sm);
  border: 1.5px solid var(--tbm-primary);
  background: var(--tbm-primary);
  color: #FFFFFF;
  font-weight: 600;
  cursor: pointer;
}

/* Sidebar Styling */
.tbm-shop-sidebar {
  background: var(--tbm-surface);
  border: 1px solid var(--tbm-border);
  border-radius: var(--tbm-radius-md);
  padding: 1.5rem;
  box-shadow: var(--tbm-shadow-sm);
  height: fit-content;
  position: sticky;
  top: 90px;
}

.tbm-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.tbm-sidebar-header h3 {
  font-size: 1.2rem;
  margin: 0;
}

.tbm-sidebar-close {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
}

.tbm-filter-group {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--tbm-border);
}

.tbm-filter-group:last-of-type {
  border-bottom: none;
  margin-bottom: 1rem;
}

.tbm-filter-group h4 {
  font-size: 1rem;
  color: var(--tbm-text-primary);
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tbm-filter-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: var(--tbm-text-secondary);
  margin-bottom: 0.6rem;
  cursor: pointer;
  transition: color 0.2s;
}

.tbm-filter-option:hover {
  color: var(--tbm-primary);
}

.tbm-filter-option input {
  accent-color: var(--tbm-primary);
  cursor: pointer;
}

/* Shop Product Cards */
.tbm-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.tbm-shop-card {
  background: var(--tbm-surface);
  border: 1px solid var(--tbm-border);
  border-radius: var(--tbm-radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--tbm-shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.tbm-shop-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tbm-shadow-md);
}

.tbm-shop-card-badge-wrap {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.tbm-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.tbm-badge-pick {
  background: var(--tbm-primary);
  color: #FFFFFF;
}

.tbm-badge-genre {
  background: var(--tbm-surface-soft);
  color: var(--tbm-text-muted);
}

.tbm-shop-cover-wrap {
  background: var(--tbm-surface-soft);
  border-radius: var(--tbm-radius-sm);
  padding: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 190px;
  margin-bottom: 1rem;
}

.tbm-shop-img {
  max-height: 160px;
  width: auto;
  border-radius: 3px;
  box-shadow: var(--tbm-shadow-3d);
  transition: transform 0.3s ease;
}

.tbm-shop-card:hover .tbm-shop-img {
  transform: scale(1.04) rotate(-1deg);
}

.tbm-shop-details {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tbm-shop-title {
  font-size: 1.15rem;
  margin: 0.2rem 0;
  line-height: 1.35;
}

.tbm-shop-author {
  font-size: 0.875rem;
  color: var(--tbm-text-muted);
  margin-bottom: 0.75rem;
}

.tbm-shop-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--tbm-border);
  margin-bottom: 1rem;
}

.tbm-amazon-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: #555;
  background: #F4F4F4;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}

.tbm-price-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tbm-text-primary);
}

.tbm-btn-block {
  width: 100%;
}

.tbm-kindle-sublink {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  color: var(--tbm-text-muted);
  margin-top: 0.4rem;
}

.tbm-kindle-sublink:hover {
  color: var(--tbm-primary);
}

.tbm-no-results {
  background: var(--tbm-surface);
  border: 1px solid var(--tbm-border);
  border-radius: var(--tbm-radius-md);
  padding: 3.5rem 2rem;
  text-align: center;
  grid-column: 1 / -1;
}

.tbm-no-results-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

@media (max-width: 992px) {
  .tbm-shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .tbm-shop-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .tbm-shop-meta-controls {
    justify-content: space-between;
  }
  .tbm-mobile-filter-btn {
    display: block;
  }
  .tbm-shop-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  }
  .tbm-shop-sidebar.active {
    left: 0;
  }
  .tbm-sidebar-close {
    display: block;
  }
  .tbm-shop-grid {
    grid-template-columns: 1fr;
  }
}
