/* MN3.2 - Business public profile page
   Surface CSS only. No business rules, no data rules. */

.business-profile-hero {
  padding: 2rem 0 1.25rem;
}

.business-profile-hero .breadcrumbs {
  margin-bottom: 1.25rem;
}

.business-profile-hero__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.business-profile-hero__logo {
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  object-fit: contain;
  border-radius: 16px;
  background: #f8f1ef;
  border: 1px solid rgba(17, 24, 39, .08);
}

.business-profile-hero__title,
.business-profile-hero .category-hero__title {
  margin: 0;
  color: var(--mp-ink, #1f2937);
}

.business-profile-hero__description,
.business-profile-hero .category-hero__text {
  margin: .4rem 0 0;
  max-width: 72ch;
  color: var(--mp-muted, #6b7280);
  line-height: 1.6;
}

.category-products {
  padding: 1.5rem 0 4rem;
}

.category-products .section-header {
  margin-bottom: 1.25rem;
}

.category-products .section-header__title {
  margin: 0;
  color: var(--mp-ink, #1f2937);
}

.category-products .section-header__text {
  margin: .25rem 0 0;
  color: var(--mp-muted, #6b7280);
}

/* Business product grid must be isolated from generic search/card button styles. */
.category-products .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.category-products .product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, .07);
}

.category-products .product-card > .product-card__link,
.category-products .product-card > a.product-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-decoration: none;
  line-height: normal;
}

.category-products .product-card > .product-card__link:hover,
.category-products .product-card > a.product-card__link:hover {
  background: transparent;
  color: inherit;
  text-decoration: none;
}

.category-products .product-card__image-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 0;
  background: #f6eeeb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.category-products .product-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-products .product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: .45rem;
  padding: 1rem;
  background: #ffffff;
}

.category-products .product-card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: 2.7em;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--mp-ink, #1f2937);
  font-weight: 800;
}

.category-products .product-card__bakery {
  margin: 0;
  min-height: 1.25em;
  color: var(--mp-muted, #6b7280);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.35;
}

.category-products .product-card__price {
  margin: .1rem 0 .55rem;
  color: #111827;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.category-products .product-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 36px;
  margin-top: auto;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--mp-brand, #a30d18);
  color: #ffffff;
  font-size: .86rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.category-products .empty-state {
  background: #fff;
  border-radius: 18px;
  padding: 2rem;
  border: 1px solid rgba(17, 24, 39, .08);
  box-shadow: 0 10px 30px rgba(16, 24, 40, .06);
}

@media (min-width: 1180px) {
  .category-products .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .category-products .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .business-profile-hero__brand {
    align-items: flex-start;
  }

  .category-products .product-grid {
    grid-template-columns: 1fr;
  }
}

/* MN6B_VISUAL_POLISH_MPV — Public product card polish. Surface CSS only. */
.product-card__image-wrap,
.search-results .product-card__image,
.category-products .product-card__image-wrap {
  background: #f8f1ef;
}

.product-card__image,
.category-products .product-card__image,
.business-profile-page .product-card__image {
  object-fit: cover;
}

.product-card,
.category-products .product-card {
  will-change: transform;
}

.product-card:hover,
.category-products .product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(17, 24, 39, .10);
}

.product-card__title {
  text-wrap: balance;
}

.product-card__price,
.product-card__price-line {
  letter-spacing: -.01em;
}

.product-card__cta {
  cursor: pointer;
}
/* END MN6B_VISUAL_POLISH_MPV */

/* MN6C_BUSINESS_BANNER — Business public profile banner. */
.business-profile-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

.business-profile-banner {
  margin: 0 0 22px;
  border-radius: 0 0 28px 28px;
  overflow: hidden;
  background: #f8f1ef;
  box-shadow: 0 18px 40px rgba(17, 24, 39, .10);
}

.business-profile-banner__image {
  display: block;
  width: 100%;
  aspect-ratio: 1270 / 270;
  min-height: 180px;
  max-height: 270px;
  object-fit: cover;
}

.business-profile-hero--with-banner {
  margin-top: 0;
}

.business-profile-hero__logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(17, 24, 39, .08);
}

@media (max-width: 720px) {
  .business-profile-page {
    padding: 0 16px 36px;
  }
  .business-profile-banner {
    border-radius: 0 0 20px 20px;
  }
  .business-profile-banner__image {
    min-height: 124px;
  }
}
/* END MN6C_BUSINESS_BANNER */

/* MN6C.1 business sticky title begin */
/*
 * Ficha pública de pastelería: al bajar, el bloque de logo + nombre queda visible.
 * Es un ajuste visual de surface. No afecta Domain, datos ni rutas.
 */
.business-page .business-profile-head,
.business-page .business-profile-header,
.business-page .business-identity,
.business-page .business-brand,
.business-page .bakery-profile-head,
.business-page .bakery-profile-header,
.business-page .bakery-identity,
.business-page .bakery-brand {
  position: sticky;
  top: 96px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0 16px;
  margin-bottom: 34px;
  background: linear-gradient(180deg, rgba(248, 244, 241, 0.98) 0%, rgba(248, 244, 241, 0.94) 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(90, 0, 8, 0.08);
}

.business-page .business-profile-head::after,
.business-page .business-profile-header::after,
.business-page .business-identity::after,
.business-page .business-brand::after,
.business-page .bakery-profile-head::after,
.business-page .bakery-profile-header::after,
.business-page .bakery-identity::after,
.business-page .bakery-brand::after {
  content: "";
  position: absolute;
  left: -24px;
  right: -24px;
  bottom: -14px;
  height: 14px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(248, 244, 241, 0.75), rgba(248, 244, 241, 0));
}

.business-page .business-profile-head img,
.business-page .business-profile-header img,
.business-page .business-identity img,
.business-page .business-brand img,
.business-page .bakery-profile-head img,
.business-page .bakery-profile-header img,
.business-page .bakery-identity img,
.business-page .bakery-brand img {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
}

.business-page .business-profile-head h1,
.business-page .business-profile-header h1,
.business-page .business-identity h1,
.business-page .business-brand h1,
.business-page .bakery-profile-head h1,
.business-page .bakery-profile-header h1,
.business-page .bakery-identity h1,
.business-page .bakery-brand h1 {
  margin: 0;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

@media (max-width: 760px) {
  .business-page .business-profile-head,
  .business-page .business-profile-header,
  .business-page .business-identity,
  .business-page .business-brand,
  .business-page .bakery-profile-head,
  .business-page .bakery-profile-header,
  .business-page .bakery-identity,
  .business-page .bakery-brand {
    top: 76px;
    gap: 12px;
    padding: 10px 0 12px;
    margin-bottom: 24px;
  }

  .business-page .business-profile-head img,
  .business-page .business-profile-header img,
  .business-page .business-identity img,
  .business-page .business-brand img,
  .business-page .bakery-profile-head img,
  .business-page .bakery-profile-header img,
  .business-page .bakery-identity img,
  .business-page .bakery-brand img {
    width: 62px;
    height: 62px;
    border-radius: 14px;
  }
}

/* MN6C.2 - Business sticky hero */
.business-profile-page .business-profile-hero {
  position: sticky;
  top: 60px;
  z-index: 60;
  margin-top: 0;
  margin-bottom: 28px;
  background: rgba(248, 245, 243, 0.96);
  backdrop-filter: blur(10px);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 10px 24px rgba(28, 19, 16, 0.07);
}

/* MN6C.2 - Business banner subtle radius */
.business-profile-banner,
.business-profile-banner__image {
  border-radius: 8px;
}


/* MN6C.3 - Business banner-first layout
   Si existe banner, dejamos solo breadcrumb + H1 accesible arriba,
   luego el banner. Si no hay banner, se mantiene la barra actual. */
.business-profile-page .business-profile-hero.business-profile-hero--with-banner {
  position: static;
  top: auto;
  z-index: auto;
  margin: 0 0 12px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  backdrop-filter: none;
}

.business-profile-page .business-profile-hero.business-profile-hero--with-banner .category-hero__content {
  padding: 0;
}

.business-profile-page .business-profile-hero.business-profile-hero--with-banner .business-profile-hero__brand {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* MN6C.6 - Breadcrumb vertical alignment only */
.business-profile-page .business-profile-hero.business-profile-hero--with-banner .breadcrumbs {
  min-height: 24px;
  display: flex;
  align-items: center;
  padding-top: 6px;
  padding-bottom: 6px;
}

.business-profile-page .business-profile-banner {
  margin: 0 0 28px;
}

.business-profile-page .business-profile-banner,
.business-profile-page .business-profile-banner__image {
  border-radius: 8px;
}

@media (max-width: 760px) {
  .business-profile-page .business-profile-banner {
    margin-bottom: 22px;
  }

  .business-profile-page .business-profile-banner,
  .business-profile-page .business-profile-banner__image {
    border-radius: 6px;
  }
}

/* MN6C.4 - Business sticky reveal after banner
   Con banner visible: no se muestra la barra logo/nombre.
   Cuando el banner sale del viewport: aparece barra sticky compacta.
   Nunca se ven banner y barra sticky juntos. */
body.business-profile-has-banner .business-profile-page .business-profile-hero.business-profile-hero--with-banner {
  position: sticky;
  top: var(--business-sticky-top, 60px);
  z-index: 80;
  margin: 0 0 18px;
  background: rgba(248, 245, 243, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 10px 24px rgba(28, 19, 16, 0.07);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

body.business-profile-has-banner.business-profile-sticky-active .business-profile-page .business-profile-hero.business-profile-hero--with-banner {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body.business-profile-has-banner .business-profile-page .business-profile-hero.business-profile-hero--with-banner .category-hero__content {
  padding: 12px 18px;
}

body.business-profile-has-banner .business-profile-page .business-profile-hero.business-profile-hero--with-banner .breadcrumbs {
  display: none;
}

body.business-profile-has-banner .business-profile-page .business-profile-hero.business-profile-hero--with-banner .business-profile-hero__brand {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  display: flex;
  align-items: center;
  gap: 14px;
}

body.business-profile-has-banner .business-profile-page .business-profile-hero.business-profile-hero--with-banner .business-profile-hero__logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: contain;
}

body.business-profile-has-banner .business-profile-page .business-profile-hero.business-profile-hero--with-banner .business-profile-hero__title {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.1;
}

@media (max-width: 760px) {
  body.business-profile-has-banner .business-profile-page .business-profile-hero.business-profile-hero--with-banner {
    top: var(--business-sticky-top, 58px);
    border-radius: 0 0 10px 10px;
  }

  body.business-profile-has-banner .business-profile-page .business-profile-hero.business-profile-hero--with-banner .category-hero__content {
    padding: 10px 14px;
  }

  body.business-profile-has-banner .business-profile-page .business-profile-hero.business-profile-hero--with-banner .business-profile-hero__logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
}

/* MN6C.5 - Business breadcrumb top compact banner
   Ajuste final:
   - En la parte superior se ve breadcrumb + banner, sin barra doble.
   - El banner queda más arriba, porque el hero oculto ya no reserva altura grande.
   - Al bajar, aparece la barra sticky compacta logo/nombre y se oculta el breadcrumb.
*/
body.business-profile-has-banner .business-profile-page .business-profile-hero.business-profile-hero--with-banner {
  position: sticky;
  top: var(--business-sticky-top, 60px);
  z-index: 80;
  margin: 0 0 10px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  backdrop-filter: none;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition: background 160ms ease, box-shadow 160ms ease, border-radius 160ms ease;
}

body.business-profile-has-banner .business-profile-page .business-profile-hero.business-profile-hero--with-banner .category-hero__content {
  padding: 0 0 6px;
}

body.business-profile-has-banner .business-profile-page .business-profile-hero.business-profile-hero--with-banner .breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.8rem;
}

body.business-profile-has-banner .business-profile-page .business-profile-hero.business-profile-hero--with-banner .business-profile-hero__brand {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Estado sticky activo: banner ya salió; se muestra logo + nombre compacto. */
body.business-profile-has-banner.business-profile-sticky-active .business-profile-page .business-profile-hero.business-profile-hero--with-banner {
  margin: 0 0 18px;
  background: rgba(248, 245, 243, 0.98);
  backdrop-filter: blur(10px);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 10px 24px rgba(28, 19, 16, 0.07);
}

body.business-profile-has-banner.business-profile-sticky-active .business-profile-page .business-profile-hero.business-profile-hero--with-banner .category-hero__content {
  padding: 12px 18px;
}

body.business-profile-has-banner.business-profile-sticky-active .business-profile-page .business-profile-hero.business-profile-hero--with-banner .breadcrumbs {
  display: none;
}

body.business-profile-has-banner.business-profile-sticky-active .business-profile-page .business-profile-hero.business-profile-hero--with-banner .business-profile-hero__brand {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  display: flex;
  align-items: center;
  gap: 14px;
}

body.business-profile-has-banner.business-profile-sticky-active .business-profile-page .business-profile-hero.business-profile-hero--with-banner .business-profile-hero__logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: contain;
}

body.business-profile-has-banner.business-profile-sticky-active .business-profile-page .business-profile-hero.business-profile-hero--with-banner .business-profile-hero__title {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.1;
}

/* Banner más compacto visualmente arriba. */
.business-profile-page .business-profile-banner {
  margin-top: 0;
  margin-bottom: 24px;
}

.business-profile-page .business-profile-banner,
.business-profile-page .business-profile-banner__image {
  border-radius: 8px;
}

@media (max-width: 760px) {
  body.business-profile-has-banner .business-profile-page .business-profile-hero.business-profile-hero--with-banner {
    top: var(--business-sticky-top, 58px);
    margin-bottom: 8px;
  }

  body.business-profile-has-banner.business-profile-sticky-active .business-profile-page .business-profile-hero.business-profile-hero--with-banner .category-hero__content {
    padding: 10px 14px;
  }

  body.business-profile-has-banner.business-profile-sticky-active .business-profile-page .business-profile-hero.business-profile-hero--with-banner .business-profile-hero__logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
}

