/* Πάντα ανοιχτόχρωμο θέμα. Κύρια χρώματα: μπλε #1151d3 και κόκκινο #bc1624 */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #1a2133;
  --muted: #646d82;
  --line: #e1e5ee;
  --accent: #1151d3;       /* μπλε: header, links, ενεργά φίλτρα, κουμπιά */
  --accent-dark: #0d41a9;
  --accent-soft: #e8effc;
  --accent-text: #ffffff;
  --sale: #bc1624;         /* κόκκινο: εκπτώσεις, «Αγορά», αναζήτηση */
  --sale-dark: #9a1120;
  --ok: #1f8a4c;
  --radius: 10px;
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.25; }
img { max-width: 100%; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top { background: var(--accent); position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 8px rgba(17, 81, 211, .25); }
.top-inner { display: flex; gap: 24px; align-items: center; height: 64px; }
.logo { font-weight: 800; font-size: 22px; color: #fff; white-space: nowrap; }
.search { flex: 1; display: flex; max-width: 640px; }
.search input {
  flex: 1; min-width: 0; padding: 10px 14px; font: inherit; color: var(--text);
  background: #fff; border: 0; border-radius: var(--radius) 0 0 var(--radius);
}
.search input:focus { outline: 2px solid var(--sale); outline-offset: -2px; }
.search button, .price-form button, .buy {
  background: var(--accent); color: var(--accent-text); border: 0; font: inherit; font-weight: 600; cursor: pointer;
}
.search button { padding: 0 18px; border-radius: 0 var(--radius) var(--radius) 0; background: var(--sale); }
.search button:hover { background: var(--sale-dark); }
.price-form button:hover { background: var(--accent-dark); }

/* Layout */
.layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding-top: 24px; padding-bottom: 40px; }
.filters-toggle > summary { display: none; }
.facet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.facet h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; }
.facet ul { list-style: none; margin: 0; padding: 0; }
.facet li a, .facet .current {
  display: flex; justify-content: space-between; gap: 8px; padding: 4px 6px; border-radius: 6px;
}
.facet li a:hover { background: var(--accent-soft); color: var(--accent); }
.facet li a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.facet small { color: var(--muted); }
.facet .on { color: var(--accent); font-weight: 600; }
.facet details summary { cursor: pointer; color: var(--accent); padding: 4px 6px; font-size: 14px; }
.facet .back { display: block; color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.facet .current { font-weight: 700; }
.facet .sub { padding-left: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.chip span { color: var(--muted); }
.clear { font-size: 13px; color: var(--accent); }
.price-form { display: flex; gap: 6px; align-items: center; }
.price-form input {
  width: 100%; min-width: 0; padding: 7px 8px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
}
.price-form button { padding: 7px 10px; border-radius: 6px; }
.toggles { display: grid; gap: 8px; }
.toggle { display: flex; gap: 8px; align-items: center; }
.toggle .box { width: 18px; height: 18px; border: 2px solid var(--line); border-radius: 4px; flex: none; }
.toggle.on .box { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--surface); }

/* Results */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.crumbs a:hover { color: var(--accent); }
.toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar h1 { margin: 0; font-size: 26px; }
.count { margin: 2px 0 0; color: var(--muted); }
.sort select {
  margin-left: 6px; padding: 7px 10px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: 0 6px 20px rgba(17, 81, 211, .14); border-color: var(--accent); transform: translateY(-2px); }
.thumb { position: relative; aspect-ratio: 1; background: #fff; overflow: hidden; }
.thumb img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; }
.badge {
  position: absolute; top: 10px; left: 10px; z-index: 1; background: var(--sale); color: #fff;
  font-weight: 700; font-size: 13px; padding: 2px 8px; border-radius: 999px;
}
.card-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.shop { font-size: 12px; color: var(--muted); }
.card h3 {
  font-size: 14px; font-weight: 500; margin: 0; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.price strong { font-size: 18px; }
.price s { color: var(--muted); font-size: 13px; margin-left: 6px; }
.empty { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; text-align: center; margin: 24px 0; }
.empty a { color: var(--accent); font-weight: 600; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 28px; }
.pager a, .pager span { padding: 7px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
.pager a:hover { border-color: var(--accent); }
.pager .cur { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.pager .gap { border: 0; background: none; }

/* Product */
main > .crumbs { margin-top: 20px; }
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin-bottom: 40px; }
.main-img { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; overflow: hidden; }
.main-img img { position: absolute; inset: 24px; width: calc(100% - 48px); height: calc(100% - 48px); object-fit: contain; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs button { flex: none; width: 68px; height: 68px; padding: 4px; background: #fff; border: 2px solid var(--line); border-radius: 8px; cursor: pointer; }
.thumbs button.on { border-color: var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.brand { color: var(--accent); font-weight: 600; }
.info h1 { font-size: 26px; margin: 4px 0 16px; }
.buy-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.price.big strong { font-size: 32px; }
.price.big s { font-size: 16px; }
.save { display: inline-block; margin-left: 10px; color: var(--sale); font-weight: 600; font-size: 14px; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 16px 0 20px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.specs .in { color: var(--ok); }
.specs .out { color: var(--sale); }
.buy { display: block; text-align: center; padding: 14px; border-radius: var(--radius); font-size: 17px; background: var(--sale); }
.buy:hover { background: var(--sale-dark); }
.desc { margin-top: 24px; }
.desc h2, .similar h2 { font-size: 20px; }
.desc p { color: var(--text); overflow-wrap: anywhere; }
.similar { margin-bottom: 40px; }

.cat-text {
  margin-top: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; line-height: 1.65;
}
.cat-text h2 { font-size: 20px; margin: 0 0 8px; }
.cat-text h3 { font-size: 17px; margin: 16px 0 6px; }
.cat-text p { margin: 0 0 12px; }
.cat-text a { color: var(--accent); text-decoration: underline; }

/* Κοινοποίηση */
.share { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 20px 0 0; font-size: 14px; }
.share span { color: var(--muted); margin-right: 4px; }
.share a, .share button {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; cursor: pointer;
}
.share a:hover, .share button:hover { border-color: var(--accent); color: var(--accent); }
.results > .share { justify-content: center; margin-top: 24px; }

/* Banners κατηγορίας (assets/banners/) */
.banner { display: block; margin: 0 auto; }
.banner img { display: block; width: 100%; height: auto; border-radius: 8px; }
.banner-728-90 { max-width: 728px; margin-bottom: 16px; }
main > .banner-728-90 { margin-top: 4px; }
.banner-300-600 { max-width: 300px; margin-top: 20px; } /* κάτω από τα φίλτρα */
.banner-970-250 { max-width: 970px; margin-bottom: 40px; }
.results > .banner-970-250, .banner-end { margin-top: 28px; } /* κάτω από τις σελίδες (1 2 3 ›) */
.banner-end .banner-728-90 { margin-bottom: 0; }

/* Μενού header (admin → Εμφάνιση) */
.logo img { display: block; height: 40px; width: auto; }
.top-nav { background: var(--accent-dark); }
.top-nav .wrap { display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.top-nav a { color: #fff; font-size: 14px; font-weight: 500; padding: 9px 12px; opacity: .92; }
.top-nav a:hover { opacity: 1; background: rgba(255, 255, 255, .12); }

/* Σελίδες (Σχετικά, Όροι...) */
.page-content { max-width: 820px; margin: 0 auto 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; line-height: 1.7; }
.page-content h1 { margin: 0 0 16px; font-size: 28px; }
.page-content h2 { font-size: 20px; margin: 28px 0 8px; }
.page-content a { color: var(--accent); text-decoration: underline; }
.contact-box { background: var(--accent-soft); border-radius: var(--radius); padding: 14px 18px; }

/* Μήνυμα cookies */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 720px; margin: 0 auto;
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: var(--radius); padding: 14px 18px; box-shadow: 0 8px 30px rgba(26, 33, 51, .18); font-size: 14px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; flex: 1; min-width: 220px; }
.cookie-banner div { display: flex; gap: 8px; }
.cookie-banner button {
  padding: 8px 16px; border-radius: 6px; border: 0; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff;
}
.cookie-banner button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }

/* Admin */
.admin { padding-top: 24px; padding-bottom: 40px; max-width: 960px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; }
.admin h1 { font-size: 24px; margin: 0 0 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.admin label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.admin input {
  padding: 8px 10px; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; min-width: 0;
}
.admin button, .btn {
  display: inline-block; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: 6px;
}
.admin button.danger { background: transparent; color: var(--sale); border: 1px solid var(--sale); }
.admin button.link { background: none; color: var(--accent); padding: 0; font-weight: 500; }
.login { max-width: 360px; margin: 40px auto; display: grid; gap: 12px; }
.feed-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.feed-form .grow { flex: 1; min-width: 240px; }
.feed-form.add { border-style: dashed; }
.status { margin: 10px 0 0; font-size: 14px; }
.stats { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.stats div { display: flex; flex-direction: column; }
.stats strong { font-size: 20px; }
.stats span { color: var(--muted); font-size: 13px; }
.stats form { margin-left: auto; }
.msg { padding: 10px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
.msg.ok, .status .ok { color: var(--ok); }
.msg a { color: inherit; text-decoration: underline; }
.msg.err, .status .err { color: var(--sale); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 8px 14px; border-radius: 6px; font-weight: 600; color: var(--muted); }
.tabs a.on { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.admin-head { margin-bottom: 12px; }
.admin textarea {
  padding: 8px 10px; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; resize: vertical; width: 100%;
}
.cat-edit { display: grid; gap: 14px; }
.cat-edit h1 + h1, .cat-edit .row + h1 { margin-top: 12px; }
.admin textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.admin label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.admin label.check input { width: auto; }
.btn { text-decoration: none; }
.cat-edit h1 { margin: 0; }
.cat-edit p { margin: 0; }
.cat-edit a { color: var(--accent); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row .grow { flex: 1; min-width: 200px; }
.link-muted { color: var(--muted); font-size: 14px; }
.cats { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.cats th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.cats th, .cats td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.cats .actions { text-align: right; white-space: nowrap; }
.cats .actions a { color: var(--accent); }
.cats .ok { color: var(--ok); }
.log {
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 12px;
  max-height: 60vh; overflow: auto; font-size: 13px; white-space: pre-wrap;
}

/* Footer */
.foot { border-top: 3px solid var(--accent); background: var(--surface); color: var(--muted); font-size: 14px; margin-top: 24px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-top: 36px; padding-bottom: 28px; }
.foot-col h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text); margin: 0 0 12px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.foot-col a:hover { color: var(--accent); }
.foot-logo { display: inline-block; font-size: 22px; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.foot-about p { margin: 0 0 12px; line-height: 1.6; }
.foot-social { display: flex; flex-wrap: wrap; gap: 8px; }
.foot-social a {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-size: 13px;
}
.foot-social a:hover { border-color: var(--accent); }
.foot-contact li { overflow-wrap: anywhere; }
.foot-bottom { border-top: 1px solid var(--line); background: var(--bg); font-size: 12.5px; padding: 14px 0; }
.foot-bottom p { margin: 2px 0; }
@media (max-width: 560px) {
  /* Κινητό: η αναζήτηση σε δική της γραμμή κάτω από το λογότυπο, ώστε να μην κόβεται */
  .top-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 8px; }
  .search { flex-basis: 100%; max-width: none; }
  .search input { padding: 9px 12px; }
}
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .foot-about { grid-column: 1 / -1; }
  .page-content { padding: 20px; }
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; padding-top: 16px; }
  .filters-toggle > summary {
    display: block; cursor: pointer; font-weight: 600; padding: 10px 14px; margin-bottom: 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  }
  .product { grid-template-columns: 1fr; gap: 20px; }
  .banner-300-600 { display: none; } /* στο κινητό θα έσπρωχνε τα προϊόντα πολύ χαμηλά - μένει το 728x90 */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .top-inner { gap: 12px; }
  .logo { font-size: 18px; }
  .search button { padding: 0 12px; }
  .toolbar h1, .info h1 { font-size: 22px; }
}
