/* Custom styles for the theme migration will be placed here. */

/* Basic Body and Typography from old project */
body {
  width: 100%;
  height: 100%;
}
h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 700;
}
:root {
  --bs-primary: #6f4e37;
  --bs-primary-rgb: 111, 78, 55;
}
legend {
  padding: 7px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #e5e5e5;
}
label {
  font-size: 12px;
  font-weight: normal;
}

/* top bar */
#top {
  display: none !important;
}

/* logo */
#logo {
  text-align: center;
  margin: 7px 0 7px 0;
}
#logo img {
  max-width: 200px;
  max-height: 60px;
  width: auto;
  height: auto;
}
@media (min-width: 768px) {
  #logo {
    text-align: left;
  }
}
@media (max-width: 767px) {
  #logo img {
    max-height: 40px;
  }
}

/* search */
#search {
  margin-bottom: 10px;
}
#search .form-control-lg {
  height: 40px;
  font-size: 12px;
  line-height: 20px;
  padding: 0 10px;
}
#search .btn-lg {
  font-size: 15px;
  line-height: 18px;
  padding: 0.57rem 35px;
  text-shadow: 0 1px 0 #FFF;
}

/* cart */
#cart {
  margin-bottom: 10px;
}
#cart .img-thumbnail {
  min-width: 100px;
}
#cart .btn-lg {
  font-size: 15px;
  line-height: 18px;
  padding: 14px 35px;
}
#cart .dropdown-menu {
  background: #eee;
}
#cart .dropdown-menu li {
  min-width: 300px;
}
@media (max-width: 768px) {
  #cart .dropdown-menu li {
    min-width: 100%;
  }
}

/* menu */
#menu {
  background-color: #6f4e37;
  background-image: linear-gradient(to bottom, #6f4e37, #6f4e37);
  background-repeat: repeat-x;
  border: 1px solid #6f4e37;
  border-color: #6f4e37 #6f4e37 #6f4e37;
  min-height: 40px;
  border-radius: 4px;
  padding: 0 1rem;
  margin-bottom: 20px;
}
#menu .navbar-nav > li > a {
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  padding: 10px 15px 10px 15px;
  background-color: transparent;
}
#menu .navbar-nav > li > a:hover {
  background-color: rgba(0, 0, 0, 0.1);
}
#menu .nav-link {
  font-size: 12px !important;
}
#menu .dropdown-menu {
  font-size: 12px;
}

/* === JS-CONTROLLED MENU STYLES === */

/* 1. Hide all nested dropdowns (without !important) */
#menu .dropdown-menu .dropdown-menu {
  display: none;
}

/* 2. Basic positioning for submenus (JS will handle the display) */
@media (min-width: 992px) {
  #menu .dropdown-submenu {
    position: relative;
  }
  #menu .dropdown-submenu > .dropdown-menu {
    position: absolute;
    left: 100%;
    top: -1px;
  }
}

/* 3. Mobile-specific font sizes for readability */
@media (max-width: 991.98px) {
  #menu .nav-link {
    font-size: 16px !important;
  }
  #menu .dropdown-item {
    font-size: 14px;
  }
}

/* footer */
footer {
  padding-top: 40px;
  background-color: #303030;
  border-top: 1px solid #ddd;
  color: #e2e2e2;
}
footer hr {
  border-top: none;
  border-bottom: 1px solid #666;
}
footer a {
  color: #ccc;
  text-decoration: none;
}
footer a:hover {
  color: #fff;
}
footer h5 {
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 15px;
}
footer .list-unstyled li {
    margin-bottom: 8px;
}
footer .fa-fw {
    margin-right: 5px;
}

/* Modern, Responsive Breadcrumbs */
.breadcrumb {
    background: none; /* Remove background */
    border: none; /* Remove border */
    padding: 15px 0;
    margin: 0 0 25px 0;
    border-bottom: 1px solid #e9e9e9; /* Subtle separator from content */
    list-style: none;
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on mobile */
    align-items: center;
}

.breadcrumb li {
    font-size: 13px;
    margin-top: 10px;
}

/* Set breadcrumb separator to a middle dot */
.breadcrumb li + li::before {
    content: '·';
    display: inline-block;
    color: #ccc;
    margin: 0 10px;
}

/* Forcefully hide the complex graphical separator */
.breadcrumb li::after {
    content: '' !important;
    display: none !important;
}

/* Remove the margin-left fix as spacing is now handled by the separator */
.breadcrumb li + li {
    margin-left: 0;
}

.breadcrumb li a {
    color: #6f4e37; /* Theme color for links */
    text-decoration: none;
}

.breadcrumb li a:hover {
    text-decoration: underline;
}

.breadcrumb li:last-child a {
    color: #555; /* Darker text for the current page */
    font-weight: 600;
    pointer-events: none; /* It's not a link */
}

.breadcrumb > li.breadcrumb-item:after {
    display: none;
}
.breadcrumb > li.breadcrumb-item {
    padding: 0;
    text-shadow: none;
    white-space: normal; /* Allow text to wrap */
}

.rating .fa-star {
  color: #FC0;
  font-size: 15px;
}

/* Widen site container on large screens */
@media (min-width: 1200px) {
  .container {
    max-width: 1600px;
  }
}

/*
 * General button styles to override Bootstrap defaults
 */

.btn-primary {
    background-color: #6f4e37;
    border-color: #6f4e37;
    transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-image: none !important;
    background-color: #5a3f2d !important;
    border-color: #5a3f2d !important;
    box-shadow: none !important;
}

/* Hide product name in breadcrumbs on mobile */
@media (max-width: 767.98px) {
  .breadcrumb-product-name {
    display: none;
  }
}

/* Align product title to the left on mobile */
@media (max-width: 767.98px) {
  #product-product h1 {
    text-align: left;
  }
}

/* Custom Search Autocomplete Styles */
.dropdown-menu > li > a.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    white-space: normal; /* Allow text to wrap */
    cursor: pointer;
}

.dropdown-menu > li > a.autocomplete-item:hover,
.dropdown-menu > li > a.autocomplete-item:focus {
    background-color: #f5f5f5;
}

.autocomplete-image {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.autocomplete-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.autocomplete-info {
    flex-grow: 1;
    line-height: 1.3;
}

.autocomplete-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
}

.autocomplete-price {
    font-size: 0.9em;
    color: #c00;
}

/* Ensure the dropdown has a max-height and is scrollable */
#search .dropdown-menu {
    max-height: 350px;
    overflow-y: auto;
    /* Prevent the dropdown from being too wide on large screens */
    max-width: 500px; 
}

/* --- New Filter Module Styles --- */
.filter-module {
    border: none;
    padding: 0;
}

.filter-group {
    margin-bottom: 20px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 15px;
}

.filter-group-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    text-align: left;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    display: inline-block;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    background-color: #f5f5f5;
    border: 1px solid #e9e9e9;
    border-radius: 20px; /* Pill-shaped buttons */
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.filter-btn:hover {
    background-color: #e9e9e9;
    color: #333;
    border-color: #ddd;
}

.filter-btn.active {
    background-color: #6f4e37; /* Theme primary color */
    color: #fff;
    border-color: #6f4e37;
    font-weight: 600;
}

/* --- Custom Pagination Styles --- */
.pagination {
    padding-top: 20px;
}
.pagination li > a, 
.pagination li > span {
    border: 1px solid #e9e9e9;
    color: #6f4e37;
    background-color: #fff;
    font-weight: 600;
    padding: 10px 15px;
    margin: 0 3px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}
.pagination li > a:hover {
    background-color: #f5f5f5;
    border-color: #ddd;
}
.pagination li.active > span,
.pagination li.active > span:hover {
    background-color: #6f4e37;
    border-color: #6f4e37;
    color: #fff;
}
.pagination li.disabled > span {
    background-color: #f9f9f9;
    border-color: #e9e9e9;
    color: #ccc;
}

/* --- Pagination Results Text --- */
.pagination-results {
    color: #6c757d;
    font-size: 14px;
    padding-top: 10px;
}