/* =========================================
   BRAND COLORS
========================================= */
:root {
  --brand-blue: #217EBB;
  --brand-blue-dark: #165F9A;
  --brand-red: #E52323;
  --text-dark: #242424;
  --text-light: #4E4E4E;
  --border: #E5E5E5;
}

/* =========================================
   RESET
========================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  font-family: Arial, sans-serif;
  color: var(--text-dark);
  background: #fff;
}

/* =========================================
   PAGE STRUCTURE
========================================= */
.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.content {
  flex: 1;
}

.main-container {
  display: flex;
  gap: 30px;
  max-width: 1300px;
  margin: 40px auto;
  padding: 0 10px;
}

/* =========================================
   SIDEBAR FILTERS (Desktop Only)
========================================= */
.filters-container {
  width: 280px;
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  position: sticky;
  top: 90px;
}

.filters-container::-webkit-scrollbar {
  width: 5px;
}
.filters-container::-webkit-scrollbar-thumb {
  background: var(--brand-blue);
  border-radius: 3px;
}

/* Group title (μόνο ο πρώτος τίτλος) */
.filters-container > .filter-group:first-child div {
  font-size: 20px;          /* μεγαλύτερο */
  font-weight: 700;
  color: var(--brand-blue-dark);
  margin-bottom: 10px;
}

/* Κάθε ομάδα φίλτρων */
.filter-group {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F1F1F1;
}
.filter-group:last-child {
  border-bottom: none;
}

/* Label group */
.filter-group > label {
  font-size: 15px;         /* +1 step */
  font-weight: 600;
  color: var(--brand-blue);
  margin-bottom: 4px;
  display: block;
}

/* Checkboxes container */
.filter-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filter-options label {
  font-size: 14px;         /* +1 step */
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-light);
  transition: color .2s ease;
}
.filter-options label:hover {
  color: var(--brand-blue-dark);
}

.filter-options input[type="checkbox"] {
  transform: scale(1.15);
  accent-color: var(--brand-blue);
}

/* Range Price */
#priceValue {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-blue-dark);
}

/* Clear Button */
.filter-actions button {
  width: 100%;
  padding: 7px 0;
  background: var(--brand-blue);
  border: 1px solid var(--brand-blue);
  color: #fff;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: .25s;
}
.filter-actions button:hover {
  background: var(--brand-blue-dark);
}

/* =========================================
   PRODUCTS GRID
========================================= */
.products-wrapper {
  flex: 1;
}
.products-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
  gap: 15px;
}
.products-header label {
  font-size: 15px;
}

.products-header select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}

.product-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1400px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .product-grid { grid-template-columns: repeat(1, 1fr); }
}

/* CARD */
.product-item {
  border: 1px solid var(--border);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: 0.3s ease;
}
.product-item:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

/* Image */
.product-thumb {
  height: 260px;
  background: #fafafa;
  display: flex;
  justify-content: center;
  align-items: center;
}
.product-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform .25s;
}
.product-item:hover img {
  transform: scale(1.05);
}

/* Info */
.product-info {
  padding: 10px;
  text-align: center;
  font-size: 15px;
  line-height: 1.35;
}
.price {
  margin-top: 6px;
  font-weight: 700;
  font-size: 15px;
}
.price del {
  color: #888;
}
.price span.discount {
  color: var(--brand-red);
}

/* Colors */
.color-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}
.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #ccc;
}
.color-dot.selected {
  box-shadow: 0 0 0 2px var(--brand-blue);
}

/* =========================================
   PAGINATION
========================================= */
#pagination {
  margin: 20px 0;
  text-align: center;
}
#pagination button {
  padding: 6px 10px;
  margin: 0 4px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}
#pagination button.active {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}

/* =========================================
   LOADING
========================================= */
#products-container {
  position: relative;
  min-height: 300px;
}
.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.spinner {
  width: 50px;
  height: 50px;
  animation: rotate 2s linear infinite;
}
.spinner .path {
  stroke: var(--brand-blue);
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}
@keyframes rotate {
  100% { transform: rotate(360deg); }
}
@keyframes dash {
  0% { stroke-dasharray:1,150; stroke-dashoffset:0; }
  50% { stroke-dasharray:90,150; stroke-dashoffset:-35; }
  100% { stroke-dasharray:90,150; stroke-dashoffset:-124; }
}

/* =========================================
   EMPTY RESULTS (ΟΥΠΣ)
========================================= */
.no-results {
  max-width: 600px;
  margin: 50px auto;
  text-align: center;
  background: #FAFAFA;
  border-radius: 10px;
  padding: 40px 20px;
}
.no-results .emoji {
  font-size: 70px;      /* πολύ μεγάλο */
  margin-bottom: 10px;
}
.no-results .oops {
  font-size: 28px;      /* ακόμα μεγαλύτερο */
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--brand-blue-dark);
}
.no-results p {
  font-size: 18px;
  color: var(--text-light);
}

/* =========================================
   MOBILE
========================================= */
@media (max-width: 768px) {
  .main-container {
    flex-direction: column;
    gap: 20px;
  }
  .filters-container {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 80%;
    max-width: 320px;
    background: #fff;
    padding: 14px 16px;
    border-right: 4px solid var(--brand-blue);
    z-index: 999;
    transform: translateX(-100%);
    transition: 0.3s ease;
  }
  .filters-container.visible {
    display: block;
    transform: translateX(0);
  }
  .toggle-filters-btn {
    display: block;
    background: var(--brand-blue);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 15px;
    margin-bottom: 10px;
  }
}

/* Desktop hide button */
@media (min-width: 769px) {
  .toggle-filters-btn { display: none; }
}


/* Default: κρυφό στις μεγάλες οθόνες */
.close-filters-btn {
  display: none;
}

/* Mobile: φαίνεται */
@media (max-width: 768px) {
  .close-filters-btn {
    display: block;
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
    z-index: 10000;
  }
}

