/* Products Page Layout */

.products-layout {
  display: flex;
  min-height: calc(100vh - 70px);
  margin-top: 70px;
}

/* Sidebar Styles */
.products-sidebar {
  width: 220px;
  background: var(--white);
  border-right: 1px solid #e5e7eb;
  position: fixed;
  left: 0;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 1.25rem 1rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.sidebar-header h3 {
  font-size: 1rem;
  color: var(--dark-color);
  margin-bottom: 0.1rem;
  font-weight: 700;
}

.sidebar-header p {
  font-size: 0.75rem;
  color: var(--gray-color);
  margin: 0;
  font-weight: 500;
}

.manufacturer-nav {
  padding: 0.3rem 0;
}

.manufacturer-link {
  display: flex;
  align-items: center;
  padding: 0.35rem 1rem;
  color: var(--dark-color);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  position: relative;
}

.manufacturer-link i {
  font-size: 0.7rem;
  color: var(--gray-color);
  margin-right: 0.5rem;
  transition: all 0.2s ease;
}

.manufacturer-link span {
  font-weight: 500;
  font-size: 0.85rem;
}

.manufacturer-link:hover {
  background: var(--bg-soft);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
}

.manufacturer-link:hover i {
  color: var(--primary-color);
  transform: translateX(3px);
}

.manufacturer-link.active {
  background: linear-gradient(
    90deg,
    rgba(15, 123, 255, 0.12) 0%,
    rgba(15, 123, 255, 0.04) 100%
  );
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  border-left-width: 4px;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(15, 123, 255, 0.1);
}

.manufacturer-link.active i {
  color: var(--primary-color);
  transform: translateX(3px);
}

/* Specialty menu items (Accessories and Pellet Stove Parts) */
.manufacturer-link[data-manufacturer="accessories"],
.manufacturer-link[data-manufacturer="pellet-stove-parts"] {
  border-left-color: #ff9800;
  border-left-width: 3px;
  padding-left: calc(1rem - 2px);
}

.manufacturer-link[data-manufacturer="accessories"]:hover,
.manufacturer-link[data-manufacturer="pellet-stove-parts"]:hover {
  border-left-color: #e65100;
  background: rgba(255, 152, 0, 0.1);
}

.manufacturer-link[data-manufacturer="accessories"].active,
.manufacturer-link[data-manufacturer="pellet-stove-parts"].active {
  border-left-color: #ff9800;
  background: linear-gradient(
    90deg,
    rgba(255, 152, 0, 0.15) 0%,
    rgba(255, 152, 0, 0.05) 100%
  );
  color: #e65100;
}

.manufacturer-link[data-manufacturer="accessories"].active i,
.manufacturer-link[data-manufacturer="pellet-stove-parts"].active i {
  color: #ff9800;
}

/* Sidebar Search Box */
.sidebar-search {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.search-box-sidebar {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--light-color);
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  transition: all 0.2s ease;
}

.search-box-sidebar:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(15, 123, 255, 0.12);
}

.search-box-sidebar i {
  color: var(--gray-color);
  font-size: 0.9rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.search-input-sidebar {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.85rem;
  color: var(--dark-color);
  font-family: inherit;
}

.search-input-sidebar::placeholder {
  color: #bcc1c7;
}

.search-clear-sidebar {
  background: none;
  border: none;
  color: var(--gray-color);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.search-clear-sidebar:hover {
  color: var(--primary-color);
}

/* Main Content Area */
.products-main {
  flex: 1;
  margin-left: 220px;
  padding: 2.5rem 2rem;
  background: var(--bg-soft);
  overflow-y: auto;
  height: calc(100vh - 70px);
  scroll-behavior: smooth;
}

.products-header {
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease;
}

.products-header h1 {
  font-size: 2.5rem;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.products-header p {
  color: var(--gray-color);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Search Box Styles */
.products-search-container {
  margin-bottom: 2.5rem;
  animation: fadeInDown 0.5s ease-out;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--white);
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-box:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 4px 16px rgba(15, 123, 255, 0.15);
}

.search-icon {
  color: var(--gray-color);
  margin-right: 0.75rem;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  color: var(--dark-color);
  font-family: inherit;
}

.search-input::placeholder {
  color: #adb5bd;
}

.search-clear {
  background: none;
  border: none;
  color: var(--gray-color);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin-left: 0.5rem;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.search-clear:hover {
  color: var(--primary-color);
  transform: scale(1.15);
}

.search-results-info {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--gray-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-results-info.active {
  color: var(--primary-color);
  font-weight: 500;
}

.search-results-info i {
  font-size: 1rem;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.products-header p {
  font-size: 1.125rem;
  color: var(--gray-color);
  max-width: 700px;
}

/* Products Sections Container */
.products-sections-container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.manufacturer-section {
  scroll-margin-top: 120px;
  padding: 2rem 0;
  border-bottom: 2px solid #e5e7eb;
}

.manufacturer-section:last-child {
  border-bottom: none;
}

.section-header-products {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--primary-color);
}

.section-header-products h2 {
  font-size: 2rem;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.section-header-products p {
  font-size: 1rem;
  color: var(--gray-color);
  margin: 0;
}

/* Products Grid */
.products-grid-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Product Card */
.product-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  box-shadow: 0 12px 32px rgba(15, 123, 255, 0.15);
  transform: translateY(-6px);
  border-color: #0f7bff;
}

/* Specialty Products (Accessories and Pellet Stove Parts) */
.product-card.specialty-product {
  border-left: 4px solid #ff9800;
}

.product-card.specialty-product:hover {
  border-left-color: #e65100;
  box-shadow: 0 12px 32px rgba(255, 152, 0, 0.2);
}

.product-image {
  width: 100%;
  height: 260px;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
  overflow: hidden;
}

.product-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 123, 255, 0) 0%,
    rgba(15, 123, 255, 0.03) 100%
  );
  pointer-events: none;
}

.product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

.product-info {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-header {
  margin-bottom: 0.75rem;
}

.product-info h3 {
  font-size: 1rem;
  color: var(--dark-color);
  margin: 0 0 0.35rem 0;
  font-weight: 700;
  line-height: 1.3;
}

.product-code {
  display: inline-block;
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  color: var(--primary-color);
  padding: 0.3rem 0.75rem;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.product-specs {
  margin-bottom: 1rem;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

.product-specs .spec {
  display: flex;
  gap: 0.6rem;
  padding: 0.6rem;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  align-items: flex-start;
  transition: all 0.2s ease;
}

.product-specs .spec:hover {
  background: #f0f4ff;
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(15, 123, 255, 0.1);
}

.product-specs .spec:last-child {
  margin-bottom: 0;
}

.product-specs .spec i {
  color: var(--primary-color);
  font-size: 1rem;
  margin-top: 0.1rem;
  min-width: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spec-content {
  flex: 1;
}

.spec-content strong {
  display: block;
  font-size: 0.7rem;
  color: var(--primary-color);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.15rem;
}

.spec-content p {
  margin: 0;
  font-size: 0.8rem;
  color: #1f2937;
  line-height: 1.4;
  font-weight: 600;
}

.btn-quote {
  display: none !important;
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, #0055cc 100%);
  color: var(--white);
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(15, 123, 255, 0.25);
}

.btn-quote:hover {
  background: linear-gradient(135deg, #0055cc 0%, #003a99 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 123, 255, 0.35);
}

.btn-quote:active {
  transform: translateY(0);
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(15, 123, 255, 0.4);
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(15, 123, 255, 0.5);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .products-main {
    margin-left: 260px;
    padding: 2rem 1.5rem;
  }

  .products-sidebar {
    width: 260px;
  }

  .products-grid,
  .products-grid-section {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .manufacturer-section {
    scroll-margin-top: 100px;
  }
}

@media (max-width: 768px) {
  .products-layout {
    flex-direction: column;
  }

  .products-sidebar {
    transform: translateX(-100%);
    width: 280px;
    box-shadow: none;
  }

  .products-sidebar.active {
    transform: translateX(0);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.1);
  }

  .products-main {
    margin-left: 0;
    padding: 2rem 1rem;
    height: calc(100vh - 70px);
  }

  .products-header h1 {
    font-size: 2rem;
  }

  .products-header p {
    font-size: 1rem;
  }

  .products-grid,
  .products-grid-section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .section-header-products h2 {
    font-size: 1.5rem;
  }

  .products-sections-container {
    gap: 3rem;
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .product-card {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .products-main {
    padding: 1.5rem 1rem;
  }

  .products-header {
    margin-bottom: 2rem;
  }

  .products-header h1 {
    font-size: 1.75rem;
  }

  .product-image {
    height: 200px;
  }

  .sidebar-toggle {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    font-size: 1.125rem;
  }
}

/* Loading State */
.products-grid.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-color);
}

.empty-state i {
  font-size: 4rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 1rem;
}

/* Quote Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  max-width: 420px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--dark-color);
  font-weight: 700;
}

.close {
  font-size: 1.3rem;
  font-weight: 300;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
  padding: 0;
  margin-left: 0.5rem;
}

.close:hover {
  color: var(--primary-color);
}

.modal-body {
  padding: 0.7rem 1rem;
}

.product-info-modal {
  background: #f3f7ff;
  padding: 0.5rem;
  border-radius: 8px;
  border-left: 4px solid #0f7bff;
  margin-bottom: 0.6rem;
}

.product-info-modal strong {
  display: block;
  color: #6b7280;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.15rem;
}

.product-info-modal p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--dark-color);
  line-height: 1.3;
}

.form-section {
  margin-bottom: 0.5rem;
}

.form-section h3 {
  margin: 0 0 0.4rem 0;
  font-size: 0.75rem;
  color: var(--dark-color);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
}

.form-group {
  margin-bottom: 0.45rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--dark-color);
  font-weight: 600;
  font-size: 0.8rem;
}

.required {
  color: #ef4444;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.45rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
  line-height: 1.2;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0f7bff;
  box-shadow: 0 0 0 3px rgba(15, 123, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #d1d5db;
}

.btn-send {
  width: 100%;
  padding: 0.55rem;
  background: linear-gradient(135deg, #0f7bff 0%, #0066cc 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.2rem;
}

.btn-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 123, 255, 0.3);
}

.btn-send:active {
  transform: translateY(0);
}
