/* Reset & body */
* { box-sizing: border-box; margin:0; padding:0; }
html,body { height:100%; }
body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size:14px;
  background:#fff;
  color:#000;
  -webkit-font-smoothing:antialiased;
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #000;
}
.nav-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 40px;
}

/* left & right navs */
.nav-left, .nav-right {
  display:flex;
  align-items:center;
  gap:24px;
  list-style:none;
}
.nav-left a, .nav-right a, .drop-toggle {
  text-decoration:none;
  color:#000;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:0.6px;
}

.nav-right {
  justify-content: flex-end; /* push items to the far right of its grid cell */
  margin-left: auto;         /* ensures it hugs the right edge */
}

/* logo */
.logo img { display:block; height:20px; margin:0 auto; }

/* dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  display:none;
  position:absolute;
  left:0;
  top: calc(100% + 6px);
  background:#fff;
  border:1px solid #000;
  min-width:170px;
  z-index:1200;
}
.dropdown-menu li { border-bottom:1px solid #000; }
.dropdown-menu li:last-child { border-bottom:none; }
.dropdown-menu a {
  display:block;
  padding:10px 12px;
  text-decoration:none;
  color:#000;
  font-size:12px;
  text-transform:none;
}
.dropdown:hover .dropdown-menu { display:block; }

/* search input */
.search {
  border:1px solid #000;
  padding:6px 10px;
  font-size:12px;
  text-transform:uppercase;
}

/* Controls area (breadcrumb / count / buttons) */
.controls {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 40px;
  border-bottom:1px solid #000;
}
.controls-left { display:flex; gap:18px; align-items:center; }
.crumb { font-size:12px; text-transform:uppercase; color:#000; letter-spacing:0.6px; }
.count { font-size:12px; color:#000; opacity:0.8; }

/* buttons */
.buttons button {
  border:1px solid #000;
  background:none;
  padding:6px 10px;
  font-size:12px;
  text-transform:uppercase;
  cursor:pointer;
  margin-left:8px;
}

/* PRODUCTS GRID
   We use a grid-outline technique: grid container has top & left borders,
   each card has right & bottom borders to keep consistent 1px lines.
*/
.products { padding:0; }
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0; /* lines are handled by borders */
  border-left: 1px solid #000;
  border-top: 1px solid #000;
}

/* product card */
.product-card {
  display:block;
  text-align:center;
  padding:18px;
  border-right:1px solid #000;
  border-bottom:1px solid #000;
  text-decoration:none;
  color:inherit;
}
.product-card img {
  width:100%;
  max-width:360px;
  height:auto;
  display:block;
  margin: 0 auto 12px;
  object-fit:cover;
}
.product-card h3 {
  font-size:13px;
  text-transform:uppercase;
  font-weight:400;
  margin-bottom:6px;
  letter-spacing:0.6px;
}
.product-card p { font-size:12px; margin:4px 0; color:#333; }

/* price weight */
.product-card .price { font-weight:600; color:#000; margin-top:6px; }

/* subtle hover */
.product-card:hover { background:#fff; }
.product-card img:hover { transform: none; }

/* responsive: stack to 2 columns below 900px, 1 column below 520px */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .nav-wrap { grid-template-columns: 1fr auto; }
  .nav-right { display:none; }
  .grid { grid-template-columns: 1fr; }
}
/* Sidebar */
.sidebar {
  position: fixed;
  top: -1;
  left: -100%;
  height: 100%;
  width: 33%; /* 1/3 of screen on desktop */
  max-width: 360px;
  background: #fff;
  border-right: 1px solid #000;
  padding: 20px;
  z-index: 2000;
  transition: left 0.3s ease;
}
.sidebar ul {
  list-style: none;
  margin-top: 40px;
}
.sidebar li {
  margin-bottom: 16px;
}
.sidebar a {
  text-decoration: none;
  color: #000;
  font-size: 14px;
  text-transform: uppercase;
}
.sidebar .close-btn {
  font-size: 28px;
  border: none;
  background: none;
  cursor: pointer;
  position: absolute;
  top: 14px;
  right: 20px;
}

/* Overlay */
#sidebarOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 1500;
}

/* Open state */
.sidebar.open { left: 0; }
#sidebarOverlay.show { display: block; }

/* Full screen on mobile */
@media (max-width: 520px) {
  .sidebar { width: 100%; max-width: none; }
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: -100%;
  height: 100%;
  width: 33%;
  max-width: 360px;
  background: #fff;
  border-right: 1px solid #000;
  padding: 20px;
  z-index: 2000;
  transition: left 0.3s ease;
}
.sidebar ul {
  list-style: none;
  margin-top: 40px;
}
.sidebar li {
  margin-bottom: 16px;
}
.sidebar a {
  text-decoration: none;
  color: #000;
  font-size: 14px;
  text-transform: uppercase;
}
.sidebar .close-btn {
  font-size: 28px;
  border: none;
  background: none;
  cursor: pointer;
  position: absolute;
  top: 14px;
  right: 20px;
}

/* Overlay */
#sidebarOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 1500;
}
.sidebar.open { left: 0; }
#sidebarOverlay.show { display: block; }

/* Full screen on mobile */
@media (max-width: 520px) {
  .sidebar { width: 100%; max-width: none; }
}

/* controls search */
.controls-search {
  border: 1px solid #000;
  padding: 6px 10px;
  font-size: 12px;
  text-transform: uppercase;
  width: 200px;
}
@media (max-width: 520px) {
  .controls-search { width: 100%; }
}
/* ========== SIDEBAR + OVERLAY ========== */
.sidebar {
  position: fixed;
  left: -100%;
  /* top will be set by JS so it sits below header + controls */
  height: calc(100%); /* JS will adjust height to fit below controls */
  width: 33%;
  max-width: 365px;
  background: #fff;
  border-right: 1px solid #000;
  padding: 20px;
  z-index: 2100; /* above overlay and page content */
  transition: left 0.28s ease;
  overflow-y: auto;
}
.sidebar ul {
  list-style: none;
  margin-top: 5px;
  padding-left: 0;
}
.sidebar li {
  margin-bottom: 16px;
}
.sidebar a {
  text-decoration: none;
  color: #000;
  font-size: 14px;
  text-transform: uppercase;
  display: block;
  padding: 8px 0;
}
.sidebar .close-btn {
  font-size: 28px;
  border: none;
  background: none;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 14px;
}

/* overlay that only covers the products area (position/top is set by JS) */
#sidebarOverlay {
  position: fixed;
  left: 0;
  width: 100%;
  background: rgba(0,0,0,0.35);
  display: none;
  z-index: 2000; /* below sidebar (2100) */
}

/* open state */
.sidebar.open { left: 0; }
#sidebarOverlay.show { display: block; }

/* Full screen on small screens */
@media (max-width: 520px) {
  .sidebar { width: 100%; max-width: none; }
}

/* controls search (when sidebar is open we replace breadcrumb with this) */
.controls-search {
  border: 1px solid #000;
  padding: 6px 10px;
  font-size: 12px;
  text-transform: uppercase;
  width: 220px;
  display: block;
}
@media (max-width: 520px) {
  .controls-search { width: 100%; }
}

/* ensure header/controls visually remain above overlay */
.navbar { position: sticky; top: 0; z-index: 3000; } /* keep nav on top */
.controls { position: relative; z-index: 3000; }      /* keep controls on top */

.card-img-wrap {
  position: relative;
}
.card-img-wrap img {
  width: 100%;
  display: block;
}
.card-img-wrap button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: 1px solid #000;
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: none; /* hidden by default */
}
.card-img-wrap .img-prev { left: 8px; }
.card-img-wrap .img-next { right: 8px; }
.product-card:hover .card-img-wrap button {
  display: block; /* show arrows only on hover */
}

