/* Styles for Book Gallery List View */

/* Main wrapper in list mode */
.wbg-main-wrapper.list {
  display: block;
  width: 100%;
}

/* List item wrapper - Card Style */
.wbg-item-list-wrapper {
  display: flex;
  margin-bottom: 15px; /* Adjusted spacing */
  border: 1px solid #e0e0e0; /* Card border */
  border-radius: 4px; /* Rounded corners */
  padding: 15px; /* Inner padding for card */
  background-color: #fff; /* Card background */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08); /* Slightly stronger shadow */
  width: 100%;
  align-items: center; /* Vertically center items (image and details) */
  box-sizing: border-box; /* Include padding and border in width */
}

/* Image container */
.wbg-item-list-img {
  flex: 0 0 120px; /* Fixed width */
  height: 200px; /* ADDED: Fixed height for the container */
  margin-right: 15px; /* Adjusted spacing */
  margin-left: 0; /* Reset left margin */
  overflow: hidden; /* Hide image parts outside the container */
  display: flex; /* Helps center image if needed */
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0; /* Optional: background for empty space if using contain */
}

.wbg-item-list-img img {
  width: 100%; /* Make image fill container width */
  height: 100%; /* Make image fill container height */
  display: block;
  object-fit: contain !important; /* Scale image to fit within container, show all, keep aspect ratio. !important overrides potential inline styles */
  object-position: center; /* Center the image within its frame */
}

/* Details container */
.wbg-item-list-detials {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Title styling */
.wbg-item-list-detials .wbg-title {
  font-size: 1.1em; /* Adjusted size */
  font-weight: 600; /* Slightly less bold */
  margin: 0 0 5px 0; /* Adjusted spacing */
  line-height: 1.3;
  padding-left: 0px !important;
}

.wbg-item-list-detials .wbg-title a {
  color: #333; /* Darker title color */
  text-decoration: none;
}

.wbg-item-list-detials .wbg-title a:hover {
  color: #bb1f35; /* Hover color to match theme */
}

/* Category styling */
.wbg-item-list-detials .wbg-category {
  font-size: 0.85em; /* Smaller text */
  color: #666; /* Slightly darker grey */
  margin-bottom: 8px; /* Increased spacing */
  line-height: 1.4;
}

/* Publish date styling */
.wbg-item-list-detials .wbg-publish-date {
  font-size: 0.85em; /* Smaller text */
  color: #666;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* Rating styling */
.wbg-item-list-detials .wbg-rating {
  margin-bottom: 10px;
}

/* Button container styling */
.wbg-item-list-detials .wbg-button-container-loop {
  margin-top: auto;
}

/* Button styling */
.wbg-item-list-detials .wbg-button-container-loop a {
  display: inline-block;
  padding: 8px 15px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  margin-right: 10px;
}

.wbg-item-list-detials .wbg-button-container-loop a:hover {
  background-color: #0056b3;
}

/* =============== NEW FILTER LAYOUT CSS =============== */
/* This entire block is removed as per Plan Step 4b, as layout is handled by book-filter.css */