.aws-search-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  font-family: "Mulish", sans-serif;
  container-type: inline-size;
}

.aws-search-form {
  position: relative;
}

/* SEARCH INPUT */

.aws-search-input-wrap {
  display: flex;
  align-items: stretch;
  border-radius: 999px;
  background: #efefef;
  overflow: hidden;
  min-height: 42px; /* było 84 */
  padding-left: 16px;
  border: none;
}

.aws-search-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 18px;
  line-height: 1.2;
  min-height: 42px;
  color: #111;
  box-shadow: none;
  font-family: "Mulish", sans-serif;
}

/* usuwa ramki z elementora / browsera */

.aws-search-input:focus,
.aws-search-input:active {
  border: none;
  outline: none;
  box-shadow: none;
}

.aws-search-input::placeholder {
  color: #111;
  opacity: 1;
  font-weight: 400;
}

.aws-search-submit {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.aws-search-submit svg {
  width: 30px;
  height: 30px;
  background: #8f42db;
  border-radius: 50%;
  padding: 7px;
  box-sizing: border-box;
  display: block;
}

/* DROPDOWN */

.aws-search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 16px);
  z-index: 9999;
  background: #efefef;
  border-radius: 28px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
  padding: 24px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

/* PANEL */

.aws-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 34px;
  background: #f4f4f4;
  border-radius: 24px;
  padding: 26px;
}

.aws-search-left,
.aws-search-right {
  min-width: 0;
}

/* LEFT LIST */

.aws-search-heading {
  margin: 0 0 24px;
  font-size: 28px;
  font-weight: 700;
  color: #111;
}

.aws-search-results {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

.aws-search-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 7px 18px;
  border-radius: 18px;
  transition: background 0.2s ease;
  min-width: 0;
}

.aws-search-item:hover,
.aws-search-item.is-active {
  background: #e9e9e9;
}

.aws-search-thumb {
  width: 65px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  background: #ddd;
  flex-shrink: 0;
}

.aws-search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aws-search-meta {
  min-width: 0;
}

.aws-search-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.aws-search-taxonomies {
  font-size: 14px;
  color: #8b8b8b;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  overflow-wrap: anywhere;
}

.aws-tax-sep {
  color: #b3b3b3;
  margin: 0 5px;
}

.aws-search-price {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

/* SEE MORE */

.aws-search-footer {
  padding-top: 24px;
}

.aws-view-all-btn {
  width: 100%;
  border: 1px solid #bdbdbd;
  background: transparent;
  color: #8a8a8a;
  padding: 14px;
  font-size: 16px;
  border-radius: 999px;
  cursor: pointer;
}

.aws-view-all-btn:hover {
  background: #e9e9e9;
  color: #111;
}

/* RIGHT PREVIEW */

.aws-search-right {
  display: flex;
  min-width: 0;
}

.aws-preview-card {
  display: none;
  flex-direction: column;
  width: 100%;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.aws-highlight {
  background: var(--aws-highlight-bg, #fff2a8);
  padding: 4px 6px;
  border-radius: 6px;
}

.aws-preview-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 340px;
  padding: 24px;
  text-align: center;
  color: #777;
  font-size: 16px;
}

.aws-preview-image-wrap {
  width: 100%;
  aspect-ratio: 1.35 / 0.8;
  border-radius: 14px;
  overflow: hidden;
  background: #ddd;
  margin-bottom: 20px;
}

.aws-preview-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.aws-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.aws-preview-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.aws-preview-taxonomies {
  font-size: 14px;
  color: #8b8b8b;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}

.aws-preview-excerpt {
  font-size: 15px;
  color: #7a7a7a;
  margin-bottom: 24px;
  overflow-wrap: anywhere;
}

.aws-preview-bottom {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.aws-preview-cart-btn {
  background: #000;
  color: #fff;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  white-space: nowrap;
  box-sizing: border-box;
  flex: 0 1 auto;
}

.aws-preview-price {
  font-size: 28px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: fit-content;
  margin-left: auto;
  text-align: right;
  align-items: flex-end;
  flex: 0 0 auto;
}

/* REMOVE INPUT BORDER COMPLETELY */

.aws-search-input,
.aws-search-input:focus,
.aws-search-input:active {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* usuwa ramkę z elementora */

.aws-search-wrap input {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* usuwa ramkę z kontenera */

.aws-search-input-wrap {
  border: none !important;
}

/* usuwa focus z przeglądarki */

.aws-search-input:focus-visible {
  outline: none !important;
}

/* usuwa hover z całego przycisku */

.aws-search-submit:hover,
.aws-search-submit:focus,
.aws-search-submit:active {
  background: transparent !important;
  box-shadow: none !important;
}

/* hover tylko na kółku */

.aws-search-submit:hover svg {
  background: #a65cff;
}

.aws-is-editor-preview .aws-search-dropdown {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  top: 16px !important;
}

.aws-is-editor-preview .aws-search-form {
  overflow: visible;
}

.aws-is-editor-preview .aws-search-results {
  display: grid !important;
}

.aws-is-editor-preview .aws-preview-card {
  display: flex !important;
}

.aws-is-editor-preview .aws-preview-empty {
  display: none !important;
}

/* estetyczny scrollbar */

.aws-search-results::-webkit-scrollbar {
  width: 6px;
}

.aws-search-results::-webkit-scrollbar-track {
  background: var(--aws-scrollbar-track, transparent);
}

.aws-search-results::-webkit-scrollbar-thumb {
  background: var(--aws-scrollbar-thumb, #d0d0d0);
  border-radius: 999px;
}

.aws-search-results::-webkit-scrollbar-thumb:hover {
  background: var(--aws-scrollbar-thumb-hover, #b5b5b5);
}

/* =====================================
   SKELETON LOADER
===================================== */

.aws-skeleton {
  background: #e6e6e6;
  position: relative;
  overflow: hidden;
}

.aws-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.6),
    transparent
  );
  animation: awsSkeleton 1.2s infinite;
}

@keyframes awsSkeleton {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* elementy */

.aws-skeleton-title {
  height: 16px;
  width: 70%;
  border-radius: 6px;
  margin-bottom: 8px;
  background: rgba(0,0,0,0.3);
}

.aws-skeleton-tax {
  height: 12px;
  width: 50%;
  border-radius: 6px;
  background: rgba(0,0,0,0.3);
}

.aws-skeleton-price {
  height: 16px;
  width: 60px;
  border-radius: 6px;
  background: rgba(0,0,0,0.3);
}

.aws-skeleton-item .aws-search-thumb {
  background: rgba(0,0,0,0.3);
}

/* PROMO PRICE FIX */

.aws-search-price,
.aws-preview-price {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.aws-search-price .aws-price-current {
  font-size: 18px;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  display: block;
}

.aws-search-price .aws-price-old {
  font-size: 14px;
  font-weight: 400;
  color: inherit;
  opacity: 0.55;
  text-decoration: line-through;
  display: block;
}

.aws-preview-price .aws-price-current {
  font-size: 28px;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  display: block;
}

.aws-preview-price .aws-price-old {
  font-size: 16px;
  font-weight: 400;
  color: inherit;
  opacity: 0.55;
  text-decoration: line-through;
  display: block;
}

/* =====================================
   QUANTITY + PREVIEW ACTIONS
===================================== */

.aws-preview-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: nowrap;
  flex: 0 1 auto;
}

.aws-preview-actions:empty {
  display: none;
}

.aws-preview-qty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  flex: 0 0 auto;
  min-width: 140px;
  max-width: 100%;
  box-sizing: border-box;
}

.aws-qty-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  box-sizing: border-box;
  flex: 0 0 34px;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}

.aws-qty-value {
  min-width: 20px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

/* =====================================
   BELOW 1100PX — ONLY RESULTS LIST
===================================== */

@container (max-width: 1100px) {
  .aws-search-dropdown {
    padding: 18px;
    border-radius: 24px;
  }

  .aws-search-panel {
    display: block;
    padding: 20px;
    border-radius: 20px;
  }

  .aws-search-right {
    display: none !important;
  }

  .aws-search-left {
    width: 100%;
    min-width: 0;
  }

  .aws-search-heading {
    margin: 0 0 18px;
    font-size: 24px;
    line-height: 1.15;
  }

  .aws-search-item {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 12px;
  }

  .aws-search-thumb {
    width: 72px;
    height: 64px;
  }

  .aws-search-title {
    font-size: 17px;
  }

  .aws-search-taxonomies {
    font-size: 13px;
    flex-wrap: wrap;
  }

  .aws-search-price {
    font-size: 17px;
  }

  .aws-search-footer {
    padding-top: 18px;
  }
}

/* =========================================
   MOBILE LAYOUT — tylko lista wyników
========================================= */

@container (max-width: 767px) {
  .aws-search-input-wrap {
    min-height: 42px;
  }

  .aws-search-input {
    font-size: 16px;
    min-height: 42px;
  }

  .aws-search-submit {
    width: 42px;
    min-width: 42px;
    height: 42px;
  }

  .aws-search-dropdown {
    padding: 12px;
    border-radius: 20px;
    top: calc(100% + 10px);
  }

  .aws-search-panel {
    display: block;
    padding: 14px;
    border-radius: 18px;
    gap: 0;
  }

  .aws-search-right {
    display: none !important;
  }

  .aws-search-left {
    width: 100%;
    min-width: 0;
  }

  .aws-search-heading {
    margin: 0 0 14px;
    font-size: 18px;
    line-height: 1.2;
  }

  .aws-search-results {
    gap: 8px;
  }

  .aws-search-item {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 14px;
    align-items: center;
  }

  .aws-search-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
  }

  .aws-search-title {
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 4px;
  }

  .aws-search-taxonomies {
    font-size: 12px;
    line-height: 1.2;
    flex-wrap: wrap;
    gap: 0;
  }

  .aws-tax-sep {
    margin: 0 4px;
  }

  .aws-search-price {
    font-size: 15px;
    line-height: 1.05;
    align-items: flex-end;
    text-align: right;
    white-space: nowrap;
  }

  .aws-price-current {
    font-size: 15px;
  }

  .aws-price-old {
    font-size: 11px;
  }

  .aws-search-footer {
    padding-top: 14px;
  }

  .aws-view-all-btn {
    padding: 12px;
    font-size: 14px;
  }

  .aws-highlight {
    padding: 2px 5px;
    border-radius: 5px;
  }
}

/* bardzo małe telefony — np. iPhone 4/4S */
@container (max-width: 380px) {
  .aws-search-dropdown {
    padding: 10px;
    border-radius: 16px;
  }

  .aws-search-panel {
    padding: 12px;
    border-radius: 16px;
  }

  .aws-search-heading {
    font-size: 17px;
    margin-bottom: 12px;
  }

  .aws-search-item {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 12px;
  }

  .aws-search-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
  }

  .aws-search-title {
    font-size: 14px;
    margin-bottom: 3px;
  }

  .aws-search-taxonomies {
    font-size: 11px;
  }

  .aws-tax-sep {
    margin: 0 3px;
  }

  .aws-search-price,
  .aws-price-current {
    font-size: 14px;
  }

  .aws-price-old {
    font-size: 10px;
  }

  .aws-view-all-btn {
    padding: 11px;
    font-size: 13px;
  }
}

.aws-search-input-wrap {
  position: relative;
}

.aws-ghost-text {
  position: absolute;
  right: 100px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0,0,0,0.28);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font: inherit;
  line-height: inherit;
  z-index: 1;
}

.aws-search-input {
  position: relative;
  background: transparent;
  z-index: 2;
}

.aws-powered-by {
  font-size: 11px;
  color: rgba(0,0,0,0.2);
  text-decoration: none;
  pointer-events: auto;
  position: relative;
  z-index: 21;
  display: inline-block;
}

.aws-powered-by-wrap {
  margin-top: 2px;
  text-align: right;
  position: relative;
  z-index: 20;
}

.aws-powered-by {
  font-size: 11px;
  color: rgba(0,0,0,0.2);
  text-decoration: none;
}

.aws-powered-by:hover {
  color: rgba(0,0,0,0.35);
}
