/* Recherche produit + caméra (style Alibaba) */
.tk-product-search {
  position: relative;
  width: 100%;
  max-width: 36rem;
  min-width: 0;
}

.tk-product-search__form {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.2rem 0.3rem 0.2rem 0.75rem;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tk-product-search__form:focus-within {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgb(16 185 129 / 0.18);
}

.tk-product-search__loupe {
  color: #94a3b8;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.tk-product-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 0.875rem;
  color: #0f172a;
  padding: 0.4rem 0.35rem;
}

.tk-product-search__input::placeholder {
  color: #94a3b8;
}

.tk-product-search__camera,
.tk-product-search__submit {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tk-product-search__camera {
  background: transparent;
  color: #64748b;
}

.tk-product-search__camera:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.tk-product-search__submit {
  background: #059669;
  color: #fff;
}

.tk-product-search__submit:hover {
  background: #047857;
}

/* Variante Bloom (theme2) */
.tk-product-search--bloom .tk-product-search__form:focus-within {
  border-color: #111827;
  box-shadow: 0 0 0 2px #111827;
}

.tk-product-search--bloom .tk-product-search__submit {
  background: #111827;
}

.tk-product-search--bloom .tk-product-search__submit:hover {
  background: #000;
}

/* Navbar shop theme1 */
.tk-product-search--nav {
  flex: 1;
  max-width: 22rem;
  margin: 0 0.75rem;
}

.tk-product-search--organic {
  max-width: none;
}

.car__search .tk-product-search,
.hero__tab__form .tk-product-search,
.search-wrap-1 .tk-product-search {
  max-width: none;
}

.tk-product-search--portal .tk-product-search__submit {
  background: #2563eb;
}

.tk-product-search--portal .tk-product-search__form:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.18);
}

.tk-product-search--portal .tk-product-search__submit:hover {
  background: #1d4ed8;
}

@media (max-width: 1023px) {
  .tk-product-search--nav {
    display: none;
  }
}

.tk-shop-nav-mobile-search {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 10060;
  padding: 0.65rem 1rem 0.85rem;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 12px 28px rgb(15 23 42 / 0.1);
}

.tk-shop-nav-mobile-search.is-open {
  display: block;
}

.tk-shop-nav-mobile-search .tk-product-search {
  max-width: none;
}

.tk-shop-nav-mobile-search .tk-product-search--nav {
  display: block;
  margin: 0;
  max-width: none;
}

#tkShopNav .tk-nav-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 9999px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
}

@media (min-width: 1024px) {
  #tkShopNav .tk-nav-search-toggle {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #tkShopNav .tk-nav-inner {
    gap: 0.5rem;
  }
}

/* Modal image search */
.tk-image-search-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem;
  background: rgb(15 23 42 / 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

@media (min-width: 640px) {
  .tk-image-search-modal {
    align-items: center;
  }
}

.tk-image-search-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tk-image-search-modal__card {
  width: min(26rem, 100%);
  max-height: min(88vh, 34rem);
  overflow: auto;
  background: #fff;
  border-radius: 1.15rem;
  box-shadow: 0 24px 60px rgb(15 23 42 / 0.28);
  padding: 1.15rem 1.15rem 1.25rem;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.tk-image-search-modal.is-open .tk-image-search-modal__card {
  transform: translateY(0);
}

.tk-image-search-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.tk-image-search-modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.tk-image-search-modal__sub {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}

.tk-image-search-modal__close {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
}

.tk-image-search-modal__drop {
  border: 1.5px dashed #cbd5e1;
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tk-image-search-modal__drop.is-dragover {
  border-color: #059669;
  background: #ecfdf5;
}

.tk-image-search-modal__drop-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.65rem;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #059669;
  font-size: 1.15rem;
}

.tk-image-search-modal__drop p {
  margin: 0;
  font-size: 0.875rem;
  color: #334155;
  font-weight: 600;
}

.tk-image-search-modal__drop span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 400;
}

.tk-image-search-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.tk-image-search-modal__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.tk-image-search-modal__btn--primary {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.tk-image-search-modal__preview {
  display: none;
  margin-top: 0.85rem;
  text-align: center;
}

.tk-image-search-modal__preview.is-visible {
  display: block;
}

.tk-image-search-modal__preview img {
  max-width: 100%;
  max-height: 10rem;
  border-radius: 0.75rem;
  object-fit: contain;
  background: #f1f5f9;
}

.tk-image-search-modal__status {
  display: none;
  margin-top: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.tk-image-search-modal__status.is-visible {
  display: block;
}

.tk-image-search-modal__status.is-error {
  background: #fef2f2;
  color: #b91c1c;
}

.tk-image-search-modal__status.is-loading {
  background: #ecfdf5;
  color: #047857;
}

.tk-image-search-modal__file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
