/*
Theme Name: CamPol24 WooCommerce
Theme URI: https://campol24.pl
Author: CamPol24
Description: Czysty motyw WooCommerce dla CamPol24 — monitoring CCTV Konin/Poznań
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Private
Text Domain: campol24-woo
*/

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

:root {
  --granat:     #1A3A5C;
  --granat2:    #142d47;
  --niebieski:  #2563A8;
  --cta:        #F5A623;
  --cta-hover:  #e09510;
  --cena:       #B85000;
  --tlo:        #F2F4F7;
  --biel:       #ffffff;
  --tekst:      #1a1a2e;
  --muted:      #64748b;
  --border:     #e2e8f0;
  --stopka:     #0f1c2b;
  --r:          8px;
  --r-lg:       14px;
  --shadow:     0 2px 12px rgba(26,58,92,0.10);
  --shadow-lg:  0 8px 32px rgba(26,58,92,0.16);
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--tlo);
  color: var(--tekst);
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--niebieski); text-decoration: none; transition: color .2s; }
a:hover { color: var(--granat); }
ul { list-style: none; }

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   NAVBAR
   ========================================================= */
.site-header {
  background: var(--granat);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}

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

.site-logo {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo:hover { color: var(--cta); }

.site-nav { display: flex; align-items: center; gap: 4px; }

.site-nav a {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 7px;
  transition: background .15s, color .15s;
}
.site-nav a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.site-nav a.nav-cta {
  background: var(--cta);
  color: #111;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 20px;
}
.site-nav a.nav-cta:hover { background: var(--cta-hover); color: #111; }

.nav-cart {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.25);
  transition: all .15s;
  white-space: nowrap;
}
.nav-cart:hover { color: #fff; border-color: rgba(255,255,255,0.5); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: #fff;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

@media (max-width: 768px) {
  .site-nav, .nav-cart { display: none; }
  .nav-toggle { display: flex; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--granat2);
    padding: 16px 24px 20px;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  .site-nav.open a { width: 100%; text-align: center; padding: 11px; }
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
  background: var(--granat);
  padding: 64px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(37, 99, 168, 0.15);
  pointer-events: none;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
}
.pill.gold {
  background: var(--cta);
  color: #111;
  font-weight: 700;
  border-color: transparent;
}

.hero h1 {
  color: #fff;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.hero-sub {
  color: rgba(255,255,255,0.72);
  font-size: 17px;
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cta);
  color: #111;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: var(--r-lg);
  border: none;
  cursor: pointer;
  transition: background .15s, transform .1s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--cta-hover); color: #111; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: var(--r-lg);
  border: 1.5px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: border-color .15s, color .15s;
  text-decoration: none;
}
.btn-secondary:hover { color: #fff; border-color: rgba(255,255,255,0.65); }

.hero-usps {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.hero-usps li {
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  padding-left: 16px;
  position: relative;
}
.hero-usps li::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cta);
}

/* =========================================================
   SEKCJA PRODUKTÓW
   ========================================================= */
.products-section {
  padding: 60px 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--granat);
  letter-spacing: -0.3px;
}

.section-link {
  font-size: 14px;
  color: var(--niebieski);
  font-weight: 500;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

/* WooCommerce product cards */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.woocommerce ul.products li.product {
  background: var(--biel) !important;
  border-radius: var(--r-lg) !important;
  box-shadow: var(--shadow) !important;
  border: 1px solid var(--border) !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: box-shadow .2s, transform .2s !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

.woocommerce ul.products li.product:hover {
  box-shadow: var(--shadow-lg) !important;
  transform: translateY(-3px) !important;
}

.woocommerce ul.products li.product a img {
  width: 100% !important;
  height: 220px !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  background: #eef2f7 !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 16px !important;
  font-weight: 600 !important;
  color: var(--granat) !important;
  line-height: 1.35 !important;
  padding: 16px 18px 8px !important;
  margin: 0 !important;
}

.woocommerce ul.products li.product .price {
  padding: 0 18px 12px !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--cena) !important;
  display: block !important;
}

.woocommerce ul.products li.product .button {
  margin: auto 18px 18px !important;
  display: block !important;
  background: var(--granat) !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  padding: 11px 20px !important;
  border-radius: var(--r) !important;
  border: none !important;
  text-align: center !important;
  transition: background .15s !important;
  cursor: pointer !important;
}

.woocommerce ul.products li.product .button:hover {
  background: var(--niebieski) !important;
  color: #fff !important;
}

/* =========================================================
   USP PASEK
   ========================================================= */
.usp-bar {
  background: var(--biel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}

.usp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.usp-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.usp-icon {
  width: 48px;
  height: 48px;
  background: #eef2f7;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.usp-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--granat);
}

.usp-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 640px) {
  .usp-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   CTA BANER
   ========================================================= */
.cta-banner {
  background: var(--granat);
  padding: 56px 0;
  text-align: center;
}

.cta-banner h2 {
  color: #fff;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-banner p {
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  margin-bottom: 28px;
}

/* =========================================================
   STOPKA
   ========================================================= */
.site-footer {
  background: var(--stopka);
  color: rgba(255,255,255,0.55);
  padding: 40px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.footer-tagline {
  font-size: 13px;
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  padding: 3px 0;
  transition: color .15s;
}
.footer-col a:hover { color: rgba(255,255,255,0.9); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
}

.footer-links { display: flex; gap: 16px; }
.footer-links a { color: rgba(255,255,255,0.45); font-size: 12px; }
.footer-links a:hover { color: rgba(255,255,255,0.8); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* =========================================================
   WOOCOMMERCE — OGÓLNE
   ========================================================= */
.woocommerce-notices-wrapper { padding: 0 24px; }

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info {
  border-top-color: var(--granat) !important;
}

/* Pojedynczy produkt */
.woocommerce div.product .product_title {
  color: var(--granat) !important;
  font-size: 28px !important;
  font-weight: 700 !important;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--cena) !important;
  font-size: 28px !important;
  font-weight: 700 !important;
}

.woocommerce div.product .single_add_to_cart_button {
  background: var(--granat) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  padding: 14px 32px !important;
  border-radius: var(--r-lg) !important;
  border: none !important;
  transition: background .15s !important;
}

.woocommerce div.product .single_add_to_cart_button:hover {
  background: var(--niebieski) !important;
}

/* Koszyk i checkout */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce #payment #place_order,
.woocommerce-checkout #payment #place_order {
  background: var(--cta) !important;
  color: #111 !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  border-radius: var(--r-lg) !important;
  border: none !important;
  padding: 14px 32px !important;
}

/* Inputy formularzy */
.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select {
  border: 1.5px solid var(--border) !important;
  border-radius: var(--r) !important;
  padding: 10px 14px !important;
  font-size: 15px !important;
  transition: border-color .15s !important;
}
.woocommerce input.input-text:focus,
.woocommerce textarea:focus {
  border-color: var(--niebieski) !important;
  outline: none !important;
}

/* =========================================================
   STRONA PRODUKTU — LAYOUT
   ========================================================= */
.single-product-wrapper {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
}

/* =========================================================
   BREADCRUMBS
   ========================================================= */
.woocommerce .woocommerce-breadcrumb {
  font-size: 13px;
  color: var(--muted);
  padding: 16px 0 8px;
}

/* =========================================================
   RESPONSYWNOŚĆ
   ========================================================= */
@media (max-width: 900px) {
  .products-grid,
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 560px) {
  .hero { padding: 40px 0 48px; }
  .products-grid,
  .woocommerce ul.products {
    grid-template-columns: 1fr !important;
  }
  .hero-btns { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}
