:root {
    --primary-color: hsl(0, 0%, 0%);
    --secondary-color: rgb(255, 255, 255);
    --primary-text-color: hsl(0, 0%, 0%);
    --secondary-text-color: hsl(41, 48%, 50%);
    --navbar-height: 50px;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    /* overflow-x: hidden; */
    /* font-family: Arial, sans-serif; */
    background-color: var(--secondary-color);
    max-width: 100%;
    /* overflow: hidden; */
    box-sizing: border-box;
    padding-top: var(--navbar-height); /*Ensure content is not hidden behind the navbar*/
}
html {
    scroll-behavior: smooth;
}

html.menu-active,
body.menu-active {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* .navbar {
    background-color: rgba(255, 255, 255, 0.7);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    backdrop-filter: blur(4px);
} */

.navbar {
    display: flex;
    height: var(--navbar-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff7a;
    backdrop-filter: blur(4px);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    transition: backdrop-filter 0.3s ease;
    /* border-bottom: 3px solid #000000; */
    z-index: 1000;
}

.navbar a {
    cursor: pointer;
}

.navbar-left {
    display: flex; /* Ensure it's a flex container */
    align-items: center; /* Center items vertically */
    height: 100%;
    flex-shrink: 0; /* Prevent shrinking */
}

.navbar-left a {
    color: rgb(0, 0, 0);
    text-decoration: none;
    padding: 0 15px; /* Adjust horizontal padding */
    display: flex; /* Make <a> a flex container */
    align-items: center; /* Center text vertically */
    height: 100%; /* Match the height of the navbar */
}

.navbar-right {
    display: flex; /* Ensure it's a flex container */
    align-items: center; /* Center items vertically */
    height: 100%;
}

.navbar-left .home-button {
    font-weight: bold;
    font-size: 30px;
}

.navbar-center{
    display: flex; /* Ensure it's a flex container */
    align-items: center; /* Center items vertically */
    height: 100%;
    flex-grow: 1; /* Allow it to grow and take available space */
    justify-content: center; /* Center items horizontally */
    margin-right: 20px; /* Add some space to the right */
}

.navbar-center a {
    display: flex; /* Ensure <a> is a flex container */
    justify-content: center; /* Center text horizontally */
    text-align: center; /* Align text to the center */
    color: #000000;
    font-weight: bold;
    align-items: center;
}

.navbar-right a {
    color: rgb(65, 65, 65);
    text-decoration: none;
    padding: 0 15px; /* Adjust horizontal padding */
    display: flex; /* Make <a> a flex container */
    align-items: center; /* Center text vertically */
    height: 100%; /* Match the height of the navbar */
    transition: background-color 0.3s;
}

.navbar-right a:hover {
    color: #000000;
    transform: scale(1.1); /* Scale the text */
    transition: color 0.3s ease, transform 0.3s ease; /* Smooth transition for color and scaling */
    display: inline-flex; /* Ensure scaling doesn't affect layout */
    align-items: center; /* Keep the text vertically centered */
    justify-content: center; /* Center horizontally if needed */
}

.hamburger-button {
    display: none;
    margin-right: 20px;
    font-size: 1.5em;
    cursor: pointer;
}

.hamburger-button img {
    width: 30px;
    height: 30px;
}

/* Mobile Menu Styles */
.mobile-menu {
    display: flex;
    visibility: hidden; /* Hidden by default */
    opacity: 0; /* Fully transparent */
    flex-direction: column;
    position: fixed;
    top: -100%; /* Start off-screen */
    left: 0; /* Align to the left edge of the viewport */
    right: 0; /* Align to the right edge of the viewport */
    width: 100%; /* Ensure full width */
    background-color: var(--secondary-color);
    padding: 20px;
    border-bottom: 3px solid #000000;
    transition: top 0.3s ease, opacity 0.3s ease, visibility 0.3s ease; /* Smooth slide-in animation */
    z-index: 4; /* Ensure it's below the navbar */
    box-sizing: border-box; /* Include padding and border in the element's total width */
}

.mobile-menu.active {
    visibility: visible; /* Make the menu visible */
    opacity: 1; /* Fully opaque */
    top: calc(var(--navbar-height) - 10px); /* Adjust this value to match the height of your navbar */
}

.mobile-menu a {
    text-decoration: none;
    color: var(--primary-text-color);
    font-size: 1.1em;
    padding: 10px 0;
    border-bottom: 1px solid var(--primary-color); /* Optional: Add separators */
}

/* Overlay Styles */
.overlay {
    display: none;
    opacity: 0;
    position: fixed;
    top: calc(var(--navbar-height) - 10px);
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
    z-index: 3;
}

.overlay.active {
    opacity: 1;
    display: block;
}

@media (max-width: 768px) {
    .navbar-right {
        display: none;
        align-items: center; /* Center items vertically */
        height: 100%;
    }

    .navbar-right.active {
        display: flex;
    }

    .hamburger-button {
        display: block;
    }
}


/* Rest of the site */
/* Homepage (index) */
.banner-bg {
    background-size: cover;
    background-position: center;
    height: 50vh; /* Set height to 10% of viewport */
    width: 100%;
    position: relative;
    display: block; /* Remove flex if you don't want it to center content */
    overflow: hidden; /* Ensures content is cut off if needed */
}

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(12px, 4vw, 24px);
  padding: 20px;
  justify-content: center;
  max-width: 1500px;
  margin: 0 auto; /*Centering element*/
}

a.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card {
  width: 100%;
  /* max-width: 320px; */
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  margin: 0 auto; /* center smaller cards inside grid cell */
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.product-link {
  text-decoration: none;
  color: inherit;
}

.product-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.product-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem 10px;
  border-bottom: 1px solid #eee;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  text-align: left;
}

.product-price {
  font-size: 1rem;
  color: #666;
  margin: 0;
  text-align: right;
}

.add-to-cart-form {
  padding-top: 1rem;
  padding-right: 1rem;
  padding-bottom: 1rem;
  padding-left: 0;
}

.add-to-cart-button {
  background-color: #111;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.add-to-cart-button:hover {
  background-color: #333;
}
