/* ===========================================================
   PJS LUXURY SEARCH OVERLAY — Pandora-Style
   =========================================================== */

/* FULLSCREEN OVERLAY */
.search-panel {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding-top: 50px;
  z-index: 10000;
  overflow-y: auto;
}

/* ACTIVE STATE */
.search-panel.open {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* OUTER WRAPPER */
.search-popup-inner {
  max-width: 1400px;
  width: 95%;
  margin: 0 auto;
  position: relative;
}

/* CLOSE BUTTON */
.search-close {
  position: absolute;
  right: 10px;
  top: -5px;
  font-size: 26px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #222;
}

/* ===========================================================
   MAIN TWO-COLUMN GRID
   =========================================================== */
.search-panel-content {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  padding: 40px 0 60px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ===========================================================
   LEFT SIDE — TITLE + SUGGESTIONS
   =========================================================== */

.search-left {
  padding-left: 0;
  margin-top: -10px;
}

.search-title {
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 18px;
  letter-spacing: 1px;
  color: #222;
}

.search-jump small {
  color: #777;
  font-size: 13px;
}

/* suggestion list container */
.search-suggestions {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

/* each section */
.suggestion-section {
  margin-bottom: 8px;
}
.suggestion-section h4 {
  font-size: 13px;
  color: #777;
  margin-bottom: 10px;
  font-weight: 600;
}

/* clickable suggestion links */
.suggestion-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  color: #222;
  text-decoration: none;
  cursor: pointer;
}

.suggestion-item .s-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-size: 15px;
}

/* ===========================================================
   SEARCH INPUT (TOP BOX)
   =========================================================== */
.popup-search-input {
  width: 100%;
  background: transparent;
  border: none;
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  height: 32px;
  outline: none;
  color: #000;
}

.popup-search-input::placeholder {
  color: #aaa;
  letter-spacing: 0.5px;
}

/* ===========================================================
   RIGHT SIDE — PRODUCT RESULTS
   =========================================================== */

.search-right {
  padding-right: 6px;
}

/* CLEAR BUTTON */
.search-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
  padding-right: 8px;
}

.search-clear {
  background: none;
  border: none;
  color: #777;
  cursor: pointer;
  font-size: 14px;
}

/* PRODUCT GRID */
.search-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.search-product {
  background: #fff;
  text-align: left;
}

/* product thumbnail */
.search-product .thumb {
  background: #f3f3f3;
  height: 140px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-product img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* product title */
.search-product .p-title {
  font-size: 14px;
  color: #222;
  margin: 8px 0 4px;
}

/* price */
.search-product .p-price {
  font-size: 13px;
  color: #666;
}

/* ===========================================================
   RESPONSIVE ADJUSTMENTS
   =========================================================== */
@media (max-width: 1024px) {
  .search-results {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .search-panel-content {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 30px 0 50px;
  }

  .search-results {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-left {
    order: 2;
  }
  .search-right {
    order: 2;
  }

  .search-close {
    top: 5px;
    right: 5px;
  }
}

/* search results — product style to match product page */
#searchResults {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  align-items: start;
  padding: 12px;
}

/* each product card */
.search-product {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: block;
  text-decoration: none;
  color: inherit;
}

/* thumb: fixed aspect ratio and cover behavior */
.search-product .thumb {
  width: 100%;
  aspect-ratio: 1 / 1; /* square card */
  overflow: hidden;
  background: #fafafa;
  display: block;
}

.search-product .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* <-- cover the container like product page */
  display: block;
  transition: transform 0.4s ease;
}

/* title and price region */
.search-product .p-title {
  padding: 12px 12px 6px;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  line-height: 1.2;
  height: 40px; /* clamp lines visually */
  overflow: hidden;
}

.search-product .p-price {
  padding: 0 12px 14px;
  font-weight: 700;
  color: #b28a4a; /* brand gold */
  font-size: 14px;
}

/* small screens: single column */
@media (max-width: 480px) {
  #searchResults {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .search-product .p-title {
    height: auto;
  }
}
/* PANDORA MOBILE SEARCH LAYOUT */
@media (max-width: 768px) {
  .search-panel-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 0 60px;
  }

  /* LEFT ALWAYS COMES FIRST */
  .search-left {
    order: 1;
    width: 100%;
    padding: 0 16px;
  }

  .popup-search-box {
    margin-bottom: 14px;
  }

  .search-jump {
    margin-bottom: 8px;
  }

  .search-suggestions {
    margin-bottom: 22px;
  }

  /* RIGHT SIDE (PRODUCT GRID) MOVES BELOW SUGGESTIONS */
  .search-right {
    order: 1;
    width: 100%;
    padding: 0 16px;
  }

  .search-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
  }

  .search-results {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}
