/* header.css */

/* Basic Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Root Variables for Easy Customization */
:root {
  --top-header-background: #FFFFFF; /* Top header background set to white */
  --bottom-header-background: #F3F3F3; /* Bottom header background */
  --text-color-dark: #000;
  --accent-color: #a72828; /* Updated to a shade of red */
  --overlay-bg: rgba(0, 0, 0, 0.8);

  --item-bg-color: #ececec;   
  --item-text-color: #333;
  --item-radius: 8px;         
  --transition-speed: 0.3s;

  --max-width: 1200px; /* Define a max-width for the header content */
  
  /* Font Variables */
  --font-family: 'Montserrat', sans-serif;
  --font-size-base: 16px;
  
  /* Additional Variables */
  --cart-color: #FF0000; /* Red color for cart */
}

/* ======================
   TOP HEADER
   ====================== */
.top-header {
  width: 100%;
  background-color: var(--top-header-background);
  border-bottom: 1px solid #ddd;
  padding: 10px 20px;
  font-family: var(--font-family);
  font-size: 1em; 
}

.top-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 60px;
}

.top-header-left {
  display: flex;
  align-items: center;
}

.company-icon {
  display: flex;
  align-items: center;
  margin-right: 30px;
  justify-content: center; /* Center the company icon */
  flex: 1;
}

.company-icon-img {
  height: 50px;
  width: auto;
}

.top-header-right {
  display: flex;
  align-items: center;
}

/* Sipariş Hattı */
.order-line {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 40px;
}

.order-info {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}

.order-icon {
  color: var(--accent-color);
  margin-right: 8px;
  font-size: 1.1em;
}

.order-label {
  font-weight: bold;
  font-size: 1em;
}

.order-number {
  color: var(--accent-color);
  font-weight: bold;
  font-size: 1em;
}

/* Authentication Links */
.auth-links {
  display: flex;
  align-items: center;
}

.auth-link {
  margin-left: 15px;
  text-decoration: none;
  color: var(--text-color-dark);
  font-weight: bold;
  transition: color 0.3s;
  padding: 8px 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  height: 36px;
}

.auth-link:hover {
  color: var(--accent-color);
  background-color: #f0f0f0;
}

/* ======================
   BOTTOM HEADER
   ====================== */
.bottom-header {
  width: 100%;
  background-color: var(--bottom-header-background);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-top: 0;
  height: 60px;
  font-family: var(--font-family);
}

.desktop-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  position: relative; /* So mega-menu can align to #navbar-menu */
}

body {
  padding-top: 0;
  font-family: var(--font-family);
}

/* Left side: Navigation Menu */
.nav-menu-left {
  display: flex;
  align-items: center;
}

#navbar-menu {
  display: flex;
  list-style: none;
  position: relative; 
}

#navbar-menu li {
  margin-right: 20px;
  /* Make first four items "static" so the mega menus line up under "Kedi" */
  position: static; 
}

/* For small dropdown triggers only: position: relative */
#navbar-menu li.dropdown.basic-dropdown-trigger {
  position: relative;
}

/* Remove right margin for the last item */
#navbar-menu li:last-child {
  margin-right: 0;
}

/* Optional vertical separators */
/* #navbar-menu li:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 15%;
  height: 70%;
  width: 1px;
  background-color: #ccc;
} */

/* Make each anchor relative to contain the pseudo-element */
/* #navbar-menu li:not(:last-child) > a {
  position: relative;
} */

/* Add vertical separator after each anchor except the last one */
/* #navbar-menu li:not(:last-child) > a::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 15%;
  height: 70%;
  width: 1px;
  background-color: #ccc;
} */

/* Only apply separators to the top-level <li> items */
#navbar-menu > li:not(:last-child) {
  position: static;
}
#navbar-menu > li:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 15%;
  height: 70%;
  width: 1px;
  background-color: #ccc;
}

/* If you also want the separator after the <a> text, 
   similarly limit it to the top-level <a> elements */
#navbar-menu > li:not(:last-child) > a {
  position: relative;
}
#navbar-menu > li:not(:last-child) > a::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 15%;
  height: 70%;
  width: 1px;
  background-color: #ccc;
}


/* Dropdown triggers */
#navbar-menu li a {
  text-decoration: none;
  color: var(--text-color-dark);
  font-size: 1em;
  display: flex;
  align-items: center;
  padding: 0 12px;
  height: 60px;
  transition: border-bottom 0.3s, background-color 0.3s;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

#navbar-menu li a .icon-left {
  margin-right: 15px;
  font-size: 1.2em;
}

#navbar-menu li a:hover {
  color: var(--text-color-dark);
  border-bottom: 2px solid var(--accent-color);
  background-color: #e6e6e6;
  border-radius: 4px;
}

/* ========== Mega Menu (Kedi, Köpek, Kuş, Kemirgen) ========== */
.dropdown-content.mega-menu {
  position: absolute;
  top: 60px;
  left: 0; 
  width: 1100px; /* Increased to avoid text cut-off */
  display: none;

  /* Subtle gradient and border for a nicer look */
  background: linear-gradient(to bottom, #fafafa, #fff);
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);

  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-speed), visibility var(--transition-speed);
}

#navbar-menu li.dropdown:hover .dropdown-content.mega-menu {
  display: flex;
  opacity: 1;
  visibility: visible;
}

/* Create a flexible grid-like layout that wraps if needed */
.mega-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem; /* Space between columns */
  width: 100%;
}

.mega-menu-column {
  flex: 1;
  min-width: 180px; /* Ensures columns don't get too narrow */
}

.mega-menu-column h3 {
  margin-bottom: 12px;
  color: var(--accent-color);
  font-size: 1.2em;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 4px;
}

.mega-menu-column ul {
  list-style: none;
  padding-top: 8px; /* Some spacing under the h3 */
}

.mega-menu-column ul li {
  margin-bottom: 10px;
}

.mega-menu-column ul li a {
  text-decoration: none;
  color: var(--text-color-dark);
  transition: color 0.3s, background-color 0.3s, transform 0.2s;
  padding: 6px 10px;
  border-radius: 4px;
}

.mega-menu-column ul li a:hover {
  background-color: var(--accent-color);
  color: #fff;
  transform: translateX(3px);
}

/* ========== Basic Dropdown (Deniz, Sahiplendirme) ========== */
.dropdown-content.basic-dropdown {
  position: absolute;
  top: 60px;
  display: none;
  background: linear-gradient(to bottom, #fafafa, #fff);
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 0;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);

  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-speed), visibility var(--transition-speed);
}

#navbar-menu li.dropdown.basic-dropdown-trigger:hover .dropdown-content.basic-dropdown {
  display: block;
  opacity: 1;
  visibility: visible;
}

.dropdown-content.basic-dropdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dropdown-content.basic-dropdown ul li a {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: var(--text-color-dark);
  transition: background-color 0.3s, color 0.3s;
}

.dropdown-content.basic-dropdown ul li a:hover {
  background-color: var(--accent-color);
  color: #fff;
}

/* ========== Right Side: Sepetim ========== */
.menu-right {
  display: flex;
  align-items: center;
}

#navbar-contact {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

#navbar-contact li {
  margin-right: 20px;
}

#navbar-contact li:last-child {
  margin-right: 0;
}

#navbar-contact li a {
  text-decoration: none;
  color: var(--text-color-dark);
  font-size: 1em;
  font-weight: bold;
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
  white-space: nowrap;
}

#navbar-contact li a .icon-left {
  margin-right: 15px;
  font-size: 1.2em;
}

/* Specific Styles for "Sepetim" */
#navbar-contact li a.cart {
  color: #fff;
  background-color: var(--cart-color); /* Set to red */
  border: 2px solid var(--cart-color); /* Set to red */
}

#navbar-contact li a.cart:hover {
  background-color: darkred; /* Darker red on hover */
  border-color: darkred;
}

/* ======================
   MOBILE NAV
   ====================== */
.mobile-nav {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: var(--bottom-header-background);
  border-bottom: 1px solid #ddd;
  z-index: 1500;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  position: relative; /* To position the centered logo */
}

.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hamburger-bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-color-dark);
  margin: 4px 0;
}

.hamburger-bar.small {
  width: 18px;
  height: 2px;
}

.mobile-logo {
  display: flex; /* Make the logo container a flex container */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically (optional if needed) */
  width: 100%; /* Take up full width of its container */
}



.mobile-logo-img {
  height: 42px;
}

.mobile-right {
  display: flex;
  align-items: center;
}

/* Profile Dropdown */
.profile-dropdown {
  position: relative;
  margin-left: 15px;
}

#profile-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color-dark);
  font-size: 1.5em;
  padding: 8px;
  transition: color var(--transition-speed);
}

/* Remove coloring when buttons are clicked */
#profile-btn:active,
.mobile-nav .cart-icon:active {
  background: none;
  color: var(--text-color-dark);
}

/* Change profile icon color on hover */
#profile-btn:hover {
  color: var(--accent-color);
}

/* Dropdown Menu */
.profile-menu {
  position: absolute;
  top: 50px; /* Adjust based on button height */
  right: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  min-width: 150px;
  display: none;
  flex-direction: column;
  z-index: 2000;
}

.profile-menu.show {
  display: flex;
  animation: fadeIn var(--transition-speed) forwards;
}

.profile-menu-item {
  padding: 10px 15px;
  text-decoration: none;
  color: var(--text-color-dark);
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

.profile-menu-item:hover {
  background-color: var(--accent-color);
  color: #fff;
}

/* Cart Icon Enhancements */
.mobile-nav .cart-icon {
  position: relative;
  margin-left: 15px;
  font-size: 1.8em; /* Increase cart icon size */
  color: var(--cart-color); /* Set cart color to red */
  transition: color var(--transition-speed);
}

/* Remove coloring when cart is clicked */
.mobile-nav .cart-icon:active {
  background: none;
  color: var(--cart-color);
}

/* Darker red on hover */
.mobile-nav .cart-icon:hover {
  color: darkred;
}

/* Button Spacing */
.mobile-right .mobile-icon {
  margin-left: 10px;
}

/* Button Colors */
.mobile-icon {
  color: var(--text-color-dark);
  transition: color var(--transition-speed);
}

.mobile-icon:hover {
  color: var(--accent-color);
}

/* Remove default focus outline and add custom focus styles */
.mobile-icon:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-color);
}

/* Animation for Dropdown */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== FULL SCREEN OVERLAY ========== */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--overlay-bg);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform var(--transition-speed) ease;
}

.mobile-menu-overlay.show {
  transform: translateX(0);
}

.overlay-content {
  width: 100%;
  height: 100%;
  background: #fff;
  padding: 0 15px;
  overflow-y: auto;
}

.menu-level {
  display: none;
}

.menu-level.active-level {
  display: block;
}

.overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.overlay-title-center {
  flex: 1;
  text-align: center;
}

.overlay-big-logo {
  height: 48px;
}

.close-overlay-btn,
.back-btn {
  background: none;
  border: none;
  font-size: 1.3em;
  cursor: pointer;
  color: var(--text-color-dark);
}

/* Titles inside mobile overlay */
.menu-title {
  margin: 15px 0;
  font-size: 1.2em;
  font-weight: bold;
}

.menu-items {
  padding: 0 15px;
  margin-bottom: 20px;
}

.menu-item {
  background-color: var(--item-bg-color);
  color: var(--item-text-color);
  padding: 12px 15px;
  margin: 8px 0;
  border-radius: var(--item-radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.menu-item:hover {
  background-color: var(--accent-color);
  color: #fff;
}

.menu-item span {
  font-size: 1em;
}

.arrow {
  color: #888;
  margin-left: 10px;
  font-weight: bold;
}

.menu-item.direct-link {
  cursor: auto;
  display: block;
  padding: 0;
  background: none;
  margin: 0;
  border-radius: 0;
}

.menu-item.direct-link a {
  display: block;
  background-color: var(--item-bg-color);
  color: var(--item-text-color);
  padding: 12px 15px;
  margin: 8px 0;
  border-radius: var(--item-radius);
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}

.menu-item.direct-link a:hover {
  background-color: var(--accent-color);
  color: #fff;
}

/* ============================
   MEDIA QUERIES
   ============================ */
@media screen and (max-width: 768px) {
  .top-header,
  .bottom-header {
    display: none;
  }
  .mobile-nav {
    display: flex;
    padding: 0 15px;
  }
}

@media screen and (max-width: 480px) {
  .mobile-logo-img {
    height: 45px;
  }
  .overlay-big-logo {
    height: 50px;
  }
  .menu-title {
    font-size: 1.1em;
  }
}

/* For mobile only */
@media screen and (max-width: 768px) {
  /* Let the mobile nav be tall enough and center its contents */
  .mobile-nav {
    height: auto;          /* let it expand if needed */
    align-items: center;   /* center items vertically */
    padding: 3px 15px;    /* push content from top & sides */
  }

  /* Force the logo container to center horizontally/vertically
     and add extra top spacing so it's not stuck to the screen edge. */
  .mobile-logo {
    display: flex;         /* ensure flex centering */
    justify-content: center;
    align-items: center;
    margin: 0 auto;        /* center horizontally if it shrinks */
    padding-top: 3px;     /* extra space from the top */
  }

  /* If you want the image itself to get spacing, you can do it here too:
  .mobile-logo-img {
    margin-top: 10px;
  }
  */
}


/* ============================
   ALIGNING MEGA MENUS UNDER "KEDI"
   ============================ */
.dropdown-content.mega-menu {
  left: 0;
  right: auto;
  margin-left: 0;
}


/* ---------- Desktop-Only Search Bar ---------- */
.desktop-only-search {
  display: flex;
  align-items: center;
  margin: 0 20px;
}

.desktop-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-search-input {
  width: 300px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}

.desktop-search-button {
  background-color: #e12222;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.3s;
}

.desktop-search-button:hover {
  background-color: #c20c0c;
}

/* Hide Desktop Search Bar on Mobile */
@media (max-width: 768px) {
  .desktop-only-search {
    display: none;
  }
}

/* Announcement Banner Container */
.announcement-banner {
  background-color: #f8f9fa;  /* Light background */
  text-align: center;
  padding: 5px 0;
  font-family: Arial, sans-serif;
}

/* Wrapper to contain and hide overflow */
.announcement-wrapper {
  position: relative;
  height: 30px;  /* Adjust as needed */
  overflow: hidden;
}

/* Common styles for each slide */
.announcement-slide {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  line-height: 30px;
  font-size: 14px;
  color: #333;
  transition: opacity 0.5s ease-in-out;
}

/* Keyframes for fade in/out */
@keyframes fade {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  40%  { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 0; }
}

/* Slide animations with a staggered delay */
.slide1 {
  animation: fade 10s infinite;
}

.slide2 {
  animation: fade 10s infinite 5s;
}


/* .slide3 {
  animation: fade 9s infinite 6s;
} */

@media (min-width: 769px) {
  .nav-menu-left {
  margin-left: -80px; /* Adjust this value until the entire nav group shifts left as desired */
  }
  }


  @media (min-width: 769px) {
    .desktop-nav .menu-right {
    margin-left: 30px;  /* Increase the value until it looks right */
    }
    }  