/* Products page specific styles */

.products-container {
  min-height: 100vh;
  position: relative;
}

#productsContent {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Content wrapper width is now in shared.css */

.products-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

/* Add top padding on desktop to clear the fixed menu */
@media (min-width: 1025px) {
  .products-header {
    padding-top: 5rem;
  }
}

.products-header .main-logo {
  width: 100px;
  height: auto;
  margin-bottom: 1.5rem;
  opacity: 0.9;
  transition: var(--transition-smooth);
}

.products-header .main-logo:hover {
  opacity: 1;
  transform: scale(1.05);
}

.products-header h1 {
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  font-weight: 600;
}

.products-header p {
  color: var(--text-gray);
  font-size: 1.1rem;
}

.search-container {
  margin: 0 0 1rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.search-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  width: 100%;
  justify-content: center;
}

.search-input-container {
  position: relative;
  flex: 1;
  min-width: 300px;
}

.available-filter-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-family: var(--font-primary);
  font-weight: 500;
  color: var(--warm-brown);
  background: rgba(250, 248, 245, 0.9);
  border: 2px solid var(--warm-brown);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.available-filter-btn:hover {
  background: rgba(250, 248, 245, 1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.available-filter-btn.active {
  background: var(--warm-brown);
  color: var(--bg-white);
  border-color: var(--warm-brown);
  box-shadow: 0 4px 15px rgba(139, 111, 71, 0.3);
}

.available-filter-btn.active:hover {
  background: var(--primary-green);
  border-color: var(--primary-green);
}

.search-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0;
  min-height: 2.5rem;
  transition: var(--transition-smooth);
}

.search-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  border-radius: 20px;
  font-weight: 500;
  transition: var(--transition-smooth);
  cursor: default;
}

.search-chip-tea-type {
  background: rgba(139, 111, 71, 0.2);
  color: var(--warm-brown);
  border: 1px solid rgba(139, 111, 71, 0.4);
}

.search-chip-tag {
  background: rgba(183, 211, 51, 0.2);
  color: var(--text-dark);
  border: 1px solid rgba(183, 211, 51, 0.4);
}

.search-chip-country {
  background: rgba(139, 111, 71, 0.15);
  color: var(--warm-brown);
  border: 1px solid rgba(139, 111, 71, 0.3);
}

.chip-remove {
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 600;
  opacity: 0.7;
  transition: var(--transition-smooth);
  margin-left: 0.2rem;
}

.chip-remove:hover {
  opacity: 1;
  transform: scale(1.2);
}

.search-input {
  width: 100%;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  border: 2px solid var(--warm-brown);
  border-radius: 8px;
  font-family: var(--font-primary);
  transition: var(--transition-smooth);
  background: rgba(250, 248, 245, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.autosuggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: var(--bg-white);
  border: 2px solid var(--warm-brown);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.suggestions-group {
  padding: 0.5rem 0;
}

.suggestions-group:not(:last-child) {
  border-bottom: 1px solid rgba(139, 111, 71, 0.2);
}

.suggestions-label {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--warm-brown);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.suggestion-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 1rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
}

.suggestion-item:hover,
.suggestion-item.selected {
  background: rgba(183, 211, 51, 0.15);
}

.suggestion-tea-type {
  padding-left: 1.5rem;
}

.suggestion-tag {
  padding-left: 1.5rem;
}

.suggestion-tea-type:hover,
.suggestion-tea-type.selected {
  background: rgba(139, 111, 71, 0.15);
  border-left: 3px solid var(--warm-brown);
}

.suggestion-tag:hover,
.suggestion-tag.selected {
  background: rgba(183, 211, 51, 0.15);
  border-left: 3px solid var(--primary-green);
}

.suggestion-country {
  padding-left: 1.5rem;
}

.suggestion-country:hover,
.suggestion-country.selected {
  background: rgba(139, 111, 71, 0.15);
  border-left: 3px solid var(--warm-brown);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(183, 211, 51, 0.1), 0 4px 15px rgba(0, 0, 0, 0.08);
  background: var(--bg-white);
}

.search-input::placeholder {
  color: var(--text-gray);
}

.filters-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 1rem;
  align-items: center;
  gap: 1rem;
}

.stock-sort-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  width: 100%;
}

.stock-filter-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stock-toggle-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-family: var(--font-primary);
  font-weight: 500;
  color: var(--warm-brown);
  background: rgba(250, 248, 245, 0.9);
  border: 2px solid var(--warm-brown);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.stock-toggle-btn:hover {
  background: rgba(250, 248, 245, 1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.stock-toggle-btn.active {
  background: var(--warm-brown);
  color: var(--bg-white);
  border-color: var(--warm-brown);
  box-shadow: 0 4px 15px rgba(139, 111, 71, 0.3);
}

.stock-toggle-btn.active:hover {
  background: var(--primary-green);
  border-color: var(--primary-green);
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 150px;
  flex: 1;
  max-width: 220px;
}

.price-filter-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

.price-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-start;
}

.price-filter-group > .price-input-group > label {
  font-size: 0.85rem;
  color: var(--warm-brown);
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
}

.price-input {
  width: 100px;
  padding: 0.5rem 0.75rem;
  text-align: center;
}

.price-slider-container {
  position: relative;
  flex: 1;
  min-width: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: calc(0.35rem + 0.85rem + 0.5rem);
}

.price-slider {
  position: absolute;
  width: 100%;
  height: 6px;
  background: transparent;
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  pointer-events: none;
  z-index: 1;
}

.price-slider-container::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 6px;
  background: rgba(139, 111, 71, 0.2);
  border-radius: 3px;
  z-index: 0;
}

.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary-green);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg-white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
  pointer-events: all;
  position: relative;
  z-index: 2;
}

.price-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.price-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--primary-green);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg-white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
  pointer-events: all;
  position: relative;
  z-index: 2;
}

.price-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.price-slider::-moz-range-track {
  background: transparent;
}

#priceMaxSlider {
  z-index: 3;
}

#priceMinSlider {
  z-index: 2;
}

.filter-group label {
  font-size: 0.85rem;
  color: var(--warm-brown);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.filter-input {
  padding: 0.75rem 1rem;
  border: 2px solid rgba(139, 111, 71, 0.3);
  border-radius: 8px;
  font-family: var(--font-primary);
  background: rgba(250, 248, 245, 0.85);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: var(--transition-smooth);
}

.filter-input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 2px rgba(183, 211, 51, 0.2);
  background: var(--bg-white);
}

.sort-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sort-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--warm-brown);
}

.sort-buttons-group {
  display: flex;
  gap: 0.4rem;
}

.sort-btn {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-family: var(--font-primary);
  font-weight: 500;
  color: var(--warm-brown);
  background: rgba(250, 248, 245, 0.9);
  border: 2px solid var(--warm-brown);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
}

.sort-btn:hover {
  background: rgba(250, 248, 245, 1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.sort-btn.active {
  background: var(--warm-brown);
  color: var(--bg-white);
  border-color: var(--warm-brown);
  box-shadow: 0 4px 15px rgba(139, 111, 71, 0.3);
}

.sort-btn.active:hover {
  background: var(--primary-green);
  border-color: var(--primary-green);
}

.sort-direction-btn {
  min-width: 45px;
  padding: 0.6rem;
}

.results-info {
  text-align: center;
  color: var(--text-gray);
  font-size: 1rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.product-card {
  background: rgba(245, 242, 237, 0.8);
  border-radius: 12px;
  padding: 1.5rem;
  transition: var(--transition-smooth);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(139, 111, 71, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-green);
  background: rgba(245, 242, 237, 0.95);
}

.product-card-name {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  width: 100%;
  text-align: center;
}

.product-card-type-origin {
  margin-bottom: 1rem;
  text-align: center;
}

.product-card-type-origin-text {
  font-size: 0.95rem;
  color: var(--warm-brown);
  font-weight: 400;
}

.product-card-tags-container {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
}

.product-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.product-card-tag {
  background: rgba(183, 211, 51, 0.2);
  color: var(--text-dark);
  padding: 0.3rem 0.6rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(183, 211, 51, 0.4);
}

.product-card-description {
  font-size: 0.95rem;
  color: var(--text-gray);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-metrics-container {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
}

.product-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.product-card-metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.product-card-metric-label {
  color: var(--warm-brown);
  font-weight: 500;
  font-size: 0.8rem;
  white-space: nowrap;
}

.product-card-metric-dots {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  justify-content: center;
}

.product-card-metric-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.product-card-metric-dot.filled {
  background: var(--primary-green);
  border: 1px solid var(--primary-green);
}

.product-card-metric-dot.unfilled {
  background: transparent;
  border: 1px solid rgba(139, 111, 71, 0.3);
}

.product-card-price {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary-green);
  margin-top: auto;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(139, 111, 71, 0.15);
}

.product-card-stock-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.2rem 0.4rem;
  background: transparent;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  margin-top: 0.5rem;
}

.product-card-stock-indicator::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--bg-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.product-card-stock-indicator.stock-skladem {
  color: var(--primary-green);
}

.product-card-stock-indicator.stock-skladem::before {
  background: var(--primary-green);
}

.product-card-stock-indicator.stock-posledni-kusy {
  color: #ff8c00;
}

.product-card-stock-indicator.stock-posledni-kusy::before {
  background: #ff8c00;
}

.product-card-stock-indicator.stock-vyprodano {
  color: #dc3545;
}

.product-card-stock-indicator.stock-vyprodano::before {
  background: #dc3545;
}

.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-gray);
  background: rgba(245, 242, 237, 0.8);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.no-results h2 {
  color: var(--warm-brown);
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .filters-container {
    flex-direction: column;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .products-header h1 {
    font-size: 2rem;
  }

  .products-content-wrapper {
    padding: 2rem 1rem;
  }

  .search-input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .search-input-container {
    min-width: unset;
    max-width: 100%;
  }

  .available-filter-btn {
    width: 100%;
  }

  .sort-container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .sort-label {
    font-size: 0.85rem;
  }

  .sort-buttons-group {
    width: 100%;
    justify-content: center;
  }

  .sort-btn {
    flex: 1;
    min-width: unset;
  }
}
