/* =======================================================
   SEARCH MODAL (Fullscreen search)
======================================================== */
.search-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #fff;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: 0.4s;
}
.search-modal.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-modal-container {
  width: 95%;
  max-width: 1300px;
  position: relative;
  text-align: left;
  margin-bottom: 50px;
}

.search-close-btn {
  position: absolute;
  top: -100px; right: 0;
  background: none;
  border: none;
  font-size: 40px;
  cursor: pointer;
}

.search-modal-form {
  display: flex;
  border-bottom: 2px solid #000;
  padding: 10px 0;
}
.search-modal-form input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
}
.search-modal-form button {
  background: none;
  border: none;
  cursor: pointer;
}

.search-suggestions,
.search-suggestions-text {
  margin-top: 20px;
  font-size: 14px;
  color: #999;
}
.search-suggestions a,
.search-suggestions-text a {
  margin-left: 15px;
  color: #000;
  text-decoration: underline;
}

/* ----- Lưới sản phẩm gợi ý ----- */
.suggested-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 30px 0 15px;
}

.suggested-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 15px !important;
  width: 100%;
}

.suggested-product-card {
  display: block;
  text-decoration: none;
  text-align: left !important;
}

.spc-image {
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 10px;
  aspect-ratio: 3/4;
  background: #f5f5f5;
  width: 100%;
}
.spc-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.suggested-product-card:hover .spc-image img {
  transform: scale(1.05);
}

.spc-name {
  font-size: 13px;
  color: #111;
  margin-bottom: 5px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.spc-price {
  font-size: 14px;
  font-weight: 700;
  color: #000;
}

/* ----- Mobile ----- */
@media (max-width: 768px) {
  .search-modal { padding-top: 50px; }
  .search-close-btn { top: -40px; font-size: 35px; }
  .search-modal-form input { font-size: 16px; }

  .search-suggestions-text {
    font-size: 11px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .search-suggestions-text a {
    margin-left: 0;
    padding: 4px 10px;
    background: #f5f5f5;
    border-radius: 20px;
  }

  .suggested-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
  .suggested-title { font-size: 12px; margin-bottom: 10px; }
  .spc-image { margin-bottom: 6px; }
  .spc-name { font-size: 10px; margin-bottom: 2px; }
  .spc-price { font-size: 11px; }
}

/* ----- Loading giá ----- */
.price-loading {
  display: inline-block;
  width: 70px;
  height: 14px;
  background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite ease-in-out;
  border-radius: 3px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
