/* =========================================================
   CERCADOR LLIBRES
   ========================================================= */

.c-cercador-llibres {
  margin-top: var(--mar-t, 0);
  margin-bottom: var(--mar-b, 0);
  padding-top: var(--pad-t, 100px);
  padding-bottom: var(--pad-b, 100px);
  position: relative;
  z-index: 10;
  overflow-x: clip;
}

.c-cercador-llibres--placeholder {
  padding: 1.5rem 2rem;
  background: #f7f7f7;
  border: 2px dashed #ddd;
  border-radius: 8px;
  text-align: center;
  color: #666;
}

.c-cercador-llibres__decorations {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.c-cercador-llibres__decorations .shape {
  position: absolute;
}

.c-cercador-llibres__decorations .shape-1 {
  left: var(--s1-l, 0%);
  top: var(--s1-t, 70%);
  width: var(--s1-w, auto);
  transform: translateY(-50%);
}

.c-cercador-llibres__decorations .shape-2 {
  right: var(--s2-r, 0%);
  top: var(--s2-t, 30%);
  width: var(--s2-w, auto);
  transform: translateY(-50%);
}

.c-cercador-llibres__wrap {
  min-height: 78px;
  grid-column: 2 / 12;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  background: var(--bg-wrap, #ffffff);
  border-radius: var(--br-wrap, 100px);
  border: 1px solid var(--bd-wrap, #EDECF0);
  height: var(--h-desk, 64px);
  padding: 0 32px;
  box-shadow: 0 8px 25px -10px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.3s ease;
}

/* --- INPUT --- */
.c-cercador-llibres__input {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  font-size: var(--fs-input, 24px);
  line-height: var(--fs-input, 24px);
  font-weight: var(--fw-input, 400);
  color: var(--c-input, #1e1348);
  outline: none;
  min-width: 0;
  caret-color: var(--c-caret, #5d4d9b);
  appearance: searchfield;
  -webkit-appearance: searchfield;
  padding: 0;
}

.c-cercador-llibres__input::placeholder {
  color: var(--c-input, #1e1348);
  opacity: 0.5;
  font-weight: var(--fw-input, 400);
}

.c-cercador-llibres__input::-webkit-search-cancel-button,
.c-cercador-llibres__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.c-cercador-llibres__input::-ms-clear,
.c-cercador-llibres__input::-ms-reveal {
  display: none;
  width: 0;
  height: 0;
}

.c-cercador-llibres__clear {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 24px;
  color: var(--c-clear, #a8a8b8);
  flex-shrink: 0;
  transition: color 0.2s ease;
  height: 100%;
}

.c-cercador-llibres__clear:hover {
  color: var(--c-clear-h, #1e1348);
}

.c-cercador-llibres__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--br-submit, 50%);
  background: var(--bg-submit, #91FFCF);
  border: none;
  cursor: pointer;
  color: var(--c-submit, #1e1348);
  flex-shrink: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 768px) {
  .c-cercador-llibres {
    margin-top: var(--mar-t-mob, 0px);
    margin-bottom: var(--mar-b-mob, 0px);
    padding-top: var(--pad-t-mob, 30px);
    padding-bottom: var(--pad-b-mob, 30px);
  }

  .c-cercador-llibres__wrap {
    grid-column: 1 / -1;
    height: var(--h-mob, 62px);
    padding: 0 8px 0 16px;
    min-height: auto;
  }

  .c-cercador-llibres__clear {
    padding: 0 16px;
  }
  
  .c-cercador-llibres__input {
    font-size: var(--fs-input-mob, 18px);
    line-height: var(--fs-input-mob, 18px);
  }
  
  .c-cercador-llibres__submit {
    width: 44px;
    height: 44px;
  }

  .c-cercador-llibres__decorations .shape-1 {
    left: var(--s1-l-mob, -15%);
    top: var(--s1-t-mob, 200%);
    width: var(--s1-w-mob, auto);
  }

  .c-cercador-llibres__decorations .shape-2 {
    right: var(--s2-r-mob, -35%);
    top: var(--s2-t-mob, 0%);
    width: var(--s2-w-mob, auto);
  }
}