html, body {
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  width: 100vw;
  max-width: 100vw;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}


:root {
  --primary: #F5F5F5;
  --secondary: #F5F7FA;
  --accent: #F76C5E;
  --text: #808080;
}


/* ---- General Styles ---- */
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--secondary);
  color: var(--text);
}

header {
  background: #282828;
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
}

.navbar-logo {
  font-size: 1.5rem;
  font-weight: normal;
  letter-spacing: 2px;
}

nav a {
  color: white;
  text-decoration: none;
  margin-left: 24px;
  font-size: 1rem;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--accent);
}

/* ---- Shop Layout ---- */
.shop-container {
    max-width: 1200px;
    margin: 38px auto;
    padding: 0 24px;
}

.main-title {
  font-size: 2.2rem;
  font-weight: bold;
  color: #0A2540;
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}


.shop-title {
  font-size: 2.2rem;
  font-weight: bold;
  color: #0A2540;
  text-align: center;
  margin-bottom: 28px;
}

/* ---- Products Grid & Card ---- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px; /* Tight gap */
  align-items: stretch;
}

.product-card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  padding: 18px 10px 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.15s, box-shadow 0.15s;
  min-width: 240px;
  max-width: 240px;
  min-height: 340px;
  max-height: 340px;
  height: 340px;
  margin: 0 auto;
  box-sizing: border-box;
}

.product-card:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 32px rgba(0,0,0,0.09);
}

.product-image {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
  background: #e6e6e6;
  margin-bottom: 12px;
  flex-shrink: 0;
}

/* Uniform text height for perfect line-up */
.product-name {
  font-size: 1.07rem;
  font-weight: bold;
  color: #0A2540;
  margin-bottom: 8px;
  text-align: center;
  min-height: 32px;
  max-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-desc {
  font-size: 0.98rem;
  color: #444;
  margin-bottom: 10px;
  text-align: center;
  min-height: 40px;
  max-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-price {
  color: var(--accent);
  font-size: 1.07rem;
  font-weight: bold;
  margin-bottom: 8px;
  min-height: 22px;
  max-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- View Details Link ---- */
.view-details-link {
  display: inline-block;
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.98rem;
  margin-bottom: 10px;
  margin-top: 2px;
  transition: color 0.18s;
}
.view-details-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ---- Buy Button ---- */
.buy-btn {
  background: #0A2540;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 24px;
  font-size: 0.98rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: auto;
  margin-bottom: 0;
  transition: background 0.18s;
}

.buy-btn:hover {
  background: var(--accent);
}

/* ---- Details Modal ---- */
#details-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(10,37,64,0.55);
  z-index: 999;
  align-items: center;
  justify-content: center;
}
#details-modal[style*="display: flex"] {
  display: flex !important;
}

#modal-content {
  background: white;
  border-radius: 14px;
  max-width: 430px;
  width: 95%;
  padding: 34px 20px 28px 20px;
  position: relative;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  text-align: center;
}
#modal-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 1px 6px #eee;
}
#modal-name {
  margin-top: 18px;
  font-size: 1.3rem;
  font-weight: bold;
  color: #0A2540;
}
#modal-shortdesc {
  font-size: 1rem;
  color: #444;
  margin: 12px 0;
}
#modal-price {
  color: var(--accent);
  font-size: 1.12rem;
  font-weight: bold;
  margin-bottom: 18px;
}
#modal-fulldesc {
  margin-top: 10px;
  font-size: 1rem;
  color: #333;
  text-align: left;
}
#details-modal button[onclick="closeDetails()"] {
  position: absolute;
  top: 8px;
  right: 14px;
  border: none;
  background: none;
  font-size: 2rem;
  color: #999;
  cursor: pointer;
}

footer {
  background: var(--primary);
  color: #F5F5F5;
  text-align: center;
  padding: 22px 0;
  margin-top: 48px;
  font-size: 1rem;
  letter-spacing: 1px;
}


/* Hamburger and Side Menu (mobile only) */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  height: 32px;
  width: 32px;
  margin-left: 12px;
  z-index: 1201;
}


.hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  margin: 4px 0;
  background: #fff;
  border-radius: 2px;
  transition: all 0.2s;
}

/* Side menu styles */
.side-menu {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 220px;
  height: 100vh;
  background: #282828;
  box-shadow: 3px 0 20px rgba(0,0,0,0.17);
  padding-top: 60px;
  z-index: 1200;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.22s;
}
.side-menu a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 1.25rem;
  padding: 16px 32px 16px 22px;
  width: 100%;
  transition: background 0.14s;
}
.side-menu a:hover {
  background: #333;
  color: var(--accent);
}
.side-menu .close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1300;
}
.side-menu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.28);
  z-index: 1100;
}
/* Desktop nav hidden on mobile, hamburger shows on mobile */
@media (max-width: 600px) {
  .navbar {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 8px;
  }
  .navbar-logo {
    font-size: 1.2rem;
  }
  nav a {
    font-size: 0.95rem;
    margin-left: 10px;
  }
}



/* Desktop nav hidden on mobile, hamburger shows on mobile */
@media (max-width: 600px) {
  .desktop-nav {
    display: none !important;
  }
  .hamburger {
    display: flex !important;
  }
  .side-menu {
    display: flex;
    transform: translateX(-100%);
  }
  .side-menu.open {
    transform: translateX(0);
  }
  .side-menu-overlay.open {
    display: block;
  }
}

/* ---- Responsive Styles ---- */
@media (max-width: 600px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 cards per row */
    gap: 6px;
  }
  .shop-title {
    font-size: 1.1rem;
  }
  .product-card {
    min-width: 130px;
    max-width: 160px;
    min-height: 280px;
    max-height: 320px;
    height: 280px;
    padding: 8px 1px;
  }
  .product-image {
    width: 54px;
    height: 54px;
  }

}

#qr-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(10,37,64,0.55);
  z-index: 1999;
  align-items: center;
  justify-content: center;
}
#qr-modal[style*="display: flex"] {
  display: flex !important;
}


