/*
Theme Name: Folio Portfolio
Description: A clean, image-led photography portfolio theme with category galleries, a lightbox, a contact form, social links and WooCommerce shop support.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: folio
License: GPL-2.0-or-later
*/

:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #777777;
  --line: #e6e6e6;
  --gap: 10px;
  --maxw: 1600px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .65; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 24px;
}
.site-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .02em;
  margin: 0;
}
.header-right { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.main-nav a { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a { border-bottom: 1px solid var(--ink); }

.social-links { display: flex; align-items: center; gap: 16px; }
.social-links a { display: inline-flex; width: 20px; height: 20px; }
.social-links svg { width: 100%; height: 100%; fill: currentColor; }
.cart-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.cart-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ---------- Gallery ---------- */
.gallery-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 24px 8px;
  text-align: center;
}
.gallery-head h1 {
  margin: 0 0 12px;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: .01em;
}
.gallery-head .intro { color: var(--muted); max-width: 640px; margin: 0 auto 14px; }
.category-nav { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 26px; }
.category-nav a { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.category-nav a:hover { color: var(--ink); opacity: 1; }
.category-nav .is-active a { color: var(--ink); border-bottom: 1px solid var(--ink); }

.photo-grid {
  max-width: var(--maxw);
  margin: 24px auto 60px;
  padding: 0 24px;
  column-count: 3;
  column-gap: var(--gap);
}
.photo-grid .photo {
  break-inside: avoid;
  margin: 0 0 var(--gap);
  overflow: hidden;
  background: #f3f3f3;
}
.photo-grid a { display: block; cursor: zoom-in; }
.photo-grid img { width: 100%; transition: transform .5s ease; }
.photo-grid a:hover { opacity: 1; }
.photo-grid a:hover img { transform: scale(1.03); }
@media (max-width: 1000px) { .photo-grid { column-count: 2; } }
@media (max-width: 560px) {
  .photo-grid { column-count: 1; padding: 0 12px; }
  .site-header { padding: 18px 12px; }
}

.pagination { text-align: center; margin: 0 0 60px; }
.pagination .page-numbers { display: inline-block; padding: 6px 12px; }
.pagination .current { border-bottom: 1px solid var(--ink); }

/* ---------- Pages ---------- */
.page-wrap { max-width: 760px; margin: 20px auto 80px; padding: 0 24px; }
.page-wrap h1 { font-size: 34px; font-weight: 500; margin: 0 0 20px; text-align: center; }
.page-wrap.wide { max-width: var(--maxw); }

/* ---------- Contact form ---------- */
.folio-form { display: grid; gap: 16px; margin-top: 24px; }
.folio-form label { display: grid; gap: 6px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.folio-form input[type=text],
.folio-form input[type=email],
.folio-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  font: inherit;
  background: #fff;
  border-radius: 0;
}
.folio-form textarea { min-height: 160px; resize: vertical; }
.folio-form input:focus, .folio-form textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.folio-form button, .button, .woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit {
  justify-self: start;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 0;
  padding: 13px 30px;
  font: inherit;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.folio-form .hp { position: absolute; left: -9999px; }
.notice { padding: 12px 16px; margin: 0 0 16px; border: 1px solid var(--line); text-align: center; }
.notice.ok { border-color: #2e7d32; color: #2e7d32; }
.notice.err { border-color: #b71c1c; color: #b71c1c; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 24px 50px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.94);
}
.lb.open { display: flex; }
.lb img { max-width: 92vw; max-height: 90vh; object-fit: contain; }
.lb button {
  position: absolute; background: none; border: 0; color: #fff;
  font-size: 38px; line-height: 1; cursor: pointer; padding: 16px;
}
.lb .lb-close { top: 4px; right: 10px; }
.lb .lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb .lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* ---------- WooCommerce light touch ---------- */
.woocommerce .products .product { text-align: center; }
.woocommerce ul.products li.product .price { color: var(--muted); }
.woocommerce-page .page-wrap { max-width: var(--maxw); }
