/* ===== Base ===== */
* {
  box-sizing: border-box;
}

:root {
  --bg: #f4f1ec;
  --fg: #1d1d1d;
  --muted: #5f5b55;
  --card: #ffffff;
  --border: #dcd6cc;
  --shadow: 0 6px 22px rgba(0, 0, 0, .08);
  --radius: 18px;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Georgia, serif;
  background: var(--bg);
  color: var(--fg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* main content grows, footer sticks to bottom */
body>main,
body>.catalog-main,
body>.contact-main,
body.product-page>.product-main {
  flex: 1 0 auto;
}

footer {
  text-align: center;
  padding: 1rem;
  background: #2b2b2b;
  color: #fff;
  font-size: .9rem;
  margin-top: auto;
}

/* ===== Header + navbar ===== */
/* ===== Header + navbar ===== */
header {
  position: relative;
  /* Removed background image and fixed heights */
}

/* Design line strip */
/* Design line strip */
.design-line {
  position: relative;
  width: 100%;
  height: 60px;
  /* Bigger by default (product pages) */
  background: url("img/fejlec.jpg") center/cover no-repeat;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
  display: flex;
  align-items: center;
  /* Vertically align logo if present */
  justify-content: center;
  transition: height 0.3s ease;
}

header.index-header .design-line {
  height: 220px;
  /* Reduced from 280px */
}

@media (min-width: 900px) {
  header.index-header .design-line {
    height: 300px;
    /* Reduced from 380px */
  }
}

.topbar {
  position: relative;
  z-index: 100;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .05);
  padding: 0;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Nav Links Wrapper */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.topbar a {
  font-weight: 600;
  font-size: 1.05rem;
  padding: .6rem 1.1rem;
  border-radius: 8px;
  color: var(--fg);
  border: 1px solid transparent;
  transition: all .2s ease;
  white-space: nowrap;
}

.topbar a:hover,
.topbar a.is-active,
.topbar a.active {
  background: #f4f1ec;
  /* subtle highlight matching bg */
  color: #000;
  box-shadow: none;
  border-color: transparent;
}

/* Logo container in header */
/* Logo container in header */
.header-logo-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0;
}

/* Logo styling - no longer absolute centering on big header */
/* Logo styling */
.logo {
  display: block;
  max-width: 90%;
  width: 640px;
  height: auto;
  margin: 0;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .3));
  /* Stronger shadow against bg */
}

/* Language Switch */
.lang-switch {
  display: flex;
  gap: .4rem;
  margin-left: 1rem;
}

.lang-btn {
  font-size: .8rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .25);
  background: rgba(255, 255, 255, .9);
  color: #8e8e8e;
  cursor: pointer;
  text-decoration: none;
}

.lang-btn:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.lang-btn.is-active {
  background: #12bccf;
  border-color: #2f5d62;
  color: #000000;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
}


/* ===== Burger Menu (Mobile) ===== */
.burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 200;
}

.burger-lines {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--fg);
  position: relative;
  transition: background-color .2s;
}

.burger-lines::before,
.burger-lines::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--fg);
  transition: transform .2s, top .2s;
  left: 0;
}

.burger-lines::before {
  top: -7px;
}

.burger-lines::after {
  top: 7px;
}

/* Burger Active State (X shape) */
.burger-btn.active .burger-lines {
  background-color: transparent;
}

.burger-btn.active .burger-lines::before {
  top: 0;
  transform: rotate(45deg);
}

.burger-btn.active .burger-lines::after {
  top: 0;
  transform: rotate(-45deg);
}


/* ===== Mobile Navigation (< 900px) ===== */
@media (max-width: 900px) {


  /* No index-header adjustment needed */

  .logo {
    width: 280px;
    margin: 0 auto;
  }

  .nav-container {
    padding: 0.8rem 1.2rem;
    justify-content: space-between;
  }

  .burger-btn {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    gap: 1rem;
    align-items: stretch;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);

    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 199;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .topbar a {
    text-align: center;
    width: 100%;
    padding: 0.8rem;
    font-size: 1.15rem;
  }

  .lang-switch {
    justify-content: center;
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

@media (max-width: 480px) {
  /* No header height override needed */

  .logo {
    width: 220px;
  }
}

/* ===== Home – responsive category grid (wider cards) ===== */
main.category-grid {
  display: grid;
  /* Desktop: exactly 3 columns, but each column can grow */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.2rem, 2vw, 2.2rem);
  padding: clamp(1.5rem, 2vw, 3rem) clamp(1rem, 2vw, 2rem) 3.5rem;
  /* container width adapts with screen, capped for nice margins */
  width: min(92vw, 1400px);
  margin: 0 auto;
}

/* Large laptops/tablets: 2 columns */
@media (max-width: 1200px) {
  main.category-grid {
    grid-template-columns: repeat(2, minmax(340px, 1fr));
    width: min(94vw, 1100px);
  }
}

/* Phones: 1 column */
@media (max-width: 700px) {
  main.category-grid {
    grid-template-columns: 1fr;
    width: min(94vw, 560px);
  }
}

/* Card */
main.category-grid .home-category-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  height: auto;
  align-self: start;
}

/* Image area – 16:9 for a broad feel */
main.category-grid .thumb {
  position: relative;
  overflow: hidden;
  border-radius: calc(24px - 2px);
}

main.category-grid .thumb::before {
  content: none !important;
}

/* 3:2 Aspect Ratio + No Padding Hack */
main.category-grid .thumb {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 0;
}

main.category-grid .thumb img {
  position: static;
  /* was absolute */
  width: 100%;
  height: 100%;
  object-fit: cover;
}

main.category-grid .home-category-card:hover .thumb img {
  transform: scale(1.035);
}

main.category-grid .home-category-card .thumb img {
  object-position: top center;
}

/* Title badge – a bit larger for wider cards */
main.category-grid .badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-block;
  background: #fff;
  color: var(--fg);
  padding: .55rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.08rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

/* Lower body keeps visual weight */
main.category-grid .card-body {
  min-height: 140px;
  padding: 1rem 1.2rem 1.2rem;
  color: var(--muted);
  font-size: .95rem;
}


/* ===== Contact page ===== */
.contact-main {
  max-width: 1100px;
  margin: 2.5rem auto 2.5rem;
  padding: 2rem 2.5rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 2.5rem;
}

.contact-main h1 {
  margin: 0 0 .4rem;
  font-size: 2rem;
}

.contact-main .lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.contact-line {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: .98rem;
}

.contact-label {
  font-weight: 700;
  min-width: 90px;
}

.contact-value a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.contact-logos {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
}

.contact-logos-label {
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.contact-logo {
  max-height: 60px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .18));
}

.contact-card-secondary {
  align-self: flex-start;
  padding: 1.6rem 1.8rem;
  background: linear-gradient(135deg, #f9f5ee, #efe3d3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: .95rem;
}

.contact-card-secondary h2 {
  margin: 0 0 .6rem;
  font-size: 1.2rem;
}

.contact-card-secondary p {
  margin: .3rem 0;
  color: var(--muted);
}

@media (max-width:900px) {
  .contact-main {
    margin: 3rem 1rem 2.2rem;
    padding: 1.8rem 1.4rem;
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
}

/* ===== Catalog (katalogus.html) ===== */
.catalog-main {
  max-width: 1200px;
  margin: 2.5rem auto 3rem;
  padding: 0 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 2.2rem;
}

@media (max-width:900px) {
  .catalog-main {
    grid-template-columns: 1fr;
    margin: 3rem auto 2.5rem;
  }
}

.catalog-filters {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.8rem;
}

.catalog-filters h1 {
  margin: 0 0 .4rem;
  font-size: 1.7rem;
}

.catalog-lead {
  margin: .1rem 0 1.4rem;
  font-size: .95rem;
  color: var(--muted);
}

.filter-form {
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: .92rem;
}

.filter-field .label-text {
  font-weight: 600;
}

.filter-form input[type="search"],
.filter-form input[type="number"],
.filter-form select {
  padding: .55rem .7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font: inherit;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.filter-actions {
  display: flex;
  gap: .6rem;
  margin-top: .6rem;
  flex-wrap: wrap;
}

/* shared button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  font: inherit;
}

.btn.primary {
  background: #2f5d62;
  border-color: #2f5d62;
  color: #fff;
}

.btn.ghost {
  background: transparent;
}

/* results */
.catalog-results {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.catalog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .95rem;
  color: var(--muted);
}

.catalog-count {
  font-weight: 600;
}

.catalog-page {
  opacity: .9;
}

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

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: .22s transform, .22s box-shadow;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
}

.product-card-img-wrap {
  position: relative;
  overflow: hidden;
}

.product-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: #f2eee9;
}

.product-card-img-wrap .badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  background: #fff;
  border-radius: 999px;
  padding: .3rem .8rem;
  font-size: .8rem;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}

.product-card-body {
  padding: 1rem 1.1rem 1.1rem;
}

.product-card-title {
  margin: 0;
  font-size: 1.1rem;
}

.product-card-meta {
  margin: .35rem 0 .25rem;
  font-size: .9rem;
  color: var(--muted);
}

.product-card-price {
  margin: .25rem 0;
  font-weight: 700;
}

.product-card-short {
  margin: .25rem 0 0;
  font-size: .9rem;
  color: #2b2b2b;
}

.catalog-empty {
  margin-top: 1rem;
  font-size: .98rem;
  color: var(--muted);
}

.pager {
  margin-top: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .8rem;
  font-size: .92rem;
}

.pager-link {
  padding: .4rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  text-decoration: none;
}

.pager-link:hover {
  box-shadow: var(--shadow);
}

.pager-current {
  color: var(--muted);
}

/* ===== Product detail page (termek.html) ===== */

body.product-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.product-main {
  max-width: 1200px;
  margin: 2.5rem auto 3.5rem;
  padding: 0 1.5rem;
  flex: 1 0 auto;
}

/* back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 1.4rem;
  font-size: .9rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
  text-decoration: none;
}

.back-link:hover {
  background: #fff;
}

/* one wide card: left image, right details */
.product-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1.8rem;
  padding: 1.2rem 1.4rem 1.5rem;
  border-radius: 24px;
}

@media (max-width:900px) {
  .product-shell {
    grid-template-columns: 1fr;
  }
}

/* optional glass effect wrapper */
.glass-card {
  background: rgba(255, 255, 255, .95);
  border-radius: 24px;
  border: 1px solid rgba(220, 214, 204, .9);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* left gallery */
.product-media {
  padding: .3rem 1rem 1rem .8rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

.product-hero {
  border-radius: 18px;
  overflow: hidden;
  background: #f3efe8;
}

.product-hero img {
  width: 100%;
  display: block;
  cursor: zoom-in;
  object-fit: cover;
}

.product-thumbs {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: .7rem;
}

.thumb-btn {
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

.thumb-btn img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  display: block;
}

.product-hint {
  margin-top: .4rem;
  font-size: .8rem;
  color: var(--muted);
}

/* right info panel */
.product-info {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.2rem 1.4rem 1.5rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .06);
}

.product-header {
  margin-bottom: 1rem;
}

.product-title {
  margin: .1rem 0 .3rem;
  font-size: 2rem;
  letter-spacing: .03em;
}

.product-meta {
  margin: 0;
  font-size: .9rem;
  color: var(--muted);
}

.product-date {
  margin: .15rem 0 0;
  font-size: .8rem;
  color: var(--muted);
}

/* labelled fields: Ár, Leírás, Tulajdonságok */
.field {
  margin-bottom: 1.2rem;
}

.field-label {
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .15rem;
}

.field-value {
  font-size: .96rem;
}

.product-price {
  font-weight: 700;
  font-size: 1.2rem;
}

.product-short {
  margin: .15rem 0 .5rem;
  font-style: italic;
}

.product-description {
  line-height: 1.6;
}

/* hide any inline images coming from description HTML */
.product-description img {
  display: none;
}

/* attributes grid */
.product-attrs {
  margin: 0;
  padding: 0;
}

.product-attrs .attr-row {
  display: grid;
  grid-template-columns: minmax(0, 140px) minmax(0, 1fr);
  gap: 1rem;
  padding: .35rem 0;
  border-top: 1px dashed var(--border);
}

.product-attrs .attr-row:first-child {
  border-top: none;
}

.product-attrs dt {
  font-weight: 600;
  font-size: .9rem;
}

.product-attrs dd {
  margin: 0;
  font-size: .9rem;
}

/* empty state */
.product-empty {
  max-width: 520px;
  margin: 2.5rem auto;
  padding: 2rem 2.3rem;
  text-align: center;
  background: rgba(255, 255, 255, .9);
  border-radius: 20px;
  border: 1px dashed var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  color: var(--muted);
}

/* footer on product page – same colors, separate class allowed */
.product-footer {
  text-align: center;
  padding: 1rem;
  background: #2b2b2b;
  color: #fff;
  font-size: .9rem;
}

/* lightbox / zoom overlay */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 999;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: min(96vw, 1100px);
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, .9);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: #fff;
}

/* ===== Admin page ===== */
body.admin {
  margin: 0;
  display: block;
  /* override flex layout */
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: #f7f6f3;
  color: #1d1d1d;
}

body.admin header {
  background: #2f5d62;
  color: #fff;
  padding: 14px 18px;
  height: auto;
  background-image: none;
}

body.admin .admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.admin .admin-bar-actions {
  display: flex;
  gap: 8px;
}

body.admin main {
  max-width: 1200px;
  margin: 18px auto 40px;
  padding: 0 12px;
}

body.admin .admin-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
}

@media (max-width:1100px) {
  body.admin .admin-grid {
    grid-template-columns: 1fr;
  }
}

body.admin .panel {
  background: #fff;
  border: 1px solid #e6dfd4;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  padding: 14px;
}

body.admin h2 {
  margin: 6px 0 12px;
}

body.admin label {
  font-size: .92rem;
  color: #555;
}

body.admin input,
body.admin select,
body.admin textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #dcd6cc;
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

body.admin .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

body.admin .row3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

body.admin .muted {
  color: #666;
  font-size: .9rem;
}

body.admin .list {
  max-height: 540px;
  overflow: auto;
}

body.admin .item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

body.admin .item:hover {
  background: #faf8f5;
}

body.admin .item img {
  width: 42px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ddd;
}

body.admin .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

body.admin .btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dcd6cc;
  background: #fff;
  cursor: pointer;
  font: inherit;
}

body.admin .btn.primary {
  background: #2f5d62;
  border-color: #2f5d62;
  color: #fff;
}

body.admin .btn.danger {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
}

body.admin .badge {
  display: inline-block;
  background: #eee;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .8rem;
  margin-left: 6px;
}

body.admin .tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
}

body.admin .tab {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #dcd6cc;
  background: #fff;
  cursor: pointer;
}

body.admin .tab.active {
  background: #2f5d62;
  border-color: #2f5d62;
  color: #fff;
}

body.admin .hidden {
  display: none !important;
}

body.admin table {
  width: 100%;
  border-collapse: collapse;
}

body.admin th,
body.admin td {
  padding: 8px;
  border-bottom: 1px solid #eee;
  text-align: left;
  font-size: .95rem;
}

body.admin th {
  color: #555;
}

body.admin .right {
  text-align: right;
}

body.admin .toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #1f2933;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
  opacity: .96;
  z-index: 100;
}

/* Admin – images */
body.admin .images {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

body.admin .thumb {
  position: relative;
  width: 96px;
  height: 128px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
}

body.admin .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.admin .thumb .tag {
  position: absolute;
  left: 6px;
  top: 6px;
  background: #2f5d62;
  color: #fff;
  font-size: .72rem;
  padding: 2px 6px;
  border-radius: 999px;
}

body.admin .thumb .tools {
  position: absolute;
  right: 4px;
  top: 4px;
  display: flex;
  gap: 4px;
}

body.admin .ico {
  border: none;
  background: #fff;
  border: 1px solid #dcd6cc;
  border-radius: 6px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

body.admin .ico:hover {
  background: #2f5d62;
  border-color: #2f5d62;
  color: #fff;
}

/* Admin – chips */
body.admin .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8f6f3;
  border: 1px solid #e2ddd4;
  border-radius: 999px;
  padding: 2px 8px;
  margin: 2px;
}

body.admin .chip button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: bold;
}

/* === Home categories: pure landscape image cards === */
main.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(360px, 1fr));
  /* 3 wide on desktop */
  gap: clamp(1.2rem, 2vw, 2rem);
  width: min(95vw, 1400px);
  margin: 0 auto;
  padding: clamp(1.25rem, 2vw, 2rem) 1.5rem 3rem;
}

@media (max-width:1200px) {
  main.category-grid {
    grid-template-columns: repeat(2, minmax(340px, 1fr));
  }
}

@media (max-width:700px) {
  main.category-grid {
    grid-template-columns: 1fr;
    width: min(94vw, 560px);
  }
}

/* card container */
main.category-grid .category {
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

/* make the whole card clickable without adding height */
main.category-grid .category>a {
  display: block;
  padding: 0;
  margin: 0;
}


/* LANDSCAPE thumb: shorter aspect */
main.category-grid .thumb {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  /* clean rectangle */
}

main.category-grid .thumb::before {
  content: "";
  display: block;
  padding-top: 42%;
  /* ~2.4:1 landscape */
}

main.category-grid .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .25s ease, filter .25s ease;
}

main.category-grid .category:hover .thumb img {
  transform: scale(1.03);
  filter: contrast(1.03) saturate(1.02);
}

/* badge on image */
main.category-grid .badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: .5rem 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

/* hide the empty lower block for landscape design */
main.category-grid .card-body {
  display: none !important;
}

/* no extra height */