/* Base */
html {
  height: 100%;
}


body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #111;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 12px 20px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  height: 40px;
  width: auto;
}

/* Layout */
.layout {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Categories */
.categories-tabs {
  display: flex;
  overflow-x: auto;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e5e5;
  background: #fafafa;
}

.categories-tabs li {
  list-style: none;
  white-space: nowrap;
  cursor: pointer;
  padding: 6px 10px;
  transition: all 0.2s ease;
}

.categories-tabs li:hover {
  font-weight: 600;
  transform: scale(1.05);
  color: #000;
}

.categories-tabs li.active {
  font-weight: 700;
  color: #000;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}

/* Products */
.products-section {
  padding: 20px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  align-items: start;
}

/* FIX: match script.js output */
.card {
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  overflow: hidden; /* prevents zoom overflow */
  transition: transform 0.25s ease;
}

/* Image sizing – THIS STOPS OVERLAP */
.card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  display: block;
  margin-bottom: 10px;
}

/* Hover zoom (restored, safe) */
.card:hover {
  transform: scale(1.10);
}

/* Product name */
.card p {
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
}

/* Footer */
.site-footer {
  position: sticky;
  bottom: 0;
  z-index: 1000;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  margin-top: 60px;
  padding: 20px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-logo {
  height: 36px;
}

.contact-info {
  display: flex;
  gap: 20px;
  align-items: center;
}

.contact-info .icon {
  font-size: 20px;
  text-decoration: none;
  color: inherit;
}

/* Desktop layout */
@media (min-width: 768px) {
  .layout {
    flex-direction: row;
  }

  .categories-tabs {
    flex-direction: column;
    width: 240px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    border-right: 1px solid #e5e5e5;
    border-bottom: none;
    position: sticky;
    top: 80px; /* height of header */
  }

  .products-section {
    flex: 1;
  }

  .contact-info {
    gap: 24px;
  }
}

/* About page */
.about-container {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
  flex: 1;
}

.about-container h2 {
  margin-bottom: 16px;
}

.about-container p {
  line-height: 1.6;
  margin-bottom: 16px;
}

.cta-button {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 20px;
  background: #111;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
}

/* Image modal */
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.image-modal.hidden {
  display: none;
}

.modal-image-wrapper {
  position: relative;
  display: inline-block;
  max-width: 90vw;
  max-height: 90vh;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

#modal-image {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 6px;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  top: 50%;
  transform: translateY(-50%);
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  background: #fff;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  text-align: center;
}

.modal-close:hover {
  background: #f0f0f0;
}

.modal-title {
  margin-top: 10px;
  font-size: 14px;
  color: #555;
  text-align: center;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  padding: 4px 10px;
  border-radius: 12px;
  pointer-events: none;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;

  background: rgba(255, 255, 255, 0.85);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-prev {
  left: -48px;
}

.modal-next {
  right: -48px;
}

.modal-nav:hover {
  background: #fff;
}

/* --- Modal arrow fix for mobile --- */
@media (max-width: 768px) {
  .modal-prev,
  .modal-next {
    left: auto;
    right: auto;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .modal-prev {
    left: 8px;
  }

  .modal-next {
    right: 8px;
  }
}

.modal-prev:hover,
.modal-next:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* Hover state */
.sidebar li:hover {
  font-weight: 600;
  transform: scale(1.05);
}

.sidebar li {
  transition: all 0.2s ease;
}

/* Active category */
.sidebar li.active {
  font-weight: 700;
  transform: scale(1.08);
  color: #000;
  background: rgba(0,0,0,0.04);
  border-radius: 6px;
}

.contact-info a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;          /* uniform clickable area */
  height: 36px;
  margin-left: 12px;   /* spacing between icons */
}

.contact-info a img {
  width: 22px;         /* actual icon size */
  height: 22px;
  object-fit: contain;
}

/* --- Keep Explore Catalogue button always visible --- */
.about-cta {
  position: sticky;
  bottom: 16px;
  margin-top: 24px;
  padding-top: 12px;
  background: linear-gradient(
    to top,
    #ffffff 60%,
    rgba(255, 255, 255, 0)
  );
  z-index: 10;
}


/* Center on mobile, left-aligned on desktop */
@media (max-width: 768px) {
  .about-cta {
    display: flex;
    justify-content: center;
  }
}



