/* ===== Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --black: #1a1a1a;
  --gray: #808080;
  --light: #f7f7f7;
  --border: #e6e6e6;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: #2b2b2b;
  line-height: 1.55;
  overflow-x: hidden; /* guard against full-bleed map 100vw causing horizontal scroll */
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.btn {
  display: inline-block; background: var(--black); color: #fff;
  padding: 14px 34px; text-transform: uppercase; font-size: 13px;
  letter-spacing: 1px; border: none; cursor: pointer; transition: background .2s;
}
.btn:hover { background: #444; }

/* ===== Header ===== */
header {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.logo { font-size: 19px; font-weight: 700; letter-spacing: 1px; display: flex; align-items: center; }
.logo img { height: 48px; width: auto; display: block; border-radius: 4px; }
.menu { display: flex; gap: 30px; list-style: none; }
.menu > li { position: relative; }
.menu > li > a, .menu > li > span {
  display: block; font-size: 14px; font-weight: 600; text-transform: uppercase;
  cursor: pointer; padding: 8px 0;
}
.submenu {
  position: absolute; top: 100%; left: 0; background: #fff;
  border: 1px solid var(--border); min-width: 210px; padding: 6px 0;
  list-style: none; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .2s; box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.menu > li:hover .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu li a { display: block; padding: 11px 20px; font-size: 13px; }
.submenu li a:hover { background: var(--light); }
.hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.hamburger span { width: 26px; height: 2px; background: var(--black); transition: .3s; }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 78vh;
  background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)),
    url('images/e44fa82574cdcb4676ce5ee1b4a6545.jpg') center/cover;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 60px 20px;
}
.hero small { letter-spacing: 2px; text-transform: uppercase; margin-bottom: 18px; font-size: 14px; }
.hero h1 { font-size: clamp(28px, 5vw, 52px); font-weight: 800; max-width: 820px; margin-bottom: 30px; line-height: 1.15; }

/* ===== Sections ===== */
section { padding: 72px 0; }
.section-title { text-align: center; font-size: 30px; font-weight: 700; margin-bottom: 44px; }
h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 1px; margin: 22px 0 10px; }

/* ===== Galleries ===== */
.gallery figure { margin: 0; position: relative; cursor: pointer; background: #f2f2f2; }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery figure span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #777; font-size: 13px; letter-spacing: 1px;
}

/* --- Slideshow mode (home, countertops) --- */
.gallery.is-slide { position: relative; max-width: 100%; margin: 0 auto; }
.car-window { position: relative; overflow: hidden; background: #f2f2f2; border: 1px solid var(--border); }
.car-track { display: flex; transition: transform .45s ease; }
.gallery.is-slide figure { flex: 0 0 100%; min-width: 100%; aspect-ratio: var(--slide-ar, 16 / 9); overflow: hidden; }
/* Natural-aspect slideshow (countertops): images shown UNCROPPED at their true ratio,
   so portrait slabs appear tall/vertical — fixed height, letterboxed sides */
.gallery.is-slide.is-natural figure { aspect-ratio: auto; height: 600px; }
.gallery.is-slide.is-natural figure img { object-fit: contain; }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; background: rgba(0,0,0,.45); color: #fff;
  border: none; cursor: pointer; font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.car-btn:hover { background: rgba(0,0,0,.8); }
.car-prev { left: 12px; }
.car-next { right: 12px; }
.car-counter {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 5;
  background: rgba(0,0,0,.6); color: #fff; padding: 5px 14px; font-size: 13px; letter-spacing: 1px;
}
.car-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.car-thumbs button { flex: 0 0 auto; width: 84px; height: 63px; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; overflow: hidden; }
.car-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-thumbs button.active { border-color: var(--black); }

/* --- Grid mode (kitchen, shower, bath) --- */
.gallery.is-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 18px; }
.gallery.is-grid.is-2col { grid-template-columns: repeat(2, 1fr); max-width: 900px; margin: 0 auto; gap: 40px; }
.gallery.is-grid figure { display: block; }
.gallery.is-grid figure img { aspect-ratio: 1 / 1; border: 1px solid var(--border); }
.gallery.is-grid.is-2col figure img { aspect-ratio: 4 / 3; }
.gallery.is-grid figcaption { margin-top: 10px; text-align: center; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: #333; }
.gallery.is-grid .vtitle { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 14px; }
.gallery.is-grid .desc { text-align: center; font-size: 12px; color: #777; margin-top: 8px; }

@media (max-width: 820px) {
  .gallery.is-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery.is-slide.is-natural figure { height: 420px; }
  .car-btn { width: 38px; height: 38px; font-size: 22px; }
}
@media (max-width: 520px) {
  .gallery.is-grid, .gallery.is-grid.is-2col { grid-template-columns: 1fr; }
  .gallery.is-slide.is-natural figure { height: 360px; }
  .subscribe .row { flex-direction: column; gap: 10px; }
  .subscribe .row button { padding: 14px; }
}

/* ===== About ===== */
.about { background: var(--light); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; margin-bottom: 40px; }
.about-grid .ph { width: 100%; height: 300px; background: #ccc; display: flex; align-items: center; justify-content: center; color: #888; }
.about-grid img.media { width: 100%; height: 300px; object-fit: cover; display: block; }
.wechat { text-align: center; }
.wechat .ph { width: 200px; height: 200px; margin: 14px auto 0; background: #ccc; display: flex; align-items: center; justify-content: center; color: #888; }
.wechat img.qr { width: 200px; height: 200px; object-fit: contain; margin: 14px auto 0; display: block; }
/* Empty-gallery note (e.g. countertops — original has no photos yet) */
.gallery-empty { text-align: center; color: #999; font-size: 15px; padding: 40px 0 10px; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.field { width: 100%; padding: 12px; border: 1px solid #ccc; margin-bottom: 14px; font-size: 14px; font-family: inherit; }
textarea.field { min-height: 130px; resize: vertical; }
.form-error { color: #c0392b; font-size: 13px; margin: -8px 0 12px; display: none; }
.form-success { color: #1e8449; font-size: 14px; margin-top: 12px; display: none; }
/* Map embed (free, no API key) — full-bleed band across the whole page */
.map-embed {
  position: relative; width: 100vw; left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw; margin-top: 56px;
}
.map-embed iframe { width: 100%; height: 460px; border: 0; display: block; }

/* ===== Subscribe ===== */
.subscribe { background: var(--black); color: #fff; text-align: center; }
.subscribe .section-title { color: #fff; }
.subscribe .row { display: flex; max-width: 480px; margin: 22px auto 0; }
.subscribe .row input { flex: 1; padding: 14px; border: none; font-size: 14px; }
.subscribe .row button { background: #fff; color: #000; border: none; padding: 0 26px; cursor: pointer; font-weight: 600; }
.subscribe .form-success { color: #7ee2a8; }

/* ===== Footer ===== */
footer { background: #000; color: #aaa; text-align: center; padding: 44px 20px; font-size: 13px; }
footer .links { margin-top: 14px; }
footer .links a { color: #ddd; margin: 0 12px; text-transform: uppercase; font-size: 12px; }
footer .links a:hover { color: #fff; }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 500;
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox .content { color: #fff; text-align: center; font-size: 22px; }
.lightbox button { position: absolute; background: none; border: none; color: #fff; font-size: 34px; cursor: pointer; }
.lightbox .close { top: 20px; right: 30px; }
.lightbox .prev { left: 30px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 30px; top: 50%; transform: translateY(-50%); }

/* ===== Cookie banner ===== */
.cookie {
  position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
  border-top: 1px solid var(--border); padding: 20px; z-index: 400;
  display: flex; gap: 20px; align-items: center; justify-content: center; flex-wrap: wrap;
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
.cookie p { font-size: 13px; max-width: 700px; }
.cookie.hide { display: none; }

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .hamburger { display: flex; }
  .menu {
    position: absolute; top: 80px; left: 0; right: 0; background: #fff;
    flex-direction: column; gap: 0; padding: 10px 0; border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .3s;
  }
  .menu.open { max-height: 600px; }
  .menu > li { padding: 0 20px; }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding-left: 14px; display: none; }
  .menu > li.expanded .submenu { display: block; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  /* phone polish: smaller logo, tighter spacing, shorter map, smaller thumbs */
  .logo img { height: 42px; }
  section { padding: 52px 0; }
  .section-title { font-size: 25px; margin-bottom: 30px; }
  .map-embed { margin-top: 40px; }
  .map-embed iframe { height: 300px; }
  .car-thumbs button { width: 64px; height: 48px; }
}
