/* Cesta lateral FyR
   Tipografía: se toma de la web (--fsc-font / --fsc-font-head, las pone el JS).
   Solo 3 tamaños: 15px (título), 13px (general), 12px (detalles). */
html.fsc-lock, html.fsc-lock body { overflow: hidden; }

.fsc {
  --fsc-dark: #111; --fsc-green: #0b4a37; --fsc-green-hover: #116149; --fsc-grey: #777; --fsc-line: #e5e5e5;
  position: fixed; inset: 0; z-index: 100000; pointer-events: none;
}
.fsc.is-open { pointer-events: auto; }

/* Todo hereda la letra de la web; nada de estilos del tema */
.fsc, .fsc * {
  font-family: var(--fsc-font, inherit) !important;
  box-sizing: border-box;
}
.fsc .fsc-title, .fsc .fsc-name, .fsc .fsc-btn, .fsc .fsc-code button {
  font-family: var(--fsc-font-head, var(--fsc-font, inherit)) !important;
}
.fsc-panel, .fsc-panel button, .fsc-panel input, .fsc-panel a, .fsc-panel label, .fsc-panel span, .fsc-panel div {
  font-size: 13px; line-height: 1.4; letter-spacing: normal; text-transform: none; text-align: left; font-weight: 400;
}

.fsc-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .25s ease; }
.fsc.is-open .fsc-overlay { opacity: 1; }

.fsc-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 520px; max-width: 100vw; background: #fff; color: var(--fsc-dark);
  transform: translateX(100%); transition: transform .3s ease;
  display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(0, 0, 0, .08);
}
.fsc.is-open .fsc-panel { transform: none; }
.fsc-panel.is-busy .fsc-inner { opacity: .55; pointer-events: none; }
.fsc-inner { display: flex; flex-direction: column; height: 100%; min-height: 0; transition: opacity .15s; }
.fsc-loading { padding: 40px 24px; color: var(--fsc-grey); }

.fsc button { color: inherit; background: none; border: 0; cursor: pointer; padding: 0; margin: 0; box-shadow: none; min-height: 0; height: auto; border-radius: 0; }
.fsc a { color: inherit; text-decoration: none; }
.fsc img { display: block; max-width: 100%; }
.fsc button:focus, .fsc a:focus, .fsc input:focus { outline: none; }
.fsc button:focus-visible, .fsc a:focus-visible { outline: 1px solid var(--fsc-dark); outline-offset: 2px; }

/* Cabecera */
.fsc-head { display: flex; justify-content: space-between; align-items: center; padding: 24px 24px 18px; }
.fsc-panel .fsc-title { font-size: 15px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.fsc-close { line-height: 0; padding: 4px !important; }

.fsc-msg { margin: 0 24px 12px; padding: 10px 12px; background: #fbeeee; color: #8a1f1f; }

/* Cuerpo */
.fsc-body { flex: 1 1 auto; overflow-y: auto; padding: 0 24px 24px; min-height: 0; }
.fsc-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

.fsc-lines { list-style: none; margin: 0; padding: 0; }
.fsc-line { display: flex; gap: 16px; padding: 14px 0 18px; border-bottom: 1px solid var(--fsc-line); }
.fsc-img { flex: 0 0 88px; aspect-ratio: 1; overflow: hidden; }
.fsc-img img { width: 100%; height: 100%; object-fit: contain; }
.fsc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.fsc-top { display: flex; justify-content: space-between; gap: 12px; }
.fsc-panel .fsc-name { font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.fsc-panel .fsc-price { white-space: nowrap; }
.fsc-panel .fsc-attrs { font-size: 12px; color: var(--fsc-grey); }

.fsc-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.fsc-qty { display: inline-flex; align-items: center; border: 1px solid var(--fsc-dark); height: 32px; }
.fsc-panel .fsc-qty button { width: 32px; height: 30px; font-size: 15px; text-align: center; }
.fsc-qty button:disabled { opacity: .3; cursor: default; }
.fsc-panel .fsc-qty span { min-width: 26px; text-align: center; }
.fsc-panel .fsc-remove { font-size: 12px; text-decoration: underline; text-underline-offset: 3px; color: var(--fsc-grey); }

/* Secciones */
.fsc-section { padding-top: 22px; }
.fsc-panel .fsc-h { font-size: 13px; font-weight: 500; margin: 0 0 10px; }

/* Cuidados y regalos */
.fsc-panel .fsc-addon {
  position: relative; display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--fsc-line); padding: 8px 12px; margin: 0 0 8px; cursor: pointer;
}
.fsc-addon input { position: absolute; opacity: 0; pointer-events: none; }
.fsc-check { flex: 0 0 16px; height: 16px; border: 1px solid var(--fsc-dark); position: relative; }
.fsc-addon input:checked + .fsc-check { background: var(--fsc-dark); }
.fsc-addon input:checked + .fsc-check::after {
  content: ''; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.fsc-addon input:focus-visible + .fsc-check { outline: 1px solid var(--fsc-dark); outline-offset: 2px; }
.fsc-addon img { flex: 0 0 40px; width: 40px; height: 40px; object-fit: contain; }
.fsc-panel .fsc-addon-name { flex: 1 1 auto; text-align: left !important; }
.fsc-panel .fsc-addon-price { flex: 0 0 auto; white-space: nowrap; }

/* Te puede interesar */
.fsc-reco-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fsc-reco-head .fsc-h { margin: 0; }
.fsc-arrows { display: flex; gap: 6px; }
.fsc-panel .fsc-arrows button {
  width: 30px; height: 30px; border: 1px solid var(--fsc-line) !important;
  font-size: 15px; text-align: center; color: var(--fsc-grey);
}
.fsc-track {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; margin-right: -24px; padding-right: 24px;
}
.fsc-track::-webkit-scrollbar { display: none; }
.fsc-card { flex: 0 0 132px; scroll-snap-align: start; }
.fsc-card-img { position: relative; aspect-ratio: 1; margin-bottom: 8px; }
.fsc-card-img a:first-child, .fsc-card-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fsc-panel .fsc-plus {
  position: absolute; right: 4px; bottom: 4px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff !important; display: flex !important; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); z-index: 2;
}
/* Selector de talla sobre la foto */
.fsc-panel .fsc-plus.is-open { background: var(--fsc-green) !important; color: #fff !important; transform: rotate(45deg); }
.fsc-panel .fsc-plus { transition: transform .15s ease, background .15s ease; }
.fsc-pick {
  position: absolute; inset: 0; padding: 8px 8px 36px; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(255, 255, 255, .97); border: 1px solid var(--fsc-line); z-index: 1;
}
.fsc-pick[hidden] { display: none; }
.fsc-panel .fsc-pick-title { font-size: 12px; color: var(--fsc-grey); margin-bottom: 6px; }
.fsc-pick-opts { display: flex; flex-wrap: wrap; gap: 4px; }
.fsc-panel .fsc-pick-opts button {
  min-width: 34px; padding: 4px 6px !important; border: 1px solid var(--fsc-line) !important;
  font-size: 12px; text-align: center; background: #fff;
}
.fsc-panel .fsc-pick-opts button.is-oos { text-decoration: line-through; color: #bbb; cursor: default; }
.fsc-panel .fsc-pick-opts button:not(.is-oos):hover { border-color: var(--fsc-green) !important; color: var(--fsc-green); }

.fsc-panel .fsc-card-name { display: block; margin-bottom: 2px; }
.fsc-panel .fsc-card-price { display: block; color: var(--fsc-grey); }

/* Pie */
.fsc-foot { flex: 0 0 auto; border-top: 1px solid var(--fsc-line); padding: 16px 24px 20px; background: #fff; }
.fsc-subtotal { display: flex; justify-content: space-between; margin-bottom: 12px; }
.fsc-panel .fsc-subtotal strong { font-size: 15px; font-weight: 500; }
.fsc-voucher { display: flex; justify-content: space-between; margin-bottom: 8px; }
.fsc-panel .fsc-voucher button { margin-left: 8px; font-size: 15px; }
.fsc-code { display: flex; border: 1px solid var(--fsc-line); height: 42px; margin-bottom: 12px; }
.fsc-panel .fsc-code input { flex: 1; border: 0; padding: 0 12px; outline: none; min-width: 0; background: transparent; height: 100%; }
.fsc-panel .fsc-code button { padding: 0 14px !important; font-weight: 500; }

.fsc-buttons { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; }
.fsc-panel .fsc-btn {
  display: flex !important; align-items: center; justify-content: center; height: 46px;
  font-weight: 500; letter-spacing: .06em; text-transform: uppercase; text-align: center;
}
.fsc-btn--ghost { border: 1px solid var(--fsc-dark) !important; }
.fsc .fsc-panel a.fsc-btn--dark, .fsc-btn--dark { background: var(--fsc-green) !important; color: #fff !important; border: 0 !important; }
.fsc .fsc-panel a.fsc-btn--dark:hover, .fsc-btn--dark:hover { background: var(--fsc-green-hover) !important; }

@media (max-width: 575px) {
  .fsc-head { padding: 18px 16px 14px; }
  .fsc-body { padding: 0 16px 20px; }
  .fsc-foot { padding: 14px 16px 16px; }
  .fsc-img { flex-basis: 72px; }
  .fsc-track { margin-right: -16px; padding-right: 16px; }
}
