@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;500;600;700;800;900&display=swap');

* {
	font-family: 'Poppins', sans-serif;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	scroll-behavior: smooth;
}

p {
	font-weight: 300;
	color: #111;
}

html {
  scroll-behavior: smooth;
}

:root {
  --nav-size: 18px;   
  --nav-weight: 700;
}

body {
  background-image: url(../img/Background1.png);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

header .navigation > li { 
    display:flex; 
    align-items:center; 
}

header .navigation li {
  list-style: none;
  margin-left: 30px;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;   
  height: 90px;
  background-color: #f27121 !important;
  z-index: 10000;    
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px; 
  gap: 8px;
}

/* prevent header wrapping and overgrowth from icons */
header, header .navigation { 
    flex-wrap: nowrap; 
}

/* Make every nav link a flex row so its contents center vertically */
header .navigation a {
  display:flex;
  align-items:center;
  line-height:1;   
}

header .navigation a.nav-link,
header .navigation a.login-btn,
.nav-cart-btn .cart-label {
  font-size: var(--nav-size);
  font-weight: var(--nav-weight);
  line-height: 1;
}

/* tighten Login ↔ Cart spacing only */
header .navigation li.nav-cart { 
    margin-left: 8px !important; 
}

header .logo,
header .navigation a { 
  color:#fff; 
}

/* "Sabor" white + "Mexico" orange */
header .logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;    
  font-weight: 800;
  font-size: 30px;
}

header .logo .mx { 
  color: #FFBD2B; 
}  

header .navigation {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin-left: auto;
  padding: 0;
  flex-wrap: nowrap;
}

/* cart.css typography */
header .navigation a,
header .navigation .cart-label {
  color: #fff !important;
  text-decoration: none;
  font-size: var(--nav-size);
  font-weight: var(--nav-weight);
  line-height: 1;
  display: flex;
  align-items: center;
}

header .navigation a:hover { 
  color: #ffffff !important; 
}

header .navigation .dropdown a,
header .navigation .dropdown button {
  color: orange !important;          
}
header .navigation .dropdown a:hover,
header .navigation .dropdown button:hover {
  background: orange;
  color: #fff !important;
}

.cart-wrap {
  position: relative;       
  display: inline-block;
  width: 50px;            
  height: 40px;
  margin-right: 4px;
  overflow: visible;    
}

.cart-count {
  position: absolute;
  left: 60%;
  top: -15px;   
  transform: translateX(-50%);
  color: #fff;
  font-weight: 900;
  font-size: 30px; 
  line-height: 1;
  background: transparent !important;
  padding: 0 !important;
  min-width: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  pointer-events: none;
  z-index: 2;  
}

/* Never hide the zero unless you intend to */
.cart-count.is-zero {
  opacity: 1 !important;
  transform: translateX(-50%);
}

/* Two/three-digit safety sizing (10+ / 100+) */
.cart-count.double { 
  font-size: 22px !important;
  top: -10px !important;
  letter-spacing:-.5px; 
}

.cart-count.triple { 
  font-size: 18px !important; 
  top: -16px !important;
  letter-spacing:-.5px; 
}

.cart-icon { 
  width:50px; 
  height:40px; 
  display:block; 
}

/* Keep nav links flex-centered and remove vertical padding */
.navigation a,
.navigation .nav-link,
.navigation .login-btn {
  display: flex;    
  align-items: center;
  line-height: 1;
  padding: 0 12px;  
  font-size: var(--nav-size);
  font-weight: var(--nav-weight);
  color: #fff;
}

/* Location chip exactly centered and non-wrapping */
.nav-location-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff !important;
  text-decoration: none;
  white-space: nowrap;
}

/* Login underline like cart.css */
.navigation a.login-btn {
  text-decoration: underline !important;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

/* Make History sit closer to Account */
.navigation li.nav-account { 
  margin-left: -8px; 
} 

/* --- Nav Links --- */
.navigation a.nav-link,
.navigation a.login-btn,
.navigation a.account-btn {
  color: orange;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  transition: all 0.2s ease;
}

/* --- Logout Button --- */
.navigation a.logout-btn {
  color: red;
}

.navigation a.nav-link:hover,
.navigation a.login-btn:hover,
.navigation a.account-btn:hover {
  background: orange;
  color: white;
  border-radius: 6px;
}

.navigation a.active {
    color: #FFBD2B;
    font-weight: bold;
}

.navigation .nav-link {
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.navigation .nav-link:hover {
  background: #fff;
  color: orange;
}

.navigation {
  display: flex;
  align-items: center;
  gap: 24px;  
  list-style:none; padding:0;   
}

.navigation li {
  position: relative;
}

.navigation > li { 
  display:flex; 
  align-items:center; 
}

/* --- Cart Button --- */
.nav-cart-btn {
  display: flex;
  align-items: center;
  height:40px; 
  gap: 6px;
  text-decoration: none;
  color: white;
  position: relative; 
  overflow: visible; 
}

/* Dropdown (keep your orange/white behavior + rounded corners) */
.dropdown {
  position:absolute; 
  right:0; 
  top:calc(100% + 10px);
  background:#fff; 
  border-radius:10px; 
  box-shadow:0 12px 28px rgba(0,0,0,.12);
  min-width:180px; 
  padding:0; 
  display:none; 
  z-index:10001; 
  overflow:hidden;
}

/* --- Dropdown Menu --- */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  min-width: 140px;
  z-index: 1000;
}

.dropdown-menu li {
  list-style: none;
}

/* --- Dropdown Buttons --- */
.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: #ffa500;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

/* --- Logout inside dropdown --- */
.dropdown-menu a.logout-btn {
  color: red;
}

/* --- Hover logic for top, middle, bottom buttons --- */
.dropdown-menu li:first-child a:hover {
  background: orange;
  color: white;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.dropdown-menu li:last-child a:hover {
  background: orange;
  color: white;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.dropdown-menu li:not(:first-child):not(:last-child) a:hover {
  background: orange;
  color: white;
  border-radius: 0;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown.show { 
  display:block; 
}

.dropdown a, .dropdown button {
  display:block; 
  width:100%; 
  text-align:left; 
  background:transparent; 
  border:0; 
  cursor:pointer;
  padding:10px 12px 10px 8px; 
  font-weight:500; 
  font-size:15px;
}

.dropdown a, .dropdown button:not(#logoutBtn){ 
  color:orange; 
}

.dropdown a:hover, .dropdown button:hover:not(#logoutBtn){ 
  background:orange; 
  color:#fff; 
}

/* Rounded only where hovered item touches edges */
.dropdown a:first-child:hover, .dropdown button:first-child:hover { 
  border-top-left-radius:10px; 
  border-top-right-radius:10px; 
}

.dropdown a:last-child:hover,  .dropdown button:last-child:hover { 
  border-bottom-left-radius:10px; 
  border-bottom-right-radius:10px; 
}

.account-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  font-size: var(--nav-size);
  font-weight: var(--nav-weight);
}

.account-trigger:hover img.profile-icon {
  background: transparent !important;
  box-shadow: none !important;
}

.account-trigger img.profile-icon {
  width: 50px; 
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.account-trigger .chev { 
  font-size: 20px; 
  opacity: .8;
  color: #fff; 
  line-height: 1;
}

.account-trigger span {
  display: flex;
  align-items: center;
}

.account-trigger,
header .navigation a{
  line-height: 1; 
  display: inline-flex;
  align-items: center;
}

/* --- Account/Profile Button --- */
.account-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
}

.navigation li.nav-account {
  display: flex;
  align-items: center;
}

/* Account button (avatar + text + triangle) */
.account-menu { 
  position:relative; 
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.account-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-avatar img.profile-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Remove extra padding just for logout so it aligns perfectly */
.account-menu .dropdown #logoutBtn {
  color: red !important;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 12px 10px 8px;
}

.account-menu .dropdown a,
.account-menu .dropdown button:not(#logoutBtn) {
  color: orange !important;
  background: transparent;
  text-decoration: none;
}

/* Hover states */
.account-menu .dropdown a:hover,
.account-menu .dropdown button:hover:not(#logoutBtn) {
  background: orange;
  color: #fff !important;
}

/* Keep the rounded hover edges for top/bottom items */
.account-menu .dropdown a:first-child:hover,
.account-menu .dropdown button:first-child:hover {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.account-menu .dropdown a:last-child:hover,
.account-menu .dropdown button:last-child:hover {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* Rounded bottom only when it's the last item */
.account-menu .dropdown #logoutBtn:last-child:hover {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* white container, rounded, no inner padding gap */
.account-menu .dropdown{
  background:#fff;
  border-radius:10px;
  overflow:hidden;
  padding:0;    
}

/* make items sit against the left edge but keep a tiny breath */
.account-menu .dropdown a,
.account-menu .dropdown button{
  padding:10px 12px 10px 8px;
  background:transparent;
  border:0;
  width:100%;
  text-align:left;
  font-weight:500;
  font-size:15px;
}

/* Hover effect for logout */
.account-menu .dropdown #logoutBtn:hover {
  background: red;
  color: #fff !important;
}

/* Optional: keep location text tidy */
.loc-text { 
  display:flex; 
  flex-direction:column; 
  line-height:1.05; 
}

.loc-title { 
  font-weight:700; 
  font-size:.95rem; 
  color:#fff; 
}

.loc-sub {   
  font-size:11px;  
  color:#fff; 
  opacity:.95; 
}

.logo { 
  display: inline-flex; 
  align-items: center; 
}

.pin-icon { 
  width:25px; 
  height:25px; 
  display:inline-block; 
  filter:brightness(0) invert(1); 
}

#logoutBtn { 
  color:red; 
}

#logoutBtn:hover { 
  background:red; 
  color:#fff; 
}

.cart-wrap, .cart-wrap * { 
  overflow: visible !important; 
}

footer {
  margin-bottom: 40px;
  text-align: center;
  font-size: 0.9rem;
  padding: 20px 0;
  color: black !important;
  background-color: #ffffff00;
}

footer.site-footer {
  text-align: center;
  color: black;
  padding: 30px 0;
  font-size: 14px;
  background-color: white;
}

/* Remove underline from the logo link */
header .logo,
header .logo a {
  text-decoration: none !important;
  color: #fff !important; 
}

.profile-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover; 
  display: block;
  overflow: hidden;
}

header .cart-count { 
  font-size:22px !important; 
  top:-15px !important; 
}

header .cart-count.double { 
  font-size:22px !important; 
  top:-10px !important; 
}

header .cart-count.triple { 
  font-size:18px !important; 
  top:-9px !important; 
}

.auth-slider {
  display: flex;
  width: 200%;
  transition: transform 0.4s ease;
  will-change: transform;
}

.auth-pane {
  display: none; /* hidden by default */
  flex-direction: column;
  gap: 10px;
}

.auth-pane.is-active {
  display: flex; /* only the active one shows */
}

/* Tabs */
.auth-tabs {
  display: flex;
  margin-bottom: 15px;
  border-radius: 6px;
  overflow: hidden; 
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: #eee;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s, color 0.3s;
}

.tab-btn.is-active {
  background: #f97316;
  color: #fff;
}

/* Inputs and buttons */
.auth-pane input, 
.auth-pane select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.btn-primary {
  background: #f97316;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: #ea580c;
}

.auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.auth-modal.show {
  display: flex !important;
}

.auth-box {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 360px;
  max-width: 90%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  position: relative;
  animation: fadeInUp 0.3s ease;
}

/* optional animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}