/* ================= FILTER SIDEBAR ================= */
.filter-sidebar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}

/* Header */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.filter-header h5 {
    font-weight: 700;
    font-size: 18px;
}

.filter-header a {
    color: #133B5C;
    font-weight: 600;
    text-decoration: none;
}

/* Section */
.filter-section {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-section:last-child {
    border-bottom: none;
}

/* Titles */
.filter-section h6 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
}

/* Inputs */
.filter-section input[type="number"],
.filter-section input[type="text"] {
    font-size: 14px;
    padding: 6px 8px;
}

/* Checkbox / Radio */
.form-check {
    padding: 3px 0;
    margin-bottom: 0px;
}

.form-check-label {
    font-size: 14px;
    cursor: pointer;
    margin-left: 10px !important;
}

/* Custom checkbox & radio */
.form-check-input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin-left: 0px !important;
    border-radius: .25em !important;
}

.form-check-input:checked {
    background-color: #133B5C;
    border-color: #133B5C;
}

/* Price slider feel */
.price-radio {
    accent-color: #133B5C;
}

/* Brand list */
.brand-list {
    padding-right: 4px;
}

.brand-list::-webkit-scrollbar {
    width: 4px;
}

.brand-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

/* Buttons */
.filter-sidebar .btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    font-weight: 600;
}

.filter-sidebar .btn:hover {
    background: #e5e7eb;
}
.product-card { border-radius: 10px; }
.product-card-media { gap: 12px; flex-wrap: nowrap; overflow: hidden; }
.phone-img {
    max-height: 220px;
    max-width: 48%;
    object-fit: contain;
}
.phone-img.single { max-width: 100%; }
.phone-img-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 170px;
    color: #6c757d;
    font-size: 13px;
    font-weight: 600;
}

.phone-title { font-weight: 700; }
.compare-link { color:#133B5C; font-weight:600; }

.spec-list { list-style:none; padding:0;margin-bottom: 0rem; }
.spec-list li { margin-bottom:6px;font-size: 14px; }
.spec-list li i{ width:20px;color:#777777;font-size:12px; }
.spec-score {
  position:absolute; top:10px; left:10px;
  background:#133B5C; color:#fff;
  padding:6px 8px; border-radius:6px;
  font-weight:600; font-size:12px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.spec-score span{ line-height: 1.1;font-size: 10px;text-align: center;}
.rel-date{font-size: 12px;}
.ratings{font-size: 14px;}
.ratings i{width:20px;color:#FFBF31;font-size:12px; }
.view-photos { display:block; margin-top:10px; font-weight:600; }
.mobile-title h4{border-left: 2px solid #133B5C;padding-left:6px;}
.price-box { font-size:18px;background: #EBEBEB;border-radius: 6px; }
.price { font-size:18px; }
.btn-store {
    color: var(--primary-color);
    font-weight: 600;
}
.btn-load {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: var(--secondary-color);
    border-radius: 6px;
    transition: var(--transition);
}
.btn-load:hover {
    background: var(--secondary-color);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}
.active-filter-tags .badge{display: inline-flex;align-items: center;justify-content: center;}
.active-filter-tags .badge .filter{font-size: 20px;line-height:0px;}
/* Mobile */
@media (max-width: 768px) {
    .filter-sidebar {
        border-radius: 0;
        border: none;
    }
}
.mobile-filter-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  border-top: 1px solid #ddd;
  display: flex;
  z-index: 9999;
}

.mobile-filter-bar button {
  flex: 1;
  border: none;
  background: none;
  font-weight: 600;
}

.mobile-filter-bar .divider {
  width: 1px;
  background: #ddd;
}
.mobile-sheet {
  position: fixed;
  inset: 0;
  background: #f5f6f8;
  transform: translateY(100%);
  transition: transform .3s ease;
  z-index: 10000;
  display: flex;
  flex-direction: column;
}

.mobile-sheet.active {
  transform: translateY(0);
}

.sheet-header {
  padding: 15px;
  background: #fff;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
}
#filterSheet, #sortSheet{z-index:999999;}
.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.sheet-footer {
  padding: 10px;
  display: flex;
  gap: 10px;
  background: #fff;
  border-top: 1px solid #ddd;
}

.sheet-footer button {
  flex: 1;
  padding: 12px;
  font-weight: 700;
  border-radius: 6px;
}

.sheet-footer .apply {
  background: #133B5C;
  color: #fff;
  border: none;
}

.sheet-footer .cancel {
  background: #eee;
  border: none;
}
/* ================= MOBILE SHEETS ================= */

.mobile-sheet {
  position: fixed;
  inset: 0;
  background: #f5f6f8;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 10000;
  display: flex;
  flex-direction: column;
}

.mobile-sheet.active {
  transform: translateY(0);
}

.sheet-header {
  background: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.sheet-footer {
  background: #fff;
  padding: 10px;
  display: flex;
  gap: 10px;
  border-top: 1px solid #ddd;
}

.sheet-footer .btn {
  flex: 1;
  font-weight: 600;
}
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #ddd;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  z-index: 9999;
}

.compare-items {
  display: flex;
  gap: 10px;
}

.compare-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.compare-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 10000;
}

.compare-modal-box {
  background: #fff;
  width: 90%;
  max-width: 400px;
  margin: 60px auto;
  border-radius: 10px;
  overflow: hidden;
}
.compare-toggle {
  font-weight: 600;
  color: #0b3a66;
  cursor: pointer;
  position: relative;
}

.compare-toggle.active::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  color: #ffffff;
  font-size: 10px;
  width: 15px;
  height: 15px;
  background: #000;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  left: -20px;
  top: 5px;
  border-radius: 100%;
  background: #133B5C;
}

.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #ddd;
  padding: 15px 20px;
  z-index: 9999;
}

.compare-wrapper {
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.compare-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  flex: 1;
}

.compare-item,
.compare-add {
  border: 1px dashed #ccc;
  padding: 10px;
  text-align: center;
  border-radius: 10px;
  min-height: 110px;
  position: relative;
}

.compare-item img {
  height: 60px;
  margin-bottom: 6px;
}

.compare-add {
  cursor: pointer;
  color: #133B5C;
}

.compare-add .plus {
  font-size: 28px;
  margin-bottom: 6px;
}

.compare-actions {
  margin-left: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.compare-actions button {
  min-width: 130px;
}
.pri-name{
    text-align: left;
}
.remove-item{
    position: absolute;
    top: -5px;
    font-size: 25px;
    right: 10px;
    cursor: pointer;
}
.compare-search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}
.compare-search-box {
  background: #fff;
  width: 90%;
  max-width: 420px;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.compare-search-box .close-modal {
  position: absolute;
  top: -9px;
  right: -8px;
  background: #133B5C;
  border: none;
  font-size: 13px;
  cursor: pointer;
  color: #ffffff;
  width: 20px;
  border-radius: 3px;
  line-height: 20px;
  z-index: 99999999;
  display: none;
}
#compareSearchInput {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 12px;
}
#compareSearchResults {
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 12px;
}
.cancel-search {
  width: 100%;
}
.compare-search-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.compare-search-item:hover {
  background: #f5f5f5;
}

.compare-search-item img {
  height: 40px;
}

.compare-search-item .price {
  color: #133B5C;
  font-weight: 600;
  font-size: 13px;
}
.toast-message {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 100000000;
}

.toast-message.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}
/* ===============================
   FLOATING POPUP CONTAINER
================================ */
.mobile-reco-popup {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
}

/* ===============================
   POPUP CARD
================================ */
.mobile-reco-popup .popup-box {
  width: 340px;
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  position: relative;
  animation: slideUpFade 0.35s ease;
}

/* ===============================
   HEADER
================================ */
.mobile-reco-popup h5 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #111;
}

/* Close button */
.mobile-reco-popup .close-popup {
  position: absolute;
  top: 20px;
  right: 16px;
  border: none;
  font-size: 9px;
  cursor: pointer;
  color: #fff;
  background: #0b3a66;
  width: 15px;
  height: 15px;
  border-radius: 3px;
}

/* ===============================
   RECOMMENDATION ITEM
================================ */
.reco-item {
  display: flex;
  gap: 12px;
  align-items: center;
}

.reco-item img {
  height: 45px;
  object-fit: cover;
  background: #f2f2f2;
}

.reco-item strong {
  font-size: 15px;
  font-weight: 600;
  color: #111;
}

.reco-date {
  font-size: 13px;
  color: #777;
  margin-top: 2px;
}

/* Divider */
.mobile-reco-popup hr {
  border: none;
  height: 1px;
  background: #e6e6e6;
  margin: 12px 0;
}
/* Specs & Article links */
.product-links a {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  text-decoration: underline;
}

.product-links a:hover {
  color: #0b3c5d;
  text-decoration: none;
}
.product-links a {
  font-weight: 600;
  text-decoration: underline;
  color: #000;
}

.product-links a:hover {
  color: #0b3c5d;
}

.price-box {
  background: #f0f0f0;
  border-radius: 10px;
}

.btn-store {
  color: #0b3c5d;
}

.btn-store:hover {
  text-decoration: underline;
}
.product-views {
  font-size: 14px;
  font-weight: 600;
}

.product-views i {
  margin-left: 4px;
  color: #6c757d;
}

/* Hide active filters container if it only contains the label */
#activeFiltersContainer:has(> .d-flex > .text-muted:only-child),
#activeFiltersContainer:has(> .d-flex > .text-muted:first-child:last-child) {
    display: none !important;
}

/* Alternative: Hide if only contains "Active filters:" text */
#activeFiltersContainer:empty {
    display: none !important;
}
.filter-section h6 .collapse-icon.float-end{color:#0b3a66;font-size: 12px;transition: all 0.2s ease-in-out;}
.filter-section h6.collapsed .collapse-icon.float-end{transform: rotate(180deg);}
.category-nav .btn-category{color: #0b3a66;border-color: #0b3a66;font-size: 12px;}
.category-nav .btn-category:hover{color: #ffffff;background: #0b3a66;}
.category-nav .btn-category .badge.bg-secondary{background:#0b3a66!important;color:#ffffff !important;}
.category-nav .btn-category:hover .badge.bg-secondary{background:#ffffff!important;color:#0b3a66 !important;}
.btn .badge{line-height: 10px;}

/* Keep alignment clean on mobile */
@media (max-width: 767px) {
  .product-links {
    justify-content: flex-start;
    margin-top: 6px;
  }
}

/* ===============================
   ANIMATION
================================ */
@keyframes slideUpFade {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===============================
   MOBILE ADJUSTMENTS
================================ */
@media (max-width: 480px) {
  .mobile-reco-popup {
    right: 12px;
    bottom: 12px;
  }

  .mobile-reco-popup .popup-box {
    width: 100%;
    max-width: 320px;
  }
}

/* Hide sidebar on mobile */
@media (max-width: 991px) {
  aside.col-lg-3 {
    display: none;
  }
}

@media (max-width: 587px) {
  .compare-wrapper{
    flex-direction: column;
  }
  .compare-actions{
    margin-left: 0px;
    flex-direction: row;
    margin-top: 15px;
  }
  .compare-item{
    flex-direction: column;
  }
  .pri-name{
    text-align: center;
    font-size: 14px;
  }
  .compare-slots{
    gap: 20px;
  }
  .product-links{
    text-align: left !important;
  }
}
