* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Updated Body: stacks top-nav and main-wrapper vertically */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #ffffff;
  color: #111827;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* NEW: Invisible white header with logo on the far left */
.top-nav {
  width: 100%;
  background-color: #ffffff;
  padding: 24px 36px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.logo {
  font-family: 'Lora', serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: #111827;
  text-decoration: none;
}

.logo img {
  height: 28px;
  width: auto;
  display: block;
}

/* NEW: Centers your container in the remaining viewport space */
.main-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 20px 60px 20px;
}

header {
  text-align: center;
  max-width: 500px;
  margin: 0 auto 40px auto; /* Centers the header block and adds space above the grid */
  padding: 0 20px;
}

header h1 {
  font-family: 'Lora', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 2.2rem;
  color: #111827;
  margin-bottom: 12px;
}

header .description {
  font-size: 0.95rem;
  color: #6b7280;
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: 680px;
}

/* 2x2 Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 28px;
}

.product-card {
  display: flex;
  flex-direction: column;
}

/* Image container with subtle zoom effect */
.image-wrapper {
  background-color: #f9fafb;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 14px;
  aspect-ratio: 4 / 4.5;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.product-card:hover .image-wrapper img {
  transform: scale(1.04);
}

/* Aligns title on left and price on right */
.product-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.product-info h2 {
  font-size: 1rem;
  font-weight: 500;
  color: #111827;
}

.price {
  font-size: 0.95rem;
  font-weight: 400;
  color: #6b7280;
}

/* Minimalist outline button */
.buy-btn {
  background-color: transparent;
  color: #111827;
  border: 1px solid #d1d5db;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
}

.buy-btn:hover {
  border-color: #111827;
  background-color: #111827;
  color: #ffffff;
}

.buy-btn.added {
  border-color: #111827;
  background-color: #111827;
  color: #ffffff;
}

@media (max-width: 520px) {
  .top-nav {
    padding: 20px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Burger Menu Button Styling */
.burger-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  padding: 0;
}

/* Pushes the logo to the left and burger to the far right */
.top-nav {
  width: 100%;
  background-color: #ffffff;
  padding: 24px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Ensures logo is left, burger is right */
}

.burger-btn {
  position: relative;
  z-index: 1001; /* Keeps it visible above the drawer */
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  padding: 0;
  flex-shrink: 0;
}

.burger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #111827; /* Dark charcoal so it's visible on white */
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Animate burger lines into an 'X' when open */
.burger-btn.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger-btn.active span:nth-child(2) {
  opacity: 0;
}

.burger-btn.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Subtle backdrop overlay */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(17, 24, 39, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* Slide-out drawer panel */
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 80vw;
  height: 100vh;
  background-color: #ffffff;
  padding: 96px 36px 36px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.04);
}

.nav-drawer.open {
  transform: translateX(0);
}

.drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drawer-links a {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 1.45rem;
  color: #111827;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.drawer-links a:hover {
  opacity: 0.55;
}

.drawer-footer p {
  font-size: 0.85rem;
  color: #6b7280;
  letter-spacing: 0.04em;
}



/* Removes link styling from product cards */
.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Product Detail Page Split Layout */
.product-detail-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

.product-container {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.product-image-section img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  background-color: #f9fafb;
  display: block;
}

.breadcrumb {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 16px;
}

.breadcrumb a {
  color: #6b7280;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #111827;
}

.product-details-section h1 {
  font-family: 'Lora', serif;
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.product-price {
  font-size: 1.2rem;
  color: #4b5563;
  margin-bottom: 20px;
}

.product-description {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Size Selector */
.size-selector-group {
  margin-bottom: 24px;
}

.size-selector-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.size-options {
  display: flex;
  gap: 10px;
}

.size-btn {
  background: transparent;
  border: 1px solid #d1d5db;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.size-btn:hover, .size-btn.active {
  border-color: #111827;
  background-color: #111827;
  color: #ffffff;
}

.product-page-btn {
  padding: 14px 20px;
  font-size: 1rem;
  margin-bottom: 24px;
}

.additional-info {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  color: #6b7280;
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
  .product-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}