/* General Styles */
body {
  font-family: 'Roboto', sans-serif;
  background-color: #f9fafb;
  color: #333;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

/* Container to control max width */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar Styling */
.navbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #ffffff;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Top Row Styling */
.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
}

/* Logo Styling */
.logo {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(20px, 5vw, 28px); /* Responsive font size */
  font-weight: bold;
  color: #000;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
  text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.4);
}

/* Search Bar Styling */
.search-bar {
  flex-grow: 1;
  max-width: 350px;
  margin: 0 15px;
}

.search-bar input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
  color: #333;
  transition: all 0.3s ease;
}

.search-bar input::placeholder {
  color: #aaa;
}

.search-bar input:focus {
  border-color: #ff6f61;
  box-shadow: 0 0 8px rgba(255, 111, 97, 0.3);
}

/* Icons Container Styling */
.icons {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px); /* Responsive gap */
}

/* Icon Styling */
.icon img {
  width: clamp(20px, 4vw, 24px); /* Responsive icon size */
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.icon:hover {
  transform: scale(1.1);
  color: #ff6f61;
  cursor: pointer;
}

/* Cart Icon Specific Styling */
.cart {
  position: relative;
  font-size: clamp(20px, 4vw, 24px);
}

.cart span {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: #ff6f61;
  color: white;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 50%;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Dropdown Menu Styling */
.user-profile {
  position: relative;
  font-size: clamp(20px, 4vw, 24px);
}

.profile-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(20px, 4vw, 24px);
  height: auto;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  top: -2px;
}

.profile-button img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.profile-button img:hover {
  transform: scale(1.1);
  color: #ff6f61;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 1000;
  width: 180px;
  max-width: 100vw; /* Prevent overflow */
}

.user-profile:focus-within .dropdown {
  display: block;
}

/* Dropdown Links Styling */
.dropdown a,
.dropdown button {
  display: block;
  width: 100%;
  padding: 12px 16px;
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dropdown a:hover,
.dropdown button:hover {
  background-color: #f0f0f0;
}

/* Menu Container Styling */
.menu-container {
  background-color: #ffffff;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.05);
  width: 100%;
}

/* Menu Items Styling */
.menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
  gap: clamp(10px, 2vw, 24px);
  padding: 12px 20px;
  font-size: clamp(14px, 3vw, 16px);
  max-width: 1200px;
  margin: 0 auto;
}

.menu a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 5px 0;
}

.menu a:hover {
  color: #ff6f61;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  cursor: pointer;
  order: 2;
  background: none;
  border: none;
  font-size: 24px;
}

/* Footer Styles */
.footer {
  background-color: #000;
  color: #ecf0f1;
  padding: clamp(20px, 5vw, 40px) clamp(10px, 3vw, 20px);
  font-family: Arial, sans-serif;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: flex-start;
  width: 100%;
}

.footer .column {
  flex: 1;
  min-width: clamp(150px, 30%, 200px);
  margin: 10px;
  padding: 0 10px;
}

.footer h4 {
  color: #3498db;
  font-size: clamp(1em, 3vw, 1.2em);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.footer a {
  color: #ecf0f1;
  text-decoration: none;
  line-height: 2;
  transition: color 0.3s ease;
  display: inline-block;
  margin-right: 15px;
}

.footer a:hover {
  color: #3498db;
}

.footer p {
  line-height: 1.6;
  margin: 5px 0;
  display: inline-block;
  margin-right: 15px;
  font-size: clamp(0.9em, 2vw, 1em);
}

.footer .bottom-row {
  width: 100%;
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #34495e;
}

.footer .bottom-row p {
  margin: 0;
  font-size: clamp(0.8em, 2vw, 0.9em);
}

.footer strong {
  color: #3498db;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  align-items: center;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  color: #666;
  padding: 10px 0;
}

.breadcrumb a {
  color: #1c8b8b;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: #156666;
}

.breadcrumb .separator {
  margin: 0 8px;
  color: #999;
  font-size: clamp(0.7rem, 2vw, 0.8rem);
}

.breadcrumb a:last-of-type {
  color: #666;
  pointer-events: none;
}

/* Ensure images are responsive throughout */
img {
  max-width: 100%;
  height: auto;
}

/* Make sure tables don't overflow on small screens */
table {
  width: 100%;
  overflow-x: auto;
  display: block;
}

/* Media Queries for Responsive Design */
@media (max-width: 992px) {
  .search-bar {
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  .top-row {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  
  .logo {
    order: 1;
  }
  
  .icons {
    order: 2;
  }
  
  .search-bar {
    order: 3;
    max-width: 100%;
    margin: 10px 0 0 0;
    flex-basis: 100%;
  }
  
  .footer .column {
    flex-basis: 45%;
  }
}

@media (max-width: 576px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .menu {
    flex-direction: column;
    align-items: center;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  .menu.active {
    max-height: 300px;
    padding: 10px 0;
  }
  
  .menu a {
    width: 100%;
    text-align: center;
    padding: 12px 0;
  }
  
  .footer .column {
    flex-basis: 100%;
  }
}