/* ========== Reset & Base ========== */
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
}
body {
  color: rgba(44, 78, 88, 0.993);
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
  background-image: url(antarctica-zakat-gory-lednik.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Remove large default gaps from headings */
h1, h2 {
  margin-top: 8px;
  margin-bottom: 8px;
}

/* ========== Headings ========== */
h1 {
  text-align: center;
  font-family: monospace;
  font-size: 72px;
  background-clip: text;
  background-image: linear-gradient(180deg, #095486, #824891);
  -webkit-text-fill-color: transparent;
}
h2 {
  text-align: center;
  background-clip: text;
  background-image: linear-gradient(180deg, #095486, #824891);
  -webkit-text-fill-color: transparent;
}

/* ========== Navbar ========== */
.navbar ul{
  list-style-type: none;
  background-image: linear-gradient(120deg, #0c5a6888, #b063c78a);
  background-blend-mode: color;
  padding: 0;
  margin: 0;
  overflow: hidden;
  backdrop-filter: none;
}
.navbar li{
  float: left;
}
.navbar a{
  color: #000000e1;
  text-decoration: none;
  padding: 15px;
  display: block;
  text-align: center;
  font-size: 16px;
  font-family: 'Lucida Sans','Lucida Grande','Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}
.navbar a:hover{
  background-color: #ffffff0c;
}

/* ========== Main Layout ========== */
/* Kill any unexpected spacing between navbar and content */
main {
  margin: 0;
  padding: 8px 16px 24px; /* small top padding to avoid sticking */
  text-align: center;
  min-height: calc(100vh - 120px); /* adjust if header/nav height differs */
}

/* ========== Products Grid (Homepage) ========== */
/* Support both .products and .productsLOL containers */
.products, .productsLOL {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  column-gap: 24px;          /* reduce wide spacing */
  max-width: 1200px;
  width: 100%;
  margin: 8px auto 24px;     /* tiny gap below navbar */
  padding: 0 8px;            /* horizontal padding only */
}

/* Product card */
.product {
  /* let grid handle width; remove fixed width */
  border: 1px solid #024b75;
  padding: 12px;
  text-align: center;
  background-image: linear-gradient(120deg, #0c5a6888, #b063c78a);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* Product image */
.product img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  margin-bottom: 10px;
  border-radius: 8px;
}

/* Product text */
.product-name {
  font-weight: bold;
  margin-bottom: 5px;
  color: rgba(120, 224, 255, 0.904);
}
.product-price {
  color: rgba(120, 224, 255, 0.904);
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .products, .productsLOL {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .products, .productsLOL {
    grid-template-columns: 1fr;
  }
}

/* ========== Optional Page-specific Backgrounds ========== */
/* Add class on body to use these */
body.homepage      { background-image: url('bg-home.jpg'); }
body.products-page { background-image: url('bg-products.jpg'); }
body.about-page    { background-image: url('bg-about.jpg'); }
body.contacts-page { background-image: url('bg-contacts.jpg'); }


/* 0) Normalize all default margins that can create gaps */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
h1, h2, h3, p { margin-top: 0; margin-bottom: 8px; }

/* 1) Ensure navbar sits flush with following content */
header { margin: 0; padding: 0; border: 0; }
.navbar { margin: 0; }
.navbar ul { margin: 0; padding: 0; }
.navbar li { margin: 0; padding: 0; }

/* 2) Remove vertical spacing from main wrapper */
main {
  margin: 0 !important;
  padding: 8px 12px 24px !important;  /* small top padding only */
  min-height: unset;                   /* don't force extra height */
}

/* 3) Kill unexpected gaps from any element immediately after navbar */
.navbar + * {
  margin-top: 0 !important;
  padding-top: 8px !important;
}

/* 4) Headline just above products: prevent big margins */
h1, h2 {
  margin-top: 4px !important;
  margin-bottom: 8px !important;
}

/* 5) Products grid container: center horizontally only, no vertical gap */
.products, .productsLOL {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 8px;          /* tiny space below navbar/heading */
  margin-bottom: 24px;
  padding: 0 8px;           /* horizontal padding only */
}

/* 6) Remove any accidental top/bottom padding from wrappers */
section, article, div.products, div.productsLOL {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* 7) If there's an empty nav or extra nav below header, collapse it */
nav:empty { display: none; }
nav + nav { margin-top: 0 !important; }

/* 8) Product card stays tidy */
.product { padding: 12px; }
.product img { width: 100%; height: 300px; object-fit: cover; }
