/* Morelia Impulsa v1.06 · Qué comprar, cocineras, recetas y proyectos de inversión */

/* Navegación primaria: conserva los nuevos accesos sin comprimir el buscador. */
@media (min-width: 1181px) {
  .site-header-v8 .header-inner-v8 { max-width: 1240px !important; }
  .site-header-v8 .primary-nav-v8 { gap: 10px !important; }
  .site-header-v8 .primary-nav-v8 > a,
  .site-header-v8 .primary-nav-v8 > .nav-more > summary { padding-inline: 9px !important; white-space: nowrap; }
  .site-header-v8 .nav-search-form { width: min(250px, 19vw) !important; min-width: 190px !important; }
}

.shopping-hero,
.recipes-hero,
.cookbooks-hero,
.cooks-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 82% 18%, rgba(115, 222, 239, .24), transparent 28%),
    radial-gradient(circle at 12% 88%, rgba(129, 87, 186, .35), transparent 34%),
    linear-gradient(128deg, #10275f 0%, #253f85 52%, #5b3f8f 100%);
  padding: clamp(74px, 8vw, 126px) 0 clamp(64px, 7vw, 104px);
}
.shopping-hero::after,
.recipes-hero::after,
.cookbooks-hero::after,
.cooks-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -160px;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  border: 75px solid rgba(255,255,255,.055);
  pointer-events: none;
}
.shopping-hero .container,
.recipes-hero .container,
.cookbooks-hero .container,
.cooks-hero .container { position: relative; z-index: 1; }
.shopping-hero h1,
.recipes-hero h1,
.cookbooks-hero h1,
.cooks-hero h1 { max-width: 850px; margin: 8px 0 18px; font-size: clamp(2.35rem, 5vw, 4.65rem); line-height: .98; color: #fff; }
.shopping-hero p,
.recipes-hero p,
.cookbooks-hero p,
.cooks-hero p { max-width: 760px; color: rgba(255,255,255,.86); font-size: clamp(1rem, 1.45vw, 1.2rem); }

.recipes-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 310px); gap: clamp(28px, 6vw, 80px); align-items: end; }
.recipes-hero-stat { display: grid; place-items: center; text-align: center; min-height: 240px; padding: 30px; border: 1px solid rgba(255,255,255,.2); border-radius: 30px; background: rgba(255,255,255,.1); backdrop-filter: blur(14px); box-shadow: 0 26px 60px rgba(6,17,53,.24); }
.recipes-hero-stat strong { display: block; font-size: clamp(3.5rem, 7vw, 6.2rem); line-height: .85; color: #fff; }
.recipes-hero-stat span { font-weight: 800; }
.recipes-hero-stat small { display: block; margin-top: 10px; color: rgba(255,255,255,.75); line-height: 1.55; }

.section-heading-wide { gap: 24px; }
.public-card-grid-4,
.recipe-grid,
.cooks-grid,
.cookbook-grid,
.investment-project-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

.shopping-section-intro { max-width: 850px; margin: -2px 0 24px; color: #5d6780; }
.shopping-profile-card,
.recipe-card,
.cook-card,
.cookbook-card,
.investment-project-card { min-width: 0; border: 1px solid #e2e6f0; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 16px 38px rgba(28,42,87,.08); transition: transform .2s ease, box-shadow .2s ease; }
.shopping-profile-card:hover,
.recipe-card:hover,
.cook-card:hover,
.cookbook-card:hover,
.investment-project-card:hover { transform: translateY(-4px); box-shadow: 0 22px 48px rgba(28,42,87,.14); }
.shopping-profile-card > a,
.recipe-card > a,
.cook-card > a,
.cookbook-card > a,
.investment-project-card > a { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.shopping-profile-card img,
.recipe-card img,
.cook-card img,
.cookbook-card img,
.investment-project-card img { width: 100%; aspect-ratio: 18 / 13; object-fit: cover; background: #e9edf6; }
.recipe-card > a > div,
.cook-card > a > div,
.cookbook-card > a > div,
.investment-project-card > a > div { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.recipe-card h2,
.recipe-card h3,
.cook-card h2,
.cookbook-card h2,
.investment-project-card h3 { margin: 5px 0 10px; font-size: 1.2rem; line-height: 1.16; }
.recipe-card p,
.cook-card p,
.cookbook-card p,
.investment-project-card p { color: #68728a; }
.recipe-card .card-link,
.cook-card .card-link,
.cookbook-card .card-link,
.investment-project-card .card-link { margin-top: auto; padding-top: 16px; }
.recipe-card-meta,
.cook-card-meta { display: grid; gap: 5px; margin-top: 14px; padding-top: 13px; border-top: 1px solid #edf0f6; color: #58627a; font-size: .86rem; }

.shopping-empty { padding: 22px; border: 1px dashed #cdd4e4; border-radius: 18px; color: #657089; background: #fafbfe; }
.shopping-modal { width: min(1180px, calc(100vw - 38px)); max-height: min(88vh, 900px); padding: 0; border: 0; border-radius: 28px; overflow: hidden; background: #fff; box-shadow: 0 38px 110px rgba(7,17,49,.38); }
.shopping-modal::backdrop { background: rgba(8,16,45,.7); backdrop-filter: blur(5px); }
.shopping-modal-panel { max-height: min(88vh, 900px); overflow: auto; padding: clamp(24px, 4vw, 46px); }
.shopping-modal-panel > header { position: sticky; top: -1px; z-index: 3; display: flex; align-items: flex-start; justify-content: space-between; gap: 26px; margin: -12px -12px 26px; padding: 12px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.shopping-modal-panel > header button { width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid #d9deea; border-radius: 50%; background: #fff; color: #243568; font-size: 1.65rem; cursor: pointer; }
body.has-open-dialog { overflow: hidden; }

.public-filter-panel { display: grid; grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(150px, .75fr)) auto; gap: 14px; align-items: end; margin-bottom: 32px; padding: 20px; border: 1px solid #e2e6f0; border-radius: 22px; background: #fff; box-shadow: 0 12px 30px rgba(28,42,87,.06); }
.public-filter-panel label { display: grid; gap: 7px; color: #26355f; font-size: .82rem; font-weight: 800; }
.public-filter-panel input,
.public-filter-panel select { width: 100%; min-height: 46px; border: 1px solid #d9deea; border-radius: 12px; padding: 0 13px; color: #1d2b51; background: #fff; }

.recipe-detail-hero,
.cookbook-detail-hero,
.investment-project-hero { position: relative; isolation: isolate; min-height: clamp(430px, 58vw, 660px); display: flex; align-items: flex-end; padding: 110px 0 70px; color: #fff; background-position: center; background-size: cover; }
.recipe-detail-hero { background-image: var(--recipe-image); }
.cookbook-detail-hero { background-image: var(--cookbook-image); }
.investment-project-hero { background-image: var(--project-image); }
.recipe-detail-overlay,
.cookbook-detail-overlay,
.investment-project-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8,20,56,.93) 0%, rgba(15,30,75,.76) 48%, rgba(15,30,75,.16) 100%), linear-gradient(0deg, rgba(7,15,43,.72), transparent 58%); }
.recipe-detail-hero .container,
.cookbook-detail-hero .container,
.investment-project-hero .container { width: 100%; }
.recipe-detail-hero h1,
.cookbook-detail-hero h1,
.investment-project-hero h1 { max-width: 900px; margin: 10px 0 16px; color: #fff; font-size: clamp(2.5rem, 6vw, 5.6rem); line-height: .94; }
.recipe-detail-hero p,
.cookbook-detail-hero p,
.investment-project-hero p { max-width: 720px; color: rgba(255,255,255,.87); }
.recipe-author-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 22px; }
.recipe-author-line a { color: #fff; font-weight: 900; text-decoration: underline; text-underline-offset: 4px; }

.recipe-detail-grid,
.project-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: clamp(28px, 5vw, 68px); align-items: start; }
.recipe-columns { display: grid; grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr); gap: 26px; margin-top: 32px; }
.recipe-ingredients,
.recipe-steps,
.recipe-cook-card,
.project-facts-card { border: 1px solid #e1e5ef; border-radius: 24px; background: #fff; box-shadow: 0 16px 40px rgba(28,42,87,.07); }
.recipe-ingredients,
.recipe-steps { padding: clamp(22px, 3vw, 34px); }
.recipe-ingredients ul { display: grid; gap: 10px; padding-left: 21px; }
.recipe-steps ol { display: grid; gap: 17px; list-style: none; counter-reset: recipe-step; padding: 0; }
.recipe-steps li { counter-increment: recipe-step; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.recipe-steps li::before { content: counter(recipe-step); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #293e87; color: #fff; font-weight: 900; }
.recipe-cook-card { position: sticky; top: 108px; padding: 18px; }
.recipe-cook-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 18px; margin-bottom: 18px; }
.recipe-cook-card h2 { margin: 5px 0 10px; }

.cookbook-intro { max-width: 900px; margin: 0 auto 48px; padding: 26px 30px; border-left: 5px solid #5b43a0; border-radius: 0 18px 18px 0; background: #f5f2fb; }

.investment-projects-section { padding-top: 44px; }
.investment-project-featured { position: relative; isolation: isolate; min-height: 470px; display: flex; align-items: flex-end; margin-top: 25px; border-radius: 30px; overflow: hidden; background-image: var(--project-card-image); background-size: cover; background-position: center; box-shadow: 0 28px 68px rgba(13,27,72,.19); }
.investment-project-featured-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12,27,72,.94), rgba(28,40,91,.7) 58%, rgba(28,40,91,.14)); }
.investment-project-featured-copy { width: min(720px, 100%); padding: clamp(28px, 5vw, 58px); color: #fff; }
.investment-project-featured-copy h2 { margin: 7px 0 14px; color: #fff; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1; }
.investment-project-featured-copy p { color: rgba(255,255,255,.86); }
.project-card-tags,
.project-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.project-card-tags span,
.project-hero-tags span { padding: 8px 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; color: #fff; background: rgba(255,255,255,.11); font-size: .82rem; font-weight: 800; }
.investment-project-grid { margin-top: 22px; }
.project-facts-card { position: sticky; top: 108px; padding: 26px; }
.project-facts-card dl { display: grid; gap: 0; margin: 15px 0 22px; }
.project-facts-card dl > div { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid #edf0f6; }
.project-facts-card dt { color: #69738a; font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.project-facts-card dd { margin: 0; color: #1b2b53; font-weight: 800; }
.project-source { display: block; margin-top: 18px; }

.profile-location-card,
.profile-location-block { margin: 28px 0; padding: 24px; border: 1px solid #dfe4ef; border-radius: 22px; background: linear-gradient(135deg, #f7f9fd, #f2effa); }
.profile-location-card h2,
.profile-location-block h2 { margin: 6px 0 10px; }
.profile-location-card address,
.profile-location-block address { margin: 0 0 14px; color: #4d5872; font-style: normal; line-height: 1.65; }
.profile-location-card .button,
.profile-location-block .button { width: fit-content; }
.profile-recipes-grid,
.tenencia-gastronomy-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tenencia-gastronomy-intro { max-width: 900px; margin-bottom: 28px; }
.tenencia-gastronomy-block + .tenencia-gastronomy-block { margin-top: 40px; }

/* Administrador */
.admin-intro-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.admin-select-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-height: 490px; overflow: auto; padding: 10px; border: 1px solid #e0e5f0; border-radius: 16px; background: #f8f9fc; }
.admin-select-list > label { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 12px; border: 1px solid #e2e6ef; border-radius: 13px; background: #fff; cursor: pointer; }
.admin-select-list > label:has(input:checked) { border-color: #6d5bb1; background: #f3f0fb; box-shadow: inset 0 0 0 1px #6d5bb1; }
.admin-select-list input { margin-top: 3px; }
.admin-select-list span { min-width: 0; }
.admin-select-list strong,
.admin-select-list small { display: block; }
.admin-select-list small { margin-top: 3px; color: #758097; }
.admin-filter-bar { display: flex; align-items: end; gap: 12px; margin-bottom: 18px; }
.admin-filter-bar label { flex: 1; }
.admin-table td > strong,
.admin-table td > small { display: block; }
.admin-table td > small { margin-top: 4px; color: #748096; max-width: 520px; }
.tenencia-gastronomy-editor { border-color: #ddd5ef !important; background: linear-gradient(145deg, #faf9fd, #f4f1fa); }

@media (max-width: 1100px) {
  .public-card-grid-4,
  .recipe-grid,
  .cooks-grid,
  .cookbook-grid,
  .investment-project-grid,
  .profile-recipes-grid,
  .tenencia-gastronomy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-filter-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-filter-panel button { min-height: 46px; }
  .admin-select-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .shopping-hero,
  .recipes-hero,
  .cookbooks-hero,
  .cooks-hero { padding: 64px 0 58px; }
  .recipes-hero-grid,
  .recipe-detail-grid,
  .project-detail-grid,
  .recipe-columns { grid-template-columns: 1fr; }
  .recipes-hero-stat { min-height: 180px; place-items: start; text-align: left; }
  .public-filter-panel { grid-template-columns: 1fr; padding: 15px; }
  .public-card-grid-4,
  .recipe-grid,
  .cooks-grid,
  .cookbook-grid,
  .investment-project-grid,
  .profile-recipes-grid,
  .tenencia-gastronomy-grid { grid-template-columns: 1fr; }
  .shopping-modal { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .shopping-modal-panel { max-height: 100dvh; padding: 20px 16px 34px; }
  .shopping-modal-panel > header { margin-inline: -4px; }
  .recipe-detail-hero,
  .cookbook-detail-hero,
  .investment-project-hero { min-height: 520px; padding: 96px 0 48px; }
  .recipe-detail-overlay,
  .cookbook-detail-overlay,
  .investment-project-overlay { background: linear-gradient(0deg, rgba(8,20,56,.95), rgba(12,28,72,.45)); }
  .recipe-cook-card,
  .project-facts-card { position: static; }
  .investment-project-featured { min-height: 520px; }
  .investment-project-featured-overlay { background: linear-gradient(0deg, rgba(12,27,72,.96), rgba(28,40,91,.25)); }
  .project-facts-card dl > div { grid-template-columns: 1fr; gap: 4px; }
  .admin-intro-actions,
  .admin-filter-bar { align-items: stretch; flex-direction: column; }
  .admin-intro-actions .button,
  .admin-filter-bar .button { width: 100%; }
}

.admin-select-list-ordered > label { align-items: center; }
.admin-select-list-ordered > label > span:nth-of-type(1) { flex: 1; }
.admin-order-field { display: grid; flex: 0 0 84px; gap: 4px; }
.admin-order-field small { margin: 0; text-align: center; }
.admin-order-field input { width: 100%; min-height: 38px; margin: 0; padding: 7px 8px; text-align: center; }

@media (max-width: 560px) {
  .admin-select-list-ordered > label { align-items: flex-start; flex-wrap: wrap; }
  .admin-order-field { flex-basis: 100%; grid-template-columns: 1fr 90px; align-items: center; }
  .admin-order-field small { text-align: left; }
}
