.main-nav {
  position: fixed;
  top: 20px;
  left: 20px;
  min-width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 30px;
  overflow: visible;            
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15),
              inset 0 1px 1px rgba(255,255,255,0.2),
              inset 0 -1px 1px rgba(0,0,0,0.2);
  background: rgba(101, 67, 33, 0.9);
  padding: 0;
  cursor: pointer;
  transition: height 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: none;
  user-select: none;
}

.main-nav.expanded {
  height: auto;
  max-height: 80vh;
  border-radius: 30px;
  padding-bottom: 20px;
  flex-direction: column;
  overflow: visible;            
}

.main-nav:hover:not(.expanded) {
  box-shadow: 0 4px 12px rgba(0,0,0,0.25),
              inset 0 1px 1px rgba(255,255,255,0.3),
              inset 0 -1px 1px rgba(0,0,0,0.3);
}

.nav-emphasis { box-shadow: 0 4px 20px rgba(0,0,0,0.3); }


.nav-links-container {
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 0 !important;
}

.main-nav.expanded .nav-links-container {
  opacity: 1;
  height: auto;
  overflow: visible;
  margin-top: 4px !important;
}


.nav-icon {
  min-width: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}


.hamburger-icon {
  width: 24px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background: #fff;
  border-radius: 3px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  pointer-events: none;
}

.main-nav.expanded .hamburger-line:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.main-nav.expanded .hamburger-line:nth-child(2) { opacity: 0; transform: scale(0); }
.main-nav.expanded .hamburger-line:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

.main-nav:hover:not(.expanded) .hamburger-line { box-shadow: 0 2px 3px rgba(0,0,0,0.3); }
.main-nav:hover:not(.expanded) .hamburger-line:nth-child(2) { transform: scaleX(0.8); }


.nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li { margin: 5px 0; width: 100%; text-align: center; }

.nav-link {
  color: rgba(255,255,255,0.9);
  padding: 6px 0;
  font: 500 0.85rem/1 'Poppins',sans-serif;
  border-radius: 10px;
  transition: 0.3s;
  display: block;
}

.nav-link:hover  { background: rgba(255,255,255,0.1); color: #fff; }
.nav-link.active { background: rgba(255,255,255,0.15); color: #fff; }


     .profile-menu {
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 0px 0 !important;
      border-radius: 10px;
      cursor: pointer;
      
      background: transparent;
      transition: none;
    }
  
    .profile-menu:hover {
      
      background: none;
    }
    .profile-img {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      object-fit: cover;
      
      pointer-events: auto;
      transition: box-shadow 0.3s;
    }
  
    .profile-img:hover {
      box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
    }

.profile-dropdown {
  display: none;
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  min-width: 120px;
  background: rgba(101, 67, 33, 0.9);
  border-radius: 20px 40px 40px 20px;
  z-index: 1001;
  overflow: visible;
  animation: dropdown-appear 0.25s ease forwards;
  padding: 0;
}

.profile-dropdown.show {
  display: block;
}

.profile-dropdown::before {
  display: none;
}
  
@keyframes dropdown-appear {
  from { opacity: 0; transform: translate(-10px, -50%); }
  to   { opacity: 1; transform: translate(0, -50%); }
}
.dropdown-section {
  padding: 0;
  border-bottom: none;
}

.signout-btn {
  display: block;
  
  width: auto;
  
  padding: 8px 12px;
  background: rgba(101, 67, 33, 0.9);
  color: #f44336;
  border: none;
  border-radius: 0 40px 40px 0;
  font: 600 0.95rem 'Poppins', sans-serif;
  text-align: left;
  box-sizing: border-box;
  margin: 0;
  transition: background 0.3s;
}

.signout-btn::before {
  content: '\f2f5';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-right: 8px;
}



  .profile-img:hover,
  .profile-menu:hover .profile-img,
  .profile-dropdown:hover .profile-img {
    background: initial !important;
    filter: initial !important;
    border: none !important;
  }
  
  
  .cart-section                { padding-top: 15px; }
  .cart-section h4             { padding-bottom: 10px; border-bottom: 1px dashed rgba(93,64,55,0.15); margin-bottom: 15px; }
  .cart-section h4::before     { content: '\f07a'; font-family: 'Font Awesome 5 Free'; font-weight: 900; font-size: 0.9rem; color: #795548; }
  
  .cart-items {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
    scrollbar-width: thin;
    scrollbar-color: rgba(93,64,55,0.3) rgba(93,64,55,0.1);
    padding-right: 8px;
    padding-left: 2px;
  }
  
  .cart-items::-webkit-scrollbar          { width: 4px; }
  .cart-items::-webkit-scrollbar-track     { background: rgba(93,64,55,0.05); border-radius: 10px; }
  .cart-items::-webkit-scrollbar-thumb     { background: rgba(93,64,55,0.3); border-radius: 10px; }
  
  .empty-cart {
    text-align: center;
    padding: 20px 10px;
    color: #888;
    background: #f8f8f8;
    border-radius: 10px;
    font-size: 0.9rem;
    border: 1px dashed rgba(0,0,0,0.08);
  }
  
  .empty-cart::before {
    content: '\f07a';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    display: block;
    font-size: 1.4rem;
    margin-bottom: 10px;
    opacity: 0.3;
    color: #795548;
  }
  
  .cart-item {
    display: flex;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: 0.3s;
    background: rgba(255,255,255,0.5);
    padding: 10px;
    border-radius: 8px;
  }
  
  .cart-item:last-child {
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: none;
  }
  
  .cart-item:hover {
    transform: translateX(3px);
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  }
  
  .cart-item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  .cart-item-info              { flex-grow: 1; display: flex; flex-direction: column; }
  .cart-item-title             { font-weight: 600; font-size: 0.9rem; color: #5d4037; margin-bottom: 3px; }
  .cart-item-price             { font-size: 0.82rem; opacity: 0.85; margin-bottom: 5px; color: #666; }
  
  .cart-item-quantity {
    display: flex;
    align-items: center;
    margin: 5px 0;
    background: rgba(121,85,72,0.05);
    border-radius: 6px;
    padding: 4px 8px;
  }
  
  .cart-qty                    { margin: 0 8px; font-size: 0.85rem; font-weight: 600; min-width: 18px; text-align: center; color: #5d4037; }
  
  .cart-qty-decrease,
  .cart-qty-increase {
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(93,64,55,0.2);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
    color: #5d4037;
  }
  
  .cart-qty-decrease:hover,
  .cart-qty-increase:hover     { background: #e0e0e0; color: #3e2723; }
  
  .cart-item-total {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4CAF50;
    align-self: flex-end;
    margin-top: 3px;
    background: rgba(76,175,80,0.08);
    padding: 2px 8px;
    border-radius: 12px;
  }
  
  .cart-summary {
    padding: 12px;
    border-radius: 10px;
    background: rgba(121,85,72,0.06);
    margin-bottom: 15px;
    border: 1px solid rgba(121,85,72,0.08);
  }
  
  .cart-summary p {
    margin: 0 0 8px;
    font-weight: 500;
    color: #5d4037;
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
  }
  
  .cart-summary p:last-child {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px dashed rgba(0,0,0,0.1);
    font-weight: 600;
    font-size: 0.95rem;
  }

  
  .checkout-btn {
    display: block;
    padding: 10px 14px;
    background: linear-gradient(135deg,#388E3C 0%,#4CAF50 100%);
    color: #fff;
    border-radius: 8px;
    font: 600 0.95rem 'Poppins',sans-serif;
    text-align: center;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: 0.3s;
    border: none;
  }
  
  .checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    background: linear-gradient(135deg,#2E7D32 0%,#43A047 100%);
  }
  
  .checkout-btn::before {
    content: '\f07a';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 8px;
    font-size: 0.9rem;
  }
  
  
  .main-footer {
    position: relative;
    padding: 15px 0 12px;
    text-align: center;
    background: #3b2a20;
    background-image:
      linear-gradient(90deg,
        rgba(0,0,0,0.3) 0%,
        rgba(0,0,0,0) 15%,
        rgba(0,0,0,0.1) 30%,
        rgba(0,0,0,0.2) 45%,
        rgba(0,0,0,0.1) 60%,
        rgba(0,0,0,0.05) 75%,
        rgba(0,0,0,0.2) 90%,
        rgba(0,0,0,0.3) 100%
      ),
      repeating-linear-gradient(
        90deg,
        transparent,
        transparent 40px,
        rgba(0,0,0,0.1) 40px,
        rgba(0,0,0,0.1) 80px
      );
    box-shadow: 0 -3px 8px rgba(0,0,0,0.2);
  }
  
  .footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    color: #fff;
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
  }
  
  .footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    grid-column: 2;
  }
  
  .footer-copyright-left {
    justify-self: flex-end;
    padding-right: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    white-space: nowrap;
    grid-column: 1;
  }
  
  .footer-copyright-right {
    justify-self: flex-start;
    padding-left: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    white-space: nowrap;
    grid-column: 3;
  }
  
  .social-icon {
    font-size: 1.6rem;
    transition: 0.3s;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  }
  
  .facebook-icon { color: #4267B2; }
  .phone-icon    { color: #4CAF50; }
  .map-icon      { color: #F44336; }
  
  .social-icon:hover { transform: scale(1.2); }
  
  @media (max-width: 768px) {
    .main-nav.expanded { max-width: 90vw; }
    .footer-content    { grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 10px; }
    .footer-social     { grid-column: 1; grid-row: 1; margin-bottom: 10px; }
    .footer-copyright-left,
    .footer-copyright-right { grid-column: 1; justify-self: center; padding: 0; }
    .footer-copyright-left  { grid-row: 2; }
    .footer-copyright-right { grid-row: 3; }
  }
  
  @media (max-width: 480px) {
    .main-nav          { width: 50px; height: 50px; top: 15px; left: 15px; }
    .main-nav.expanded { max-width: 95vw; }
    .nav-icon          { min-width: 50px; height: 50px; }
    .hamburger-icon    { width: 20px; height: 16px; }
    .hamburger-line    { height: 2.5px; }
    .main-nav.expanded .hamburger-line:nth-child(1) { transform: translateY(6.75px) rotate(45deg); width: 20px; }
    .main-nav.expanded .hamburger-line:nth-child(3) { transform: translateY(-6.75px) rotate(-45deg); width: 20px; }
    .nav-links li      { margin: 0 3px; }
    .nav-link          { padding: 6px 12px; font-size: 0.9rem; }
    .profile-img       { width: 36px; height: 36px; }
    .main-footer       { padding-top: 12px; padding-bottom: 10px; }
  }
  
  .main-nav,
  .main-nav.expanded   { width: 60px !important; max-width: 60px !important; flex-direction: column; }
  
  .nav-links-container,
  .nav-links           { width: 100%; }
  

.profile-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(40, 30, 20, 0.55);
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(.4,0,.2,1);
}
.profile-modal.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}
@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.profile-modal-content {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(101,67,33,0.18);
  padding: 2.5rem 2rem 2rem 2rem;
  min-width: 320px;
  max-width: 90vw;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.3s, transform 0.3s, opacity 0.3s;
  opacity: 1;
  transform: scale(1);
}
.profile-modal.show .profile-modal-content {
  animation: modal-content-fade-in 0.3s;
}
@keyframes modal-content-fade-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.profile-modal-close {
  position: absolute;
  top: 18px; right: 18px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #654321;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 1;
}
.profile-modal-close:hover {
  color: #f44336;
}
.profile-modal-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(101,67,33,0.15);
  margin-bottom: 1rem;
  
  border: none;
}
.profile-modal-username {
  font-size: 1.3rem;
  font-weight: 600;
  color: #654321;
  margin: 0.5rem 0 0.2rem 0;
}
.profile-modal-welcome {
  font-size: 1rem;
  color: #795548;
  margin-bottom: 1.2rem;
}
.profile-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: 100%;
  margin-top: 0.5rem;
}
.profile-modal-btn {
  display: block;
  width: 100%;
  padding: 0.7rem 0;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border: none;
  outline: none;
  cursor: pointer;
}
.profile-modal-view {
  background: #e0c9a6;
  color: #654321;
  cursor: pointer;
  opacity: 1;
  transition: background 0.2s, color 0.2s, transform 0.3s;
}
.profile-modal-view:hover {
  background: #ffe4b5;
  color: #3e2723;
  transform: scale(1.04);
}
.profile-modal-logout {
  background: #f44336;
  color: #fff;
  font-weight: 600;
}
.profile-modal-logout:hover {
  background: #d32f2f;
}
@media (max-width: 600px) {
  .profile-modal-content {
    min-width: 90vw;
    padding: 1.2rem 0.5rem 1.5rem 0.5rem;
  }
  .profile-modal-img {
    width: 70px; height: 70px;
  }
}
body.modal-open {
  overflow: hidden;
}
  
/* Profile Modal Tabs */
.profile-modal-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 18px 0 10px 0;
  gap: 10px;
}
.profile-modal-tab {
  background: #f8f5f1;
  color: #795548;
  border: none;
  outline: none;
  padding: 8px 22px;
  border-radius: 18px 18px 0 0;
  font: 600 1rem 'Poppins', sans-serif;
  cursor: pointer;
  box-shadow: 0 1px 4px #e0c9a6;
  transition: background 0.2s, color 0.2s;
  margin-bottom: -2px;
}
.profile-modal-tab.active {
  background: #fff;
  color: #654321;
  box-shadow: 0 2px 8px #e0c9a6;
  font-weight: 700;
  z-index: 2;
}
.profile-modal-tab:not(.active):hover {
  background: #e0c9a6;
  color: #654321;
}
  
/* Order Detail Modal Styles */
.order-detail-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(40, 30, 20, 0.55);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: modal-fade-in 0.2s;
}
.order-detail-modal {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(101,67,33,0.18);
  padding: 2.5rem 2rem 2rem 2rem;
  min-width: 340px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  text-align: left;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: modal-content-fade-in 0.3s;
}
.order-detail-close {
  position: absolute;
  top: 18px; right: 18px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #654321;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 1;
}
.order-detail-close:hover {
  color: #f44336;
}
.order-detail-items {
  width: 100%;
}
.order-detail-item-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  background: #f8f5f1;
  border-radius: 12px;
  box-shadow: 0 1px 4px #e0c9a6;
  padding: 12px 10px;
}
.order-detail-item-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(101,67,33,0.10);
  background: #fff;
}
.order-detail-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.order-detail-item-name {
  font-weight: 600;
  color: #654321;
  font-size: 1.05rem;
}
.order-detail-item-qty {
  color: #795548;
  font-size: 0.98rem;
}
.order-detail-item-price {
  color: #388E3C;
  font-size: 0.98rem;
  font-weight: 500;
}
.order-detail-readd-btn {
  margin-top: 1.2rem;
  background: #e0c9a6;
  color: #654321;
  border: none;
  border-radius: 12px;
  padding: 0.8rem 2.2rem;
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px #e0c9a6;
}
.order-detail-readd-btn:hover {
  background: #ffe4b5;
  color: #3e2723;
  transform: scale(1.04);
}
@media (max-width: 600px) {
  .order-detail-modal {
    min-width: 90vw;
    padding: 1.2rem 0.5rem 1.5rem 0.5rem;
  }
  .order-detail-item-img {
    width: 48px; height: 48px;
  }
}
  