:root {
  --primary: #7F4E1E;
  --secondary: #CEAC86;
  --accent: #996633;
  --light-bg: #F9F7EA;
  --nav-bg: #EEF7DE;
  --nav-border: #DDD0B8;
  --border: #CEAC86;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, sans-serif;
  font-size: 14px;
  color: var(--primary);
  background: #ece8df;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

/* ── Page wrapper ── */
.page-wrapper {
  max-width: 960px;
  margin: 8px auto;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}

/* ── Header ── */
header {
  background-image: url('../images/container_bg.jpg');
  background-repeat: no-repeat;
  background-size: 100% auto;
  background-position: top center;
  background-color: #f5ede0;
  min-height: 200px;
  display: flex;
  align-items: flex-start;
  padding: 0;
  position: relative;
}

.header-logo {
  position: absolute;
  left: 40px;
  top: 40px;
  width: 90px;
}
.header-logo img { width: 90px; height: auto; }

.header-center {
  margin-left: 170px;
  padding-top: 30px;
  flex: 1;
}
.header-center h1 img { max-width: 350px; height: auto; }
.header-center h2 {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  font-size: 1em;
  color: var(--primary);
  margin-top: 4px;
  font-weight: normal;
}

.header-contact {
  padding: 20px 30px 20px 10px;
  font-size: 0.9em;
  line-height: 1.6;
  text-align: right;
  white-space: nowrap;
}
.header-contact strong { font-size: 1em; }

/* ── Navigation ── */
nav {
  background: var(--nav-bg);
  border-top: 2px solid var(--nav-border);
  border-bottom: 2px solid var(--nav-border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  flex-wrap: wrap;
  gap: 0;
}

nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0; }

nav ul li a {
  display: block;
  padding: 12px 20px;
  font-weight: bold;
  color: var(--primary);
  border-right: 1px solid var(--nav-border);
  transition: background .2s;
}
nav ul li:first-child a { border-left: 1px solid var(--nav-border); }
nav ul li a:hover,
nav ul li a.active { background: var(--nav-border); text-decoration: none; }

.lang-switcher {
  margin-left: auto;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
}
.lang-switcher a {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9em;
  color: var(--primary);
  font-weight: bold;
}
.lang-switcher a:hover { text-decoration: underline; }
.lang-switcher img { width: 20px; height: auto; vertical-align: middle; }

/* ── Main content ── */
main {
  padding: 30px 40px 40px 40px;
  min-height: 400px;
}

.breadcrumb {
  font-size: 0.85em;
  margin-bottom: 16px;
  color: var(--secondary);
}
.breadcrumb a { color: var(--secondary); }

h1.page-title {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  font-size: 2em;
  color: var(--primary);
  margin-bottom: 20px;
  border-bottom: 1px dotted var(--secondary);
  padding-bottom: 10px;
}

/* ── Home page ── */
.welcome-text {
  font-size: 1em;
  line-height: 1.7;
  color: var(--primary);
}
.welcome-text p { margin-bottom: 14px; }
.welcome-text .signature {
  margin-top: 20px;
  font-style: italic;
}

/* ── Gallery overview (category cards) ── */
.gallery-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 10px;
}

.category-card {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: center;
  background: var(--light-bg);
  transition: box-shadow .2s;
}
.category-card:hover { box-shadow: 0 4px 12px rgba(127,78,30,.2); }

.category-card img {
  max-width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  margin: 0 auto 10px;
}

.category-card h3 {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  font-size: 1.3em;
  color: var(--primary);
  margin-bottom: 8px;
  background: none;
  height: auto;
  padding: 0;
}
.category-card p {
  font-size: 0.85em;
  color: var(--accent);
  font-style: italic;
}

/* ── Product thumbnails grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.product-item {
  border: 1px solid var(--border);
  padding: 8px;
  text-align: center;
  background: var(--light-bg);
  transition: box-shadow .2s;
}
.product-item:hover { box-shadow: 0 3px 8px rgba(127,78,30,.2); }

.product-item a { display: block; }

.product-item img {
  max-width: 100%;
  height: 180px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #fff;
}

.product-item .product-name {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: bold;
  font-size: 1.05em;
  color: var(--primary);
  padding: 6px 0 2px;
}

/* image placeholder when loading fails */
.img-placeholder {
  width: 100%;
  height: 180px;
  background: #f0e8d8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 0.8em;
  font-style: italic;
  border: 1px dashed var(--secondary);
}

/* ── Contact page ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}
@media (max-width: 600px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-office h3 {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  font-size: 1.2em;
  margin-bottom: 10px;
  background: none;
  height: auto;
  padding: 0;
  border-bottom: 1px dotted var(--secondary);
  padding-bottom: 6px;
}
.contact-office p { margin-bottom: 6px; line-height: 1.6; }
.contact-office a { color: var(--primary); text-decoration: underline; }

.contact-form-section h2 {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  font-size: 1.3em;
  margin-bottom: 16px;
  color: var(--primary);
}

.contact-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 4px;
  margin-top: 12px;
  font-size: 0.9em;
}
.contact-form input[type=text],
.contact-form input[type=email],
.contact-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--secondary);
  font-family: Arial, sans-serif;
  font-size: 0.9em;
  color: var(--primary);
  background: #fdfaf5;
}
.contact-form textarea { resize: vertical; min-height: 100px; }
.contact-form button {
  margin-top: 16px;
  padding: 10px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 0.95em;
  cursor: pointer;
  font-family: Arial, sans-serif;
  transition: background .2s;
}
.contact-form button:hover { background: var(--accent); }

/* ── Projects page ── */
.projects-content { line-height: 1.8; }
.projects-content p { margin-bottom: 14px; }

/* ── Footer ── */
footer {
  border-top: 1px dotted #ccc;
  background: var(--light-bg);
  text-align: center;
  padding: 16px;
  font-size: 0.85em;
  color: var(--accent);
}

/* ── Lightbox ── */
#lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
#lightbox-overlay.active { display: flex; }
#lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}
#lightbox-img {
  display: block;
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border: 3px solid #fff;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
#lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 30px;
  height: 30px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  cursor: pointer;
  line-height: 1;
  user-select: none;
}
#lightbox-close:hover { background: var(--accent); }

/* ── Responsive ── */
@media (max-width: 700px) {
  header { flex-direction: column; min-height: unset; }
  .header-logo { position: static; margin: 16px auto 0; display: block; }
  .header-center { margin-left: 0; padding: 10px 16px 0; }
  .header-center h1 img { max-width: 260px; }
  .header-contact { text-align: center; padding: 10px 16px; white-space: normal; }
  nav ul li a { padding: 10px 12px; font-size: 0.9em; }
  main { padding: 20px 16px 30px; }
  .gallery-overview { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
