header {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 8px 20px; /* Slightly increase top-bottom padding for balance */
    border-bottom: 2px solid #ddd; /* Use a subtle grey for a modern touch */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    justify-content: space-between;
    z-index: 1000;
    height: 50px; /* Reduce height for a sleeker look */
    pointer-events: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Add a subtle shadow for depth */
    overflow: hidden; /* Prevent scrolling */
    border-bottom: 0.3px solid;
}
nav ul {
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
}

nav ul li {
    padding: 5px 10px; /* Adjust space around nav links */
}

nav a {
    font-size: 16px; /* Adjust font size */
    padding: 5px 8px; /* Reduce padding inside links */
    font-weight: 300; /* Thin font for a sleek look */
    font-family: 'Poppins', sans-serif; /* Premium modern font */
    text-transform: uppercase; /* Stylish uppercase text */
    letter-spacing: 1px; /* Slight letter spacing for elegance */
}

/* Navigation links (Desktop View) */
.nav-links {
    display: flex;
    gap: 20px;
    z-index: 1001;
    position: static;
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        margin-top: 50px;
        margin-left: 130px;
        border-radius: 5px;
        width: 50%;
        height: 50vh; /* Full height */
        background-color: rgba(0, 0, 0, 0.9); /* Dark background for contrast */
        display: none;
        flex-direction: column;
        align-items: center;
        padding: 50px 0;
        z-index: 2000; /* Ensure it's above everything */
        overflow: hidden; /* Prevents scrolling */
        max-height: 100%; /* Ensures it doesn’t expand beyond its content */
    }

    .nav-links.active {
        display: flex;
    }

    /* Prevent scrolling when the menu is open */
    body.menu-open {
        overflow: hidden;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        top: 50%;
        right: 20px; /* Adjust for better placement */
        transform: translateY(-50%);
        font-size: 24px;
        background: none;
        border: none;
        color: black;
        cursor: pointer;
        z-index: 3000; /* Ensure it's above everything */
        overflow: hidden; /* Prevents scrolling */
        max-height: 100%; /* Ensures it doesn’t expand beyond its content */
    }
}

@media (min-width: 769px) {
    .nav-links {
        display: flex !important; /* Forces menu to show on larger screens */
    }
}

/* Navigation Links */
.nav-links a {
    color: royalblue;
    display: block;
    padding: 10px;
    text-align: center;
    z-index: 1002;
    position: relative;
    font-weight: 300; /* Thin font */
    transition: color 0.3s ease-in-out; /* Smooth color transition */
}

/* Underline Animation */
.nav-links a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: black;
    transition: width 0.5s ease-in-out, left 0.5s ease-in-out; /* Slow-motion effect */
}
.logo-container .logo {
    width: 50px;
    border-radius: 5px;
    transition: transform 0.3s ease;
}
.nav-links a:hover {
    color: black; /* Darker color on hover */
}

.nav-links a:hover::after {
    width: 100%;
    left: 0;
}
.logo{
    max-width: 150px; 
    height: auto;
    margin-right: 10px;
}
.logo-container {
    display: flex;
    align-items: center;
}
a{
    text-decoration: none;
    padding: 20px;
    align-content: center;
    color: white;
    font-weight: 700;
}
a:hover{
     text-decoration: overline;
     animation-duration: 3ms;
     text-decoration-color:royalblue;
}
body.loaded {
    opacity: 1;
}
/* Quantity controls container */
.cart-items td {
    vertical-align: middle;
}

/* Quantity buttons */
.cart-items button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    padding: 5px 10px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

/* Quantity display */
.cart-items td:nth-child(3) {
    font-weight: bold;
    min-width: 120px;
    text-align: center;
}

/* Hover effects */
.cart-items button:hover {
    background-color: #e0e0e0;
}

/* Remove button specific styling */
.cart-items button[onclick*="removeItem"] {
    background-color: #ffebee;
    border-color: #ffcdd2;
    color: #c62828;
    margin-left: 10px;
}

.cart-items button[onclick*="removeItem"]:hover {
    background-color: #ffcdd2;
}

/* Quantity buttons specific styling */
.cart-items button[onclick*="changeQuantity"] {
    min-width: 30px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cart-items button {
        padding: 3px 6px;
        font-size: 12px;
        margin: 0 3px;
    }
    
    .cart-items td:nth-child(3) {
        min-width: 100px;
    }
}
/* Default state - hidden on larger screens */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #333; /* Change color to match your design */
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

/* Show only on small screens */
@media (max-width: 768px) { /* Adjust breakpoint as needed */
    .menu-toggle {
        display: block;
    }
    
    /* Hide regular nav links on mobile */
    .nav-links {
        display: none;
        position: absolute;
        top: 60px; /* Adjust based on your header height */
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    /* Show nav when menu is open */
    .nav-links.active {
        display: flex;
    }
}
.menu-toggle,
.back-button {
  -webkit-tap-highlight-color: transparent; /* Remove gray overlay on iOS/Android */
  -webkit-touch-callout: none;              /* Disable long-press menu on iOS */
  outline: none;                            /* Optional: remove focus outline */
}
.back-button {
    display: none; /* Hide by default */
    background: transparent;
    color: var(--primary-color);
    border: none;
    padding: 10px 15px;
    font-size: 1.6rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: fixed;
    top: 5px;
    right: 10px;
    z-index: 1000;
  }
  
  .back-button:hover {
    background: white;
  }
  
  /* Show on small screens */
  @media (max-width: 768px) {
    .back-button {
      display: block;
      size: 50px;
    }
  }
  .custom-cart-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    max-width: 400px;
    width: 90%;
  }
  
  .popup-content {
    position: relative;
  }
  
  .close-popup {
    position: absolute;
    top: -10px;
    right: -10px;
    cursor: pointer;
    font-size: 24px;
  }
  
  .popup-details {
    display: flex;
    gap: 15px;
    margin: 15px 0;
  }
  
  .popup-details img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
  }
  
  .popup-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
  }
  
  .popup-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  
  .popup-buttons button:first-child {
    background: #007bff;
    color: white;
  }
  
  .popup-buttons button:last-child {
    background: #f8f9fa;
    border: 1px solid #ddd;
  }
  
