.sf-home, .sf-view {
  --sf-ink: #101a32;
  --sf-teal: #00645e;
  --sf-line: #d3dfe7;
  --sf-muted: #365269;
  color: var(--sf-ink);
}
.sf-home [hidden], .sf-view[hidden], .sf-view [hidden] { display: none !important; }
.sf-home { padding: clamp(26px, 5vw, 60px) 0; }
.sf-home .sf-home-head { max-width: 660px; margin: 0 0 clamp(16px, 3vw, 28px); }
.sf-home-head span { color: var(--sf-teal); font-weight: 800; }
.sf-home-head h2, .sf-wrap h1 { color: var(--sf-ink); font-size: clamp(1.6rem, 3.45vw, 2.55rem); line-height: 1.09; letter-spacing: -.038em; margin: 5px 0 8px; overflow-wrap: anywhere; }
.sf-home-head p, .sf-intro { font-size: clamp(1rem, 2vw, 1.17rem); line-height: 1.4; margin: 0; color: #253952; }
.sf-home-grid, .sf-new-grid, .sf-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(9px, 1.4vw, 18px); }
.sf-card, .sf-new-card, .sf-row, .sf-product { display: block; min-width: 0; color: inherit; text-decoration: none; border: 1px solid var(--sf-line); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 3px 6px #152d4810; }
.sf-card { display: flex; flex-direction: column; }
.sf-card:hover, .sf-new-card:hover, .sf-row:hover, .sf-product:hover { border-color: #19887e; }
.sf-card:focus-visible, .sf-new-card:focus-visible, .sf-row:focus-visible, .sf-product:focus-visible { outline: 3px solid #108578; outline-offset: 2px; }
.sf-home svg, .sf-view svg { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.2em; }
.sf-media, .sf-avatar { position: relative; display: grid; place-items: center; overflow: hidden; background: #e8f1f3; color: #507179; }
.sf-media > svg { width: clamp(25px, 6vw, 46px); height: auto; }
.sf-image { display: block; width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.sf-card-photo { aspect-ratio: 1.56; }
.sf-card-body { display: flex; flex: 1; flex-direction: column; position: relative; padding: clamp(8px, 1.3vw, 17px); gap: 7px; }
.sf-avatar { border: 3px solid #fff; border-radius: 50%; width: clamp(37px, 5.8vw, 63px); aspect-ratio: 1; }
.sf-card-body > .sf-avatar { position: absolute; top: -15px; left: clamp(5px, 1vw, 14px); }
.sf-card-name { display: block; padding-left: clamp(34px, 6vw, 67px); min-height: 2.6em; }
.sf-card-name strong, .sf-new-name strong, .sf-row-body strong { display: block; font-size: clamp(.96rem, 1.6vw, 1.24rem); line-height: 1.15; letter-spacing: -.028em; overflow-wrap: anywhere; }
.sf-card-name > span:not(.sf-demo), .sf-new-name > span, .sf-row-body > span:not(.sf-demo) { display: block; font-size: .86rem; line-height: 1.25; color: #2a4558; margin-top: 3px; overflow-wrap: anywhere; }
.sf-demo { display: inline-block; padding: 2px 6px; border-radius: 6px; background: #eef1f5; color: #435669; font-size: .72rem; font-weight: 750; }
.sf-count { font-size: .8rem; line-height: 1.25; margin-top: auto; }
.sf-visit, .sf-directory-link, .sf-more, .sf-actions :is(a, button) { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 750; text-decoration: none; line-height: 1.2; }
.sf-visit { font-weight: 400; text-align: center; padding: 7px 2px; border-radius: 9px; background: #d5efed; color: #004d49; font-size: .85rem; }
.sf-home-action { text-align: center; margin-top: clamp(19px, 4vw, 36px); }
.sf-directory-link { font-weight: 400; background: #006c67; color: #fff; border: 4px solid #fff; border-radius: 999px; padding: 12px clamp(14px, 4vw, 38px); font-size: clamp(.99rem, 1.9vw, 1.24rem); }
.sf-view { background: #fafbfc; min-height: 62vh; }
.sf-wrap { width: min(calc(100% - 24px), 1060px); margin: 0 auto; padding: clamp(14px, 3vw, 24px) 0 clamp(32px, 7vw, 76px); }
.sf-crumbs { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; font-size: .87rem; overflow-wrap: anywhere; }
.sf-crumbs a { color: #164b55; }
.sf-crumbs svg { color: var(--sf-teal); }
.sf-search { display: flex; align-items: center; gap: 9px; border: 1px solid #aebfce; border-radius: 9px; margin: 18px 0 14px; padding: 0 11px; background: #fff; }
.sf-search:focus-within { outline: 2px solid #09796e; outline-offset: 1px; }
.sf-search input { width: 100%; min-width: 0; padding: 11px 0; border: 0; outline: none; color: var(--sf-ink); background: transparent; font: inherit; }
.sf-search input::placeholder { color: #455b73; }
.sf-rubros { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 21px; }
.sf-rubros button, .sf-list-head select { border: 1px solid var(--sf-line); border-radius: 999px; padding: 6px 11px; min-height: 36px; background: #f5f9fb; color: var(--sf-ink); font: inherit; font-size: .86rem; cursor: pointer; }
.sf-rubros button[aria-pressed="true"] { background: #00746e; color: #fff; border-color: #00746e; font-weight: 750; }
.sf-wrap h2 { margin: 0; font-size: clamp(1.22rem, 2.65vw, 1.72rem); line-height: 1.16; letter-spacing: -.032em; }

.sf-new {
  margin-bottom: 30px;
  border-radius: 5px;
  background: #ffd600;
}
.sf-new-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  padding: 11px clamp(12px, 2.3vw, 39px);
}
.sf-new-star {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: clamp(30px, 2.4vw, 40px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  background: #ffbf00;
  box-shadow: inset 0 0 0 1px #fff6;
}
.sf-new-star > svg { width: 61%; height: 61%; fill: currentColor; }
#storefront .sf-directory .sf-new-head h2 {
  margin: 0;
  font-size: clamp(1.125rem, 2.1vw, 2.125rem);
  line-height: 1.05;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.sf-new-head p {
  margin: 0;
  color: var(--sf-ink);
  font-size: clamp(.8rem, 1.18vw, 1.2rem);
  line-height: 1.24;
  font-style: italic;
}
.sf-new-head > .sf-new-spark { display: none; }
.sf-new .sf-new-grid {
  padding: 8px clamp(9px, 1.1vw, 18px) clamp(10px, 1.32vw, 22px);
  gap: clamp(8px, .6vw, 11px);
  border-radius: clamp(14px, 2.1vw, 32px) clamp(14px, 2.1vw, 32px) 5px 5px;
  background: linear-gradient(105deg, #ffe67b, #ffec93 48%, #ffe67b);
}
.sf-new-card {
  position: relative;
  padding: clamp(4px, .48vw, 8px);
  border-color: #fff4c0;
  border-radius: clamp(13px, 1.95vw, 32px);
  box-shadow: 0 2px 3px #bc8a1930;
}
.sf-new-card:hover { border-color: #bb8a00; }
.sf-new-photo {
  aspect-ratio: 2.09;
  border-radius: clamp(9px, 1.45vw, 24px) clamp(9px, 1.45vw, 24px) 12px 12px;
}
.sf-new-name { display: block; padding: clamp(8px, .7vw, 12px) clamp(5px, 1.3vw, 22px) clamp(4px, .55vw, 9px); }
#storefront .sf-directory .sf-new-name strong {
  font-size: clamp(.87rem, 1.43vw, 1.45rem);
  font-weight: 750;
}
.sf-new-name .sf-new-category {
  display: flex;
  align-items: flex-start;
  gap: clamp(4px, .5vw, 8px);
  margin-top: clamp(4px, .6vw, 9px);
  font-size: clamp(.74rem, 1.04vw, 1.06rem);
  color: var(--sf-ink);
}
.sf-new-category > svg { flex: none; color: #17254f; }
.sf-new-category-leaf > svg { color: #087b6c; }
#storefront .sf-directory .sf-new-badge {
  position: absolute;
  top: clamp(4px, .48vw, 8px);
  right: clamp(7px, .8vw, 14px);
  max-width: calc(100% - 18px);
  background: #d92323;
  color: #fff;
  border-radius: 0 999px 999px 999px;
  padding: 4px clamp(7px, .82vw, 13px);
  font-size: clamp(.65rem, .97vw, .98rem);
  font-weight: 400;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
@media (min-width: 1100px) {
  .sf-new-head {
    grid-template-columns: auto max-content minmax(0, 1fr) auto;
    gap: clamp(10px, .8vw, 14px);
    padding: 12px clamp(18px, 2vw, 32px);
  }
  #storefront .sf-directory .sf-new-head h2 { font-size: clamp(1.125rem, 2.1vw, 2rem); }
  .sf-new-star { grid-row: auto; }
  .sf-new-head p {
    font-size: clamp(.8rem, 1.15vw, 1.125rem);
    border-inline-start: 2px solid #fff8;
    margin-inline-start: clamp(6px, 1.3vw, 22px);
    padding: 6px 0 6px clamp(10px, 1.75vw, 29px);
  }
  .sf-new-head > .sf-new-spark {
    display: block;
    width: clamp(23px, 2.1vw, 35px);
    color: #fff;
  }
  .sf-new-spark > svg { width: 100%; height: auto; stroke-width: 2.4; }
}
@media (min-width: 1100px) {
  .sf-new .sf-new-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding-inline: 14px;
    gap: 9px;
  }
  .sf-new-grid > .sf-new-card { flex: 0 0 calc((100% - 36px) / 5); }
  .sf-new-name { padding-inline: clamp(8px, 1vw, 14px); }
  #storefront .sf-directory .sf-new-name strong { font-size: clamp(1rem, 1.43vw, 1.1875rem); }
  .sf-new-name .sf-new-category { font-size: clamp(.78rem, 1.04vw, .9rem); }
}
@media (width < 1100px) {
  .sf-new-grid > .sf-new-card:nth-child(n + 5) { display: none; }
}
@media (max-width: 789px) {
  .sf-new-photo { aspect-ratio: 1.65; }
}

.sf-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.sf-list-head select { border-radius: 8px; max-width: 100%; background: #fff; }
.sf-wrap h2 span { color: #41647a; }
#sfProductTitle { font-weight: 400; }
.sf-list { display: grid; gap: 9px; }
.sf-row { display: grid; grid-template-columns: clamp(68px, 24vw, 135px) minmax(0, 1fr) auto; align-items: center; gap: clamp(8px, 1.5vw, 16px); min-height: 72px; padding: 4px 9px 4px 4px; border-radius: 13px; }
.sf-row-photo { aspect-ratio: 1.55; border-radius: 9px; }
.sf-row-body { min-width: 0; }
.sf-row-body small { display: block; margin: 4px 0; font-size: .82rem; color: var(--sf-muted); }
.sf-row > svg { color: var(--sf-teal); }
.sf-profile { border: 1px solid #e1e8ed; border-radius: 16px; background: #fff; overflow: hidden; padding-bottom: 14px; }
.sf-cover { height: clamp(100px, 26vw, 290px); }
/* Actitud10: keep the face in view in this portrait cover. */
.sf-cover > .sf-image[src$="/api/comercio/foto/b26f24b684170324513ea186766a32af"] { object-position: 50% 26.5%; }
.sf-profile-heading { display: flex; align-items: flex-start; gap: clamp(8px, 2vw, 19px); position: relative; margin: 8px 12px 0; }
.sf-profile-heading > div { min-width: 0; }
.sf-profile-heading .sf-avatar { width: clamp(61px, 14vw, 112px); border-width: 5px; flex: none; margin-top: clamp(-44px, -5vw, -20px); box-shadow: 0 3px 7px #152d4824; }
.sf-profile-heading .sf-avatar svg { width: 35%; height: auto; }
.sf-profile-heading p { margin: 4px 0; }
.sf-profile-heading .sf-location { color: var(--sf-muted); font-size: .87rem; }
.sf-description { white-space: pre-line; overflow-wrap: anywhere; margin: 12px 14px; }
.sf-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 13px 12px 0; }
.sf-actions :is(a, button), .sf-more { border: 1px solid #adbfca; border-radius: 8px; background: #fff; padding: 8px 10px; color: var(--sf-ink); min-height: 43px; cursor: pointer; }
.sf-actions :is(a, button) { flex: 1 1 132px; text-align: center; font-size: .89rem; }
.sf-actions .sf-contact { color: #fff; background: #007b56; border-color: #007b56; }
.sf-more { margin-top: 14px; color: var(--sf-teal); }
#sfShareFallback { display: block; padding: 6px 12px; }
#sfShareFallback input { display: block; width: 100%; }
.sf-shop .sf-search { margin-bottom: clamp(16px, 3vw, 25px); }
.sf-products { margin-top: 13px; }
.sf-product { display: flex; flex-direction: column; }
.sf-product .sf-media { aspect-ratio: 1.34; }
.sf-product strong { font-weight: 400; display: block; padding: 7px 8px 4px; overflow-wrap: anywhere; line-height: 1.2; }
.sf-product-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 5px 8px 8px; gap: 4px; font-weight: 400; font-size: clamp(.88rem, 2.4vw, 1.23rem); }
.sf-product-foot svg { color: #005c57; background: #b8ece9; border-radius: 50%; padding: 4px; width: 25px; height: 25px; }
.sf-empty { grid-column: 1 / -1; padding: 10px 0; color: var(--sf-muted); }
@media (min-width: 790px) {
  .sf-home-grid, .sf-products, .sf-new-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 359px) {
  .sf-card-name { padding-left: 0; padding-top: 15px; }
  .sf-search input { font-size: .9rem; }
}
#comercios.sf-home { padding: clamp(26px, 5vw, 60px) 0; background: radial-gradient(ellipse at 93% 8%, #d8f5fb, transparent 49%), radial-gradient(ellipse at 7% 98%, #d5f3fa, transparent 40%), #f5fbfd; }
#comercios .sf-home-head h2 { color: var(--sf-ink); font-family: inherit; font-size: clamp(1.6rem, 3.45vw, 2.55rem); line-height: 1.09; letter-spacing: -.038em; margin: 5px 0 8px; }
.sf-wrap h1[tabindex="-1"]:focus { outline: none; }

@media (min-width: 380px) {
  .sf-home-head h2::after {
    content: '';
    display: inline-block;
    width: 28px;
    height: 26px;
    vertical-align: top;
    margin-left: 4px;
    background: linear-gradient(#e7be00, #e7be00) 5px 0 / 3px 11px no-repeat,
                linear-gradient(#e7be00, #e7be00) 13px 7px / 3px 13px no-repeat,
                linear-gradient(#e7be00, #e7be00) 20px 15px / 3px 11px no-repeat;
    transform: rotate(35deg);
  }
}

#storefront .sf-directory,
#storefront .sf-directory * { font-weight: 400; }

@media (max-width: 700px) {
  .sf-home-grid { gap: 15px 13px; }
}


/* Comercios compactos - solo computadora */
@media (min-width: 1100px) {
  #comercios .sf-home-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
  }

  #comercios .sf-card {
    border-radius: 9px;
  }

  #comercios .sf-card-body {
    padding: 12px;
  }

  #comercios .sf-card-name strong {
    font-size: 16px;
  }

  #comercios .sf-card-body > .sf-avatar {
    width: 46px;
  }

  #comercios .sf-card-name {
    padding-left: 47px;
  }
}

@media (min-width: 1100px) {
  .sf-directory #sfDirectoryRows {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Directorio comercial - tarjetas */
#sfDirectoryRows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

#sfDirectoryRows .sf-directory-card {
  border-radius: 10px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

#sfDirectoryRows .sf-card-photo {
  aspect-ratio: 1.65;
}

#sfDirectoryRows .sf-card-body {
  padding: 12px;
  gap: 8px;
}

#sfDirectoryRows .sf-avatar {
  width: 44px;
  left: 10px;
  top: -15px;
}

#sfDirectoryRows .sf-card-name {
  padding-left: 43px;
  min-height: 48px;
}

#sfDirectoryRows .sf-card-name strong {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
}

#sfDirectoryRows .sf-count {
  color: #526c79;
  font-size: 12px;
}

#sfDirectoryRows .sf-visit {
  background: #d5efed;
  color: #005c57;
  padding: 8px 3px;
  border-radius: 6px;
  font-size: 13px;
}

@media (790px <= width < 1100px) {
  #sfDirectoryRows {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 700px) {
  #sfDirectoryRows {
    gap: 10px;
  }

  #sfDirectoryRows .sf-card-body {
    padding: 9px;
  }

  #sfDirectoryRows .sf-card-name {
    padding-left: 35px;
    min-height: 54px;
  }

  #sfDirectoryRows .sf-avatar {
    width: 36px;
    left: 7px;
    top: -12px;
  }

  #sfDirectoryRows .sf-card-name strong {
    font-size: 14px;
  }

  #sfDirectoryRows .sf-card-name > span {
    font-size: 11px;
  }
}


/* Barra horizontal exclusiva del directorio */
.sf-directory .sf-rubros-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid #e2e9eb;
  border-radius: 9px;
  padding: 5px 7px;
  margin: 0 0 21px;
}
.sf-directory .sf-rubros {
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 3px;
  margin: 0;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.sf-directory .sf-rubros::-webkit-scrollbar {
  display: none;
}
.sf-directory .sf-rubros button {
  flex: 0 0 auto;
  white-space: nowrap;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #56626a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 400;
  min-height: 36px;
  padding: 8px 12px;
}
.sf-directory .sf-rubros button:hover {
  background: #f1f6f4;
}
.sf-directory .sf-rubros button[aria-pressed="true"] {
  background: #dff5ed;
  color: #126353;
  font-weight: 400;
}
.sf-directory .sf-rubro-arrow {
  flex: 0 0 27px;
  width: 27px;
  height: 29px;
  border: 0;
  border-radius: 50%;
  background: #f4f7f6;
  color: #778681;
  font-size: 22px;
  cursor: pointer;
  padding: 0;
}
@media (max-width: 700px) {
  .sf-directory .sf-rubros-bar {
    padding: 4px;
    gap: 2px;
    margin-bottom: 15px;
  }
  .sf-directory .sf-rubros button {
    font-size: 12px;
    padding: 7px 10px;
    min-height: 34px;
  }
  .sf-directory .sf-rubro-arrow {
    flex-basis: 22px;
    width: 22px;
    height: 27px;
  }
}
