/* SenaPed 14.4.0 — catalog imagery, read-only teams and mobile order dock */

/* Product photography sits inside a consistent framed tile without cropping. */
body #productGrid[data-view="showcase"] .product-media,
body #productGrid[data-view="compact"] .product-media {
  width: auto;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 8px 8px 0;
  overflow: hidden;
  border: 1px solid rgba(24, 21, 16, .07);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 40%, #fff 0 47%, #f1f3f5 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92);
}

body #productGrid .product-media img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  padding: 7px;
  border-radius: 14px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 10px 16px rgba(35, 29, 18, .08));
}

body #productGrid[data-view="list"] .product-media {
  align-self: center;
  margin: 5px;
  overflow: hidden;
  border: 1px solid rgba(24, 21, 16, .07);
  border-radius: 12px;
  background: #fff;
}

body #productGrid[data-view="list"] .product-media img {
  padding: 3px;
  border-radius: 10px;
}

/* Commercial filters use the same rounded, tactile treatment. */
.catalog-filter-trigger,
#brandFilterTrigger,
#familyFilterTrigger,
[data-campaign-products128] {
  min-height: 44px;
  padding-inline: 16px;
  border-radius: 999px !important;
  border-color: rgba(24, 21, 16, .1);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 7px 20px rgba(31, 26, 16, .055), inset 0 1px 0 #fff;
}

[data-campaign-products128] {
  gap: 8px;
  color: #211e19;
  background: linear-gradient(135deg, #ffe487, #f4c95d);
  border-color: rgba(141, 106, 24, .18);
}

.catalog-filter-trigger:hover,
.catalog-filter-trigger[aria-expanded="true"],
[data-campaign-products128]:hover {
  border-color: rgba(214, 176, 82, .65);
  background: #f1f3f5;
  box-shadow: 0 10px 24px rgba(141, 106, 24, .11), inset 0 1px 0 #fff;
}

.catalog-filter-menu {
  border-radius: 20px;
}

/* Teams are a read-only directory sourced from SenaHub. */
.team-readonly-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.team-directory-note {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(168, 121, 28, .16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(214, 176, 82, .105), rgba(255, 255, 255, .72));
}

.team-directory-note-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f1f3f5;
  color: #a8791c;
}

.team-directory-note b,
.team-directory-note small {
  display: block;
}

.team-directory-note b {
  margin-bottom: 3px;
  color: var(--ui-ink, #211e1a);
  font-size: 13px;
}

.team-directory-note small {
  color: var(--ui-muted, #756d61);
  font-size: 11px;
  line-height: 1.45;
}

.team-directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.team-directory-grid > .empty-state {
  grid-column: 1 / -1;
}

.team-directory-card {
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--ui-line, rgba(24, 21, 16, .08));
  border-radius: 20px;
  background: var(--ui-panel, #fff);
  color: var(--ui-ink, #211e1a);
  text-align: left;
  box-shadow: 0 8px 24px rgba(31, 26, 16, .045);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.team-directory-card:hover {
  border-color: rgba(214, 176, 82, .42);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(31, 26, 16, .085);
}

.team-directory-card.is-active {
  border-color: rgba(214, 176, 82, .52);
  background: linear-gradient(135deg, #f1f3f5, #fff);
  box-shadow: 0 14px 34px rgba(141, 106, 24, .1), inset 3px 0 0 #f4c95d;
}

.team-directory-card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #f1f3f5;
  color: #a8791c;
}

.team-directory-card.is-active .team-directory-card-icon {
  background: #fff0bd;
  color: #8d6a18;
}

.team-directory-card-copy,
.team-directory-card-copy b,
.team-directory-card-copy small {
  min-width: 0;
  display: block;
}

.team-directory-card-copy b {
  overflow: hidden;
  font-size: 14px;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-directory-card-copy small {
  margin-top: 5px;
  color: var(--ui-muted, #756d61);
  font-size: 11px;
}

.team-directory-card-arrow {
  display: grid;
  place-items: center;
  color: var(--ui-muted, #756d61);
}

.team-directory-card.is-active .team-directory-card-arrow {
  color: #8d6a18;
  transform: translateX(2px);
}

.team-members-panel {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--ui-line, rgba(24, 21, 16, .08));
  border-radius: 22px;
  background: var(--ui-panel-soft, #f8f9fb);
}

.team-members-head {
  min-height: 102px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--ui-line, rgba(24, 21, 16, .08));
  background: linear-gradient(135deg, rgba(214, 176, 82, .09), rgba(244, 201, 93, .06));
}

.team-members-head span:first-child {
  color: #8d6a18;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.team-members-head h3 {
  margin: 4px 0 5px;
  color: var(--ui-ink, #211e1a);
  font-size: 21px;
  letter-spacing: -.04em;
}

.team-members-head p {
  margin: 0;
  color: var(--ui-muted, #756d61);
  font-size: 11px;
}

.team-members-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.team-member-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--ui-line, rgba(24, 21, 16, .08));
  border-radius: 16px;
  background: var(--ui-panel, #fff);
}

.team-member-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #2a2620, #11100e);
  color: #f4c95d;
  font-size: 12px;
  font-weight: 850;
}

.team-member-copy,
.team-member-copy b,
.team-member-copy small {
  min-width: 0;
  display: block;
}

.team-member-copy b {
  overflow: hidden;
  color: var(--ui-ink, #211e1a);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-member-copy small {
  margin-top: 4px;
  color: var(--ui-muted, #756d61);
  font-size: 10px;
}

/* The mobile order actions become a floating, two-action dock. */
@media (max-width: 900px) {
  :root {
    --mobile-nav-height: calc(94px + env(safe-area-inset-bottom, 0px));
  }

  body .mobile-nav {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    width: auto;
    height: 78px;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: 7px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 25px;
    background: rgba(22, 18, 12, .94);
    box-shadow: 0 20px 50px rgba(15, 13, 8, .32), inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(24px) saturate(155%);
  }

  body .mobile-nav .mobile-search-action,
  body .mobile-nav .mobile-finish-order {
    min-width: 0;
    min-height: 62px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    justify-content: stretch;
    gap: 9px;
    padding: 7px 10px 7px 8px;
    border-radius: 19px;
    text-align: left;
  }

  body .mobile-nav .mobile-search-action {
    border: 1px solid rgba(255, 255, 255, .09);
    background: rgba(255, 255, 255, .065);
    color: #fff;
  }

  body .mobile-nav .mobile-finish-order {
    border: 1px solid rgba(255, 227, 139, .65);
    background: linear-gradient(135deg, #ffe58b, #efbb3f);
    color: #16130c;
    box-shadow: 0 8px 22px rgba(230, 177, 49, .22), inset 0 1px 0 rgba(255, 255, 255, .58);
  }

  .mobile-nav-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, .09);
  }

  .mobile-finish-order .mobile-nav-icon {
    background: rgba(255, 255, 255, .35);
  }

  body .mobile-nav .mobile-nav-icon .icon {
    width: 21px;
    height: 21px;
  }

  .mobile-nav-copy,
  .mobile-nav-copy b,
  .mobile-nav-copy small {
    min-width: 0;
    display: block;
  }

  body .mobile-nav .mobile-nav-copy b {
    position: static;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    overflow: hidden;
    font-size: 11px;
    font-weight: 820;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-nav-copy small {
    overflow: hidden;
    margin-top: 4px;
    color: rgba(255, 255, 255, .48);
    font-size: 8px;
    font-weight: 620;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-finish-order .mobile-nav-copy small {
    color: rgba(22, 19, 12, .58);
  }

  body .mobile-nav .mobile-finish-order #mobileFinishBadge {
    top: 7px;
    right: 7px;
    min-width: 20px;
    height: 20px;
    border: 2px solid #f7cf63;
    background: #211e1a;
    color: #fff;
    font-size: 9px;
  }

  body #mobileCartSummary {
    display: none !important;
  }

  body:has(#mobileCartSummary:not([hidden])) .page-shell {
    padding-bottom: 0;
  }

  .cart-panel {
    bottom: calc(var(--mobile-nav-height) + 3px);
  }

  .cart-scrim {
    bottom: var(--mobile-nav-height);
  }

  .catalog-filter-trigger,
  #brandFilterTrigger,
  #familyFilterTrigger,
  [data-campaign-products128] {
    min-height: 46px;
    padding-inline: 14px;
  }

  .team-directory-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body #productGrid[data-view="showcase"] .product-media,
  body #productGrid[data-view="compact"] .product-media {
    margin: 6px 6px 0;
    border-radius: 15px;
  }

  body #productGrid .product-media img {
    padding: 5px;
  }

  .team-readonly-status {
    width: 100%;
    justify-content: center;
  }

  .team-directory-note {
    align-items: flex-start;
    padding: 13px;
  }

  .team-members-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-member-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .team-member-row > .status {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 390px) {
  body .mobile-nav {
    height: 74px;
    border-radius: 22px;
  }

  body .mobile-nav .mobile-search-action,
  body .mobile-nav .mobile-finish-order {
    min-height: 58px;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 7px;
    padding-inline: 7px;
    border-radius: 17px;
  }

  .mobile-nav-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .mobile-nav-copy small {
    display: none;
  }
}
