/* =========================== 
   GENERAL RESET
=========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  color: #333;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ===========================
   HEADER & NAVIGATION
=========================== */
header {
  width: 100%;
  background-color: #fff;
  position: relative;
  z-index: 1000;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

nav ul li {
  position: relative;
}

nav ul li a {
  display: block;
  padding: 12px 20px;
  font-weight: 500;
  color: #333;
}

nav ul li .dropdown-menu-custom {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 180px;
  flex-direction: column;
  border: 1px solid #ddd;
  z-index: 2000;
}

nav ul li .dropdown-menu-custom.open {
  display: flex;
}

nav ul li .dropdown-menu-custom a {
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
}

nav ul li .dropdown-menu-custom a:hover {
  background-color: #f5f5f5;
}

/* ===========================
   HEADER GRID DESKTOP
=========================== */
.header-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 10px;
  width: 100%;
  padding: 10px 20px;
  align-items: center;
}

.row2-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.row2-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.row2-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* ===========================
   SEARCH & FILTER
=========================== */
.search-filter-container {
  display: flex !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  align-items: center !important;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 150px;
}

.search-box input {
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 4px 8px;
  width: 100%;
  outline: none;
}

.all-category {
  display: flex;
  align-items: center;
  border-left: 1px solid #ccc;
  padding-left: 8px;
  margin-left: 8px;
  font-size: 13px;
  color: #004080;
  cursor: pointer;
}

.search-icon {
  margin-right: 6px;
  color: #004080;
}

.filter-text {
  margin-left: 10px;
  font-size: 13px;
  color: #004080;
  cursor: pointer;
}

.filter-text i {
  margin-left: 3px;
  font-size: 10px;
}

/* ===========================
   DROPDOWNS & HOVER EFFECTS
=========================== */
.dropdown-menu-custom {
  display: none;
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px;
  flex-direction: column;
  min-width: 180px;
  z-index: 100;
}

.dropdown-menu-custom a {
  padding: 5px 10px;
  color: #004080;
  text-decoration: none;
}

.dropdown-menu-custom a:hover {
  background: linear-gradient(135deg, #a0c4ff, #80b0ff);
  color: #fff;
  border-radius: 4px;
}

/* ===========================
   STICKY HEADER
=========================== */
header.sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dropdown-menu-custom.show {
  display: flex !important;
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   RESPONSIVE GRID & SEARCH
=========================== */
@media(max-width:992px) {
  .header-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(9, auto);
    gap: 10px;
    padding: 10px;
  }

  .row2-left,
  .row2-center,
  .row2-right {
    justify-content: center !important;
    flex-direction: column;
    text-align: center;
    gap: 5px;
  }

  .row2-center .search-box {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .row2-center .search-box input {
    width: 100%;
    margin-bottom: 5px;
  }

  .row2-center .filter-text {
    margin-left: 0;
  }
}

/* ===========================
   HAMBURGER MENU
=========================== */
#hamburgerBtn {
  display: none;
}

@media (max-width: 991px) {
  #hamburgerBtn {
    display: block;
    font-size: 24px;
    padding: 10px;
  }

  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  nav ul.active {
    display: flex;
  }
}

/* ===========================
   MODALS & PANELS
=========================== */
#cartModal,
#notificationPanel,
#profileDropdown,
#appLauncherMenu,
#hamburgerMenu,
#allCategoryMenu,
#filterMenu {
  display: none;
  position: fixed;
  top: 50px;
  right: 20px;
  background: #fff;
  border: 1px solid #ddd;
  z-index: 3000;
  flex-direction: column;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.close-cart {
  align-self: flex-end;
  padding: 5px 10px;
}

/* ===========================
   WISHLIST & SOUND BUTTONS
=========================== */
#wishlist-count,
#soundBtn {
  cursor: pointer;
  margin: 0 5px;
}

/* ===========================
   CENTER SEARCH ALIGNMENT FIX
=========================== */
.row2-center {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.row2-center .search-box {
  width: 100%;
  max-width: 500px;
}

.row2-left,
.row2-right {
  display: flex;
  align-items: center;
}

.row2-left img {
  height: 40px;
  margin-right: 10px;
}

.row2-left,
.row2-right {
  min-width: 200px;
}


/* ===== UFO PANEL (modern holographic gradient) ===== */
.ufo-control-panel {
  position: fixed !important;
  top: 200px !important;
  right: 20px !important;
  width: 320px !important;
  max-width: 320px !important;
  z-index: 2147483647 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* main wrapper visuals */
.ufo-control-panel .ufo-cover-screen {
  width: 320px;
  height: 220px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.65) 0%,
      rgba(140, 170, 255, 0.45) 25%,
      rgba(145, 120, 255, 0.45) 50%,
      rgba(255, 180, 220, 0.40) 75%,
      rgba(255, 120, 120, 0.35) 100%);
  box-shadow: 0 12px 36px rgba(15, 20, 30, 0.45), 0 0 32px rgba(160, 120, 255, 0.12);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

/* top row inside cover */
.ufo-cover-screen .cover-top {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.ufo-cover-screen .cover-left {
  width: 72px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ufo-cover-screen .cover-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ufo-cover-screen .cover-right {
  width: 62px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* analog clock container */
.analog-wrap {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
}

/* temperature bubble */
.temp-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  color: #0b1430;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(20, 30, 60, 0.18);
  width: 110px;
  max-width: 100%;
  font-size: 14px;
}

/* top small icon row */
.icon-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.cover-icon {
  background: transparent;
  border: none;
  padding: 6px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}

.cover-icon svg {
  opacity: 0.95;
  transform: translateZ(0);
}

/* digital clock */
.digital-clock {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.18);
}

/* expanded wrapper */
.ufo-expanded-wrap {
  height: 0;
  overflow: hidden;
  transition: height 420ms cubic-bezier(.2, .9, .2, 1);
  margin-top: 12px;
  border-radius: 18px;
}

/* expanded header */
.expanded-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  color: #fff;
}

.collapse-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(180deg, #2f3356, #1b1830);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.exp-title {
  flex: 1;
}

.exp-title-main {
  font-weight: 800;
  font-size: 15px;
}

.exp-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

/* content */
.ufo-content {
  padding: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.06));
  border-radius: 12px;
}

.chat-bubble.assistant {
  background: linear-gradient(90deg, #7b61e6, #b687f3);
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  display: inline-block;
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

/* conversation area */
.conversation-area {
  margin-top: 12px;
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  padding: 6px;
  background: #f4f5f7;
  border-radius: 10px;
}

/* input row */
.input-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

#ufoInput {
  flex: 1;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  outline: none;
  font-size: 14px;
}

#ufoSend {
  width: 52px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(180deg, #6f4ef0, #a05be9);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

/* bottom bar */
.bottom-bar {
  margin-top: 12px;
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(90deg, #5f49f2, #b16be6);
  color: #fff;
}

.bottom-icons {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.bottom-item {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  padding: 8px 10px;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
}

.bottom-search {
  display: flex;
  gap: 8px;
}

.bottom-search input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
}

/* folded state helpers (we will toggle .folded on root) */
.ufo-control-panel.folded .ufo-expanded-wrap {
  height: 0 !important;
}

.ufo-control-panel.expanded .ufo-expanded-wrap {
  height: 620px !important;
}

/* expanded target height; measured to match contents */

/* small responsive tweak */
@media (max-width:420px) {
  .ufo-control-panel {
    right: 12px !important;
  }

  .ufo-control-panel .ufo-cover-screen {
    transform: scale(0.95);
    transform-origin: top right;
  }
}

/* Remove these lines from CSS: 
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="ufo-panel.css">
*/
