/* ====================================================================
   Public site. Every color, font and corner radius comes from a CSS variable, so a theme
   (includes/themes.php) only has to override these variables — the layout never changes.
   The defaults below are the "Editorial" theme; the admin panel also uses them.
   ==================================================================== */
:root {
  --bg: #f2f0ec;
  --surface: #ffffff;
  --surface-2: #e9e5dc;
  --text: #111111;
  --text-soft: #333333;
  --muted: #7a746a;
  --border: #cfc9bd;
  --border-soft: #e4e0d8;
  --accent: #e11d2e;
  --accent-dark: #b5121f;
  --on-accent: #ffffff;
  --header-bg: #111111;
  --header-text: #f2f0ec;
  --header-link: #cfcac2;
  --header-input-bg: #1f1f1f;
  --header-input-border: #333333;
  --header-shadow: 0 1px 0 rgba(255,255,255,0.06);
  --footer-bg: #111111;
  --footer-text: #a8a29a;
  --footer-heading: #ffffff;
  --footer-rule: #2a2a2a;
  --rule: #111111;
  --media-bg: #1c1c1c;
  --ad-bg: #f5f3ee;
  --hero-accent: var(--accent);
  --radius: 6px;
  --font-display: 'Anton', sans-serif;
  --font-body: 'Archivo', sans-serif;
  --display-weight: 400;
  --display-transform: uppercase;
  --display-spacing: 0.5px;
  --texture: none;
  --texture-size: auto;
  --gutter: clamp(16px, 4vw, 48px);

  /* kept for older admin rules */
  --ink: var(--text);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background-color: var(--bg);
  background-image: var(--texture);
  background-size: var(--texture-size);
  background-position: var(--texture-position, 0 0);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  text-transform: var(--display-transform);
  letter-spacing: var(--display-spacing);
  overflow-wrap: anywhere;
}

body:not(.admin-body) .btn-primary { background: var(--accent); color: var(--on-accent); }
body:not(.admin-body) .btn-primary:hover { background: var(--accent-dark); color: var(--on-accent); }
body:not(.admin-body) .btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }

.social-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; color: #fff !important;
  font-size: 12px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase;
  transition: opacity 0.2s ease, transform 0.2s ease; white-space: nowrap;
}
.social-link:hover { opacity: 0.9; transform: translateY(-1px); }
.instagram-link { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4); }
.youtube-link { background: #ff0000; }
.pinterest-link { background: #e60023; }
.x-link { background: #000000; }
.footer-social { display: flex; flex-wrap: wrap; gap: 8px; }

/* Only the admin sees this bar, while previewing a theme before applying it. */
.theme-preview-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px;
  padding: 10px 16px; background: #fff7c2; color: #3b3000; font-size: 13px; font-family: 'Archivo', sans-serif;
  border-bottom: 1px solid #e6d77a;
}
.theme-preview-bar a { color: #3b3000; font-weight: 700; text-decoration: underline; }

/* ---------- Site header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px var(--gutter);
  background: var(--header-bg);
  color: var(--header-text);
  box-shadow: var(--header-shadow);
}
.site-header .logo { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 24px; letter-spacing: var(--display-spacing); text-transform: var(--display-transform); white-space: nowrap; }
.site-header .logo a { color: var(--header-text); }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; }
.site-nav > a:not(.social-link) { color: var(--header-link); position: relative; padding: 4px 0; }
.site-nav > a:not(.social-link)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform 0.2s ease;
}
.site-nav > a:not(.social-link):hover { color: var(--header-text); }
.site-nav > a:not(.social-link):hover::after { transform: scaleX(1); }

.site-search { display: flex; align-items: center; background: var(--header-input-bg); border: 1px solid var(--header-input-border); border-radius: 999px; overflow: hidden; }
.site-search input {
  width: 170px; padding: 8px 4px 8px 14px; background: transparent; border: none; color: var(--header-text);
  font-family: inherit; font-size: 13px; text-transform: none; letter-spacing: 0;
}
.site-search input::placeholder { color: var(--header-link); opacity: 0.75; }
.site-search input:focus { outline: none; }
.site-search:focus-within { border-color: var(--accent); }
.site-search button { background: none; border: none; color: var(--header-link); padding: 8px 12px 8px 6px; cursor: pointer; display: flex; }
.site-search button:hover { color: var(--header-text); }

/* Hamburger button — hidden on desktop, shown once the nav no longer fits comfortably. */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 30px; height: 30px; padding: 0; background: none; border: none; cursor: pointer;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--header-text); transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 980px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--header-bg);
    padding: 12px var(--gutter) 18px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.25);
  }
  .site-nav.open { display: flex; }
  .site-nav > a:not(.social-link) { padding: 13px 0; border-bottom: 1px solid var(--header-input-border); }
  .site-nav > a:not(.social-link)::after { display: none; }
  .site-nav .social-link { align-self: flex-start; margin-top: 12px; }
  .site-search { width: 100%; margin-bottom: 6px; }
  .site-search input { width: 100%; font-size: 16px; } /* 16px stops iPhone auto-zoom on focus */
}

/* ---------- Ads ---------- */
.ad-slot { margin: 0; overflow: hidden; text-align: center; }
.ad-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--ad-bg); border: 1px dashed var(--border); color: var(--muted);
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  pointer-events: none; user-select: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 34px var(--gutter) 26px;
  border-bottom: 4px solid var(--rule);
}
.hero h1 { font-size: clamp(28px, 4vw, 46px); line-height: 1.05; margin: 0; text-transform: none; overflow-wrap: anywhere; }
.hero h1 .accent { color: var(--accent); }
.hero .hero-prefix { display: block; color: var(--muted); font-size: 0.5em; margin-bottom: 6px; }
.hero .meta { font-size: 13px; color: var(--text-soft); opacity: 0.85; margin-top: 10px; text-transform: uppercase; letter-spacing: 0.8px; }
.hero-intro { max-width: 720px; margin: 14px 0 0; font-size: 15px; line-height: 1.65; color: var(--text-soft); white-space: pre-line; }
.hero-logo { display: block; margin: 0; height: auto; width: auto; max-height: 180px; max-width: min(100%, 560px); object-fit: contain; border-radius: 4px; }
@media (max-width: 760px) { .hero-logo { max-height: 120px; } }
/* Logo on the left, count + intro text beside it on the right (stacks on phones). */
.hero-with-logo { display: flex; align-items: center; gap: 32px; }
.hero-with-logo .hero-logo { flex-shrink: 0; }
.hero-with-logo .hero-text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hero-with-logo .hero-intro { margin: 0; }
@media (max-width: 760px) { .hero-with-logo { flex-direction: column; align-items: flex-start; gap: 14px; } }

/* Hero with an admin-uploaded background photo: the photo is darkened (the darkness is set
   in the admin panel) so the white heading on top of it always stays readable. */
.hero.has-bg {
  position: relative; padding-top: clamp(48px, 9vw, 96px); padding-bottom: clamp(40px, 7vw, 72px);
  background-color: var(--media-bg); background-size: cover; background-position: center; color: #fff;
}
.hero.has-bg h1 .accent { color: var(--hero-accent); }
.hero.has-bg .hero-prefix { color: rgba(255,255,255,0.7); }
.hero.has-bg .meta { color: rgba(255,255,255,0.85); opacity: 1; }
.hero.has-bg .hero-intro { color: rgba(255,255,255,0.9); text-shadow: 0 1px 2px rgba(0,0,0,0.4); }
.hero.has-bg h1 { text-shadow: 0 2px 12px rgba(0,0,0,0.35); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Layout: sidebar + grid ---------- */
.layout {
  display: flex;
  gap: 36px;
  padding: 26px var(--gutter);
  align-items: flex-start;
  flex-wrap: wrap;
}
.sidebar { width: 200px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
.sidebar .heading { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }
.cat-list { display: flex; flex-direction: column; gap: 2px; }
.cat-list a.cat-link {
  padding: 10px 12px; font-size: 14px; text-transform: none; letter-spacing: 0.2px; color: var(--text-soft);
  display: flex; align-items: center; justify-content: space-between; border-radius: calc(var(--radius) * 0.7);
  transition: background 0.15s ease, color 0.15s ease;
}
.cat-list a.cat-link .chevron { font-size: 10px; color: var(--muted); margin-left: 8px; }
.cat-list a.cat-link.active .chevron { color: var(--on-accent); }
.cat-list a.cat-link:hover { background: var(--surface-2); }
.cat-list a.cat-link.active { font-weight: 700; color: var(--on-accent); background: var(--accent); }
.cat-list a.cat-link.sub { padding-left: 26px; font-size: 12px; color: var(--muted); justify-content: flex-start; }
.cat-list a.cat-link.sub:before { content: "\21B3"; margin-right: 6px; color: var(--muted); }
.cat-list a.cat-link.sub.active { color: var(--on-accent); }
.cat-list a.cat-link.sub.active:before { color: var(--on-accent); }
.cat-row { display: flex; align-items: center; gap: 4px; }
.cat-row .cat-link { flex: 1; min-width: 0; }
.cat-toggle {
  flex-shrink: 0; width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer;
  color: var(--muted); font-size: 12px; border-radius: calc(var(--radius) * 0.7);
  transition: transform 0.2s ease, background 0.15s ease;
}
.cat-toggle:hover { background: var(--surface-2); color: var(--text); }
.cat-group:not(.open) .cat-toggle { transform: rotate(-90deg); }
.cat-children { display: none; flex-direction: column; gap: 2px; }
.cat-group.open .cat-children { display: flex; }

.content { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 14px; }

/* Phones: categories become one swipeable row of pill buttons above the grid, so the photos
   are visible straight away instead of after a long list. */
@media (max-width: 760px) {
  .layout { flex-direction: column; gap: 16px; padding-top: 18px; }
  .sidebar { width: 100%; gap: 8px; }
  .sidebar .heading { font-size: 12px; }
  .cat-list {
    flex-direction: row; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 4px;
  }
  .cat-list::-webkit-scrollbar { display: none; }
  .cat-list a.cat-link, .cat-list a.cat-link.sub {
    flex: 0 0 auto; white-space: nowrap; padding: 9px 15px; font-size: 12px;
    background: var(--surface); border: 1px solid var(--border-soft); border-radius: 999px; color: var(--text-soft);
  }
  .cat-list a.cat-link.sub { background: var(--surface-2); }
  .cat-list a.cat-link.sub:before { content: none; }
  .cat-list a.cat-link.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  .cat-list a.cat-link .chevron { margin-left: 6px; }
  /* In the swipeable pill row the groups dissolve into plain pills; closed groups hide their subs. */
  .cat-group, .cat-row { display: contents; }
  .cat-group.open .cat-children { display: contents; }
  .cat-toggle {
    flex: 0 0 auto; width: auto; height: auto; padding: 9px 12px; font-size: 11px;
    background: var(--surface); border: 1px solid var(--border-soft); border-radius: 999px;
  }
  .sidebar-ad { display: none; } /* a tall sidebar ad would push the photos far down on phones */
}

/* ---------- Photo grid ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 900px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .photo-grid { gap: 8px; } }
@media (max-width: 330px) { .photo-grid { grid-template-columns: 1fr; } }

.photo-card {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  display: block;
  background: var(--media-bg);
  border-radius: var(--radius);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.photo-card .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 9px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  font-size: 12.5px; color: #fff; font-weight: 700; text-transform: none; letter-spacing: 0.2px;
}
@media (hover: hover) {
  .photo-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,0.25); transform: translateY(-2px); }
  .photo-card:hover img { transform: scale(1.05); }
}
@media (max-width: 520px) { .photo-card .cap { font-size: 10px; padding: 22px 8px 7px; } }

.photo-card .variant-badge {
  position: absolute; top: 8px; right: 8px; min-width: 22px; height: 22px; padding: 0 6px;
  background: rgba(0,0,0,0.65); color: #fff; font-size: 11px; font-weight: 700; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px);
}

.pagination { display: flex; gap: 6px; justify-content: center; padding: 18px 0 4px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; padding: 0 8px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-soft); border: 1px solid var(--border); border-radius: calc(var(--radius) * 0.7); background: var(--surface);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.pagination a:hover { border-color: var(--text); color: var(--text); }
.pagination a.current, .pagination span.current { font-weight: 700; color: var(--bg); background: var(--text); border-color: var(--text); }
.pagination .gap { border: none; color: var(--muted); }

/* ---------- Photo detail ---------- */
.article-column { display: flex; justify-content: center; padding: 30px var(--gutter) 0; }
.article-column .inner { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 20px; }
.article-column .photo { width: 100%; aspect-ratio: 4/5; overflow: hidden; background: var(--media-bg); border-radius: var(--radius); }
.article-column .photo img { width: 100%; height: 100%; object-fit: cover; }
img[data-zoom] { cursor: zoom-in; }
.zoom-hint { margin-top: -12px; font-size: 11px; color: var(--muted); text-align: center; letter-spacing: 0.3px; }
.badge { display: inline-flex; align-self: flex-start; padding: 5px 12px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; border-radius: calc(var(--radius) * 0.5); }
.badge:hover { color: var(--on-accent); background: var(--accent-dark); }
.article-column h1 { font-size: clamp(26px, 5vw, 34px); margin: 0; line-height: 1.05; }
.article-body { font-size: 15px; line-height: 1.7; color: var(--text-soft); padding-top: 16px; border-top: 2px solid var(--rule); white-space: pre-line; }
.breadcrumb { padding: 18px var(--gutter) 0; font-size: 12px; letter-spacing: 0.5px; color: var(--muted); text-transform: uppercase; }
.back-link { font-size: 13px; }

.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.share-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px;
  font-size: 13px; font-weight: 600; font-family: inherit; color: #fff; border: none; cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.share-btn:hover { color: #fff; opacity: 0.92; transform: translateY(-1px); }
.share-pinterest { background: #e60023; }
.share-whatsapp { background: #1fa855; }
.share-native { background: var(--text); color: var(--bg); }
.share-native:hover { color: var(--bg); }

.design-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.design-nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--surface);
  border: 1px solid var(--border-soft); border-radius: var(--radius); color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.design-nav-link:hover { color: var(--text); border-color: var(--text); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
.design-nav-link img { width: 52px; height: 66px; object-fit: cover; border-radius: calc(var(--radius) * 0.7); flex-shrink: 0; background: var(--media-bg); }
.design-nav-link span { display: flex; flex-direction: column; gap: 3px; font-size: 13px; font-weight: 700; text-transform: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.design-nav-link small { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.5px; }
.design-nav-link.next { justify-content: flex-end; text-align: right; grid-column: 2; }
.design-nav-link.next span { align-items: flex-end; }

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(8,8,8,0.96);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out; padding: 16px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lightbox-close {
  position: absolute; top: 14px; right: 16px; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,0.14); color: #fff; border: none; font-size: 26px; line-height: 1; cursor: pointer;
}

.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); line-height: 1.6; }

/* ---------- Design variant carousel (same tattoo, different placement) ---------- */
.variant-carousel { position: relative; border-radius: var(--radius); overflow: hidden; }
.variant-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; width: 100%; aspect-ratio: 4/5; background: var(--media-bg);
}
.variant-track::-webkit-scrollbar { display: none; }
.variant-slide { flex: 0 0 100%; scroll-snap-align: center; position: relative; height: 100%; }
.variant-slide img { width: 100%; height: 100%; object-fit: cover; }
.variant-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  font-size: 12.5px; font-weight: 700; color: #fff; text-transform: none; letter-spacing: 0.2px;
  pointer-events: none;
}
.variant-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff; border: none; font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background 0.15s ease;
}
.variant-arrow:hover { background: rgba(0,0,0,0.8); }
.variant-arrow.prev { left: 10px; }
.variant-arrow.next { right: 10px; }
.variant-dots { display: flex; gap: 6px; justify-content: center; padding-top: 10px; }
.variant-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); cursor: pointer; transition: background 0.15s ease, transform 0.15s ease; }
.variant-dots .dot.active { background: var(--accent); transform: scale(1.2); }

/* ---------- Related photos / Popular designs ---------- */
.related-section { padding-top: 22px; border-top: 2px solid var(--rule); display: flex; flex-direction: column; gap: 14px; }
.related-section .heading { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 15px; text-transform: uppercase; letter-spacing: 0.6px; }
/* Same look, but used directly in the page body (homepage), so it needs its own side padding. */
.popular-section { padding: 0; border-top: none; }
.all-designs-heading { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 15px; text-transform: uppercase; letter-spacing: 0.6px; padding-top: 18px; margin-top: 8px; border-top: 2px solid var(--rule); }

/* ---------- Comments ---------- */
.comments-section { display: flex; flex-direction: column; gap: 18px; padding-top: 8px; }
.comments-section h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.6px; margin: 0; }
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment { padding: 14px 0; border-top: 1px solid var(--border-soft); }
.comment .comment-author { font-size: 13px; font-weight: 700; }
.comment .comment-date { font-size: 11px; color: var(--muted); margin-left: 8px; text-transform: uppercase; letter-spacing: 0.4px; }
.comment .comment-text { font-size: 14px; line-height: 1.6; color: var(--text-soft); margin-top: 6px; white-space: pre-line; }
.comment-form { display: flex; flex-direction: column; gap: 10px; max-width: 500px; }
.comment-form input[type=text], .comment-form textarea {
  padding: 11px 13px; border: 1px solid var(--border); border-radius: calc(var(--radius) * 0.7); font-size: 14px; font-family: inherit; width: 100%;
  background: var(--surface); color: var(--text);
}
.comment-form input[type=text]:focus, .comment-form textarea:focus { outline: none; border-color: var(--text); }
.comment-form textarea { resize: vertical; }
.comment-form .hp { position: absolute; left: -9999px; }
.flash { border-radius: calc(var(--radius) * 0.7); }

/* ---------- About / Contact / legal pages ---------- */
.page-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.page-cta .btn { border-radius: calc(var(--radius) * 0.7); }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.contact-card {
  display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--border-soft); border-radius: var(--radius); color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.contact-card:hover { color: var(--text); border-color: var(--accent); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }
.contact-card-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.contact-card-value { font-size: 16px; font-weight: 700; word-break: break-all; }
.legal-page { gap: 12px !important; }
.legal-page h2 { font-size: 17px; margin: 14px 0 0; }
.legal-page p { font-size: 15px; line-height: 1.7; color: var(--text-soft); margin: 0; }
.legal-updated { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 48px;
  padding: 40px var(--gutter) 22px;
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 13px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col a:not(.social-link) { color: var(--footer-text); transition: color 0.15s ease; }
.footer-col a:not(.social-link):hover { color: var(--footer-heading); }
.footer-logo { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 22px; color: var(--footer-heading); text-transform: var(--display-transform); letter-spacing: var(--display-spacing); }
.footer-brand p { margin: 0; line-height: 1.6; max-width: 420px; }
.footer-brand .footer-ig { align-self: flex-start; margin-top: 6px; }
.footer-heading { color: var(--footer-heading); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--footer-rule); font-size: 12px; color: var(--footer-text); opacity: 0.8; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ==================================================================== */
/* Admin panel — functional, Turkish UI                                  */
/* ==================================================================== */
.admin-body { background: #f7f6f4; color: #1a1a1a; font-family: 'Archivo', sans-serif; margin: 0; }
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar { width: 230px; flex-shrink: 0; background: #181818; color: #cfcac2; padding: 22px 0; }
.admin-sidebar .brand { padding: 0 22px 22px; font-size: 16px; font-weight: 700; color: #fff; border-bottom: 1px solid #2c2c2c; margin-bottom: 14px; }
.admin-sidebar a { display: block; padding: 11px 22px; font-size: 13px; color: #cfcac2; }
.admin-sidebar a:hover { color: #fff; }
.admin-sidebar a.active { font-weight: 600; color: #fff; background: var(--accent); border-left: 3px solid #fff; }
.admin-sidebar .logout { margin-top: auto; }
.nav-badge { display: inline-block; min-width: 16px; padding: 1px 5px; background: #fff; color: var(--accent); font-size: 10px; font-weight: 700; border-radius: 8px; text-align: center; }
.admin-sidebar a .nav-badge { background: var(--accent); color: #fff; margin-left: 6px; }
.admin-sidebar a.active .nav-badge { background: #fff; color: var(--accent); }

.admin-content { flex: 1; padding: 36px 44px; display: flex; flex-direction: column; gap: 24px; max-width: 1100px; min-width: 0; }
.admin-title { font-size: 22px; font-weight: 700; }
.admin-sub { font-size: 12.5px; color: #8a8579; margin-top: -12px; }

.upload-methods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.upload-methods-grid .upload-method-2 { border-left: 1px solid var(--border-soft); padding-left: 20px; }

/* Mobile top bar with the hamburger toggle — hidden on desktop, where the sidebar is always visible. */
.admin-mobile-bar { display: none; align-items: center; gap: 14px; padding: 14px 16px; background: #181818; }
.admin-mobile-bar-title { color: #fff; font-weight: 700; font-size: 14px; }
.admin-mobile-bar button {
  background: none; border: 1px solid #444; color: #fff; padding: 8px 12px;
  font-size: 13px; font-family: inherit; cursor: pointer;
}
.admin-overlay { display: none; }

@media (max-width: 880px) {
  .admin-mobile-bar { display: flex; }
  .admin-wrap { position: relative; }
  .admin-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; overflow-y: auto;
    transform: translateX(-100%); transition: transform 0.2s ease;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-overlay.show {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 50;
  }
  .admin-content { padding: 20px 16px; max-width: 100%; }

  /* The two side-by-side upload methods stack on mobile instead of squeezing into columns. */
  .upload-methods-grid { grid-template-columns: 1fr; }
  .upload-methods-grid .upload-method-2 { border-left: none; padding-left: 0; border-top: 1px solid var(--border-soft); padding-top: 20px; margin-top: 4px; }

  .table { display: block; overflow-x: auto; white-space: nowrap; }
}

.card { background: #fff; border: 1px solid var(--border-soft); padding: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 11.5px; color: #8a8579; text-transform: uppercase; letter-spacing: 0.4px; }
.field input[type=text], .field input[type=url], .field input[type=password], .field textarea, .field select {
  padding: 10px 12px; border: 1px solid #d6d1c6; font-size: 13px; font-family: 'Archivo', sans-serif; width: 100%;
}
.field textarea { resize: vertical; }
.field.code textarea { font-family: monospace; font-size: 12px; color: #444; }

.btn { display: inline-block; padding: 10px 20px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-dark { background: #111; color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { background: transparent; border: 1px solid #d6d1c6; color: #333; }
.btn-row { display: flex; gap: 10px; justify-content: flex-end; }

.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border-soft); }
.table th, .table td { text-align: left; padding: 12px 16px; font-size: 13px; border-bottom: 1px solid #efece5; }
.table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #8a8579; }
.table tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 12px; }
.row-actions a, .row-actions button { color: #8a8579; background: none; border: none; padding: 0; font-size: 13px; cursor: pointer; font-family: inherit; }
.row-actions a:hover, .row-actions button:hover { color: var(--accent); text-decoration: underline; }

.manage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.manage-card { background: #fff; border: 1px solid var(--border-soft); }
.manage-card .thumb { position: relative; aspect-ratio: 1; background: #1c1c1c; overflow: hidden; }
.manage-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.manage-card .info { padding: 9px 10px; display: flex; flex-direction: column; gap: 6px; }
.manage-card .info .title { font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.flash { padding: 12px 16px; font-size: 13px; }
.flash.success { background: #e7f5ea; color: #1a7a3c; border: 1px solid #b9e3c4; }
.flash.error { background: #fdecec; color: #b5121f; border: 1px solid #f3bcbc; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #181818; }
.login-box { width: 100%; max-width: 340px; background: #fff; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.login-box .brand { font-family: 'Anton', sans-serif; text-transform: uppercase; font-size: 22px; text-align: center; }

/* ---------- Admin: theme picker ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.theme-card { background: #fff; border: 1px solid var(--border-soft); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow 0.15s ease, border-color 0.15s ease; }
.theme-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,0.08); }
.theme-card.is-active { border: 2px solid #1a7a3c; }
.theme-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.theme-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.theme-badge { font-size: 10px; font-weight: 700; color: #fff; background: #1a7a3c; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.5px; }
.theme-desc { font-size: 12px; color: #6f6a61; line-height: 1.45; flex: 1; }
.theme-actions { display: flex; gap: 8px; margin-top: 6px; }
.theme-actions .btn { padding: 8px 14px; font-size: 12px; }
.theme-confirm { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; border: 2px solid var(--accent); }
.theme-undo { font-size: 13px; color: #555; }
.theme-undo button { background: none; border: none; color: var(--accent); font-weight: 600; cursor: pointer; font-family: inherit; font-size: 13px; padding: 0; }

.tp-mock { height: 150px; display: flex; flex-direction: column; background-color: var(--bg); background-image: var(--texture); background-size: var(--texture-size); background-position: var(--texture-position, 0 0); border-bottom: 1px solid var(--border-soft); }
.tp-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; background: var(--header-bg); box-shadow: var(--header-shadow); }
.tp-logo { font-family: var(--font-display); font-weight: var(--display-weight); text-transform: var(--display-transform); color: var(--header-text); font-size: 12px; letter-spacing: var(--display-spacing); }
.tp-nav { display: flex; gap: 4px; }
.tp-nav i { width: 14px; height: 3px; background: var(--header-link); border-radius: 2px; opacity: 0.8; }
.tp-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tp-title { font-family: var(--font-display); font-weight: var(--display-weight); text-transform: var(--display-transform); color: var(--text); font-size: 17px; line-height: 1; letter-spacing: var(--display-spacing); }
.tp-title span { color: var(--accent); }
.tp-pills { display: flex; gap: 4px; }
.tp-pills span { font-size: 8px; padding: 2px 7px; border-radius: 999px; background: var(--surface); color: var(--text-soft); border: 1px solid var(--border-soft); font-family: var(--font-body); }
.tp-pills span.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tp-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; flex: 1; }
.tp-cards i { background: var(--media-bg); border-radius: calc(var(--radius) * 0.5); background-image: linear-gradient(to top, rgba(0,0,0,0.4), transparent 60%); }
.tp-footer { height: 10px; background: var(--footer-bg); }

.hero-bg-card { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
.hero-bg-preview { min-height: 170px; border-radius: 6px; background: #eeebe5; background-size: cover; background-position: center; display: flex; align-items: center; padding: 20px; }
.hero-bg-preview-title { font-family: 'Anton', sans-serif; text-transform: uppercase; color: #fff; font-size: 34px; line-height: 1; text-shadow: 0 2px 12px rgba(0,0,0,0.35); }
.hero-bg-preview-title span { color: #ff4b57; }
.hero-bg-empty { font-size: 13px; color: #8a8579; }
.hero-bg-controls { display: flex; flex-direction: column; gap: 18px; }
.hero-bg-controls input[type=range] { width: 100%; }
@media (max-width: 880px) { .hero-bg-card { grid-template-columns: 1fr; } }

.cat-hidden-badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #fff3d6; color: #8a5a00; font-size: 11px; font-weight: 600; vertical-align: middle; cursor: help; }

.fonts-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

/* ---------- Admin: E-posta ---------- */
.mi { flex-shrink: 0; }
.mail-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.mail-top-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mail-chip { font-size: 12.5px; color: #555; background: #ece9e2; padding: 5px 12px; border-radius: 999px; }
.mail-top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mail-top-actions form { margin: 0; }
.mbtn { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; border: 1px solid transparent; background: none; font-family: inherit; color: #222; text-decoration: none; }
.mbtn-primary { background: #e11d2e; color: #fff; }
.mbtn-primary:hover { background: #c41625; color: #fff; }
.mbtn-ghost { background: #fff; border-color: #dcd7cc; }
.mbtn-ghost:hover { background: #f5f3ee; color: #111; }
.mbtn-icon { width: 38px; padding: 0; justify-content: center; background: #fff; border-color: #dcd7cc; }
.mbtn-icon:hover { background: #f5f3ee; }
.mbtn-danger { color: #b5121f; }
.mbtn-danger:hover { background: #fdecee; border-color: #f2b8be; }
.mail-log { font-size: 12.5px; color: #555; background: #fff; border: 1px solid #e6e1d6; border-radius: 8px; padding: 8px 14px; margin-bottom: 12px; }
.mail-log summary { cursor: pointer; font-weight: 600; }
.mail-log ul { margin: 8px 0 2px; padding-left: 18px; }

.mail-shell { display: flex; background: #fff; border: 1px solid #e6e1d6; border-radius: 12px; overflow: hidden; min-height: 560px; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.mail-folders { flex: 0 0 220px; display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; background: #faf9f6; border-right: 1px solid #ece8df; }
.mail-folders a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: #3a3a3a; font-size: 13.5px; border-radius: 8px; text-decoration: none; }
.mail-folders a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-folders a:hover { background: #f0ede6; color: #111; }
.mail-folders a.active { background: #fde8ea; color: #b5121f; font-weight: 700; }
.mail-folders .mail-compose-btn { justify-content: center; background: #e11d2e; color: #fff; font-weight: 700; margin-bottom: 10px; padding: 11px 12px; box-shadow: 0 2px 6px rgba(225,29,46,0.25); }
.mail-folders .mail-compose-btn:hover { background: #c41625; color: #fff; }
.mail-count { font-size: 11px; background: #e11d2e; color: #fff; border-radius: 999px; padding: 1px 8px; }
.mail-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mail-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 16px 20px 12px; border-bottom: 1px solid #ece8df; }
.mail-folder-title { font-size: 18px; font-weight: 700; }
.mail-muted { color: #8a8579; font-size: 12.5px; }
.mail-list { display: flex; flex-direction: column; }
.mail-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid #f1eee7; color: #555; text-decoration: none; position: relative; }
.mail-row:hover { background: #faf8f4; }
.mail-row.unread { background: #fffdf8; }
.mail-row.unread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #e11d2e; }
.mail-row.unread .mail-from, .mail-row.unread .mail-subj { color: #111; font-weight: 700; }
.mail-avatar { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.mail-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mail-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mail-from { font-size: 14px; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-subj { display: flex; align-items: center; gap: 6px; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-date { flex-shrink: 0; color: #8a8579; font-size: 12px; }
.mail-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #9b968c; padding: 60px 20px; font-size: 14px; }
.mail-empty .mi { width: 44px; height: 44px; stroke-width: 1.2; }
.mail-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; }

.mail-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid #ece8df; }
.mail-toolbar form { margin: 0; }
.mail-toolbar-sep { width: 1px; height: 24px; background: #e6e1d6; margin: 0 4px; }
.mail-toolbar-space { flex: 1; }
.mail-read { padding: 20px 24px 28px; display: flex; flex-direction: column; gap: 16px; }
.mail-subject { margin: 0; font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; }
.mail-sender { display: flex; align-items: center; gap: 12px; }
.mail-sender-info { flex: 1; min-width: 0; font-size: 13.5px; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.mail-when { flex-shrink: 0; }
.mail-files { display: flex; flex-wrap: wrap; gap: 8px; }
.mail-file { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid #e0dbd0; border-radius: 8px; font-size: 13px; color: #222; background: #faf9f6; text-decoration: none; max-width: 100%; }
.mail-file:hover { border-color: #c9c2b4; background: #f3f0e9; }
.mail-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-images-note { font-size: 12.5px; background: #fff8d9; padding: 9px 12px; border: 1px solid #f0e2a0; border-radius: 8px; }
.mail-frame { width: 100%; height: 65vh; min-height: 360px; border: 1px solid #ece8df; border-radius: 8px; background: #fff; }
.mail-text { font-size: 14.5px; line-height: 1.65; overflow-wrap: anywhere; color: #222; }

.mail-compose { display: flex; flex-direction: column; margin: 0; }
.mail-compose-head { padding: 14px 18px; font-weight: 700; font-size: 15px; border-bottom: 1px solid #ece8df; background: #faf9f6; }
.mail-line { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid #f1eee7; }
.mail-line span { flex: 0 0 52px; font-size: 13px; color: #8a8579; }
.mail-line input { flex: 1; min-width: 0; border: 0 !important; outline: none; padding: 13px 0 !important; font-size: 14px; background: transparent; box-shadow: none !important; }
.mail-body { border: 0 !important; outline: none; resize: vertical; padding: 16px 18px !important; font-family: inherit; font-size: 14.5px; line-height: 1.6; min-height: 300px; box-shadow: none !important; }
.mail-compose-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid #ece8df; }
.mail-attach { position: relative; overflow: hidden; }
.mail-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

@media (max-width: 760px) {
  .mail-shell { flex-direction: column; border-radius: 10px; }
  .mail-folders { flex: 0 0 auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid #ece8df; padding: 10px; }
  .mail-folders a { white-space: nowrap; flex-shrink: 0; }
  .mail-folders .mail-compose-btn { margin-bottom: 0; }
  .mail-row { padding: 12px 14px; }
  .mail-read { padding: 16px; }
  .mail-toolbar { padding: 10px 14px; }
}


/* Pinterest "Save" button on the photo itself (always visible on phones, on hover on computers) */
.photo { position: relative; }
.pin-save {
  position: absolute; top: 12px; left: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px; background: #e60023; color: #fff !important; font-size: 13px; font-weight: 700;
  font-family: Arial, sans-serif; letter-spacing: 0; text-transform: none; box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.pin-save:hover { background: #ad081b; color: #fff !important; transform: translateY(-1px); }
@media (hover: hover) { .photo .pin-save { opacity: 0.88; } .photo:hover .pin-save, .pin-save:focus-visible { opacity: 1; } }

/* 3+ social accounts: round icon buttons in the header menu */
@media (min-width: 981px) {
  .site-nav.social-compact .social-link { padding: 0; width: 34px; height: 34px; justify-content: center; gap: 0; }
  .site-nav.social-compact .social-link .sl-text { display: none; }
}
