/* ===========================
   DrrDamson – "screen" theme
   (styl jak na podglądzie)
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

:root{
  --accent:#00bcd4;
  --accent2:#0097a7;
  --text:#f4f6fb;
  --muted:#b9c2d3;

  --bg:#070a10;
  --panel:rgba(15, 20, 30, .72);
  --panel2:rgba(15, 20, 30, .58);
  --stroke:rgba(255,255,255,.08);
  --shadow:0 18px 60px rgba(0,0,0,.55);
  --radius:14px;

  --container:1100px;
}

*{ box-sizing:border-box; }

html,body{ height:100%; }

body{
  font-family:'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background: var(--bg);
  /* Zmieniono tło strony na grafikę z ulotki.
     Zachowujemy delikatne gradienty, aby nałożyć subtelny kolor i zachować głębię.
     Ostatnia wartość w liście background-image wskazuje na nową grafikę ulotki. */
  background-image:
    radial-gradient(1200px 700px at 15% 20%, rgba(0,188,212,.18), transparent 55%),
    radial-gradient(900px 600px at 85% 10%, rgba(0,151,167,.12), transparent 55%),
    linear-gradient(180deg, rgba(0,0,0,.85), rgba(0,0,0,.75)),
    /* Zmieniamy tło na wycięty fragment logotypu z ulotki (logo_bg.png). */
    url("../assets/images/logo_bg.png");
  background-size: auto, auto, auto, cover;
  background-position: center, center, center, center;
  background-attachment: fixed;
  min-height:100vh;
}

/* ============================================
   3D mockup effect
   Użyj klasy .mockup3d wokół elementu <img>, aby nadać mu lekki efekt 3D. Obraz obraca się w osi Y i wraca do oryginalnej pozycji po najechaniu kursorem. Dzięki temu zdjęcia projektów prezentują się bardziej przestrzennie bez użycia prawdziwych modeli 3D.
   ============================================ */
.mockup3d{
  perspective:800px;
  display:inline-block;
}
.mockup3d img{
  display:block;
  transform:rotateY(15deg);
  transform-style:preserve-3d;
  transition:transform 0.5s ease;
}
.mockup3d:hover img{
  transform:rotateY(0deg);
}

/* ============================================
   Ulotka – animacja pojawiania się
   Dodajemy płynny efekt pojawiania się dla wstawionego obrazka ulotki. Element z klasą
   .flyer-wrapper będzie unosił się delikatnie podczas ładowania strony. To zwiększa
   płynność graficzną i dodaje dynamiki.
   ============================================ */
@keyframes flyerFadeIn{
  from{ opacity:0; transform: translateY(40px); }
  to{ opacity:1; transform: translateY(0); }
}

.flyer-wrapper{
  animation: flyerFadeIn 1.2s ease-out both;
}

/* ============================================
   Aukcje Allegro – sekcja
   Definiujemy styl nagłówków i tekstu w sekcji z aukcjami Allegro,
   która jest dodana pod kafelkami produktów na stronie głównej.
   ============================================ */
.allegro-section h3{
  text-align:center;
  font-size:32px;
  font-weight:700;
  margin-bottom:12px;
}
.allegro-section p{
  text-align:center;
  font-size:16px;
  color:var(--muted);
}

/* Fallback link for Allegro iframe */
.allegro-fallback{
  margin-top:12px;
  text-align:center;
  font-size:14px;
  color:var(--muted);
}
.allegro-fallback a{
  color:var(--accent);
  text-decoration:underline;
}

/* ============================================
   Produkty cyfrowe – siatka kart
   Klasy używane w projekty-svd-dxf.html do wyświetlania pakietów SVG/DXF.
   ============================================ */
.products-grid{
  display:grid;
  gap:32px;
  grid-template-columns:repeat(auto-fit, minmax(250px, 1fr));
  margin-top:24px;
}
.product-card{
  background:rgba(255,255,255,0.05);
  border-radius:var(--radius);
  padding:16px;
  text-align:center;
  box-shadow:0 4px 12px rgba(0,0,0,.2);
  transition:transform 0.3s ease;
}
.product-card:hover{
  transform:translateY(-4px);
}
.product-card h3{
  margin-top:12px;
  font-size:20px;
  color:var(--text);
}
.product-card .price{
  color:var(--accent);
  font-weight:700;
  margin-top:8px;
  font-size:18px;
}

a{ color:inherit; }
a:hover{ color:var(--accent); }

/* Container */
.container{
  width:min(var(--container), calc(100% - 32px));
  margin-inline:auto;
}

/* ===========================
   Header (nowy)
   =========================== */
.site-header{
  position:sticky;
  top:0;
  z-index:999;
  background:rgba(8,10,14,.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,188,212,.35);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding: 12px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  white-space:nowrap;
}
.brand-logo{
  width:44px;
  height:44px;
  border-radius:10px;
  object-fit:cover;
  box-shadow: 0 0 0 1px var(--stroke), 0 12px 30px rgba(0,0,0,.5);
}
.brand-text{
  font-family:'Pacifico', cursive;
  font-size: 26px;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(0,188,212,.45);
  letter-spacing:.4px;
}

/* Burger */
.nav-toggle{ display:none; }
.nav-burger{
  display:none;
  width:44px; height:44px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  cursor:pointer;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:10px;
}
.nav-burger span{
  display:block;
  height:2px;
  width:100%;
  background: rgba(255,255,255,.85);
  border-radius:999px;
}

/* Nav */
.main-nav{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:center;
}
.main-nav a{
  text-decoration:none;
  font-weight:600;
  font-size: 13px;
  opacity:.92;
  padding: 10px 10px;
  border-radius: 12px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.main-nav a:hover{
  background: rgba(0,188,212,.16);
  transform: translateY(-1px);
  color: var(--text);
}

.header-social{
  display:flex;
  gap:10px;
  align-items:center;
}

/* Icon buttons (social) */
.icon-btn{
  width:38px; height:38px;
  display:grid;
  place-items:center;
  border-radius:10px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
  text-decoration:none;
}
.icon-btn img{
  width:20px; height:20px;
  transition: transform .2s ease, filter .2s ease;
}
.icon-btn:hover{
  transform: translateY(-1px) scale(1.02);
  border-color: rgba(0,188,212,.45);
  background: rgba(0,188,212,.12);
}
.icon-btn:hover img{
  transform: scale(1.08);
  filter: brightness(1.15);
}

/*
 * Hide the colourful brand logo and social media icons in the header to improve
 * focus on the content. These elements remain in the markup but are not
 * displayed. If needed in the future, simply remove these rules.
 */
/* Hide the entire brand element (including logo and name) and header social icons */
.brand,
.header-social {
  display: none !important;
}

/*
 * Improve readability across the site by increasing the base font size and
 * line height. This change makes body text easier to read without altering
 * the overall layout dramatically.
 */
body{
  font-size: 17px;
  line-height: 1.6;
}

/* Ensure headings have adequate line height for legibility */
h1, h2, h3, h4, h5, h6{
  line-height: 1.3;
}

/* Mobile nav */
@media (max-width: 980px){
  .nav-burger{ display:flex; }
  .main-nav{
    position:fixed;
    left:16px; right:16px;
    top:74px;
    padding: 14px;
    border-radius: var(--radius);
    background: rgba(10,12,18,.92);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    display:none;
    flex-direction:column;
    align-items:stretch;
  }
  .main-nav a{
    padding: 12px 12px;
  }
  .nav-toggle:checked ~ .main-nav{ display:flex; }
}

/* ===========================
   Hero + sekcje jak na screenie
   =========================== */
.hero-splash{
  padding: 70px 0 22px;
}
.hero-content{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 42px 28px 26px;
  text-align:center;
}
.hero-content h1{
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.05;
  text-transform: uppercase;
}
.hero-content h1 span{
  color: var(--accent);
  text-shadow: 0 0 22px rgba(0,188,212,.45);
}
.hero-sub{
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
}

/* Benefits row */
.benefits{
  margin-top: 26px;
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.benefit{
  background: var(--panel2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 14px 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  min-height: 64px;
}
.benefit-ico{
  font-size: 26px;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
}
.benefit-title{
  font-weight: 700;
  font-size: 13px;
}
.benefit-desc{
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 900px){
  .benefits{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .benefits{ grid-template-columns: 1fr; }
}

/* Section title */
.section-title{
  margin-top: 26px;
  margin-bottom: 10px;
  text-align:center;
}
.section-title h2{
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.section-title h2 span{
  color: var(--accent);
  text-shadow: 0 0 18px rgba(0,188,212,.42);
}
.section-sub{
  margin-top: 6px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .8px;
  font-size: 13px;
}

/* Tiles (4 karty jak na screenie) */
.tiles{
  margin-top: 16px;
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.tile{
  display:block;
  border-radius: var(--radius);
  overflow:hidden;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,.25);
  box-shadow: 0 14px 40px rgba(0,0,0,.5);
  text-decoration:none;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tile img{
  width:100%;
  height: 190px;
  object-fit: cover;
  display:block;
}
.tile-bar{
  background: rgba(0,188,212,.85);
  color: #001014;
  font-weight: 800;
  text-transform: none;
  padding: 12px 12px;
  text-align:center;
  letter-spacing:.3px;
}
.tile:hover{
  transform: translateY(-4px);
  border-color: rgba(0,188,212,.55);
  box-shadow: 0 20px 55px rgba(0,0,0,.65);
}
@media (max-width: 980px){
  .tiles{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .tiles{ grid-template-columns: 1fr; }
  .tile img{ height: 210px; }
}

/* CTA boxes */
.cta-grid{
  margin-top: 22px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.cta-card{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px;
}
.cta-card h3{
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .8px;
  font-size: 22px;
}
.cta-card h3 span{
  color: var(--accent);
}
.cta-card p{
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}
.cta-btn{
  display:inline-block;
  margin-top: 14px;
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(0,188,212,.9);
  color:#001014;
  font-weight: 800;
  text-decoration:none;
  box-shadow: 0 10px 26px rgba(0,188,212,.22);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.cta-btn:hover{
  transform: translateY(-2px);
  background: rgba(0,151,167,.95);
  box-shadow: 0 14px 32px rgba(0,151,167,.22);
  color:#001014;
}
.cta-social{
  margin-top: 14px;
  display:flex;
  gap: 10px;
}
@media (max-width: 900px){
  .cta-grid{ grid-template-columns: 1fr; }
}

/* About */
.about{
  margin-top: 18px;
  background: var(--panel2);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 18px 18px;
  box-shadow: 0 14px 40px rgba(0,0,0,.45);
}
.about h3{
  font-weight: 800;
  margin-bottom: 8px;
}
.about p{
  color: var(--muted);
  font-size: 14px;
}

/* ===========================
   Pages (main content)
   =========================== */
main{
  padding-bottom: 34px;
}

/* Make legacy mains look like panels */
main.fade-in,
main.page,
main:not(.hero-content){
  width: min(var(--container), calc(100% - 32px));
  margin: 22px auto 0;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px;
}

/* Do not double-wrap index main which contains its own sections */
body.home main{
  width: 100%;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 0 34px;
}

/* Products grid styling (category pages) */
.products,
.product-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.product-card{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,.45);
  padding: 12px;
}
.product-card img{
  width:100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
}
.product-card h3{ margin-top: 10px; font-size: 14px; }
.product-card p{ color: var(--muted); font-size: 13px; margin-top: 6px; }
.product-card .buy-btn{
  display:inline-block;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,188,212,.9);
  color:#001014 !important;
  text-decoration:none;
  font-weight: 800;
}

/* ===========================
   Footer
   =========================== */
.site-footer{
  margin-top: 28px;
  background: rgba(8,10,14,.70);
  border-top: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}
.footer-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 22px 0 16px;
}
.footer-col h3{
  font-size: 15px;
  text-transform: none;
  margin-bottom: 10px;
}
.footer-col ul{
  list-style:none;
  padding:0;
  margin:0;
}
.footer-col li{ margin: 7px 0; }
.footer-col a{
  text-decoration:none;
  color: var(--muted);
}
.footer-col a:hover{ color: var(--accent); }

.footer-social{
  display:flex;
  gap:10px;
}

.footer-bottom{
  padding: 14px 0 18px;
  text-align:center;
  color: rgba(255,255,255,.55);
  font-size: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}

@media (max-width: 900px){
  .footer-grid{ grid-template-columns: 1fr; }
}

/* ===========================
   Modal (zostaje, tylko dopasowany)
   =========================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
.modal.show { display: flex; }

.modal .modal-content {
  background: rgba(12, 16, 24, 0.95);
  border: 1px solid var(--stroke);
  padding: 20px;
  border-radius: var(--radius);
  width: 92%;
  max-width: 420px;
  position: relative;
  box-shadow: var(--shadow);
}
.modal .close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 24px;
  color: rgba(255,255,255,.7);
  cursor: pointer;
}
.modal form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal form input {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
  padding: 10px 10px;
  border-radius: 12px;
  color: var(--text);
  outline: none;
}
.modal form button {
  margin-top: 6px;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: rgba(0,188,212,.92);
  color: #001014;
  font-weight: 900;
  cursor: pointer;
}

/* Fade-in animation (kompatybilne z custom.js) */
.fade-in { opacity: 0; transform: translateY(18px); }
.fade-in.appear { opacity: 1; transform: translateY(0); transition: opacity .8s ease-out, transform .8s ease-out; }


/* ===========================
   Dropdown "Oferta" (Kategorie)
   =========================== */
.main-nav .nav-dd{ position:relative; }
.main-nav .nav-dd > summary{
  list-style:none;
  cursor:pointer;
  user-select:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:12px;
  color:var(--text);
  opacity:.92;
}
.main-nav .nav-dd > summary::-webkit-details-marker{ display:none; }
.main-nav .nav-dd > summary::after{
  content:"▾";
  font-size:.9em;
  opacity:.75;
}
.main-nav .nav-dd[open] > summary{
  background: rgba(0,151,167,.10);
  opacity:1;
}
.main-nav .nav-dd-menu{
  position:absolute;
  top: calc(100% + 10px);
  left:0;
  min-width: 220px;
  padding:8px;
  border-radius:14px;
  background: rgba(10,12,18,.98);
  border:1px solid rgba(0,151,167,.35);
  box-shadow: 0 18px 45px rgba(0,0,0,.55);
  display:flex;
  flex-direction:column;
  gap:4px;
  z-index:50;
}
.main-nav .nav-dd-menu a{
  display:block;
  padding:10px 12px;
  border-radius:12px;
  color:var(--text);
  opacity:.9;
}
.main-nav .nav-dd-menu a:hover{
  background: rgba(0,151,167,.14);
  opacity:1;
}

/* Mobile: menu jest pionowy, więc dropdown ma być "inline" */
@media (max-width: 900px){
  .main-nav .nav-dd{ width:100%; }
  .main-nav .nav-dd > summary{ width:100%; justify-content:space-between; }
  .main-nav .nav-dd-menu{
    position:static;
    top:auto; left:auto;
    min-width:0;
    padding:6px 0 0 0;
    border:none;
    background:transparent;
    box-shadow:none;
  }
  .main-nav .nav-dd-menu a{
    padding:10px 12px;
  }
}
