
/*
Theme Name: Pisco Lite
Theme URI: https://www.piscorealestate.com/
Author: ChatGPT
Description: Ultra-light tema optimizovana za Pisco Real Estate, sa minimalnim CLS-om.
Version: 0.6
Text Domain: pisco-lite
*/

:root {
  --pisco-blue: #0f4c81;
  --pisco-blue-dark: #0d3a63;
  --pisco-bg: #f5f7fb;
  --pisco-text: #1f2933;
  --pisco-border: #e4e7f0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--pisco-text);
  background: var(--pisco-bg);
}

/* Layout */

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 0 auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--pisco-blue);
  color: #fff;
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.site-description {
  margin: 0;
  font-size: 0.75rem;
  opacity: 0.85;
}

.site-logo img {
  max-height: 48px;
  height: auto;
  width: auto;
}

/* Navigation */

.primary-nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
}

.primary-nav {
  margin: 0;
}

.primary-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
}

.primary-nav .menu > li {
  position: relative;
}

.primary-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
}

.primary-nav .menu > li > a:hover,
.primary-nav .menu > li.current-menu-item > a {
  border-bottom-color: rgba(255,255,255,0.9);
}

/* Dropdown */

.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  background: #ffffff;
  border: 1px solid var(--pisco-border);
  z-index: 100;
}

.primary-nav .sub-menu li a {
  display: block;
  padding: 0.4rem 0.75rem;
  color: var(--pisco-text);
  border-bottom: none;
}

.primary-nav .sub-menu li a:hover {
  background: #eef2ff;
}

/* show dropdown on hover + focus  */
.primary-nav .menu > li:hover > .sub-menu,
.primary-nav .menu > li:focus-within > .sub-menu {
  display: block;
}

/* Header right */

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-lang {
  font-size: 0.85rem;
}

/* Hero search */

.hero-search {
  padding: 1.5rem 1rem 1rem;
  background: #ffffff;
  border-bottom: 1px solid var(--pisco-border);
}

.hero-search-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-search-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.hero-search-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 0.75rem;
}

.hero-search-form .field-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-search-form label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-search-form input,
.hero-search-form select {
  border-radius: 4px;
  border: 1px solid var(--pisco-border);
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
  background: #fff;
}

.hero-search-submit {
  align-self: flex-end;
}

.hero-search-submit button {
  width: 100%;
  border-radius: 4px;
  border: none;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--pisco-blue);
  color: #fff;
  cursor: pointer;
}

.hero-search-submit button:hover {
  background: var(--pisco-blue-dark);
}

/* Property type pills */

.property-type-strip {
  max-width: 1200px;
  margin: 0.75rem auto 0;
  padding: 0 1rem 0.5rem;
}

.property-type-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.property-type-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--pisco-border);
  background: #ffffff;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--pisco-text);
}

.property-type-list a:hover {
  background: #eef2ff;
}

/* Main content containers */

.pisco-container {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1rem 2rem;
}

/* Property grid & cards */

.property-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
}

.property-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--pisco-border);
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.property-card-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #e5e7eb;
}

.property-card-thumb::before {
  content: "";
  display: block;
  width: 100%;
  /* 3:2 ratio for 1200x800 exports */
  aspect-ratio: 3 / 2;
}

.property-card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-card-body {
  padding-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.property-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.property-card-title a {
  color: var(--pisco-text);
  text-decoration: none;
}

.property-card-title a:hover {
  text-decoration: underline;
}

.property-card-location {
  font-size: 0.85rem;
  color: #4b5563;
}

.property-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.property-card-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--pisco-border);
  background: #f9fafb;
}

.property-card-meta .meta-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
  color: #6b7280;
}

.property-card-price {
  margin-top: auto;
  font-weight: 700;
  font-size: 1rem;
}

/* Single property */

.single-property {
  display: grid;
  grid-template-columns: 2.3fr 1fr;
  gap: 1.5rem;
}

.single-property-main {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--pisco-border);
  padding: 1rem;
}

.single-property-sidebar {
  align-self: flex-start;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--pisco-border);
  padding: 1rem;
}

/* Gallery main + grid */

.single-property-gallery-main {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #e5e7eb;
}

.single-property-gallery-main::before {
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
}

.single-property-gallery-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-property-gallery-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 0.4rem;
}

.single-property-gallery-grid a {
  display: block;
}

.single-property-gallery-grid img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

/* Single meta */

.single-property-header {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.single-property-header h1 {
  margin: 0 0 0.25rem;
}

.single-property-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #4b5563;
}

.single-property-price {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.75rem;
}

/* Contact form */

.pisco-contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pisco-contact-form label {
  font-size: 0.85rem;
  font-weight: 600;
}

.pisco-contact-form input,
.pisco-contact-form textarea {
  border-radius: 4px;
  border: 1px solid var(--pisco-border);
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
  width: 100%;
}

.pisco-contact-form textarea {
  min-height: 100px;
  resize: vertical;
}

.pisco-contact-form button {
  border-radius: 4px;
  border: none;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--pisco-blue);
  color: #fff;
  cursor: pointer;
}

.pisco-contact-form button:hover {
  background: var(--pisco-blue-dark);
}

/* Footer */

.site-footer {
  background: var(--pisco-blue);
  color: #e5e7eb;
  padding: 1.25rem 1rem 1.5rem;
  margin-top: 2rem;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer a {
  color: #e5e7eb;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Responsiveness */

@media (max-width: 1024px) {
  .hero-search-form {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
  .property-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  .single-property {
    grid-template-columns: 3fr 2fr;
  }
  .single-property-gallery-grid {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}

@media (max-width: 720px) {
  .site-header-inner {
    flex-wrap: wrap;
  }

  .primary-nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .primary-nav {
    width: 100%;
  }

  .primary-nav.is-collapsed {
    display: none;
  }

  .primary-nav .menu {
    flex-direction: column;
    padding-top: 0.5rem;
  }

  .primary-nav .sub-menu {
    position: static;
    border: none;
    padding: 0;
    background: transparent;
  }

  .primary-nav .sub-menu li a {
    padding-left: 1rem;
    color: #e5e7eb;
  }

  .hero-search-form {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .single-property {
    grid-template-columns: 1fr;
  }

  .single-property-gallery-grid {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }

  .property-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Dodatno za single nekretninu i lightbox (v0.6) --- */

.pisco-container-wide {
  max-width: 1440px;
}

.single-property {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 1.5rem;
}
.single-property-main {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--pisco-border);
  padding: 1rem;
}
.single-property-sidebar {
  align-self: flex-start;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--pisco-border);
  padding: 1rem;
}

.single-property-gallery-main {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #e5e7eb;
}
.single-property-gallery-main::before {
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
}
.single-property-gallery-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.single-property-gallery-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 0.4rem;
}
.single-property-gallery-grid img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.single-property-header {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}
.single-property-header h1 {
  margin: 0 0 0.25rem;
}
.single-property-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #4b5563;
}
.single-property-price {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.75rem;
}

/* Lightbox */

.pisco-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.pisco-lightbox.is-open {
  display: flex;
}
.pisco-lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
.pisco-lightbox-inner img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.pisco-lightbox-close,
.pisco-lightbox-prev,
.pisco-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 1.1rem;
}
.pisco-lightbox-close {
  top: 1rem;
  right: 1rem;
  transform: none;
}
.pisco-lightbox-prev {
  left: -3rem;
}
.pisco-lightbox-next {
  right: -3rem;
}

@media (max-width: 1024px) {
  .single-property {
    grid-template-columns: 1fr;
  }
  .single-property-sidebar {
    margin-top: 1rem;
  }
  .single-property-gallery-grid {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}

@media (max-width: 720px) {
  .single-property-gallery-grid {
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
  .pisco-lightbox-prev {
    left: 0.5rem;
  }
  .pisco-lightbox-next {
    right: 0.5rem;
  }
}
