/* ============================================================
   products.css — Search, Results, Drug Detail
   ============================================================ */

/* ── Products Header ── */
.products-header {
  background: var(--dark);
  padding: 80px 24px 40px;
  border-bottom: 4px solid var(--red);
}

.products-header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-logo-link { flex-shrink: 0; }
.header-logo {
  width: 70px;
  height: 70px;
  max-width: 70px;
  max-height: 70px;
  object-fit: contain;
  display: block;
}

.products-title {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
}

.products-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
}

/* ── Nav home button in lang bar ── */
.nav-home-btn {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 13px;
  margin-left: auto;
  padding: 3px 12px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  transition: all 0.2s;
}
body.lang-en .nav-home-btn { margin-left: 0; margin-right: auto; }
.nav-home-btn:hover { color: #fff; border-color: rgba(255,255,255,0.4); }

/* ── Search Section ── */
.search-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.search-wrap {
  position: relative;
  margin-bottom: 32px;
}

.search-box-container {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 0 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box-container:focus-within {
  border-color: var(--red);
  box-shadow: 0 4px 32px rgba(200,16,46,0.15);
}

.search-icon {
  font-size: 1.4rem;
  color: var(--text-muted);
  flex-shrink: 0;
  line-height: 1;
  margin-left: 4px;
}
body.lang-en .search-icon { margin-left: 0; margin-right: 4px; }

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.1rem;
  font-family: var(--font-en);
  color: var(--text);
  background: transparent;
  padding: 16px 14px;
  direction: ltr;
}

.search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  display: none;
  transition: color 0.2s;
}
.search-clear:hover { color: var(--red); }
.search-clear.visible { display: block; }

/* ── Suggestions Dropdown ── */
.suggestions-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  border: 1px solid var(--border);
  overflow: hidden;
  display: none;
  z-index: 50;
  max-height: 380px;
  overflow-y: auto;
}
.suggestions-box.open { display: block; }

.suggestion-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 18px 6px;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  text-decoration: none;
  color: inherit;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: rgba(200,16,46,0.05); }

.suggestion-pill {
  width: 36px; height: 36px;
  background: rgba(200,16,46,0.08);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  color: var(--red);
}

.suggestion-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  direction: ltr;
  text-align: left;
}
.suggestion-form {
  font-size: 0.78rem;
  color: var(--text-muted);
  direction: ltr;
  text-align: left;
}

.suggestion-name mark {
  background: rgba(200,16,46,0.15);
  color: var(--red);
  border-radius: 2px;
  padding: 0 1px;
  font-weight: 700;
}

/* ── Search Placeholder ── */
.search-placeholder {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.placeholder-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}
.search-placeholder p {
  font-size: 1rem;
  margin-bottom: 6px;
}
.placeholder-hint {
  font-size: 0.85rem !important;
  opacity: 0.6;
  font-family: var(--font-en);
  direction: ltr;
  margin-top: 8px !important;
}

/* ── Results Area ── */
.results-area { display: none; }
.results-area.visible { display: block; }

.results-count {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 0 4px;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.result-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  text-decoration: none;
  color: inherit;
  border-right: 4px solid transparent;
  transition: all 0.2s;
}
body.lang-en .result-card { border-right: none; border-left: 4px solid transparent; }
.result-card:hover {
  border-right-color: var(--red);
  transform: translateX(-3px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
body.lang-en .result-card:hover {
  border-left-color: var(--red);
  transform: translateX(3px);
}

.result-info { flex: 1; min-width: 0; }

.result-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  direction: ltr;
  text-align: left;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-name mark {
  background: rgba(200,16,46,0.12);
  color: var(--red-deep);
  border-radius: 2px;
  padding: 0 1px;
}

.result-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  direction: ltr;
  text-align: left;
}

.result-price-wrap { flex-shrink: 0; text-align: center; }

.result-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green);
  font-family: 'Montserrat', monospace;
  white-space: nowrap;
}

.result-currency {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
  margin-top: 1px;
}

.price-on-request {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--red);
  background: rgba(200,16,46,0.07);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  text-align: center;
  line-height: 1.4;
}

.result-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.result-card:hover .result-arrow { transform: translateX(-4px); color: var(--red); }
body.lang-en .result-card:hover .result-arrow { transform: translateX(4px); }

.no-results {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.no-results-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.3; }
.no-results p { font-size: 0.95rem; }

/* ── Drug Detail Page ── */
.drug-detail-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.drug-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 28px;
  transition: color 0.2s;
}
.drug-detail-back:hover { color: var(--red); }

.drug-detail-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.drug-detail-header {
  background: var(--dark);
  padding: 32px 32px 28px;
  border-bottom: 4px solid var(--red);
}

.drug-detail-name {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 900;
  color: #fff;
  direction: ltr;
  text-align: left;
  line-height: 1.2;
  margin-bottom: 6px;
}

.drug-detail-form {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  direction: ltr;
  text-align: left;
}

.drug-detail-body {
  padding: 32px;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  gap: 16px;
}
.detail-row:last-child { border-bottom: none; }

.detail-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.detail-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  direction: ltr;
  text-align: left;
}

.detail-price-value {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--green);
  font-family: 'Montserrat', monospace;
}

.detail-price-currency {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-right: 4px;
}
body.lang-en .detail-price-currency { margin-right: 0; margin-left: 4px; }

.contact-prompt-box {
  background: rgba(200,16,46,0.05);
  border: 1.5px solid rgba(200,16,46,0.2);
  border-radius: 12px;
  padding: 20px 22px;
  text-align: center;
  margin-top: 24px;
}

.contact-prompt-box p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.contact-prompt-btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  padding: 11px 28px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.2s;
}
.contact-prompt-btn:hover {
  background: var(--red-deep);
  transform: translateY(-1px);
}

.drug-not-found {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .products-header-inner { flex-direction: column; align-items: flex-start; }
  .drug-detail-body { padding: 20px; }
  .drug-detail-header { padding: 24px 20px; }
  .detail-row { flex-direction: column; gap: 4px; }
  .detail-value, .detail-price-value { text-align: right; }
  body.lang-en .detail-value, body.lang-en .detail-price-value { text-align: left; }
}
