:root {
  --bg-dark: #161418;
  --text-main: #fff;
  --accent: #ffa726;
  --btn-bg: #232220;
  --card-bg: #232220;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Montserrat', Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  min-width: 401px;
  overflow-x: auto;
}

/* ====== HEADER ====== */
header, .main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 1100;
  padding: 18px 28px 0 20px;
  background: transparent;
  min-height: 62px;
}
.hamburger-btn {
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
}
.hamburger-btn img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 1px #0008);
}
.hamburger-btn:hover img {
  filter: brightness(1.2);
}
.header-logo img {
  width: 64px;
  height: auto;
  object-fit: contain;
  background: none !important;
  border-radius: 0;
  box-shadow: none;
  margin-right: 2em;
  margin-top: 0;
  display: block;
  filter: none;
}

/* ====== SIDE DRAWER ====== */
.side-drawer {
  position: fixed;
  left: 0;
  top: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: #191919;
  z-index: 2000;
  transform: translateX(-101%);
  transition: transform 0.25s cubic-bezier(.77,0,.18,1);
  box-shadow: 2px 0 28px #0007;
  display: flex;
  flex-direction: column;
  padding-top: 14px;
}
.side-drawer.open {
  transform: translateX(0);
}
.close-drawer {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  position: absolute;
  top: 18px;
  left: 18px;
  cursor: pointer;
  z-index: 3;
}
.side-logo {
  display: flex;
  align-items: center;
  margin: 16px 0 20px 0;
  justify-content: flex-end;
  padding-right: 18px;
}
.side-logo img {
  width: 56px;
  height: auto;
  background: none;
  border-radius: 0;
  box-shadow: none;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 28px;
  padding-left: 36px;
}
.side-nav .nav-link, .side-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.08rem;
  transition: color 0.18s;
  padding: 0;
  display: block;
}
.side-nav .nav-link.active, .side-nav .nav-link:focus, .side-nav .nav-link:hover {
  color: var(--accent);
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: #0008;
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.drawer-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* ====== MAIN PAGE ====== */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem 1rem;
  min-height: 100vh;
  position: relative;
  padding-top: 92px; /* Leaves space for header */
}
@media (max-width: 600px) {
  main { padding-top: 54px; }
}
h2 {
  text-align: center;
  font-weight: 400;
  margin-bottom: 2.2rem;
  margin-top: 2.5rem;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* ====== SEARCH ====== */
.search-container, .add-search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}
.search-box {
  background: #232220;
  border-radius: 16px;
  padding: 1rem 1.5rem;
  width: 100%;
  max-width: 300px;
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}
.search-box input {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.14rem;
  outline: none;
  width: 100%;
}
.search-box button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.35rem;
  margin-left: 0.7rem;
  cursor: pointer;
  opacity: 0.8;
}
.city-list {
  background: #232220;
  border-radius: 16px;
  width: 100%;
  max-width: 370px;
  margin: 0 auto 1rem auto;
  box-shadow: 0 2px 10px #0002;
  overflow: hidden;
}
.city-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.3rem;
  border-bottom: 1px solid #333;
  font-size: 1.07rem;
  cursor: pointer;
  transition: background 0.13s;
}
.city-item:last-child { border-bottom: none; }
.city-item:hover { background: #292727; }
.city-flag { margin-left: auto; font-size: 1.4rem; }

/* ====== WATCHES LIST ====== */
.watches-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.2rem 2.2rem;
  margin: 0 0 2rem 0;
  max-width: 860px;
  width: 100%;
  padding: 0 0.5rem;
  box-sizing: border-box;
}

/* ====== WATCH CARD ====== */
.watch-card {
  flex: 0 0 400px;
  display: grid;
  grid-template-columns: 58% 42%;
  min-width: 350px;
  min-height: 300px;
  width: 370px;
  height: 300px;
  max-width: 370px;
  max-height: 300px;
  border-radius: 22px;
  background: var(--card-bg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 10px #0001;
  margin: 0 auto;
}
.watch-card-left {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding-right: 0px;
}
.watch-icon {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  background: url('img/watches-w-logo/watch-w-logo1.png') no-repeat center/cover;
  border-radius: 0%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: 310px;
  min-width: 170px;
  position: relative;
}
.logo-img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  margin-left: 0.3em;
  border-radius: 8px;
  background: #fff2;
  box-shadow: 0 1px 6px #0002;
  display: flex;
  align-items: center;
  justify-content: center;
}
.watch-face-inner {
  width: 100%;
  height: 100%;
  position: relative;
}
.watch-am {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.watch-digit-img {
  height: 53px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px #0007);
  vertical-align: middle;
  margin-left: -2.5px;
  margin-right: -2.5px;
}
.watch-divider-img {
  width: 20px;
  min-width: 13px;
  max-width: 22px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 3px #0007);
}
.watch-ampm-img {
  width: 44px;
  height: 28px;
  object-fit: contain;
}
.watch-digits {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: row;
  gap: 0px;
  width: auto;
  justify-content: center;
  pointer-events: none;
}

/* ====== WATCH CARD RIGHT ====== */
.watch-card-right {
  position: relative;
  min-height: 100%;
  width: 100%;
  height: 100%;
}
.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  right: 1.2rem;
  z-index: 1;
}
.city-label {
  right: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.12em;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: normal;
  margin-top: 18px;
  margin-right: 20px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.city-flag {
  font-size: 1.2em;
  margin-right: 0.22em;
}
.city-name {
  font-weight: 700;
  letter-spacing: 0.01em;
}
.daynight-icon {
  position: absolute;
  top: 50%;
  right: 5.4rem;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 2px #0008);
  z-index: 2;
}
.remove-watch {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.85em;
  color: #fff;
  opacity: 0.85;
  cursor: pointer;
  transition: color 0.18s;
  line-height: 1;
  padding: 0.09em 0.3em;
  display: flex;
  align-items: center;
  z-index: 2;
}
.remove-watch img {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
  filter: brightness(0.87) grayscale(0.2);
  transition: filter 0.18s;
}
.remove-watch:hover img {
  filter: brightness(1.15) drop-shadow(0 0 4px #ff6b6b);
}
.change-watch {
  position: absolute;
  right: 1.2rem;
  bottom: 1.25rem;
  color: var(--accent);
  cursor: pointer;
  font-size: 1.09rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
  align-self: flex-start;
  z-index: 1;
}

/* ====== BUTTONS & PHOTO ====== */
#share-btn {
  background: var(--btn-bg);
  color: #fff;
  border-radius: 13px;
  padding: 0.75rem 2rem;
  margin-bottom: 1.5rem;
  border: none;
  font-size: 1.15rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  margin: 0 auto 1.5rem auto;
  justify-content: center;
}
.add-watch-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.2rem auto 0 auto;
  background: var(--btn-bg);
  border-radius: 16px;
  width: 62px;
  height: 62px;
  font-size: 2.3rem;
  color: var(--accent);
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 6px #0003;
  transition: background 0.13s;
}
.add-watch-btn:hover { background: #292727; }
.watch-sun { font-size: 1.3rem; margin-right: 0.4em; }
.watch-moon { font-size: 1.2rem; margin-right: 0.4em; }

.main-photo {
  display: flex;
  justify-content: center;
  margin: 2rem auto 0 auto;
  max-width: 330px;
  width: 100%;
}
.main-photo img {
  width: 100%;
  border-radius: 12px;
  opacity: 0.88;
  max-width: 300px;
}

/* ====== SWISS FLAG COMPONENT ====== */
.swiss-flag {
  display: inline-block;
  width: 23px;
  height: 23px;
  vertical-align: middle;
  margin-left: 0.3em;
  background: url('https://upload.wikimedia.org/wikipedia/commons/f/f3/Flag_of_Switzerland.svg') no-repeat center/cover;
  border-radius: 4px;
}

/* ====== WATCH SELECTOR PAGE/OVERLAY ====== */
.watch-selector-page {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 3000;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 80px;
  animation: fadeIn 0.25s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.watch-back-btn {
  position: absolute;
  top: 24px;
  left: 22px;
  background: var(--btn-bg);
  color: #fff;
  border: none;
  font-size: 1.14rem;
  font-weight: 600;
  padding: 9px 24px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px #0002;
  z-index: 99;
  transition: background 0.14s;
}
.watch-back-btn:hover { background: #2a2826; }
.selector-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 96vw;
  max-width: 820px;
}
.selector-content h2 {
  margin-top: 16px;
  font-weight: 400;
  letter-spacing: 0.01em;
  font-size: 1.21rem;
}
.crafted-large {
  font-size: 2.8rem;
  color: #fff;
  text-align: center;
  margin: 24px 0 0 0;
  letter-spacing: 0.04em;
}
.crafted-large .swiss-flag {
  margin-left: 0.7em;
  width: 29px;
  height: 29px;
  vertical-align: middle;
}
.selector-watches {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 34px 24px;
  margin: 32px 0 0 0;
  justify-content: center;
}
.selector-logo-img {
  display: inline-block;
  vertical-align: middle;
  width: 146px;
  margin-left: 0.4em;
  border-radius: 8px;
  box-shadow: 0 1px 8px #0002;
  padding-bottom: 10px;
}
.selector-watches .watch-opt[data-style="watch-1"] img {
  width: 150px; /* or match the size of the others */
  max-width: 90%;
  height: auto;
}
.watch-opt {
  background: #232220;
  border-radius: 22px;
  padding: 22px 20px 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 310px;
  min-height: 210px;
  cursor: pointer;
  position: relative;
  box-shadow: 0 2px 9px #0002;
  transition: box-shadow 0.17s, transform 0.12s;
}
.watch-opt.selected,
.watch-opt:hover {
  box-shadow: 0 2px 18px #ffa72633, 0 1.5px 10px #0003;
  transform: translateY(-4px) scale(1.027);
}
.watch-opt img {
  width: 120px;
  height: auto;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 1px 8px #0005);
}
.watch-opt-label {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
  position: absolute;
  right: 19px;
  bottom: 17px;
  letter-spacing: 0.01em;
  background: none;
  border-radius: 7px;
  padding: 0 7px;
}
.watch-opt.selected .watch-opt-label {
  color: #fff;
  background: none;
  font-size: 1.07rem;
  right: 19px;
  bottom: 17px;
}

/* Responsive: stack selector watches on mobile */
@media (max-width: 900px) {
  .selector-watches {
    gap: 24px 8px;
  }
  .watch-opt {
    min-width: 220px;
    max-width: 95vw;
    padding: 16px 6vw 13px 6vw;
  }
  .watch-opt img {
    width: 84px;
  }
}

/* ====== RESPONSIVE LAYOUT ====== */
/* Desktop: 2 cards per row */
@media (min-width: 861px) {
  .watches-list {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 860px;
    justify-content: center;
    overflow-x: visible;
  }
  .watch-card {
    flex: 0 0 400px;
    width: 370px;
    margin: 0;
  }
}
/* Tablet & mobile: stack cards vertically (1 per row) */
@media (max-width: 860px) {
  .watches-list {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2rem 0;
    max-width: 100vw;
    overflow-x: visible;
    padding-bottom: 0.5rem;
  }
  .watch-card {
    min-width: 400px;
    width: 400px;
    max-width: 98vw;
    margin: 0 auto;
  }
  main {
    max-width: 99vw;
    padding: 0.5rem;
  }
}
@media (max-width: 440px) {
  .watch-card, .watch-card-left, .watch-card-right {
    min-width: 320px !important;
    width: 320px !important;
    max-width: 98vw !important;
    height: 220px !important;
    max-height: 220px !important;
  }
  .side-drawer {
    width: 91vw;
    min-width: 0;
    padding-top: 10px;
  }
  .side-logo img {
    width: 40px;
  }
  .close-drawer {
    top: 12px;
    left: 10px;
    font-size: 1.7rem;
  }
  .side-nav {
    gap: 22px;
    margin-top: 17px;
    padding-left: 21px;
  }
}
