@font-face {
    font-family: 'Pacifico';
    src: url('/assets/fonts/Pacifico.ttf');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Times New Roman';
    src: url('/assets/fonts/TimesNewRoman.ttf');
    font-weight: normal;
    font-style: normal;
}


/* ======== User button (logged-in) — override .navbar-right a styles ======== */
a#user {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center;
}

a#user img {
    display: block;
    background: transparent;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* ======== Logout link (logged-in) — keep pill style but remove excess margin ======== */
a#logout {
    margin-right: 10px !important;
    margin-left: 0 !important;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-image: linear-gradient(to right, #1C2594 , #5BCAF3);
    color: #FFFAF0;
    box-shadow: 1px -15px 4px 17px rgba(0,0,0,0.53);
    -webkit-box-shadow: 1px -15px 4px 17px rgba(0,0,0,0.53);
    -moz-box-shadow: 1px -15px 4px 17px rgba(0,0,0,0.53);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    height: 65px;
}

.navbar-left,
.navbar-center,
.navbar-right {
    display: flex;
    align-items: center;
}

.navbar-left {
    flex: 1;
    gap: 10px;
}

.logo {
    aspect-ratio: auto;
    height: 40px;
    float: left;
    margin-left: 10px;
    margin-right: 10px;
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    transition: ease-in-out, 0.25s;
}

.brand:hover {
    color: #FFFAF0;
    text-shadow: 0 0 3px #FFFAF0;
}

.brand:not(:hover) {
    color: #FFFAF0;
    text-shadow: 0 0 0px #FFFAF0;
}

.brand-name {
    margin: 0;
    font-size: 1.6rem;
    font-family: 'Pacifico';
}

.brand-tagline {
    margin: 0;
    font-size: 0.75rem;
    font-family: 'Pacifico';
}

.brand-link {
    color: inherit; /* so it doesn't look like a normal blue link */
    text-decoration: none;
}

.navbar-center {
    flex: 2;
    justify-content: center;
}

.searchbar {
    display: flex;
    align-items: center;
    background-color: #FFFAF0;
    border-radius: 9.48px;
    max-width: 400px;
    width: 100%;
    overflow: hidden;
    position: relative;
    top: 0;
    left: 0;
    transform: none;
}

.searchbar input {
    flex: 1;
    padding: 8px 12px;
    border: none;
    outline: none;
    background-color: transparent;
    font-size: 0.95rem;
}

.searchbar input::placeholder {
    color: #a0a0a0;
    opacity: 1;
    font-family: 'TimesNewRoman';
  }

.searchbar button {
    background: none;
    border: none;
    padding: 0 12px;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
}

.searchbar button img {
    width: 20px;
    height: 20px;
}

button .navbar {
    width: 100%;
    max-width: 400px;
    padding: 6px 10px;
    border-radius: 24px;
    background-color: #FFFAF0;
    font-size: 0.95rem;
    transition: background-color 0.3s;
}

.navbar-right {
    flex: unset;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-right: 10px;
    margin-left: -12px;
}

.navbar-right a {
    padding: 8px 16px;
    background-color: #FFFAF0;
    color: #000000;
    width: 104px;
    height: 22px;
    border-radius: 12px;
    cursor: pointer;
    border: none;
    font-family: 'TimesNewRoman';
    text-decoration: none;
    text-align: center;
    font-size: 1.2rem;
    display: inline-block;
    line-height: 24px;
    transition: background-color 0.3s ease;
}

.navbar-right a:hover {
    background-color: #cacaca;
}

/* User icon hover — no background change since it's transparent */
a#user:hover {
    background-color: transparent !important;
}

/* Desktop cart positioning — override inline styles */
.navbar-cart {
    order: 0;
    margin-left: 0;
    margin-right: 0 !important;
}

/* Tighten favorites icon spacing */
a.navbar-favorites {
    margin-right: 0 !important;
}

/* Hide hamburger and mobile menu by default */
.hamburger-icon {
  display: none;
  cursor: pointer;
  color: #FFFAF0;
  padding-right: 1rem;
}

.hamburger-toggle {
  display: none;
}

/* Mobile menu container */
.mobile-menu {
    position: fixed;
    top: 65px;
    left: 0;
    width: 100%;
    background-color: #FFFAF0;
    border-bottom: 2px solid #1C2594;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    box-sizing: border-box;
    max-width: 100vw;
    overflow-x: hidden;
    z-index: 999;

    /* Start hidden above */
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out, visibility 0s linear 0.3s;
}

.hamburger-toggle:checked ~ .mobile-menu {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out, visibility 0s linear 0s;
}

/* General mobile menu links */
.mobile-menu a {
  width: 90%;
  padding: 0.75rem 1rem;
  margin-left: auto;
  margin-right: auto;
  margin-top: 15px;
  color: #1C2594; /* Changed to dark for contrast */
  font-family: 'TimesNewRoman';
  font-weight: 500;
  font-size: 1.1rem;
  text-decoration: none;
  border-bottom: 2px solid #1C2594;
  box-sizing: border-box;
  text-align: center; /* Center the link text */
}

.mobile-auth {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center horizontally */    /* Center vertically */
  gap: 1rem;               /* Space between items */
  width: 100%;
  margin-top: 1rem;        /* Give some spacing from other menu items */
}

.mobile-auth a {
  display: block;
  width: 90%;
  margin: auto;
  padding: 0.75rem 1rem;
    color: #000000;
  font-size: 1.1rem;
  text-decoration: none;
  border-bottom: 2px solid #1C2594;
  box-sizing: border-box;
}

.mobile-search-btn {
  background: none;
  border: none;
  margin-bottom: 10px;
  cursor: pointer;
}

.mobile-search {
  display: none;
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 8px;
  font-family: 'TimesNewRoman';
  font-size: 1rem;
}

/* Toggle menu and search with checkbox hack */
.hamburger-toggle:checked ~ .mobile-menu {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  transform: translateY(0);
  opacity: 1;
}

.hamburger-toggle:checked ~ .mobile-menu .mobile-search {
  display: block;
}

/* Responsive */
@media (max-width: 768px) {
  .navbar-center,
  .navbar-right {
    display: none;
  }

  .hamburger-icon {
    display: block;

  }
}

/* Hide toggle input */
.mobile-search-toggle {
  display: none;
}

/* Search icon (left side on mobile) */
.mobile-search-icon {
  display: none;
  margin-left: 10px;
  cursor: pointer;
}

.mobile-search-icon img {
  width: 24px;
  height: 24px;
}

/* Full-width search overlay */
.mobile-search-overlay {
  display: none;
  position: absolute;
  top: 0;
  width: 100%;
  background-image: linear-gradient(to right, #1C2594 , #5BCAF3);
  height: 65px;
  padding: 10px 15px;
  z-index: 9999;
  align-items: center;
  justify-content: center; /* Center the container */
  box-sizing: border-box;
  overflow-x: hidden;
}

.mobile-search-overlay input {
  flex: 1;
  padding: 8px;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  font-family: 'TimesNewRoman';
  outline: none;
  background-color: transparent;
}

.mobile-search-overlay button,
.mobile-search-overlay .close-search {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-top: 0;
  padding: 0;
}

.mobile-search-overlay img {
  width: 20px;
  height: 20px;
}

.mobile-searchbar-container {
  display: flex;
  align-items: center;
  width: 100%;
  background-color: #FFFAF0;
  border-radius: 8px;
  padding: 6px 10px;
  height: 25px;
  gap: 8px;
}

/* Close "X" button */
.close-search {
  cursor: pointer;
}

.close-search img {
  height: 20px;
  width: 20px;
  padding-bottom: 0;
}

/* Show overlay when checked */
.mobile-search-toggle:checked ~ .mobile-search-overlay {
  display: flex;
}

/* Responsive visibility */
@media (max-width: 768px) {
  .navbar-center {
    display: none;
  }

  .mobile-search-icon {
    display: block;
  }
}

/* Browse link in navbar */
.navbar-browse-link {
    font-family: 'TimesNewRoman';
    font-size: 1rem;
    font-weight: bold;
    color: #FFFAF0;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    float: right;
    margin-right: 5px;
}

.navbar-browse-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Hide on mobile (shown in hamburger menu instead) */
@media (max-width: 768px) {
    .navbar-browse-link {
        display: none;
    }
}

    .navbar-cart {
        display: none;
    }

/* Browse link in mobile dropdown menu */
.mobile-menu-link {
    display: block;
    padding: 12px 20px;
    font-family: 'TimesNewRoman';
    font-size: 1.1rem;
    border-bottom: 1px solid #1C2594;
    text-decoration: none;
}

.mobile-menu-link:hover {
    background-color: #f0e6d6;
}
