/*
Theme Name: Pajzca Site
Description: pajzca.com. Black homepage with animated banner and cursor, About and Projects pages, and a two-product WooCommerce shop.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: pajzca-site
*/

:root {
  --bg: #000;
  --ink: #fff;
  --muted: #9a9a9a;
  --line: #333;
  --pixel: "VT323", "Courier New", monospace;
  --body: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px dashed #fff; outline-offset: 5px; }

/* ================= HOMEPAGE ================= */
.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.nav-item { position: relative; display: inline-block; }
.banner-btn { appearance: none; background: none; border: 0; padding: 0; margin: 0; display: block; cursor: pointer; }
.banner-btn img { width: min(92vw, 600px); height: auto; image-rendering: pixelated; }

.menu {
  list-style: none;
  margin: 0;
  padding: 14px 0 0;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 44px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.nav-item:hover .menu,
.nav-item:focus-within .menu,
.nav-item.open .menu { opacity: 1; visibility: visible; transform: none; }
.menu a { text-decoration: none; font-family: var(--pixel); font-size: 1.9rem; letter-spacing: 0.06em; padding: 4px 6px; }
.menu a:hover, .menu a:focus-visible { text-decoration: underline; text-underline-offset: 6px; }

/* ================= INNER PAGES (About, Projects) ================= */
.inner-head { display: flex; justify-content: center; padding: 28px 20px 0; }
.inner-head img { width: min(70vw, 300px); image-rendering: pixelated; }
.inner-menu { display: flex; justify-content: center; gap: 36px; margin: 8px 0 0; padding: 0; list-style: none; }
.inner-menu a { text-decoration: none; font-family: var(--pixel); font-size: 1.6rem; }
.inner-menu a:hover { text-decoration: underline; text-underline-offset: 5px; }
.page-wrap { max-width: 720px; margin: 0 auto; padding: 48px 24px 96px; font-size: 1.05rem; }
.page-wrap h1, .entry-title { font-family: var(--pixel); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1.1; margin: 0 0 20px; }

/* ================= SHOP HEADER ================= */
.shop-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 24px clamp(20px, 4vw, 56px);
}
.shop-home { justify-self: start; display: block; }
.shop-home img { width: clamp(120px, 20vw, 200px); image-rendering: pixelated; }
.shop-title { font-family: var(--pixel); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; text-decoration: none; letter-spacing: 0.04em; }
.shop-cart { justify-self: end; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 1.5rem; }
.shop-cart svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.shop-cart .count { min-width: 1.2em; text-align: center; }

.site-main { padding: 24px clamp(20px, 4vw, 56px) 96px; max-width: 1200px; margin: 0 auto; }

/* ================= SHOP: product grid ================= */
.product-grid { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 5vw, 72px); }
.product-card a { text-decoration: none; display: block; }
.product-card .media { position: relative; aspect-ratio: 4 / 5; background: #111; overflow: hidden; }
.product-card .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s ease; }
.product-card .media .alt { opacity: 0; }
.product-card a:hover .media .alt, .product-card a:focus-visible .media .alt { opacity: 1; }
.product-card h2 { font-family: var(--pixel); font-weight: 400; font-size: 2rem; margin: 16px 0 0; line-height: 1.1; letter-spacing: 0.03em; }
.product-card .price { font-size: 1rem; }
.product-card .desc { color: var(--muted); margin: 8px 0 0; max-width: 42ch; }

/* ================= SHOP: single product ================= */
.woocommerce div.product { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
.woocommerce div.product div.images, .woocommerce div.product div.summary { float: none; width: 100%; margin: 0; }
.woocommerce div.product .product_title { font-family: var(--pixel); font-weight: 400; font-size: clamp(2.4rem, 4vw, 3.2rem); line-height: 1.05; margin: 0 0 8px; letter-spacing: 0.03em; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--ink); font-size: 1.15rem; }
.woocommerce div.product form.cart { margin: 24px 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.woocommerce div.product form.cart .variations { width: 100%; border: 0; }
.woocommerce div.product form.cart .variations td, .woocommerce div.product form.cart .variations th { display: block; padding: 0 0 6px; text-align: left; }
.woocommerce div.product form.cart .variations select,
.woocommerce .quantity .qty {
  padding: 12px; font: inherit; color: var(--ink); background: #000; border: 1px solid var(--ink); border-radius: 0;
}
.woocommerce div.product form.cart .variations select { width: 100%; }
.woocommerce .quantity .qty { width: 4.5em; }
.woocommerce .product_meta { display: none; }
.woocommerce a.reset_variations { font-size: 0.85rem; color: var(--muted); }

/* ================= Buttons ================= */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .wp-block-button__link, .wc-block-components-button {
  background: #fff !important;
  color: #000 !important;
  border: 1px solid #fff !important;
  border-radius: 0 !important;
  padding: 14px 28px !important;
  font: inherit !important;
  font-weight: 500 !important;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .wc-block-components-button:hover { background: #000 !important; color: #fff !important; }

/* ================= Notices, cart, checkout ================= */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
  list-style: none; margin: 0 0 24px; padding: 14px 18px;
  border: 1px solid #fff; background: transparent;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.wc-block-components-text-input input, .wc-block-components-select select, .wc-block-components-textarea,
.wc-blocks-components-select__select, .wc-block-components-combobox input {
  background: #000 !important; color: #fff !important; border-color: #666 !important;
}
.wc-block-components-text-input label, .wc-block-components-form .wc-block-components-text-input label { color: var(--muted) !important; }
.wc-block-components-totals-wrapper, .wc-block-cart-items, .wc-block-cart-items__row { border-color: var(--line) !important; }

/* ================= Animated cursor ================= */
.has-custom-cursor, .has-custom-cursor * { cursor: none !important; }
.custom-cursor {
  position: fixed; top: 0; left: 0;
  width: 32px; height: 32px;
  background: url("assets/cursor.gif") no-repeat center / contain;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  will-change: transform;
}
.custom-cursor.visible { opacity: 1; }

@media (max-width: 720px) {
  .product-grid { grid-template-columns: 1fr; }
  .woocommerce div.product { grid-template-columns: 1fr; }
  .menu { gap: 28px; }
  .shop-header { grid-template-columns: 1fr 1fr; }
  .shop-title { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}
@media (prefers-reduced-motion: reduce) {
  .menu, .product-card .media img { transition: none; }
}
