/* styles.css — grid, κάρτες, εικόνες, φίλτρα */

.kp-grid{ display:grid; grid-template-columns:repeat(1,1fr); gap:1rem; }
@media (min-width: 640px){ .kp-grid{ grid-template-columns:repeat(2,1fr);} }
@media (min-width:1024px){ .kp-grid{ grid-template-columns:repeat(4,1fr);} } /* 4 ανά σειρά όπως στο prod */

.wa-card{
  border:1px solid var(--kp-border);
  border-radius:12px; background:var(--kp-surface); box-shadow:var(--kp-shadow);
  display:flex; flex-direction:column; height:100%;
}
.wa-card__body{ padding:1rem; display:flex; flex-direction:column; gap:.5rem; flex:1; }

/* Εικόνες: contain + auto height (δεν κόβονται) */
.card-img{
  width:100%; height:auto; display:block; border-radius:10px;
  background:#f8fafc; object-fit:contain;
}

/* Σώμα κάρτας για ίσο ύψος */
.kp-card-content{ display:flex; flex-direction:column; gap:.35rem; flex:1; }
.kp-card-footer{ margin-top:auto; }

/* Τίτλοι/ISBN/Buttons */
.kp-title{ font-weight:800; color:#111827; text-decoration:none; }
.kp-isbn{ color:var(--kp-muted); font-size:.9rem; }
.kp-details-btn{ display:inline-block; }

/* Badges (αν τα χρειαστείς κάτω από την εικόνα) */
.kp-badges{ display:flex; flex-wrap:wrap; gap:.35rem; }
.wa-badge{
  background:#f3f4f6; color:#374151; border-radius:999px;
  padding:.25rem .6rem; font-size:.85rem; line-height:1;
}

/* Φίλτρα κατηγοριών */
.filters{ display:flex; gap:.5rem; flex-wrap:wrap; margin: 0 0 1rem 0; }
.filters .pill{
  display:inline-block; padding:.45rem .9rem; border-radius:999px; font-weight:700;
  border:1px solid var(--kp-pill-border); background:var(--kp-pill-bg); color:var(--kp-pill-text);
  cursor:pointer; user-select:none;
}
.filters .pill.active{
  background:var(--kp-pill-bg-active); color:var(--kp-pill-text-active); border-color:var(--kp-pill-bg-active);
}

/* Prose στο single */
.prose{ max-width:75ch; }
.prose p{ margin:0 0 1rem 0; }
.prose ul{ margin:0 0 1rem 1.25rem; list-style:disc; }
.prose li{ margin:.25rem 0; }
.prose b, .prose strong{ font-weight:700; }

/* Πίνακας λεπτομερειών */
.kp-detail-row{
  display:flex; justify-content:space-between; gap:1rem;
  border-bottom:1px solid var(--kp-border); padding:.6rem 0;
}
.kp-detail-row .label{ color:var(--kp-muted); }
.kp-detail-row .value{ text-align:right; }

/* Layout του κάθε book card */
.book-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.book-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }

/* Εικόνα */
.book-card img.card-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}

/* Περιεχόμενο */
.kp-card-content { padding: 0.75rem 1rem; }
.kp-title { margin: 0; font-weight: 700; color: #111; }
.kp-isbn { font-size: 0.875rem; color: #555; margin-top: 0.25rem; }
.kp-isbn a { text-decoration: underline dotted; }

/* Footer με κουμπί & heart */
.kp-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem 1rem;
}

.kp-details-btn {
  font-size: 0.875rem;
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
}

/* Heart icon */
.heart-btn {
  border: none;
  background: none;
  color: #333;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color .2s ease;
}
.heart-btn:hover { color: #e74c3c; }
.heart-btn.favorited i { color: #e74c3c; }

/* --- BOOK CARD footer (CTA + heart) --- */
.kp-card-footer {
  display:flex; align-items:center; justify-content:space-between;
  padding: 0.75rem 1rem 1rem;
}

/* CTA: View details (red pill) */
.kp-cta {
  display:inline-block;
  background:#e74c3c;          /* red */
  color:#fff !important;
  padding: .45rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration:none !important;
  box-shadow: 0 2px 0 rgba(0,0,0,.2);
  transition: transform .06s ease, filter .15s ease;
}
.kp-cta:hover { filter: brightness(.96); }
.kp-cta:active { transform: translateY(1px); }

/* Heart icon button (bottom-right) */
.heart-btn {
  border: none; background: transparent; padding: 0;
  width: 28px; height: 28px; cursor: pointer;
}
.heart-btn img { width: 28px; height: 28px; display: block; }
.heart-btn.favorited img { content: url("/assets/images/Heart.svg"); }

/* μικρές βελτιώσεις τίτλου/ISBN */
.kp-title { margin: .5rem 0 0; font-weight: 800; color:#111; text-decoration:none; }
.kp-isbn { margin-top:.35rem; }
.kp-isbn a { color: #2b4f8c; text-decoration: underline dotted; }

/* kill any WA-style pseudo elements / shadows on the heart button */
.heart-btn {
  position: relative;
  width: 28px; height: 28px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  line-height: 0;
}
.heart-btn::before,
.heart-btn::after {
  content: none !important;       /* <- κλείνει τελείως το “αόρατο” pill */
  display: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border: 0 !important;
}
.heart-btn img {
  display: block;
  width: 28px; height: 28px;
  pointer-events: none;
}

/* για σιγουριά μην έχει pseudo και το footer */
.kp-card-footer::before,
.kp-card-footer::after {
  content: none !important;
  display: none !important;
}

/* ----------- FOOTER ----------- */
footer.site-footer {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
  color: #222;
  padding: 1.5rem 1rem 2rem;
  line-height: 1.6;
}

footer.site-footer a {
  color: #2b4f8c;
  text-decoration: underline dotted;
}

footer.site-footer span {
  display: inline-block;
  margin: 0 0.25rem;
}

/* wa-page κάνει το slotted footer flex—κεντράρουμε αντί να το πολεμάμε */
footer.site-footer{
  justify-content: center !important;  /* κέντρο στον κύριο άξονα */
  align-items: center !important;      /* κέντρο στον κάθετο */
  flex-wrap: wrap;                     /* ωραίο break σε mobile */
  gap: .25rem;
  padding: 1.5rem 1rem 2rem;
  opacity: .8;
  font-size: .9rem;
}

footer.site-footer > .container{
  max-width: 1200px;                   /* ίδιο πλάτος με grid */
  margin: 0 auto;
  text-align: center;
}

footer.site-footer a{
  color: #2b4f8c;
  text-decoration: underline dotted;
}

/* ----- SINGLE ----- */
.single-grid { display:grid; gap:1.5rem; }
@media (min-width:1024px){ .single-grid{ grid-template-columns: 1fr 1.2fr; } }

.single-cover {
  width: 100%;
  border-radius: 12px;
  display:block;
  background:#fff;
  object-fit: contain;
}

.single-card .wa-card__header { display:flex; align-items:center; justify-content:space-between; }
.single-title { margin:0; }
.single-content.prose { margin-top:.5rem; }

.single-heart {
  border:none; background:transparent; padding:0; width:28px; height:28px; cursor:pointer;
}
.single-heart img { width:28px; height:28px; display:block; }
.single-heart.favorited img { content: url("/assets/images/Heart.svg"); }

/* details table inside card */
.kp-detail-row { display:flex; justify-content:space-between; gap:1rem; border-bottom:1px solid var(--kp-border); padding:.6rem 0; }
.kp-detail-row .label { color:var(--kp-muted); }
.kp-detail-row .value { text-align:right; }

/* pagination row */
.single-pager { display:flex; gap:.5rem; flex-wrap:wrap; justify-content:space-between; align-items:center; margin-top:1rem; }
.single-pager .spacer { flex:1; }

/* --- padding στη δεξιά κάρτα του single --- */
.single-card.wa-card {
  padding: 1.5rem 1.75rem !important; /* main card padding */
}

.single-card .wa-card__body {
  padding: 0 !important; /* μη διπλασιάζει από default Web Awesome */
}

.single-card .wa-card__header + .wa-card__body {
  margin-top: 1rem;
}

/* --- Tighten spacing in book grid cards --- */

/* λιγότερο padding στο επάνω τμήμα της κάρτας */
.book-card > .wa-card__body {
  padding: 0.75rem 1rem 0.5rem;  /* πριν ήταν ~1rem */
}

/* μικρότερο κενό κάτω από το cover */
.book-card > .wa-card__body img.card-img {
  margin-bottom: 0.5rem !important;
  display: block;
}

/* το block με τίτλο/ISBN */
.book-card .kp-card-content {
  padding: 0 1rem 0.35rem;       /* φέρνουμε τα πάντα πιο κοντά */
}

/* τίτλος κοντύτερα στην εικόνα */
.book-card .kp-card-content .kp-title.wa-h6 {
  margin: 0.25rem 0 0.25rem !important;
  line-height: 1.25;
}

/* ISBN λίγο πιο πάνω και “σφιχτό” */
.book-card .kp-card-content .kp-isbn {
  margin: 0.1rem 0 0.2rem !important;
  font-size: 0.92rem;
}

/* footer: μικρότερο top-padding για να ανέβει οπτικά */
.book-card .kp-card-footer {
  padding-top: 0.5rem;
}

.static-card {
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  max-width: 900px;
  margin: 0 auto;
}

.contact-form .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem 1.5rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  gap: .3rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: .5rem .75rem;
  font-size: 1rem;
}

.contact-form .phone-field {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.contact-form button[type="submit"] {
  font-weight: 600;
  font-size: 1rem;
}

/* ---- Static pages ---- */
.static-card {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 1rem;
}

.static-card h1 {
  margin-bottom: 1rem;
}

.static-card p {
  line-height: 1.7;
}

/* ===== OUR TEAM ===== */
.team-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  justify-items: center;
  align-items: start;
  padding: 1rem 0;
  list-style: none;
  margin: 0;
}

.team-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.team-list img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.team-list strong {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: #222;
}

.team-list div {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ===== CONTACT FORM ===== */
.contact-card {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-row .form-field {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
}

.contact-row textarea {
  min-height: 100px;
}

.contact-actions {
  text-align: left;
  margin-top: 1rem;
}

/* Match grid container width to header (especially on mobile) */
#outlet .container,
#router-outlet .container,
main#outlet .container {
  padding-left: 1rem;
  padding-right: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  #outlet .container,
  #router-outlet .container,
  main#outlet .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

.heart-btn wa-icon {
  transition: transform .2s ease, color .2s ease;
}
.heart-btn:hover wa-icon {
  transform: scale(1.08);
}

/* === Hearts in grid cards === */
.book-card .wa-card__footer {
  display: flex;
  align-items: center;          /* ίδια ευθυγράμμιση με "View details" */
  padding-right: 0.875rem;      /* λίγο αέρα δεξιά από το πλαίσιο */
}
.book-card .kp-cta {
  margin-right: auto;           /* σπρώξε την καρδιά δεξιά */
}
.book-card .heart-btn {
  margin-inline-end: 0.125rem;  /* ψιλο-απόσταση από το πλαίσιο */
}
.book-card .heart-btn wa-icon {
  font-size: 1.5em;             /* ελαφρώς μικρότερο για οπτικό balance */
}

/* === Heart στο single view header === */
.single-card .wa-card__header {
  display: flex;
  align-items: center;          /* κάθετα στο κέντρο με τον τίτλο */
  gap: 0.5rem;
  padding-right: 0.875rem;      /* περισσότερη απόσταση από το δεξί πλαίσιο */
}
.single-card .heart-btn {
  margin-left: auto;            /* πάνε τη καρδιά δεξιά */
  margin-right: 0.125rem;       /* μικρό safety gap πριν το edge */
}
.single-card .heart-btn wa-icon {
  font-size: 1.6em;             /* λίγο πιο έντονο στο single */
  vertical-align: middle;
}

/* reset + box για το native heart button */
.heart-btn {
  all: unset;                     /* καθαρό κουμπί */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  cursor: pointer;
  border-radius: 999px;
  /* μικρό tap target χωρίς οπτικό outline */
}
.heart-btn:focus-visible {
  outline: 2px solid rgba(255,0,0,.35);
  outline-offset: 2px;
}
.heart-btn wa-icon {
  font-size: 1.5em;               /* default μέγεθος εικονιδίου */
  line-height: 1;
  transition: transform .2s ease, color .2s ease;
}
.heart-btn:hover wa-icon {
  transform: scale(1.08);
}

/* reset + box για το native heart button */
.heart-btn {
  all: unset;                     /* καθαρό κουμπί */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  cursor: pointer;
  border-radius: 999px;
  /* μικρό tap target χωρίς οπτικό outline */
}
.heart-btn:focus-visible {
  outline: 2px solid rgba(255,0,0,.35);
  outline-offset: 2px;
}
.heart-btn wa-icon {
  font-size: 1.5em;               /* default μέγεθος εικονιδίου */
  line-height: 1;
  transition: transform .2s ease, color .2s ease;
}
.heart-btn:hover wa-icon {
  transform: scale(1.08);
}

/* GRID footer alignment */
.kp-grid .book-card .wa-card__footer.kp-card-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: .5rem !important;
  padding-right: 1rem !important;     /* αέρας από το δεξί πλαίσιο */
}
.kp-grid .book-card .wa-card__footer.kp-card-footer .kp-cta {
  margin-right: auto !important;      /* κουμπί αριστερά */
}
.kp-grid .book-card .wa-card__footer.kp-card-footer .heart-btn {
  margin-right: .125rem !important;   /* safety gap δεξιά */
}

/* SINGLE header alignment */
.single-card .wa-card__header {
  display: flex !important;
  align-items: center !important;     /* center με τον τίτλο */
  gap: .5rem !important;
  padding-right: 1rem !important;     /* περισσότερο margin από δεξί edge */
}
.single-card .wa-card__header .heart-btn {
  margin-left: auto !important;       /* καρδιά δεξιά */
  margin-right: .125rem !important;
}
.single-card .wa-card__header .heart-btn wa-icon {
  font-size: 1.6em;                   /* λίγο πιο έντονο στο single */
}

/* /assets/styles.css */
.static-card .wa-card__body > h1 { margin-bottom: .25rem; }
.static-card .wa-card__body > .wa-caption-s { color: var(--wa-color-neutral-600); margin-bottom: 1rem; }
.static-card .wa-card__body h2 { margin-top: 1rem; }
.static-card .wa-card__body ul { margin-left: 1rem; }

/* ===== Base / Typography */
:root{
  --page-pad:16px;
  --card-radius:14px;
  --card-gap:24px;
}
html { font-size: clamp(15px, 1.8vw, 16px); }
img { max-width: 100%; height: auto; display: block; }

/* ===== Page container */
.container { padding: var(--page-pad); }

/* ===== Category filter chips */
.filters{
  display:flex; gap:.5rem; flex-wrap:wrap;
  margin-bottom: .75rem;
}
.filters .chip,
.filters wa-button,
.filters .wa-button{
  white-space: nowrap;
  border-radius: 999px;
  padding: .5rem .9rem;
  line-height: 1;
  min-height: 36px;
}
@media (max-width: 768px){
  .filters{
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 calc(var(--page-pad) * -1) .75rem;
    padding: 0 var(--page-pad) .5rem;
    scroll-snap-type: x proximity;
  }
  .filters > *{ scroll-snap-align: start; }
  .filters::-webkit-scrollbar{ display:none; }
}

/* ===== Books grid (listing) */
.book-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: var(--card-gap);
}
@media (max-width: 1024px){
  .book-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .book-grid{ grid-template-columns: 1fr; gap: 18px; }
}

/* ===== Book card */
.book-card{
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  padding: 14px;
}
.book-card .cover{
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: .75rem;
}
.book-card .cover img{
  width: 100%;
  aspect-ratio: 3 / 4;       /* σταθερή αναλογία για ομοιομορφία */
  object-fit: cover;
}
.book-card .title{
  font-weight: 700;
  font-size: clamp(1.05rem, 2.8vw, 1.2rem);
  margin: 0 0 .25rem 0;
}
.book-card .isbn{
  color: #555;
  font-size: .95rem;
  overflow-wrap: anywhere;   /* για μεγάλα ISBN να μην “σπάνε” το layout */
  margin-bottom: .5rem;
}
.book-card .actions{
  display:flex; align-items:center; gap:.5rem; margin-top:.5rem;
}
.book-card .actions .primary{
  flex:1 1 auto;
}
.book-card .actions .favorite{
  width:48px; height:48px; min-width:48px;
  display:grid; place-items:center;
  border-radius:12px;
}

/* Κάνε τα tap targets μεγάλα στο mobile */
@media (max-width: 480px){
  .book-card .actions a,
  .book-card .actions button,
  .book-card .actions .wa-button,
  .filters .chip,
  .filters .wa-button{ min-height:44px; }
}

/* ===== Single book — meta list */
.book-meta{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px 16px;
}
@media (max-width: 640px){
  .book-meta{ grid-template-columns: 1fr; }
}

/* ===== Reduce hover effects on touch */
@media (hover:none){
  .book-card:hover{ transform:none !important; }
}

/* ===== reCAPTCHA badge safety spacing (να μην σκεπάζει CTA) */
.page-has-recaptcha{
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
@media (max-width: 480px){
  .grecaptcha-badge{ right: 8px !important; bottom: 8px !important; }
}
