/* Fliesen Ibragimov — site styles */

:root {
  --green: #0b6b2c;
  --green-dark: #054d1e;
  --green-light: #e8f3ea;
  --cream: #faf8f4;
  --ink: #262421;
  --muted: #5c5850;
  --border: #e2ddd3;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius: 10px;
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, Segoe UI, Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* This site has no dark theme yet — force light form controls so inputs/selects
     don't render with the browser's dark-mode widget colors (invisible text on
     a black field) when the visitor's OS/browser prefers dark. */
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--cream);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  margin: 0 0 0.5em;
  color: var(--green-dark);
}

h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1.2em;
}

a {
  color: var(--green-dark);
}

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: var(--green-dark);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  height: 44px;
  width: auto;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
}

.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  text-decoration: none;
  color: #f1efe9;
  font-weight: 500;
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  border-bottom-color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #fff;
  cursor: pointer;
}

/* Hero */

.hero {
  position: relative;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  overflow: hidden;
}

.hero-watermark {
  position: absolute;
  top: 50%;
  right: -60px;
  width: 420px;
  max-width: none;
  opacity: 0.12;
  transform: translateY(-50%);
  pointer-events: none;
}

.hero-overlay {
  position: relative;
  color: #fff;
  text-align: center;
  padding: 90px 24px;
}

.hero-overlay h1 {
  color: #fff;
  font-size: 2.4rem;
  max-width: 800px;
  margin: 0 auto 0.5em;
}

.hero-overlay p {
  max-width: 600px;
  margin: 0 auto 1.6em;
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-primary {
  background: var(--green);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--green-dark);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Sections */

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 70px 24px;
}

.textbox {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.textbox p {
  margin: 0 0 1em;
}

.textbox p:last-child {
  margin-bottom: 0;
}

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

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.card i {
  font-size: 1.8rem;
  color: var(--green);
  margin-bottom: 12px;
}

.card h3 {
  font-size: 1.15rem;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.collections-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.collection-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  height: 220px;
  text-decoration: none;
  box-shadow: var(--shadow);
  background: var(--green-light);
}

.collection-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-card.no-image img {
  display: none;
}

.collection-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px;
  background: linear-gradient(0deg, rgba(5, 77, 30, 0.85), transparent);
  color: #fff;
  font-weight: 600;
  text-align: center;
}

.cta {
  text-align: center;
  background: var(--green-light);
  border-radius: var(--radius);
  max-width: 1100px;
  margin: 0 auto 70px;
}

.cta p {
  max-width: 560px;
  margin: 0 auto 1.6em;
  color: var(--muted);
}

/* Products page */

.page-hero {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  text-align: center;
  padding: 60px 24px;
}

.page-hero h1 {
  color: #fff;
  font-size: 2.1rem;
}

.page-hero p {
  max-width: 600px;
  margin: 0 auto;
  opacity: 0.9;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}

.filter-tab {
  text-decoration: none;
  color: var(--green-dark);
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
}

.filter-tab:hover {
  border-color: var(--green);
}

.filter-tab.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.empty-state {
  text-align: center;
  color: var(--muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  height: 240px;
  box-shadow: var(--shadow);
  cursor: pointer;
  background: var(--green-light);
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-card .product-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px;
  background: linear-gradient(0deg, rgba(5, 77, 30, 0.85), transparent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 12, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  max-width: 90vw;
  max-height: 85vh;
  text-align: center;
}

.lightbox-figure img {
  max-width: 90vw;
  max-height: 75vh;
  border-radius: 6px;
}

.lightbox-figure figcaption {
  color: #fff;
  margin-top: 12px;
  font-weight: 600;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 2rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

@media screen and (max-width: 600px) {
  .lightbox-nav {
    width: 40px;
    height: 40px;
  }
}

/* Contact page */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 28px;
  align-items: start;
}

.contact-info h2,
.contact-form-wrap h2 {
  margin-bottom: 0.6em;
}

.contact-info .telmail {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}

.contact-info .telmail i {
  color: var(--green);
  width: 18px;
}

.contact-info .telmail a {
  color: var(--ink);
  text-decoration: none;
}

.contact-info .telmail a:hover {
  color: var(--green-dark);
}

.map {
  margin-top: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-row {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row label {
  font-weight: 500;
  font-size: 0.9rem;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}

.contact-form-wrap h3 {
  font-size: 1.05rem;
  margin: 20px 0 10px;
}

.item-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.7fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.item-row select,
.item-row input {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.92rem;
  width: 100%;
  background: #fff;
  color: var(--ink);
}

.item-line-total {
  font-size: 0.85rem;
  color: var(--muted);
  white-space: nowrap;
}

.item-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}

.item-remove:hover {
  color: #b3261e;
}

.btn-small {
  padding: 8px 18px;
  font-size: 0.9rem;
  margin-top: 4px;
}

.estimate-total {
  margin: 18px 0;
  font-size: 1.05rem;
}

.form-row-checkbox label {
  display: flex;
  gap: 10px;
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--muted);
  align-items: flex-start;
}

.form-row-checkbox input {
  margin-top: 3px;
}

.form-errors {
  background: #fdecea;
  border: 1px solid #f3c1bc;
  color: #8a2119;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.form-errors ul {
  margin: 0;
  padding-left: 18px;
}

.form-success {
  background: var(--green-light);
  border: 1px solid var(--green);
  color: var(--green-dark);
  border-radius: 8px;
  padding: 16px 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

@media screen and (max-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-row-group {
    grid-template-columns: 1fr;
  }

  .item-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "product product"
      "finish area"
      "total remove";
  }

  .item-row select[name="product[]"] {
    grid-area: product;
  }

  .item-row select[name="finish[]"] {
    grid-area: finish;
  }

  .item-row input[name="area[]"] {
    grid-area: area;
  }

  .item-row .item-line-total {
    grid-area: total;
  }

  .item-row .item-remove {
    grid-area: remove;
    justify-self: end;
  }
}

/* Footer */

.site-footer {
  text-align: center;
  padding: 32px 24px;
  background: var(--green-dark);
  color: #f1efe9;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 4px 0;
}

/* Responsive */

@media screen and (max-width: 800px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    display: none;
    border-bottom: 1px solid var(--border);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    color: var(--ink);
  }

  .site-nav a:hover,
  .site-nav a.active {
    color: var(--green-dark);
    border-bottom-color: var(--border);
  }

  .hero-overlay h1 {
    font-size: 1.8rem;
  }

  .section {
    padding: 50px 20px;
  }
}
