/*
Theme Name: Ustronne Zakupy
Theme URI: https://ustroniezakupy.pl
Author: Studio Kofeina
Description: Motyw dla Parku Handlowego Ustronne Zakupy w Ustroniu
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: ustronne-zakupy
*/

/* =========================================================
   CSS CUSTOM PROPERTIES
   ========================================================= */
:root {
  --color-primary:     #1B4332;
  --color-primary-light: #2D6A4F;
  --color-secondary:   #52B788;
  --color-accent:      #E76F51;
  --color-accent-light:#F4A261;
  --color-bg:          #F8F9FA;
  --color-bg-alt:      #FFFFFF;
  --color-text:        #212529;
  --color-text-muted:  #6C757D;
  --color-border:      #DEE2E6;
  --color-white:       #FFFFFF;

  --font-heading: 'Montserrat', sans-serif;
  --font-body:    'Open Sans', sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --shadow-sm:  0 2px 8px rgba(0,0,0,.08);
  --shadow-md:  0 4px 20px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.16);

  --max-width:  1200px;
  --gutter:     clamp(16px, 4vw, 40px);
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-accent); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
}

/* =========================================================
   UTILITIES
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(48px, 8vw, 96px); }
.section--alt { background: var(--color-bg-alt); }
.section--dark { background: var(--color-primary); color: var(--color-white); }
.section--dark h2, .section--dark h3 { color: var(--color-white); }

.section-header {
  text-align: center;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-header h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: .5rem; }
.section-header p { color: var(--color-text-muted); max-width: 600px; margin-inline: auto; }

.tag {
  display: inline-block;
  background: var(--color-secondary);
  color: var(--color-white);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: .75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .9rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.btn--primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}
.btn--primary:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent-light);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn--white {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}
.btn--white:hover {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

/* =========================================================
   HEADER & NAVIGATION
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.site-logo img { height: 48px; width: auto; }
.site-logo .logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-primary);
  line-height: 1.1;
}
.site-logo .logo-sub {
  font-size: .65rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .875rem;
  color: var(--color-text);
  transition: all .2s;
}
.main-nav a:hover,
.main-nav a.current-menu-item {
  background: var(--color-primary);
  color: var(--color-white);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-hours {
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: right;
}
.header-hours strong { display: block; color: var(--color-primary); font-size: .9rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: all .3s;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: clamp(420px, 55vw, 600px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-primary);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: .35;
}
.hero-content {
  position: relative;
  z-index: 1;
  color: var(--color-white);
  max-width: 700px;
  padding-block: 80px;
}
.hero-content .tag { background: var(--color-accent); }
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--color-white);
  margin-bottom: 1rem;
}
.hero-content p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  opacity: .9;
  margin-bottom: 2rem;
  max-width: 520px;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.2);
}
.hero-stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-accent-light);
}
.hero-stat-label { font-size: .8rem; opacity: .8; margin-top: 2px; }

/* =========================================================
   INFO BAR
   ========================================================= */
.info-bar {
  background: var(--color-accent);
  color: var(--color-white);
  padding-block: 14px;
}
.info-bar-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  flex-wrap: wrap;
}
.info-bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .9rem;
}
.info-bar-item svg { flex-shrink: 0; }

/* =========================================================
   SKLEPY (SHOP GRID)
   ========================================================= */
.sklepy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.sklep-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all .3s;
  text-decoration: none;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
}
.sklep-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-secondary);
}
.sklep-card__logo {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.sklep-card__logo img { max-height: 80px; object-fit: contain; }
.sklep-card__logo .logo-placeholder {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
}
.sklep-card__body { padding: 16px 20px; flex: 1; }
.sklep-card__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--color-primary);
}
.sklep-card__lokal {
  font-size: .75rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.sklep-card__category {
  margin-top: 8px;
  display: inline-block;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 10px;
  color: var(--color-text-muted);
}

/* =========================================================
   SINGLE SKLEP
   ========================================================= */
.sklep-hero {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding-block: 48px;
}
.sklep-hero-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  align-items: center;
}
.sklep-hero__logo-box {
  width: 180px;
  height: 180px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.sklep-hero__logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sklep-meta { display: flex; gap: 24px; margin-top: 16px; flex-wrap: wrap; }
.sklep-meta-item { display: flex; align-items: center; gap: 8px; font-size: .9rem; }

.sklep-hours-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.sklep-hours-table td { padding: 8px 12px; border-bottom: 1px solid var(--color-border); font-size: .9rem; }
.sklep-hours-table td:first-child { font-weight: 600; color: var(--color-primary); }
.sklep-hours-table tr:last-child td { border-bottom: none; }
.day-today td { background: rgba(82,183,136,.1); }

/* =========================================================
   GODZINY OTWARCIA
   ========================================================= */
.hours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.hours-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.hours-card__head {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hours-card__name { font-family: var(--font-heading); font-weight: 700; }
.hours-card__lokal { font-size: .8rem; opacity: .7; }
.hours-card__body { padding: 16px 24px; }
.hours-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--color-border); font-size: .9rem; }
.hours-row:last-child { border-bottom: none; }
.hours-row .days { font-weight: 600; }

/* =========================================================
   INTERACTIVE MAP
   ========================================================= */
.map-section { background: var(--color-bg-alt); }
.map-container { position: relative; }
.map-svg-wrapper {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.map-svg-wrapper svg {
  width: 100%;
  height: auto;
  display: block;
}

/* SVG map styles */
.map-building {
  fill: #E8F5E9;
  stroke: var(--color-primary);
  stroke-width: 2;
}
.map-lokal {
  fill: var(--color-bg-alt);
  stroke: var(--color-primary-light);
  stroke-width: 1.5;
  cursor: pointer;
  transition: fill .2s;
}
.map-lokal:hover { fill: var(--color-secondary); }
.map-lokal.active { fill: var(--color-accent); }
.map-lokal-empty { fill: #F5F5F5; stroke: #BDBDBD; stroke-width: 1; stroke-dasharray: 4,2; }
.map-road { fill: #ECEFF1; stroke: #B0BEC5; stroke-width: 1; }
.map-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  fill: var(--color-primary);
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}
.map-label-small {
  font-size: 9px;
  font-weight: 500;
  fill: var(--color-text-muted);
}

.map-tooltip {
  position: absolute;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  white-space: nowrap;
  z-index: 10;
  box-shadow: var(--shadow-md);
}
.map-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom: none;
  border-top-color: var(--color-primary);
}
.map-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
}
.map-legend-dot {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid rgba(0,0,0,.1);
}

/* =========================================================
   AKTUALNOŚCI / BLOG
   ========================================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}
.post-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all .3s;
  border: 1px solid var(--color-border);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card__thumb {
  height: 200px;
  overflow: hidden;
  background: var(--color-bg);
}
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card__thumb img { transform: scale(1.05); }
.post-card__body { padding: 24px; }
.post-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .75rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}
.post-card__title { font-size: 1.1rem; margin-bottom: 10px; }
.post-card__title a { color: var(--color-primary); }
.post-card__title a:hover { color: var(--color-accent); }
.post-card__excerpt { font-size: .9rem; color: var(--color-text-muted); line-height: 1.6; }
.post-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-weight: 700;
  font-size: .85rem;
  color: var(--color-accent);
}

/* =========================================================
   KONTAKT
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: start;
}
.contact-info-card {
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.contact-info-card h3 { color: var(--color-white); margin-bottom: 24px; }
.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.contact-info-item svg { flex-shrink: 0; opacity: .8; }
.contact-info-item strong { display: block; margin-bottom: 4px; }
.contact-info-item span { font-size: .9rem; opacity: .8; }

.map-embed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.map-embed iframe { width: 100%; height: 420px; border: none; display: block; }

.contact-form { background: var(--color-bg-alt); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-sm); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .95rem;
  transition: border-color .2s;
  background: var(--color-bg-alt);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(82,183,136,.15);
}
.form-group textarea { resize: vertical; min-height: 140px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,.8);
  padding-block: 64px 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .site-logo { margin-bottom: 16px; }
.footer-brand .site-logo .logo-text { color: var(--color-white); }
.footer-brand p { font-size: .9rem; line-height: 1.7; }
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: .9rem; color: rgba(255,255,255,.7); transition: color .2s; }
.footer-col ul li a:hover { color: var(--color-accent-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,.6); }
.footer-bottom a:hover { color: var(--color-accent-light); }

/* =========================================================
   BREADCRUMBS
   ========================================================= */
.breadcrumbs {
  padding-block: 14px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  font-size: .8rem;
  color: var(--color-text-muted);
}
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs span + span::before { content: ' › '; padding-inline: 4px; }

/* =========================================================
   PAGE HERO
   ========================================================= */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: var(--color-white);
  padding-block: clamp(40px, 6vw, 72px);
  text-align: center;
}
.page-hero h1 { color: var(--color-white); font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
.page-hero p { opacity: .8; margin-top: .5rem; }

/* =========================================================
   SEARCH / FILTER BAR
   ========================================================= */
.filter-bar {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding-block: 20px;
  position: sticky;
  top: 72px;
  z-index: 90;
}
.filter-inner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filter-search {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  transition: border-color .2s;
}
.filter-search:focus-within { border-color: var(--color-secondary); }
.filter-search input { border: none; background: transparent; font-size: .9rem; flex: 1; outline: none; }
.filter-btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-bg-alt);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

/* =========================================================
   WOLNY LOKAL
   ========================================================= */
.vacant-card {
  background: var(--color-bg);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  transition: all .3s;
}
.vacant-card:hover { border-color: var(--color-secondary); background: rgba(82,183,136,.05); }
.vacant-card__nr {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-border);
  margin-bottom: 8px;
}
.vacant-card p { color: var(--color-text-muted); font-size: .9rem; }

/* =========================================================
   MEDIA QUERIES
   ========================================================= */
@media (max-width: 1024px) {
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-bg-alt);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--color-border);
  }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; padding: 12px 16px; }
  .header-hours { display: none; }

  .hero-stats { gap: 20px; flex-wrap: wrap; }

  .sklep-hero-inner { grid-template-columns: 1fr; text-align: center; }
  .sklep-hero__logo-box { margin-inline: auto; }
  .sklep-meta { justify-content: center; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .sklepy-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-buttons { flex-direction: column; }
  .info-bar-inner { gap: 16px; }
}

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-up { animation: fadeInUp .6s ease forwards; }
.animate-up:nth-child(2) { animation-delay: .1s; }
.animate-up:nth-child(3) { animation-delay: .2s; }
.animate-up:nth-child(4) { animation-delay: .3s; }

/* =========================================================
   SCROLLBAR
   ========================================================= */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-secondary); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }
