/* =============================================
   RESET
============================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =============================================
   HEADER WRAPPER
   Two rows: amz-top + amz-nav
============================================= */
.amz-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  font-family: Arial, sans-serif;
}

/* =============================================
   TOP BAR  (dark navy — Amazon's #131921)
============================================= */
.amz-top {
  background: #131921;
  display: flex;
  align-items: center;
  padding: 8px 16px;
  gap: 12px;
  height: 60px;
}

/* ---- LOGO ---- */
.amz-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 3px;
  padding: 3px 6px;
  flex-shrink: 0;
}

.amz-logo:hover {
  border-color: #fff;
}

.amz-logo img {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
}

.amz-logo span {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ---- SEARCH BAR ---- */
.amz-search {
  flex: 1;
  display: flex;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  min-width: 0;
}

.amz-search input {
  flex: 1;
  padding: 0 12px;
  font-size: 14px;
  border: none;
  outline: none;
  min-width: 0;
  background: #fff;
}

.amz-search button {
  width: 46px;
  background: #6d28d9;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #e8e8e8;
  flex-shrink: 0;
  transition: background 0.15s;
}

.amz-search button:hover {
  background: #905ce3
}

/* ---- RIGHT ACTIONS CLUSTER ---- */
.amz-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ---- ACCOUNT BUTTON ---- */
.amz-action-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #fff;
  text-decoration: none;
  padding: 4px 8px;
  border: 2px solid transparent;
  border-radius: 3px;
  background: none;
  cursor: pointer;
  line-height: 1.3;
  white-space: nowrap;
}

.amz-action-btn:hover {
  border-color: #fff;
}

.amz-label {
  font-size: 11px;
  color: #ccc;
}

.amz-value {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

/* ---- ACCOUNT DROPDOWN ---- */
.amz-dropdown {
  position: relative;
}

.amz-dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.22);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: 0.18s ease;
  z-index: 2000;
}

/* Arrow pointer */
.amz-dropdown-panel::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 26px;
  border: 8px solid transparent;
  border-bottom-color: #fff;
  border-top: 0;
}

.amz-dropdown.open .amz-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.amz-dropdown-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: #222;
  text-decoration: none;
  font-size: 13px;
  transition: background 0.12s;
}

.amz-dropdown-panel a:hover {
  background: #f3f3f3;
}

.amz-dropdown-panel hr {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 4px 0;
}

.amz-dropdown-panel .logout {
  color: #c0392b;
}

/* ---- CART ---- */
.amz-cart {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  text-decoration: none;
  padding: 4px 8px;
  border: 2px solid transparent;
  border-radius: 3px;
  position: relative;
  white-space: nowrap;
}

.amz-cart:hover {
  border-color: #fff;
}

.amz-cart-count {
  position: absolute;
  top: 0px;
  left: 20px;
  background: #6d28d9;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.amz-cart-label {
  font-size: 13px;
  font-weight: 700;
}

/* ---- HAMBURGER (hidden on desktop) ---- */
.amz-hamburger {
  display: none;
  background: none;
  border: 2px solid transparent;
  border-radius: 3px;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}

.amz-hamburger:hover {
  border-color: #fff;
}

/* =============================================
   BOTTOM NAV STRIP  (slightly lighter dark)
============================================= */
.amz-nav {
  background: #232f3e;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 4px;
  height: 38px;
  overflow-x: auto;
  scrollbar-width: none;
}

.amz-nav::-webkit-scrollbar {
  display: none;
}

.amz-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  border: 2px solid transparent;
  border-radius: 2px;
  transition: border-color 0.12s;
}

.amz-nav a:hover,
.amz-nav a.active {
  border-color: #fff;
}

/* =============================================
   BODY OFFSET — push content below header
============================================= */
body {
  padding-top: 98px; /* 60px top + 38px nav strip */
}

/* =============================================
   MOBILE SIDEBAR
============================================= */
.amz-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1500;
}

.amz-sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  background: #fff;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: left 0.28s ease;
  overflow-y: auto;
}

.amz-sidebar-head {
  background: #232f3e;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  font-size: 15px;
  font-weight: 700;
}

.amz-sidebar-nav {
  padding: 8px 0;
  display: flex;
  flex-direction: column;
}

.amz-sidebar-section {
  font-size: 12px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 16px 4px;
}

.amz-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: #111;
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}

.amz-sidebar-nav a:hover {
  background: #f3f3f3;
  border-left-color: #febd69;
}

.amz-sidebar-nav a.logout {
  color: #c0392b;
}

.amz-sidebar-nav a i {
  width: 18px;
  text-align: center;
  color: #555;
}

.amz-sidebar-hr {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin: 8px 0;
}

/* Sidebar open state */
body.sidebar-open .amz-sidebar {
  left: 0;
}

body.sidebar-open .amz-overlay {
  display: block;
}

/* =============================================
   MOBILE  ≤ 768px
============================================= */
@media (max-width: 768px) {

  /* Show hamburger, hide desktop account btn text */
  .amz-hamburger {
    display: block;
  }

  .amz-action-btn,
  .amz-dropdown,
  .amz-cart-label {
    display: none;
  }

  /* Cart icon stays visible, just without label */
  .amz-cart {
    display: flex;
  }

  /* Tighten top bar */
  .amz-top {
    padding: 8px 12px;
    gap: 8px;
  }

  /* Shrink logo text on very small screens */
  .amz-logo span {
    font-size: 14px;
  }

  /* Bottom nav still scrolls horizontally */
  .amz-nav {
    gap: 0;
  }

  .amz-nav a {
    font-size: 12px;
    padding: 0 8px;
  }
}

@media (max-width: 400px) {
  .amz-logo span {
    display: none; /* show only the logo image on tiny screens */
  }
}