/* 📦 Termékek Specifikus Stílusok */

.products-container {
  padding: 140px 20px 30px 20px; /* Hely a fix keresősávnak */
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* 🔍 FIX KERESŐSÁV A FEJLEC ALATT */
.products-search-header {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
  z-index: 90;
  display: flex;
  gap: 10px;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.products-search-header .search-box {
  flex: 1;
}

.filter-toggle-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.filter-toggle-btn:active {
  transform: scale(0.95);
  background: var(--accent-light);
  border-color: var(--accent-color);
}

/* 🔍 SZŰRŐ POPUP (MODAL) */
.filter-popup-overlay {
  display: none; /* Rejtve alapértelmezetten */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10008;
}

.filter-popup-overlay.open {
  display: block;
}

.filter-popup {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: #ffffff;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 10009;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  color: #1f2937;
  visibility: hidden;
  box-sizing: border-box;
}

.filter-popup.open {
  right: 0;
  visibility: visible;
}

.filter-popup .popup-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.filter-popup .popup-header h3 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
}

.popup-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: #9ca3af;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  outline: none;
}

.popup-close-btn:active {
  background: rgba(0, 0, 0, 0.05);
  color: #1f2937;
}

.filter-options {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-popup-footer {
  padding: 16px 24px 30px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.filter-option:active {
  background: #f3f4f6;
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-color);
  cursor: pointer;
}

.filter-option span {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}

.filter-apply-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease;
  box-shadow: 0 4px 10px var(--accent-light);
}

.filter-apply-btn:active {
  transform: scale(0.98);
}

/* 🗂️ KÉTSOROS TERMÉK KÁRTYA */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--transition-bezier);
}

.product-card:active {
  transform: translateY(1px);
}

/* 1. Sor: Kép ikon és Név */
.product-row-1 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-image-icon {
  font-size: 20px;
  color: #ffffff;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  background: var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.product-image-icon:active {
  transform: scale(0.9);
}

.product-name-block {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text-main);
  flex: 1;
  word-break: break-word;
}

/* 2. Sor: Ár, Szabad/Foglalt készlet és Fogaskerék */
.product-row-2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  font-size: 12px;
}

.product-left-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.product-price-block {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  color: var(--price-color);
}

.product-stock-block {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.stock-avail {
  color: var(--stock-avail-color);
}

.stock-res {
  color: var(--stock-res-color);
}

.product-cog-btn {
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.product-cog-btn:active {
  transform: rotate(45deg) scale(0.9);
  color: var(--accent-color);
}

/* 🔄 LAPOZÁS */
.load-more-container {
  text-align: center;
  margin: 10px 0 30px 0;
}

.load-more-btn {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.load-more-btn:active {
  transform: scale(0.98);
  background: var(--border-color);
}

/* 🖼️ LIGHTBOX MODAL */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 10005;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-content {
  margin: auto;
  display: block;
  width: 85%;
  max-width: 500px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: zoom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoom {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  color: #ffffff;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:active {
  background: rgba(255,255,255,0.2);
}

.lightbox-caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 500px;
  text-align: center;
  color: #ffffff;
  padding: 20px 0;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
}

/* 📝 TERMÉK RÉSZLETEI BOTTOM SHEET */
.sheet-overlay {
  display: none; /* Rejtve alapértelmezetten */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10003;
}

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

.bottom-sheet {
  display: none; /* Rejtve alapértelmezetten */
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  background: #ffffff;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
  z-index: 10004;
  padding: 20px 20px 35px 20px;
  color: #1f2937;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.bottom-sheet.open {
  display: block;
}

.sheet-header {
  text-align: center;
  margin-bottom: 20px;
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: #d1d5db;
  border-radius: 2px;
  margin: 0 auto 12px auto;
}

.sheet-header h3 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 4px;
}

.sheet-subtitle {
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
}

.technical-specs {
  background: #f8fafc;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
}

.technical-specs h4 {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  font-size: 12px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-label {
  color: #9ca3af;
  font-weight: 500;
}

.spec-value {
  color: #1f2937;
  font-weight: 600;
  word-break: break-all;
}

/* Teljes sor lefedettség a leírásnak */
.specs-grid .spec-item-full {
  grid-column: span 2;
}

.sheet-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.sheet-btn-cancel {
  height: 48px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.06);
  background: #f3f4f6;
  color: #1f2937;
  transition: all 0.2s ease;
}

.sheet-btn-cancel:active {
  background: #e5e7eb;
}

/* 🔍 Okos Al-szűrők */
.filter-sub-group {
  margin-top: 14px;
  border-top: 1px dashed rgba(0,0,0,0.08);
  padding-top: 12px;
}

.filter-sub-title {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: block;
}

.filter-select-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.filter-select-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-select-item label {
  font-size: 11px;
  font-weight: 600;
  color: #4b5563;
}

.filter-select-item select {
  height: 38px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #1f2937;
  padding: 0 8px;
  font-size: 13px;
  outline: none;
  width: 100%;
}
