/* Minimalistická profesionální galerie */
:root {
  --bg: #ffffff;
  --card: #fefefe;
  --text: #2b2b2b;
  --muted: #6f6f6f;
  --accent: #4e4339;
  --accent-hover: #635548;
  --radius: 10px;
  --shadow: 0 3px 12px rgba(0,0,0,0.06);
  --gap: 20px;
}

#galerie h2 {
  font-size: 36px;
}

.filters a[href="?cat=all#galerie"] button,
.filters a[href="?cat=available#galerie"] button,
.filters a[href="?cat=sold#galerie"] button {
  background: #8a7a69;
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  cursor: pointer;
  transition: 0.2s;
}

.filters a[href="?cat=all#galerie"] button:hover,
.filters a[href="?cat=available#galerie"] button:hover,
.filters a[href="?cat=sold#galerie"] button:hover {
  background: #b6a28d;
}

.galerie-section {
  padding: 40px 16px;
  background: var(--bg);
  text-align: center;
  font-family: "Red Hat Display", sans-serif;
}

.filters {
  font-family: "Red Hat Display", sans-serif;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 30px;
}

.filters button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  cursor: pointer;
  transition: .2s;
}

.filters button:hover {
  background: var(--accent-hover);
}

/* ---------- GRID ---------- */
.galerie-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 1150px;
  margin: auto;
}

@media (max-width: 900px) {
  .galerie-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .galerie-container {
    grid-template-columns: 1fr;
  }
}

/* ---------- KARTA ---------- */
.ad {
  background: #ffffff;
  border-radius: 12px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid #e1e1e1;
}

/* ---------- OBRÁZEK ---------- */
.image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-wrapper img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* ---------- BADGE ---------- */
.sold-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;       /* ⭐ menší = už se neroztahuje */
  font-size: 11px;
  font-weight: bold;
  border-radius: 8px;
  color: white;
  z-index: 10;
}

.sold-badge.in-stock {
  background: #00b347;
}

.sold-badge.sold {
  background: #cc0000;
}

/* ---------- TEXT OBSAH ---------- */
.ad-content {
  text-align: center;
  padding: 8px 4px;
}

.ad-content h3 {
  margin: 8px 0 4px 0;
  font-size: 18px;
}

.ad-desc {
  margin: 6px 0;
  font-size: 14px;
  color: #555;
}

/* ---------- CENA ---------- */
.ad-price {
  font-size: 17px;
  margin: 3px 0 5px 0;
}

/* ---------- SKLADEM ---------- */
.stock {
  margin: 4px 0;
  font-size: 14px;
  font-weight: 600;
}

.stock.in-stock {
  color: #00a53c;
}

.stock.sold {
  color: #cc0000;
}

/* ---------- TLAČÍTKO ---------- */
.show-btn {
  display: inline-block;
  margin-top: 8px;
  background: #4e4339;
  color: white;
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  transition: 0.2s;
}

.show-btn:hover {
  background: #796756;
}

/* ========================================================= */
/* ======================== DETAIL ========================== */
/* ========================================================= */

.detail-section {
  font-family: "Red Hat Display", sans-serif;
  margin: 0 auto;
  padding: 20px;
  max-width: 1400px;
  transform: scale(1.3);
  transform-origin: center;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.detail-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

/* LEVÁ STRANA - OBRÁZEK */
.detail-left {
  flex: 1 1 400px;
}

.detail-left img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

/* PC – OMEZENÍ VÝŠKY A POSUN DOLŮ */
@media (min-width: 1025px) {
  .detail-left img {
    max-height: 80vh;
    object-fit: contain;
    margin-top: 60px;
  }
}

/* PRAVÁ STRANA – TEXT DOPROSTŘED */
.detail-right {
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-right h1 {
  margin-top: 0;
  font-size: 28px;
}

/* MENŠÍ A NEROZTAŽENÉ BADGE */
.sold-big,
.instock-big {
  display: inline-block;
  padding: 4px 8px;
  font-size: 14px;
  border-radius: 6px;
  font-weight: bold;
  width: auto;
}

.sold-big {
  background: #c70000;
  color: white;
}

.instock-big {
  background: #3aa13a;
  color: white;
}

.detail-price {
  margin: 15px 0;
  font-size: 22px;
}

.detail-desc {
  margin: 15px 0;
  line-height: 1.6;
}

.back-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 16px;
  background: #4e4339;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  transition: 0.2s;
}

.back-btn:hover {
  background: #695949;
}

/* ===================================== */
/* TABLETY */
/* ===================================== */
@media (max-width: 1024px) {
  .detail-section {
    transform: scale(1);
    padding: 25px;
  }

  /* OBRÁZEK NA TABLETU NESMÍ VLÉZT DO NAVBARU */
  .detail-left img {
    max-height: 70vh;
    object-fit: contain;
  }

  .detail-right h1 {
    font-size: 24px;
  }

  .detail-price {
    font-size: 20px;
  }
}

/* ===================================== */
/* MOBILY */
/* ===================================== */
@media (max-width: 600px) {
  .detail-section {
    transform: scale(1);
    padding: 40px 15px 25px; /* ⭐ menší top padding */
    min-height: auto;
    align-items: flex-start;
  }

  .detail-wrapper {
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
  }

  /* MOBIL – obrázek nesmí lézt do navbaru */
  .detail-left img {
    max-height: 60vh;
    object-fit: contain;
  }

  .detail-right h1 {
    font-size: 22px;
  }

  .detail-price {
    font-size: 18px;
  }

  .detail-desc {
    font-size: 15px;
  }

  .back-btn {
    padding: 10px 18px;
    font-size: 15px;
  }
}
