:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --danger-color: #e74c3c;
  --warning-color: #f39c12;
  --success-color: #2ecc71;
}

body {
  background-color: #f5f7fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


.header-section {
  background-color: var(--secondary-color);
  color: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.filters-section {
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.section-header {
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

/* Brand Selector Styling */
/* Brand Selector Styling */
.brand-selector {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
}



.brand-logo-container {
  position: relative;
}

.brand-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.brand-logo:hover {
  background-color: rgba(13, 110, 253, 0.1);
}

.brand-logo.active {
  background-color: rgba(13, 110, 253, 0.2);
  border: 1px solid #0d6efd;
}

.clear-filter-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #0d6efd;
  color: white;
  border: none;
  font-size: 12px;
  font-weight: bold;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.brand-logo.active .clear-filter-btn {
  display: flex;
}

.brand-logo.active:hover .clear-filter-btn {
  background-color: #dc3545;
}

.logo-container {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
}

.brand-image {
  max-width: 100%;
  max-height: 100%;
}

.brand-name {
  font-size: 0.9rem;
  text-align: center;
}

.logo-container {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  border-radius: 50%;
  padding: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 8px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.brand-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}


.search-filters {
  background-color: #f8f9fa;
  padding: 12px; /* Reduced from 20px */
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  background-image: linear-gradient(to bottom, #ffffff, #f8f9fa);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  width: 95%; /* Increased width */
  margin: 0 auto 10px; /* Reduced bottom margin */
  max-height: 180px; /* Added max-height */
  overflow: hidden; /* Hide overflow */
  transition: max-height 0.3s ease; /* Smooth transition */
}

.filter-card {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 15px;
  height: 100%;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.filter-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: #ffffff;
  transition: all 0.3s ease;
}

.filter-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(220, 53, 69, 0.15);
  border-color: rgba(220, 53, 69, 0.2);
}

.filter-card:hover::before {
  width: 6px;
  background-color: #ffc107;
}

.filter-card .input-group {
  border-radius: 8px;
  transition: all 0.3s ease;
}

.filter-card .input-group:focus-within {
  border-color: #ffffff;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.15);
}

.filter-card .form-control {
  background-color: #f8f9fa;
  border: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.filter-card .form-control:focus {
  background-color: #fff;
  box-shadow: none;
}
.btn-clicked {
  transform: scale(0.95);
  opacity: 0.8;
  transition: all 0.1s ease;
}

.filter-card .btn {
  background-color: #ffffff;
  color: white;
  border: none;
  transition: all 0.3s ease;
}

.filter-card .btn:hover {
  background-color: #ffffff;
  color: white;
}

.filter-card .form-select {
  background-color: #f8f9fa;
  border: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23dc3545' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3e%3c/svg%3e");
  background-position: left 0.75rem center;
  background-size: 16px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-card .form-select:focus {
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
  border-color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .filter-card {
    padding: 12px;
  }
  
  .filter-card label {
    font-size: 0.8rem;
  }
  
  .filter-card .form-control, 
  .filter-card .form-select {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
  }
  
  .filter-card .btn {
    padding: 0.35rem 0.75rem;
  }
}

@media (max-width: 768px) {
  .search-filters {
    padding: 15px;
  }
  
  .filter-card {
    margin-bottom: 10px;
  }
  
  .filter-card:hover {
    transform: none;
  }
}
.filter-card-large {
  transform: scale(1.15);
  transform-origin: top left;
  z-index: 1;
}

.filter-card-large:hover {
  transform: scale(1.15) translateY(-3px); /* Combine both scale and hover effect */
}
.filter-scale-075 {
  transform: scale(0.75);
  transform-origin: top left;
}
/* Reduce width only for pno filter */
.pno-narrow {
  max-width: 160px; /* Adjust width as needed */
}
.col-lg-1-5 {
  flex: 0 0 12.5%;
  max-width: 12.5%;
}

@media (max-width: 991.98px) {
  .col-lg-1-5 {
    flex: none;
    max-width: 100%;
  }
}


/* Animation for search buttons */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.filter-card .btn:active {
  animation: pulse 0.3s ease;
}
/* Responsive Adjustments */
@media (max-width: 768px) {
  .brand-logo {
    min-width: 70px;
    padding: 8px;
  }
  
  .logo-container {
    width: 50px;
    height: 50px;
  }
  
  .brand-name {
    font-size: 0.8rem;
  }
}



.scroll-table-container {
  max-height: 800px;
  overflow-y: auto;
  overflow-x: auto;
  border: 2px solid #ced4da;
  border-radius: 12px;
  background-color: #f8f9fa;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease-in-out;
}

.scroll-table-container:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.clickable-cell {
  transition: background-color 0.2s;
}

.clickable-cell:hover {
  background-color: #f0f0f0 !important;
}

.quantity-control {
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-input {
  width: 50px;
  text-align: center;
  margin: 0 5px;
}

.quantity-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}


  
  .quantity-btn {
    width: 25px;
    height: 25px;
    font-size: 0.8rem;
  }
  
  /* Make table cells stack vertically on mobile */


/* Stock level coloring */
#productList tr[data-stock="0"] {
  background-color: #ffebee !important;
}

#productList tr[data-stock="0"] td:first-child {
  border-left: 4px solid var(--danger-color);
}

#productList tr[data-stock="1"],
#productList tr[data-stock="2"] {
  background-color: #fff8e1 !important;
}

#productList tr[data-stock="1"] td:first-child,
#productList tr[data-stock="2"] td:first-child {
  border-left: 4px solid var(--warning-color);
}

#productList tr[data-stock="3"] td:first-child {
  border-left: 4px solid var(--success-color);
}

/* Cart sidebar styles */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background-color: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: right 0.3s;
  padding: 20px;
  overflow-y: auto;
}

.cart-sidebar.open {
  right: 0;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.cart-overlay.open {
  display: block;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.cart-item-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .engine-col {
    display: none;
  }
}

@media (max-width: 992px) {
  .subtype-col, .company-col {
    display: none;
  }
}

@media (max-width: 768px) {
  .maintype-col, .location-col {
    display: none;
  }
  
  .cart-sidebar {
    width: 300px;
  }
}

/* Print styles */
@media print {
  body * {
    visibility: hidden;
  }
  .print-section, .print-section * {
    visibility: visible;
  }
  .print-section {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  .no-print {
    display: none !important;
  }
}
/* Modal fixes */
.modal {
z-index: 1060 !important;
background-color: rgba(0,0,0,0.5); /* Add semi-transparent background */
}

.modal-backdrop {
z-index: 1050 !important;
background-color: #000 !important;
}

/* Fix for multiple backdrops */
.modal-backdrop:not(:first-of-type) {
display: none !important;
}

/* Ensure modal content is always on top */
.modal-content {
position: relative;
z-index: 1061 !important;
}

/* Prevent body scrolling when modal is open */
body.modal-open {
overflow: hidden;
padding-right: 0 !important;
}
/* Availability filter styling */
#availabilityFilter {
cursor: pointer;
}

#availabilityFilter option[value="available"] {
color: var(--success-color);
}

#availabilityFilter option[value="limited"] {
color: var(--warning-color);
}

#availabilityFilter option[value="unavailable"] {
color: var(--danger-color);
}

.bootstrap-select .dropdown-menu {
border-radius: 8px;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
border: none;
}
.bootstrap-select .dropdown-toggle:focus {
outline: none !important;
box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
}
.bootstrap-select .dropdown-item {
padding: 0.5rem 1rem;
}
.bootstrap-select .dropdown-item.active, 
.bootstrap-select .dropdown-item:hover {
background-color: #f8f9fa;
}
.bootstrap-select .filter-option {
display: flex;
align-items: center;
}

.itemmain-logo {
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
padding: 10px;
border-radius: 8px;
transition: all 0.3s ease;
}

.itemmain-logo img {
width: 40px;
height: 40px;
object-fit: contain;
margin-bottom: 5px;
}

.itemmain-logo:hover {
background-color: #f0f0f0;
}

.itemmain-logo.active {
background-color: #e0e0ff;
font-weight: bold;
}
.badge-out-of-stock {
background-color: #dc3545; /* red */
color: white;
}

@media (max-width: 576px) {
  .table th, .table td {
    font-size: 0.9rem; /* Adjust font size for smaller screens */
    padding: 0.5rem; /* Adjust padding for better spacing */
  }
  .table th {
    white-space: nowrap; /* Prevent header text from wrapping */
  }
}


#floatingCartIcon {
  transition: left 0.1s ease-out, top 0.1s ease-out;
  width: 60px;
  height: 60px;
  background: #ff6d00;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  cursor: grab;
  position: fixed;
  z-index: 9999;
}

#floatingCartIcon img {
  width: 32px;
  height: 32px;
}

.dragging {
  cursor: grabbing !important;
}



#cartBadge1.pop {
  position:absolute;
  top:-6px;right:-6px;
  min-width:20px;height:20px;
  padding:0 4px;
  border-radius:999px;
  background:#fff;
  color:#ff6d00;
  font:700 12px/20px sans-serif;
  font-size: 16px;
  text-align:center;
  transform-origin:center;
}

@keyframes pop {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  80% { transform: scale(0.95); }
  100% { transform: scale(1); }
}


#floatingCartIcon img {
  width: 30px;
  height: 30px;
}

.pagination-controls-wrapper {
  margin: 0;
  padding: 0;
  width: 100%;
}

.pagination-controls-container {
  border: 1px solid #ddd;
  background-color: #f8f9fa !important;
  padding: 8px 0;
  margin: 0 auto;
  border-radius: 6px;
}

.pagination-inner-container {
  max-width: 300px;
  margin: 0 auto;
}

/* Button Styles (same as previous) */
.btn-prev, .btn-next {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-prev {
  background-color: #f1f1f1;
  color: #555;
}

.btn-next {
  background-color: #0d6efd;
  color: white;
}

.btn-prev:hover {
  background-color: #e9ecef;
  transform: translateX(-2px);
}

.btn-next:hover {
  background-color: #0b5ed7;
  transform: translateX(2px);
}

.btn-prev:active, .btn-next:active {
  transform: scale(0.95);
}

/* Button animation effects */
.btn-prev::after, .btn-next::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.3s ease;
}

.btn-prev:hover::after, .btn-next:hover::after {
  transform: scale(1);
}

/* Page info styling */
#pageInfo1 {
  font-size: 1rem;
  color: #6c757d;
  min-width: 100px;
  text-align: center;
  display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .pagination-inner-container {
      max-width: 250px;
  }
  
  .btn-prev, .btn-next {
      width: 28px;
      height: 28px;
  }
  
  #pageInfo1 {
      font-size: 0.9rem;
      min-width: 80px;
  }
}
  .input-group-text {
    font-weight: 600;
  }
  #pageInput {
    max-width: 60px;
  }

  .cart-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 0);
    background-color: #ffc107; /* Bootstrap warning color */
    color: #212529; /* Bootstrap text-dark */
    padding: 0.25rem 0.75rem;
    border-radius: 50rem; /* pill shape */
    font-size: 0.75rem;
    white-space: nowrap;
  }

  body {
    direction: rtl;
    font-family: 'Tajawal', sans-serif;
}

.product-container {
    background-color: #fff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

.detail-card, .specs-card, .price-card {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.03);
}

.detail-card h3, .specs-card h3, .price-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #0d6efd;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.detail-item {
    margin-bottom: 0.8rem;
}

.detail-label {
    font-weight: bold;
    color: #6c757d;
    display: inline-block;
    min-width: 120px;
}

.detail-value {
    color: #212529;
}

.price-amount {
    font-size: 2rem;
    font-weight: bold;
    color: #28a745;
}

.btn-add-to-cart {
    background-color: #0d6efd;
    color: white;
    padding: 0.75rem 1.5rem;
    width: 100%;
    border-radius: 0.5rem;
    font-size: 1.1rem;
}

.btn-add-to-cart:hover {
    background-color: #0b5ed7;
}

.product-image-placeholder {
    background-color: #e9ecef;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    font-size: 4rem;
    color: #adb5bd;
}

.table th {
    background-color: #f1f3f5;
}

.technical-icon {
    color: #0d6efd;
    margin-left: 0.5rem;
}

.input-group .btn {
    min-width: 40px;
}
.product-image {
  display: block;
  width: 100%;
  height: 50%;
}

.brand-highlight {
  position: absolute;
  pointer-events: none; /* So it doesn't block clicks */
  border-radius: 8px; /* Match icon shape if rounded */
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); /* Soft shadow */
  transition: all 0.3s ease;
  z-index: 1; /* Behind or in front based on layout */
  opacity: 0;
}
@media (max-width: 767.98px) {
  /* 1. Remove floating cart */
  #floatingCartIcon {
    display: none !important;
  }

  /* 2. Table container adjustments */
  .scroll-table-container {
    width: 100%;
    max-height: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    display: block;
  }

  /* 3. Reduce font size only */
  .table,
  .table thead th,
  .table tbody td,
  .table .quantity-input,
  .table .quantity-btn,
  .table .badge {
    font-size: 0.7rem !important;
  }

  /* 4. Compact padding */
  .table th, 
  .table td {
    padding: 4px 6px !important;
    
    /* Allow text to wrap normally */
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    max-width: none !important;
    word-break: break-word; /* Break long words to next line */
  }

  /* 5. Quantity controls adjustments */
  .quantity-control {
    gap: 2px;
  }
  .quantity-btn {
    width: 22px;
    height: 22px;
    padding: 0;
  }
  .quantity-input {
    width: 30px;
    height: 22px;
    padding: 0 2px;
  }

  /* 6. Make table full width */
  .table {
    width: 100% !important;
    min-width: 100% !important;
    margin: 0;
  }
}

@media (max-width: 768px) {
  #staticCartCol {
    display: block !important;
  }
  
  #floatingCartIcon {
    display: none !important;
  }

  /* Make the cart icon container a 25x25 circle with orange background */
  #staticCartIcon {
    width: 30px !important;
    height: 30px !important;
    background-color: #fc7100;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* for badge positioning */
    cursor: pointer;
  
    box-sizing: border-box;
  
    margin: 0 !important;
    padding: 0 !important;
  
  
    min-width: 25px !important;
    min-height: 25px !important;
    max-width: 25px !important;
    max-height: 25px !important;
  }
  

  /* Make the cart image smaller to fit inside the circle */
  #staticCartIcon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 0; /* no rounding on image itself */
  }
  

  /* Badge as a smaller circle on top */
  #staticCartIcon .badge {
    width: 16px;
    height: 16px;
    font-size: 10px;
    line-height: 16px;
    padding: 0;
    border-radius: 50%;
    background-color: #212529; /* dark background for contrast */
    color: #ffc107; /* text in orange */
    top: 0;
    right: 0;
    position: absolute;
    transform: translate(50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
  }


}
  dotlottie-wc {
  transform: none;
  will-change: auto;
}