:root {
  --blue: #0b5ed7;
  --blue-dark: #082a5e;
  --red: #e60023;
  --green: #16a34a;
  --ink: #0b2340;
  --muted: #64748b;
  --line: #e5eaf2;
  --bg: #f6f9fd;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(11, 35, 64, .10);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #fff;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 78px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 54px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 234, 242, .9);
}

.logo {
  display: inline-flex;
  align-items: baseline;
  font-weight: 950;
  font-size: 34px;
  letter-spacing: -2px;
  white-space: nowrap;
}
.logo span { color: var(--blue-dark); font-style: italic; }
.logo strong { color: var(--red); font-style: italic; }
.logo em {
  color: var(--blue-dark);
  font-size: .55em;
  font-style: italic;
  margin-left: 4px;
}

.nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 32px;
  font-weight: 800;
  font-size: 15px;
}
.nav a { color: var(--blue-dark); }
.nav a.active { color: var(--red); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn, .cart-btn, .menu-btn {
  border: 0;
  background: #fff;
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 900;
}
.icon-btn { font-size: 34px; line-height: 1; }
.cart-btn { position: relative; font-size: 25px; padding: 8px; }
.cart-btn span {
  position: absolute;
  top: -3px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: white;
  font-size: 12px;
}
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  padding: 10px 18px;
  border-radius: 12px;
  color: #fff;
  background: #087a3e;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  box-shadow: 0 10px 26px rgba(22, 163, 74, .25);
}
.whatsapp-btn:before { content: ""; width: 20px; height: 20px; margin-right: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='white' d='M16.04 3.2c-7.02 0-12.72 5.7-12.72 12.72 0 2.23.59 4.41 1.7 6.33L3.2 28.8l6.72-1.76a12.69 12.69 0 0 0 6.12 1.56h.01c7.02 0 12.72-5.7 12.72-12.72S23.06 3.2 16.04 3.2Zm0 23.25h-.01c-1.89 0-3.75-.51-5.37-1.48l-.39-.23-3.99 1.05 1.06-3.89-.25-.4a10.49 10.49 0 0 1-1.61-5.58c0-5.83 4.74-10.57 10.57-10.57s10.57 4.74 10.57 10.57-4.75 10.53-10.58 10.53Zm5.8-7.91c-.32-.16-1.89-.93-2.18-1.04-.29-.11-.5-.16-.71.16-.21.32-.82 1.04-1.01 1.25-.19.21-.37.24-.69.08-.32-.16-1.34-.49-2.55-1.57-.94-.84-1.58-1.88-1.77-2.2-.19-.32-.02-.49.14-.65.15-.14.32-.37.48-.56.16-.19.21-.32.32-.53.11-.21.05-.4-.03-.56-.08-.16-.71-1.71-.97-2.34-.26-.62-.52-.54-.71-.55h-.61c-.21 0-.56.08-.85.4-.29.32-1.11 1.09-1.11 2.65s1.14 3.08 1.3 3.29c.16.21 2.24 3.42 5.43 4.8.76.33 1.35.52 1.81.67.76.24 1.45.21 2 .13.61-.09 1.89-.77 2.15-1.52.27-.75.27-1.39.19-1.52-.08-.13-.29-.21-.61-.37Z'/%3E%3C/svg%3E") center / contain no-repeat; flex: 0 0 auto; }
.menu-btn { display: none; font-size: 26px; }

.home-hero {
  width: 100%;
  overflow: hidden;
  background: #eaf4ff;
}
.home-hero picture,
.home-hero img {
  display: block;
  width: 100%;
}
.home-hero img {
  height: auto;
}

.hero-legacy {
  min-height: 620px;
  display: flex;
  align-items: center;
  background-image: linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.86) 34%, rgba(255,255,255,.18) 58%, rgba(255,255,255,0) 100%);
  background-size: cover;
  background-position: center;
  padding: 70px 72px;
}

.hero-copy-legacy { max-width: 620px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
}
h1, h2, h3, p { margin-top: 0; }
.hero-legacy h1 {
  margin-bottom: 18px;
  font-size: clamp(48px, 5vw, 78px);
  line-height: .96;
  letter-spacing: -3px;
}
.hero-subtitle-legacy {
  max-width: 520px;
  font-size: 23px;
  line-height: 1.28;
  color: #18395f;
}
.hero-buttons-legacy { display: flex; gap: 18px; margin: 34px 0; }
.btn {
  border: 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 25px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 950;
}
.btn-primary { background: var(--red); color: white; box-shadow: 0 13px 30px rgba(230,0,35,.22); }
.btn-outline { border: 2px solid var(--red); color: var(--red); background: white; }
.btn-light { background: #edf3fb; color: var(--blue-dark); width: 100%; }
.btn-whatsapp { background: #087a3e; color: white; width: 100%; }

.mini-trust {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.mini-trust div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 130px;
}
.mini-trust span { font-size: 28px; }
.mini-trust b, .mini-trust small { display: block; }
.mini-trust small { color: var(--muted); font-weight: 700; }

.category-bar {
  width: min(1280px, calc(100% - 42px));
  margin: 24px auto 8px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.cat-chip {
  border: 1px solid var(--line);
  background: white;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 15px;
  color: var(--blue-dark);
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(11, 35, 64, .05);
}
.cat-chip.active {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.products-section {
  width: min(1280px, calc(100% - 42px));
  margin: 32px auto 0;
}
.section-heading { text-align: center; margin: 28px auto 28px; }
.section-heading h2 {
  margin-bottom: 8px;
  color: var(--blue-dark);
  font-size: clamp(34px, 4vw, 46px);
  letter-spacing: -1px;
}
.section-heading p { color: var(--muted); font-size: 18px; }


/* V140: search bar is a homepage-level block placed before configured home sections; sorting is hidden on small catalog. */
.home-search-section {
  width: min(1280px, calc(100% - 42px));
  margin: 24px auto 0;
}
.home-search-section .catalog-toolbar {
  margin-bottom: 0;
}

.catalog-toolbar {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 24px;
}
.catalog-toolbar label {
  display: grid;
  gap: 7px;
  font-weight: 900;
  color: var(--blue-dark);
}
.search-box { flex: 1; }
.search-box input, .sort-box select {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 16px;
  background: white;
  color: var(--ink);
  outline: none;
}
.search-box input:focus, .sort-box select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(11, 94, 215, .10); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(11, 35, 64, .06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  border-radius: 8px;
  padding: 6px 9px;
  background: var(--red);
  color: white;
  font-weight: 950;
  font-size: 13px;
}
.product-image {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
  background: #f8fbff;
}
.product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
}
.product-info h3 {
  margin-bottom: 5px;
  color: var(--blue-dark);
  font-size: 16px;
  line-height: 1.18;
}
.product-info p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.price-row {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price {
  color: var(--red);
  font-weight: 950;
  font-size: 21px;
}
.old-price {
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 800;
}
.card-actions {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  margin-top: 13px;
}
.add-cart {
  min-height: 42px;
  border-radius: 9px;
  border: 0;
  background: var(--blue);
  color: white;
  font-weight: 950;
  cursor: pointer;
}
.quick-whatsapp {
  border: 0;
  border-radius: 9px;
  background: #eafaf1;
  color: #138a45;
  cursor: pointer;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.quick-whatsapp img {
  width: 24px;
  height: 24px;
  display: block;
}

.benefits {
  width: min(1280px, calc(100% - 42px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #f4f8fd;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.benefits article {
  padding: 28px 24px;
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 14px;
}
.benefits article + article { border-left: 1px solid var(--line); }
.benefits span { font-size: 38px; grid-row: span 2; }
.benefits h3 { margin-bottom: 7px; font-size: 18px; color: var(--blue-dark); }
.benefits p { margin-bottom: 0; color: #334155; font-weight: 800; font-size: 14px; }

.promo {
  width: min(1280px, calc(100% - 42px));
  margin: 34px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 260px;
  padding: 48px 54px;
  border-radius: 23px;
  color: white;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 16%, rgba(255,255,255,.35), transparent 18%),
    linear-gradient(100deg, rgba(8,42,94,.98), rgba(11,94,215,.78));
  background-size: cover;
  background-position: center;
}
.promo-tag {
  display: inline-flex;
  border-radius: 999px;
  padding: 9px 15px;
  background: var(--red);
  color: #fff;
  font-weight: 950;
}
.promo h2 {
  max-width: 680px;
  margin: 14px 0 10px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -1.6px;
}
.promo p:not(.promo-tag) { color: rgba(255,255,255,.9); font-size: 18px; }
.promo-badge {
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 999px;
  color: var(--blue-dark);
  background: #fff;
  box-shadow: 0 18px 40px rgba(0,0,0,.15);
}

.faq {
  width: min(1280px, calc(100% - 42px));
  margin: 0 auto 48px;
}
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 18px 20px;
  box-shadow: 0 9px 24px rgba(11, 35, 64, .04);
}
summary {
  cursor: pointer;
  color: var(--blue-dark);
  font-weight: 950;
}
details p { margin: 12px 0 0; color: var(--muted); line-height: 1.55; }

.footer {
  display: grid;
  grid-template-columns: 1.4fr .8fr .8fr 1.2fr;
  gap: 46px;
  padding: 54px 72px 34px;
  background: linear-gradient(135deg, #082a5e, #04172e);
  color: #fff;
}
.footer p { color: rgba(255,255,255,.78); line-height: 1.55; }
.footer h4, .footer-title { text-transform: uppercase; letter-spacing: .06em; color: #fff; font-weight: 900; margin: 0 0 12px; }
.footer a {
  display: block;
  margin: 9px 0;
  color: rgba(255,255,255,.78);
}
.footer-logo { margin-bottom: 12px; }
.footer-logo span, .footer-logo em { color: white; }
.footer-logo strong { color: #ff304c; }
.socials { letter-spacing: 12px; font-size: 18px; }
.payment-logos {
  margin-top: 14px;
  display: inline-flex;
  padding: 10px 12px;
  border-radius: 12px;
  background: white;
  color: var(--blue-dark);
  font-weight: 950;
  font-size: 13px;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4, 23, 46, .46);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
}
.cart-drawer.open {
  opacity: 1;
  visibility: visible;
}
.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: #fff;
  box-shadow: -24px 0 60px rgba(0,0,0,.16);
  transform: translateX(100%);
  transition: transform .25s ease;
}
.cart-drawer.open .cart-panel { transform: translateX(0); }
.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-head h2 { margin: 0; }
.cart-head button {
  border: 0;
  background: #edf3fb;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 26px;
  cursor: pointer;
}
.cart-items {
  flex: 1;
  overflow: auto;
  padding: 18px 0;
}
.cart-item {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item img {
  width: 66px;
  height: 66px;
  object-fit: cover;
  border-radius: 12px;
}
.cart-item h4 { margin: 0 0 4px; color: var(--blue-dark); }
.cart-item p { margin: 0; color: var(--red); font-weight: 950; }
.qty-actions { display: flex; gap: 5px; align-items: center; }
.qty-actions button {
  border: 0;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  color: var(--blue-dark);
  font-weight: 950;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  font-size: 22px;
}
.cart-total strong { color: var(--red); }
.cart-panel .btn + .btn { margin-top: 10px; }

@media (max-width: 1100px) {
  .site-header { padding: 0 22px; }
  .nav { display: none; }
  .menu-btn { display: inline-block; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .benefits article:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .benefits article:nth-child(4) { border-top: 1px solid var(--line); }
  .footer { grid-template-columns: repeat(2, 1fr); padding: 44px 28px; }
}

@media (max-width: 760px) {
  .site-header { height: 70px; gap: 10px; }
  .logo { font-size: 26px; letter-spacing: -1px; }
  .whatsapp-btn { display: none; }
  .hero-legacy {
    min-height: 660px;
    padding: 48px 22px;
    align-items: flex-start;
    background-image: linear-gradient(180deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.86) 42%, rgba(255,255,255,.18) 100%);
    background-position: 58% bottom;
  }
  .hero-legacy h1 { font-size: 48px; }
  .hero-subtitle-legacy { font-size: 19px; }
  .hero-buttons-legacy { flex-direction: column; max-width: 270px; }
  .mini-trust { gap: 12px; }
  .category-bar { justify-content: flex-start; overflow: auto; flex-wrap: nowrap; padding-bottom: 8px; }
  .cat-chip { white-space: nowrap; }
  .catalog-toolbar { display: grid; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-info { padding: 12px; }
  .card-actions { grid-template-columns: 1fr; }
  .quick-whatsapp { display: none; }
  .benefits { grid-template-columns: 1fr; }
  .benefits article, .benefits article + article { border-left: 0; border-top: 1px solid var(--line); }
  .benefits article:first-child { border-top: 0; }
  .promo { display: block; padding: 32px 24px; }
  .promo-badge { margin-top: 28px; width: 130px; height: 130px; }
  .faq-grid { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 430px) {
  .product-grid { grid-template-columns: 1fr; }
}


/* Admin */
.admin-body { background: #f4f8fd; }
.admin-wrap { width: min(1220px, calc(100% - 32px)); margin: 28px auto; }
.admin-top { display:flex; justify-content:space-between; align-items:center; gap:18px; margin-bottom:22px; }
.admin-card { background:#fff; border:1px solid var(--line); border-radius:18px; box-shadow:0 12px 30px rgba(11,35,64,.07); padding:22px; margin-bottom:18px; }
.admin-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.admin-grid .full { grid-column:1 / -1; }
.admin-card label { display:grid; gap:7px; font-weight:900; color:var(--blue-dark); }
.admin-card input, .admin-card select, .admin-card textarea { width:100%; border:1px solid var(--line); border-radius:12px; padding:12px 13px; background:#fff; outline:none; }
.admin-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.admin-table { width:100%; border-collapse: collapse; overflow:hidden; }
.admin-table th, .admin-table td { border-bottom:1px solid var(--line); padding:12px 10px; text-align:left; vertical-align:middle; }
.admin-table th { color:var(--blue-dark); font-size:13px; text-transform:uppercase; letter-spacing:.04em; }
.admin-thumb { width:70px; height:70px; object-fit:cover; border-radius:12px; background:#f8fbff; border:1px solid var(--line); }
.notice { padding:12px 14px; border-radius:12px; font-weight:800; margin-bottom:14px; }
.notice.ok { background:#eafaf1; color:#138a45; }
.notice.err { background:#fff1f2; color:#be123c; }
.login-box { width:min(440px, calc(100% - 32px)); margin:80px auto; }
.small-muted { color:var(--muted); font-size:13px; }
@media (max-width:1100px){ .admin-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:760px){ .admin-grid{grid-template-columns:1fr;} .admin-top{display:block;} }


/* V7: 手机端也显示每个产品的 WhatsApp 咨询按钮 */
@media (max-width: 760px) {
  .product-card .card-actions {
    grid-template-columns: 1fr 44px;
  }

  .product-card .quick-whatsapp {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 42px;
  }
}


/* V8: 产品详情页 */
.product-image-link {
  display: block;
  background: #f8fbff;
}

.product-info h3 a {
  color: inherit;
}

.card-actions-3 {
  grid-template-columns: 1fr 1fr 44px;
}

.detail-btn {
  min-height: 42px;
  border-radius: 9px;
  border: 1px solid var(--blue);
  color: var(--blue);
  background: #fff;
  font-weight: 950;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.detail-page {
  background: #f6f9fd;
  padding: 28px 0 54px;
}

.detail-breadcrumb {
  width: min(1280px, calc(100% - 42px));
  margin: 0 auto 20px;
  color: var(--muted);
  font-weight: 800;
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

.detail-breadcrumb a {
  color: var(--blue);
}

.detail-layout {
  width: min(1280px, calc(100% - 42px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 560px) 1fr;
  gap: 34px;
  align-items: start;
}

.detail-gallery {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.detail-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  background: #f8fbff;
}

.detail-badge {
  top: 28px;
  left: 28px;
}

.detail-summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.detail-category {
  color: var(--blue);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 13px;
  margin-bottom: 10px;
}

.detail-summary h1 {
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: -1.5px;
  margin-bottom: 14px;
  color: var(--blue-dark);
}

.detail-feature {
  font-size: 20px;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 22px;
}

.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 26px;
}

.detail-price-row strong {
  color: var(--red);
  font-size: 42px;
  font-weight: 950;
}

.detail-price-row span {
  color: #94a3b8;
  font-size: 22px;
  font-weight: 900;
  text-decoration: line-through;
}

.detail-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.detail-actions .btn {
  min-width: 210px;
}

.detail-specs {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.detail-specs h2 {
  color: var(--blue-dark);
  font-size: 22px;
  margin-bottom: 14px;
}

.detail-specs ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.8;
}

.detail-note {
  margin-top: 22px;
  border-radius: 16px;
  padding: 15px 17px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
}

.detail-info-blocks {
  width: min(1280px, calc(100% - 42px));
  margin: 26px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.detail-info-blocks article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(11, 35, 64, .06);
}

.detail-info-blocks span {
  font-size: 36px;
}

.detail-info-blocks h3 {
  margin: 10px 0 6px;
  color: var(--blue-dark);
}

.detail-info-blocks p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.related-products {
  width: min(1280px, calc(100% - 42px));
  margin: 36px auto 0;
}

.related-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-loading,
.detail-error,
.detail-empty {
  grid-column: 1 / -1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-info-blocks {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .card-actions-3 {
    grid-template-columns: 1fr 1fr 44px;
  }

  .detail-summary {
    padding: 24px;
  }

  .detail-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .detail-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .detail-price-row strong {
    font-size: 34px;
  }
}

@media (max-width: 430px) {
  .related-grid {
    grid-template-columns: 1fr;
  }

  .card-actions-3 {
    grid-template-columns: 1fr 44px;
  }

  .card-actions-3 .detail-btn {
    grid-column: 1 / -1;
  }
}


/* V10: 列表页移除独立 Ver detalle 按钮，图片和名称进入详情页 */
.product-card .card-actions {
  grid-template-columns: 1fr 44px;
}

.product-card .detail-btn {
  display: none !important;
}

@media (max-width: 760px) {
  .product-card .card-actions {
    grid-template-columns: 1fr 44px;
  }
}

.detail-actions .btn-primary,
.detail-actions .btn-outline {
  min-height: 52px;
}

.detail-actions .btn-outline {
  background: #fff;
}


/* V11: 修复图片可点击、详情页购物车图标与两列动作 */
.product-image-link {
  display: block;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.product-image-link .product-image {
  display: block;
}

.detail-header-cart {
  display: inline-flex;
}

.detail-page .detail-actions {
  align-items: stretch;
}

.detail-page .detail-add-cart {
  gap: 8px;
}

.detail-page .detail-add-cart::before {
  content: "🛒";
}

@media (max-width: 760px) {
  .detail-header-cart {
    display: inline-flex;
  }
}


/* V14: Quantity tier pricing */
.tier-card-note {
  margin: 4px 0 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.tier-card-price .price {
  font-size: 19px;
}

.price-tier-table {
  margin: 20px 0 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.price-tier-table h2 {
  margin: 0;
  padding: 16px 18px;
  color: var(--blue-dark);
  background: #f4f8fd;
  font-size: 20px;
}

.price-tier-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  align-items: center;
}

.price-tier-row.header {
  color: var(--muted);
  font-weight: 950;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.price-tier-row strong {
  color: var(--red);
  font-size: 20px;
}

.box-qty-pill {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.detail-qty-box {
  display: grid;
  gap: 10px;
  margin: 18px 0 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fbff;
}

.detail-qty-box label {
  display: grid;
  gap: 8px;
  color: var(--blue-dark);
  font-weight: 950;
}

.detail-qty-box input {
  width: 150px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font-weight: 950;
  font-size: 18px;
}

.detail-price-preview {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 900;
}

.detail-price-preview strong {
  color: var(--red);
}

.cart-item p {
  line-height: 1.35;
}

@media (max-width: 760px) {
  .price-tier-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .price-tier-row.header {
    display: none;
  }

  .detail-qty-box input {
    width: 100%;
  }
}


/* V15: multi image gallery */
.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.detail-thumb {
  border: 2px solid transparent;
  background: #fff;
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}

.detail-thumb.active {
  border-color: var(--blue);
}

.detail-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.admin-image-preview-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-image-preview-grid img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f8fbff;
}

.admin-help {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .detail-thumbs {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* V16: fixed 3-tier pricing admin UI */
.admin-tier-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 8px 0;
}

.admin-tier-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #f8fbff;
}

.admin-tier-box h3 {
  margin: 0 0 12px;
  color: var(--blue-dark);
  font-size: 17px;
}

.admin-tier-box label {
  margin-bottom: 10px;
}

.admin-tier-box .locked-field {
  background: #eef4fb;
  color: #64748b;
}

.admin-tier-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  padding: 12px 14px;
  border-radius: 14px;
}

@media (max-width: 900px) {
  .admin-tier-panel {
    grid-template-columns: 1fr;
  }
}

/* V19: admin product image management */
.admin-image-list-title {
  font-weight: 900;
  color: var(--blue-dark);
  margin-bottom: 8px;
}

.admin-image-manage-grid {
  gap: 12px;
}

.admin-image-item {
  width: 132px;
  display: grid !important;
  gap: 7px !important;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
  color: var(--blue-dark);
  font-size: 12px;
}

.admin-image-item img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.admin-image-file {
  overflow-wrap: anywhere;
  line-height: 1.25;
  color: var(--muted);
}

.admin-image-keep {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 900;
}

.admin-image-keep input {
  width: auto !important;
}


/* V20: clickable quantity tiers */
.price-qty-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  width: 100%;
  max-width: 180px;
  padding: 8px 12px;
  border: 1px solid rgba(11, 94, 215, .25);
  border-radius: 999px;
  background: #f4f8fd;
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.price-qty-button:hover,
.price-qty-button.active {
  background: #eaf2ff;
  box-shadow: 0 8px 18px rgba(11, 94, 215, .14);
  transform: translateY(-1px);
}

.price-qty-button:focus-visible {
  outline: 3px solid rgba(11, 94, 215, .22);
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .price-qty-button {
    max-width: none;
    justify-content: flex-start;
  }
}

/* V21: detalle SKU, descripción y backend textarea */
.detail-sku-line {
  font-size: 20px;
  color: var(--muted);
  font-weight: 800;
  margin: -10px 0 22px;
}

.detail-description {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.detail-description h2 {
  color: var(--blue-dark);
  font-size: 22px;
  margin-bottom: 14px;
}

.detail-description p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.8;
}

.admin-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  font-weight: 800;
  resize: vertical;
  min-height: 120px;
  background: #fff;
}


/* V25: admin home hero upload */
.admin-hero-preview {
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 18px;
  overflow: hidden;
  background: #f8fafc;
  max-width: 760px;
}
.admin-hero-preview img {
  display: block;
  width: 100%;
  height: auto;
}

/* V27: align Lista de Precios quantity header with quantity buttons */
.price-tier-row > span:first-child {
  display: flex;
  justify-content: center;
}

.price-tier-row.header > span:first-child {
  width: 100%;
  max-width: 180px;
  text-align: center;
}

@media (max-width: 700px) {
  .price-tier-row.header > span:first-child {
    max-width: none;
  }
}

/* V28: categories, marketing badges, retail-only discounts */
.admin-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 14px;
  margin-top: 10px;
}
.admin-check-grid label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #334155;
}
.admin-check-grid input { width: auto !important; }
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.discount-price { color: #dc2626; font-weight: 1000; }
.price-tier-row del { color: #94a3b8; font-size: 13px; margin-left: 6px; }
.discount-only-retail { display: block; margin-top: 4px; color: #dc2626; font-size: 12px; font-weight: 900; }
.discount-policy-note { margin: 10px 18px 16px; color: #7f1d1d; background: #fff1f2; border-color: #fecdd3; }
.cart-item small { color: #dc2626; font-weight: 800; }
@media (max-width:760px){ .admin-check-grid{grid-template-columns:1fr;} }

/* V29: detail badges, admin save/delete improvements, product detail benefits */
.product-card-badges {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  pointer-events: none;
}
.product-card-badges .badge,
.detail-badges .badge,
.detail-gallery-badges .badge,
.admin-static-badge {
  position: static;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  line-height: 1.15;
}
.detail-gallery-badges {
  position: absolute;
  top: 34px;
  left: 34px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.detail-gallery-badges .badge {
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 14px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .18);
}
.legacy-badge { background: #ef4444 !important; color: #fff !important; }
.discount-percent-badge {
  display: block;
  margin-top: 5px;
  color: #dc2626;
  font-size: 12px;
  font-weight: 950;
}
.detail-benefits {
  margin-top: 28px;
  margin-bottom: 0;
}
.admin-inline-save {
  margin-top: 10px;
  width: fit-content;
}
.admin-quick-delete-form {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.admin-badge-editor {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: #f8fafc;
}
.admin-badge-editor h3 { margin: 0 0 12px; color: var(--blue-dark); }
.admin-badge-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
@media (max-width: 760px) {
  .detail-gallery-badges { top: 24px; left: 24px; right: 24px; }
  .detail-gallery-badges .badge { font-size: 12px; padding: 7px 10px; }
  .admin-quick-delete-form, .admin-badge-editor-grid { grid-template-columns: 1fr; }
}


/* V33: stable product detail, admin and SEO UX enhancements */
.detail-savings-banner,
.detail-upgrade-hint {
  margin: 14px 0;
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 900;
  line-height: 1.45;
}
.detail-savings-banner {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.detail-upgrade-hint {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.detail-savings-banner[hidden],
.detail-upgrade-hint[hidden] { display: none; }
.detail-gallery { touch-action: pan-y; }
.detail-thumb img { loading: lazy; }
.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px;
  gap: 12px;
  margin: 12px 0 18px;
}
.admin-toolbar input, .admin-toolbar select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  background: #fff;
  outline: none;
  font-weight: 800;
}
.admin-url-preview {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-weight: 800;
  word-break: break-all;
}
.admin-copy-form { display: inline-flex; }
@media (max-width: 760px) {
  .admin-toolbar { grid-template-columns: 1fr; }
  .related-products { width: 100%; padding-left: 21px; padding-right: 0; }
  .related-grid {
    display: flex;
    overflow-x: auto;
    gap: 14px;
    padding: 4px 21px 12px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .related-grid .product-card {
    min-width: 78%;
    scroll-snap-align: start;
  }
}


/* V34: admin productivity and product detail magnifier */
.admin-bulk-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0 16px;
}
.admin-bulk-table .admin-mini-input {
  width: 92px;
  min-width: 92px;
  padding: 9px 10px;
  border-radius: 10px;
  font-weight: 800;
}
.admin-toggle-cell {
  display: flex !important;
  grid-template-columns: auto 1fr !important;
  align-items: center;
  gap: 6px !important;
  font-weight: 800 !important;
  white-space: nowrap;
}
.admin-toggle-cell input { width: auto !important; }
.admin-pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}
.admin-hidden-form { display: none; }
.admin-drag-handle {
  display: inline-flex;
  align-self: flex-start;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--blue-dark);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
  cursor: grab;
}
.admin-image-item.dragging {
  opacity: .55;
  outline: 2px dashed var(--blue);
}
.detail-gallery {
  position: relative;
}
.detail-gallery-zoom-lens {
  position: absolute;
  width: 140px;
  height: 140px;
  border: 2px solid rgba(11,94,215,.55);
  background: rgba(255,255,255,.22);
  pointer-events: none;
  border-radius: 16px;
  display: none;
  z-index: 5;
}
.detail-gallery-zoom-preview {
  position: absolute;
  left: calc(100% + 18px);
  top: 0;
  width: 360px;
  height: 360px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background-repeat: no-repeat;
  background-color: #fff;
  box-shadow: 0 18px 42px rgba(11,35,64,.16);
  display: none;
  z-index: 20;
}
@media (hover: hover) and (min-width: 980px) {
  .detail-gallery.zooming .detail-gallery-zoom-lens,
  .detail-gallery.zooming .detail-gallery-zoom-preview { display: block; }
}
@media (max-width: 760px) {
  .admin-bulk-table .admin-mini-input { width: 78px; min-width: 78px; }
}

/* V35: 后台标签式重构 */
.admin-main-tabs,
.admin-form-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 18px;
}
.admin-main-tab,
.admin-form-tab {
  border: 1px solid var(--line);
  text-decoration: none;
  background: #fff;
  color: var(--blue-dark);
  border-radius: 999px;
  padding: 11px 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(11,35,64,.05);
}
.admin-main-tab.active,
.admin-form-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.admin-main-panel,
.admin-form-panel {
  display: none;
}
.admin-main-panel.active,
.admin-form-panel.active {
  display: block;
}
.admin-form-tabs {
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
}
.admin-form-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
}
.admin-seo-preview {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #f8fbff;
}
.admin-seo-preview p {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}
.admin-seo-preview strong {
  color: var(--blue-dark);
}
@media (max-width: 760px) {
  .admin-main-tabs,
  .admin-form-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .admin-main-tab,
  .admin-form-tab {
    width: 100%;
    border-radius: 14px;
    padding: 10px 8px;
    font-size: 13px;
  }
  .admin-form-panel {
    padding: 12px;
  }
}

/* V36 content management enhancements */
.home-hero-copy {
  position: absolute;
  left: clamp(18px, 6vw, 88px);
  bottom: clamp(22px, 7vw, 100px);
  max-width: 560px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 18px 45px rgba(15,23,42,.16);
  backdrop-filter: blur(10px);
}
.home-hero-copy h1 { margin: 8px 0 10px; font-size: clamp(28px, 4vw, 56px); line-height: 1; color: #0f172a; }
.home-hero-copy p { margin: 0 0 18px; color: #334155; font-weight: 700; }
.home-hero-copy[hidden] { display: none; }
.detail-specs,
.detail-extra-info {
  margin-top: 22px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.detail-specs h2,
.detail-extra-info h2 { margin: 0 0 12px; color: #0f172a; }
.detail-specs table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 16px; }
.detail-specs th,
.detail-specs td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #eef2f7; vertical-align: top; }
.detail-specs th { width: 42%; color: #475569; font-weight: 900; background: #f8fafc; }
.detail-specs td { color: #0f172a; font-weight: 750; }
.detail-extra-info { display: grid; gap: 16px; }
.detail-extra-info p { margin: 0; color: #475569; line-height: 1.7; }
.admin-hero-preview img { width: 100%; max-height: 280px; object-fit: cover; border-radius: 22px; border: 1px solid #e5e7eb; }
@media (max-width: 760px) {
  .home-hero-copy { left: 14px; right: 14px; bottom: 14px; padding: 18px; border-radius: 22px; }
  .home-hero-copy h1 { font-size: 28px; }
  .detail-specs th,
  .detail-specs td { display: block; width: 100%; }
  .detail-specs th { border-bottom: 0; padding-bottom: 4px; }
  .detail-specs td { padding-top: 4px; }
}
.home-hero { position: relative; }


/* V37: 首页运营与分类入口 */
.compact-heading { margin-top: 18px; margin-bottom: 18px; }
.compact-heading h2 { font-size: clamp(28px, 3vw, 38px); }
.home-category-entrance,
.home-featured-section,
.home-featured-sections {
  width: min(1280px, calc(100% - 42px));
  margin: 28px auto 0;
}
.home-category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
.home-category-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 18px;
  padding: 18px;
  text-align: left;
  box-shadow: 0 10px 26px rgba(11,35,64,.06);
  cursor: pointer;
  color: var(--blue-dark);
  display: grid;
  gap: 7px;
  min-height: 142px;
}
.home-category-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.home-category-icon { font-size: 30px; }
.home-category-card strong { font-size: 18px; }
.home-category-card small { color: var(--red); font-weight: 900; }
.home-category-card em { color: var(--muted); font-style: normal; font-size: 13px; line-height: 1.25; }
.home-featured-block { margin-top: 28px; }
.home-featured-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.detail-footer { margin-top: 48px; }
.admin-dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.admin-dashboard-card { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 16px; display: grid; gap: 8px; }
.admin-dashboard-card strong { color: var(--blue-dark); font-size: 18px; }
.admin-dashboard-card span { color: var(--red); font-weight: 950; }
.admin-dashboard-card small { color: var(--muted); font-weight: 800; line-height: 1.35; }
@media (max-width: 980px) {
  .home-category-grid,
  .home-featured-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .home-category-card { min-width: 210px; scroll-snap-align: start; }
  .home-featured-grid .product-card { min-width: 220px; scroll-snap-align: start; }
  .admin-dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .home-category-entrance,
  .home-featured-section, .home-featured-sections { width: min(100% - 24px, 1280px); }
}

/* V38: shipping, trust and policy pages */
.shipping-announcement {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 18px;
  background: linear-gradient(90deg, #082a5e, #0b5ed7);
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.shipping-announcement strong { color: #fff; }
.shipping-announcement span { color: rgba(255,255,255,.94); }
.trust-strip {
  width: min(1180px, calc(100% - 42px));
  margin: 28px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.trust-strip article,
.detail-trust-box,
.policy-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(11,35,64,.06);
}
.trust-strip article { padding: 18px; }
.trust-strip strong,
.detail-trust-box strong { display: block; color: var(--blue-dark); font-weight: 950; margin-bottom: 6px; }
.trust-strip span,
.detail-trust-box p { color: var(--muted); line-height: 1.45; margin: 0; }
.detail-trust-box {
  margin: 18px 0;
  padding: 16px 18px;
  background: #f8fbff;
}
.detail-trust-box ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.55; }
.policy-hero {
  width: min(1100px, calc(100% - 42px));
  margin: 42px auto 18px;
  padding: 34px;
  border-radius: 26px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.policy-hero h1 { margin: 8px 0 10px; font-size: clamp(30px, 4vw, 52px); color: var(--blue-dark); }
.policy-layout {
  width: min(1100px, calc(100% - 42px));
  margin: 18px auto 52px;
  display: grid;
  gap: 16px;
}
.policy-card { padding: 24px; }
.policy-card h2 { margin: 0 0 10px; color: var(--blue-dark); }
.policy-card p, .policy-card li { color: var(--muted); line-height: 1.65; }
.policy-card ul { margin: 10px 0 0; padding-left: 22px; }
.policy-highlight {
  border-left: 6px solid var(--red);
  background: #fff7f7;
}
.detail-qty-box input[type="number"] {
  appearance: auto;
  -moz-appearance: number-input;
}
.detail-qty-box input[type="number"]::-webkit-inner-spin-button,
.detail-qty-box input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
}
@media (max-width: 760px) {
  .shipping-announcement { font-size: 13px; gap: 6px; }
  .trust-strip { grid-template-columns: 1fr; }
  .policy-hero { padding: 24px; }
}


/* V39: cart delivery method, searchable comunas and WhatsApp conversion */
.cart-delivery-box {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  display: grid;
  gap: 10px;
}
.cart-delivery-box h3 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 16px;
}
.delivery-option {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  color: var(--blue-dark);
  cursor: pointer;
}
.delivery-option input { width: 16px; height: 16px; accent-color: var(--blue); }
.delivery-comuna-wrap {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid var(--line);
}
.delivery-comuna-wrap label { font-weight: 950; color: var(--blue-dark); font-size: 13px; }
.delivery-comuna-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font-weight: 800;
  outline: none;
}
.delivery-comuna-wrap input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,94,215,.12); }
.delivery-help,
.delivery-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 750;
}
.delivery-help { color: #0b5ed7; }
.cart-item small { color: #64748b; font-weight: 850; }


/* V40 checkout shipping rules */
.pickup-address-box {
  margin: 8px 0 10px 28px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #eff6ff;
  color: #0b3b75;
  font-size: 13px;
  font-weight: 800;
}

.delivery-comuna-wrap {
  position: relative;
}

.comuna-suggestions {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 260px;
  overflow: auto;
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
  padding: 6px;
}

.comuna-suggestion {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.comuna-suggestion:hover,
.comuna-suggestion:focus {
  background: #f8fafc;
  outline: none;
}

.comuna-name {
  color: #0B5ED7;
  font-weight: 800;
}

.comuna-badge-flex {
  color: #E60023;
  font-weight: 900;
  letter-spacing: .02em;
}

.comuna-badge-transporte {
  color: #111827;
  font-weight: 900;
  letter-spacing: .02em;
}

.comuna-empty {
  color: #64748b;
  font-weight: 800;
  padding: 12px;
}

.cart-total-breakdown {
  display: grid;
  gap: 8px;
  border-top: 1px solid #e5edf6;
  padding-top: 14px;
}

.cart-total-breakdown > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cart-total-breakdown span {
  color: #475569;
  font-weight: 900;
}

.cart-total-breakdown strong {
  color: #0b2340;
  font-size: 16px;
}

.cart-total-main {
  padding-top: 6px;
  border-top: 1px dashed #dbe4f0;
}

.cart-total-main span,
.cart-total-main strong {
  color: var(--red);
  font-size: 20px;
}

.cart-shipping-note {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}


/* V42 payment method selector */
.cart-payment-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  margin-top: 12px;
}
.cart-payment-box h3 {
  margin: 0;
  color: #9a3412;
  font-size: 15px;
}
.payment-help {
  margin: 0;
  color: #7c2d12;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
}


/* V43: color management and product color variants */
.color-dot{display:inline-block;width:18px;height:18px;border-radius:999px;border:1px solid rgba(15,23,42,.22);vertical-align:middle;box-shadow:inset 0 0 0 1px rgba(255,255,255,.45)}
.admin-color-preview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin-top:8px}
.admin-color-preview-item{display:flex;gap:10px;align-items:center;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:10px 12px;flex-wrap:wrap}
.admin-color-preview-item small{width:100%;color:#64748b;font-weight:800;margin-left:28px}
.admin-color-select-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:14px}
.admin-color-check-grid label{align-items:center;display:flex;gap:8px}
.admin-color-image-map{background:#fff7ed;border:1px solid #fed7aa;border-radius:16px;padding:14px;display:grid;gap:12px}
.admin-color-image-map h3{margin:0;color:#9a3412}
.detail-color-selector{margin:18px 0;padding:14px;border:1px solid #dbeafe;background:#eff6ff;border-radius:18px}
.detail-color-selector>strong{display:block;color:var(--blue-dark);font-size:18px;margin-bottom:10px}
.detail-color-options{display:flex;flex-wrap:wrap;gap:10px}
.detail-color-option{display:flex;align-items:center;gap:8px;border:2px solid #dbeafe;background:#fff;border-radius:999px;padding:9px 12px;font-weight:950;color:var(--blue-dark);cursor:pointer}
.detail-color-option.active{border-color:var(--red);box-shadow:0 8px 20px rgba(230,0,35,.12)}
.detail-color-selector p{margin:10px 0 0;color:#64748b;font-weight:900}
.cart-item-color{font-size:12px;color:var(--blue-dark);font-weight:950;margin-bottom:3px}
.locked-field[disabled]{background:#eef2f7!important;color:#64748b!important;cursor:not-allowed!important;border-color:#cbd5e1!important}


/* V45 data backup panel */
.admin-backup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.admin-backup-card {
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.admin-backup-card h3 { margin: 0 0 8px; }
.admin-backup-card p { margin: 0 0 14px; color: #64748b; line-height: 1.55; }
.admin-backup-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.admin-backup-summary div {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  padding: 14px;
}
.admin-backup-summary strong { display:block; font-size: 26px; color:#0B5ED7; }
.admin-backup-summary span { color:#64748b; font-size: 13px; }
.admin-backup-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
@media (max-width: 860px) {
  .admin-backup-grid,
  .admin-backup-summary,
  .admin-backup-lists { grid-template-columns: 1fr; }
}


/* V45: admin data quality, bulk selection and current product header */
.admin-current-product {
  display:flex;
  flex-wrap:wrap;
  gap:10px 16px;
  align-items:center;
  margin: -4px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
  color: var(--ink);
}
.admin-current-product span {
  color: var(--muted);
  font-weight: 800;
}
.admin-page-size-label {
  display:flex !important;
  grid-template-columns: none !important;
  align-items:center;
  gap:8px !important;
  white-space:nowrap;
  color: var(--muted);
  font-weight: 900 !important;
}
.admin-page-size-label select { min-width: 90px; }
.admin-selected-count {
  display:inline-flex;
  align-items:center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background:#eef6ff;
  color:var(--blue-dark);
  font-weight:900;
}
.admin-check-all {
  display:flex !important;
  grid-template-columns:none !important;
  align-items:center;
  gap:6px !important;
  white-space:nowrap;
  font-weight:900 !important;
}
.admin-check-all input,
.admin-row-select { width:auto !important; min-width:auto !important; }
.admin-row-select { transform: scale(1.25); accent-color: var(--blue); }
.admin-bulk-table th:first-child,
.admin-bulk-table td:first-child { text-align:center; min-width:86px; }


/* V46: carrito UI structure fix */
.cart-panel {
  overflow-y: auto;
  gap: 0;
}
.cart-items {
  flex: 0 0 auto;
  max-height: 44vh;
  min-height: 120px;
  overflow-y: auto;
  padding: 14px 0;
  margin-bottom: 6px;
}
.cart-delivery-box,
.cart-payment-box,
.cart-total-breakdown {
  flex: 0 0 auto;
}
.cart-delivery-box {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 18px;
  padding: 14px;
  margin: 8px 0 0;
}
.cart-payment-box {
  margin-top: 10px;
}
.cart-total-breakdown {
  margin-top: 12px;
  border: 1px solid #e5edf6;
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}
.cart-item {
  grid-template-columns: 72px minmax(0,1fr) auto;
}
.cart-item h4,
.cart-item p,
.cart-item-color {
  overflow-wrap: anywhere;
}
@media (max-width: 520px) {
  .cart-panel {
    padding: 18px;
  }
  .cart-items {
    max-height: 38vh;
    min-height: 150px;
  }
  .cart-item {
    grid-template-columns: 64px 1fr;
    align-items: start;
  }
  .cart-item .qty-actions {
    grid-column: 2;
    justify-content: flex-start;
    margin-top: 6px;
  }
  .cart-total-main span,
  .cart-total-main strong {
    font-size: 18px;
  }
}


/* V47 图片库、颜色变体与批量维护增强 */
.admin-image-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px;margin-top:16px}.admin-library-card{border:1px solid #e5e7eb;border-radius:16px;padding:10px;background:#fff;display:flex;flex-direction:column;gap:6px;box-shadow:0 8px 20px rgba(15,23,42,.06)}.admin-library-card img{width:100%;height:120px;object-fit:cover;border-radius:12px;background:#f8fafc}.admin-library-card strong{font-size:13px;color:#0f172a;word-break:break-word}.admin-library-card small{font-size:11px;color:#64748b;word-break:break-all}.admin-image-tags{display:flex;flex-wrap:wrap;gap:4px}.admin-image-tags span{background:#e0f2fe;color:#0369a1;border-radius:999px;padding:2px 7px;font-size:11px;font-weight:800}.admin-image-tags .warn{background:#fee2e2;color:#b91c1c}.admin-main-image-badge{position:absolute;top:8px;left:8px;background:#0b5ed7;color:#fff;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:900;z-index:2}.admin-image-item{position:relative}.admin-image-color-tags{display:block;margin-top:6px;font-size:11px;font-weight:800;color:#475569}.admin-mini-select{min-width:120px;max-width:170px;border:1px solid #cbd5e1;border-radius:10px;padding:6px;background:#fff}.admin-bulk-flags{min-width:130px}.admin-bulk-flags label{display:block;font-size:12px;font-weight:800;color:#334155;margin:2px 0}.admin-stat{border:1px solid #e5e7eb;border-radius:16px;padding:14px;background:#fff}.admin-stat strong{display:block;font-size:24px;color:#0b5ed7}.admin-stat span{font-size:12px;color:#64748b;font-weight:800}

/* V49: 后台批量管理宽屏优化 */
.admin-main-panel.admin-bulk-panel-wide {
  max-width: min(1680px, calc(100vw - 36px));
  margin-left: calc(50% - min(840px, calc(50vw - 18px)));
  margin-right: calc(50% - min(840px, calc(50vw - 18px)));
  padding: 22px;
}
.admin-bulk-panel-wide .admin-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 10px 24px rgba(11,35,64,.07);
}
.admin-bulk-panel-wide .admin-bulk-actions {
  position: sticky;
  top: 76px;
  z-index: 29;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(11,35,64,.07);
}
.admin-bulk-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 -8px 18px rgba(15,23,42,.04);
  -webkit-overflow-scrolling: touch;
}
.admin-bulk-scroll:focus {
  outline: 3px solid rgba(11,94,215,.18);
  outline-offset: 2px;
}
.admin-bulk-table {
  min-width: 1560px;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}
.admin-bulk-table th,
.admin-bulk-table td {
  white-space: nowrap;
  background: #fff;
}
.admin-bulk-table thead th {
  position: sticky;
  top: 0;
  z-index: 12;
  background: #f8fbff;
}
.admin-bulk-table th:nth-child(1),
.admin-bulk-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 15;
  width: 92px;
  min-width: 92px;
  background: #fff;
  box-shadow: 8px 0 16px rgba(15,23,42,.05);
}
.admin-bulk-table thead th:nth-child(1) { z-index: 25; background:#f8fbff; }
.admin-bulk-table th:nth-child(2),
.admin-bulk-table td:nth-child(2) {
  min-width: 96px;
}
.admin-bulk-table th:nth-child(3),
.admin-bulk-table td:nth-child(3) {
  position: sticky;
  left: 92px;
  z-index: 14;
  width: 120px;
  min-width: 120px;
  background: #fff;
  box-shadow: 8px 0 16px rgba(15,23,42,.04);
}
.admin-bulk-table thead th:nth-child(3) { z-index: 24; background:#f8fbff; }
.admin-bulk-table th:nth-child(4),
.admin-bulk-table td:nth-child(4) {
  position: sticky;
  left: 212px;
  z-index: 13;
  width: 280px;
  min-width: 280px;
  max-width: 320px;
  white-space: normal;
  background: #fff;
  box-shadow: 8px 0 16px rgba(15,23,42,.035);
}
.admin-bulk-table thead th:nth-child(4) { z-index: 23; background:#f8fbff; }
.admin-bulk-table td:nth-child(4) .small-muted {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-bulk-table .admin-mini-select {
  min-width: 150px;
  max-width: 220px;
}
.admin-bulk-table .admin-mini-input {
  width: 104px;
  min-width: 104px;
}
.admin-bulk-table .admin-actions {
  min-width: 220px;
}
.admin-bulk-flags {
  min-width: 160px;
  white-space: normal !important;
}
.admin-bulk-flags label {
  display: inline-flex;
  margin-right: 8px;
  white-space: nowrap;
}
.admin-bulk-scroll::after {
  content: '';
  display: none;
  position: sticky;
  left: 0;
  bottom: 0;
  width: max-content;
  padding: 8px 12px;
  color: #64748b;
  font-weight: 900;
  font-size: 12px;
  background: rgba(248,251,255,.94);
  border-top-right-radius: 12px;
}
@media (max-width: 760px) {
  .admin-main-panel.admin-bulk-panel-wide {
    max-width: calc(100vw - 20px);
    margin-left: calc(50% - 50vw + 10px);
    margin-right: calc(50% - 50vw + 10px);
    padding: 14px;
  }
  .admin-bulk-panel-wide .admin-toolbar,
  .admin-bulk-panel-wide .admin-bulk-actions {
    position: static;
  }
  .admin-bulk-table {
    min-width: 1180px;
  }
  .admin-bulk-table th:nth-child(1),
  .admin-bulk-table td:nth-child(1),
  .admin-bulk-table th:nth-child(3),
  .admin-bulk-table td:nth-child(3),
  .admin-bulk-table th:nth-child(4),
  .admin-bulk-table td:nth-child(4) {
    position: static;
    box-shadow: none;
  }
}


/* V52 admin IA refinement */
.admin-section-title {
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
  font-weight: 900;
  color: #0f172a;
  font-size: 18px;
}
.admin-hidden-sync {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.admin-visual-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  border-radius: 18px;
}
.admin-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.admin-visual-card {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.admin-visual-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.admin-visual-card-head strong { color: #0f172a; }
.admin-visual-card-head small { margin-left: auto; color: #64748b; font-weight: 800; }
.admin-category-icon-preview {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 22px;
}
.admin-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.admin-mini-grid label, .admin-visual-card label { font-size: 12px; font-weight: 900; color: #475569; }
.admin-mini-grid input, .admin-visual-card input {
  margin-top: 5px;
  height: 38px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  width: 100%;
}
.admin-check-grid.compact { margin: 10px 0; grid-template-columns: repeat(2, minmax(0,1fr)); }
.admin-color-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.admin-color-strip span,
.admin-color-swatch {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-block;
  border: 2px solid #e2e8f0;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.08);
}
.admin-color-editor-card .admin-color-swatch { flex: 0 0 auto; }
@media (max-width: 720px) {
  .admin-mini-grid { grid-template-columns: 1fr; }
  .admin-visual-grid { grid-template-columns: 1fr; }
}

/* V54 admin visual category/color cards */
.admin-card-toolbar {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}
.admin-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.admin-visual-card {
  border: 1px solid #dbe6f3;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(11, 35, 64, .06);
  display: grid;
  gap: 13px;
}
.admin-visual-card.new-card {
  border-color: #0b5ed7;
  box-shadow: 0 12px 28px rgba(11, 94, 215, .12);
}
.admin-visual-card-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.admin-visual-card-head strong {
  display: block;
  font-size: 17px;
  color: #0b2340;
}
.admin-visual-card-head small {
  display: block;
  color: #64748b;
  font-weight: 700;
  margin-top: 2px;
}
.admin-category-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #eef5ff;
  border: 1px solid #d6e8ff;
  display: grid;
  place-items: center;
  font-size: 25px;
  flex: 0 0 auto;
}
.admin-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.admin-mini-grid label,
.admin-visual-card > label {
  font-size: 12px;
  color: #334155;
  font-weight: 900;
}
.admin-mini-grid input,
.admin-visual-card textarea {
  margin-top: 6px;
}
.admin-card-flags {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px dashed #dbe6f3;
}
.admin-card-flags label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  color: #0f172a;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.admin-card-flags input {
  width: auto !important;
  margin: 0;
}
.admin-card-flags .danger-check {
  background: #fff1f2;
  color: #be123c;
}
.admin-color-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0 8px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}
.admin-color-strip span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .18), 0 4px 10px rgba(15, 23, 42, .12);
}
.admin-color-big-dot {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .18), 0 8px 18px rgba(15, 23, 42, .16);
  flex: 0 0 auto;
}
.admin-visual-help {
  margin-top: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 12px 14px;
}
@media (max-width: 640px) {
  .admin-visual-grid { grid-template-columns: 1fr; }
  .admin-mini-grid { grid-template-columns: 1fr; }
  .admin-card-toolbar { align-items: stretch; }
  .admin-card-toolbar .btn { width: 100%; }
}

/* V56 商品管理重构 */
.admin-catalog-panel { max-width: 1680px; margin-left: auto; margin-right: auto; }
.admin-catalog-scroll { max-height: 68vh; overflow: auto; border: 1px solid #e5e7eb; border-radius: 18px; background: #fff; }
.admin-catalog-table { min-width: 1120px; border-collapse: separate; border-spacing: 0; }
.admin-catalog-table th, .admin-catalog-table td { white-space: nowrap; }
.admin-catalog-table th:nth-child(1), .admin-catalog-table td:nth-child(1) { position: sticky; left: 0; z-index: 12; background: #fff; text-align: center; min-width: 96px; }
.admin-catalog-table thead th:nth-child(1) { z-index: 20; background: #f8fbff; }
.admin-catalog-table th:nth-child(3), .admin-catalog-table td:nth-child(3) { position: sticky; left: 96px; z-index: 11; background: #fff; min-width: 120px; }
.admin-catalog-table thead th:nth-child(3) { z-index: 19; background: #f8fbff; }
.admin-catalog-table th:nth-child(4), .admin-catalog-table td:nth-child(4) { min-width: 280px; white-space: normal; }
.admin-catalog-table .admin-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; background:#f8fafc; border:1px solid #e5e7eb; }
.admin-catalog-bulk-actions { position: sticky; top: 0; z-index: 18; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border: 1px solid #e5e7eb; border-radius: 18px; padding: 12px; margin: 12px 0; box-shadow: 0 8px 20px rgba(15,23,42,.06); }
.admin-status-pill { display:inline-flex; align-items:center; border-radius:999px; padding:5px 9px; font-size:12px; font-weight:900; border:1px solid transparent; }
.admin-status-active { background:#dcfce7; color:#166534; border-color:#bbf7d0; }
.admin-status-ready { background:#dbeafe; color:#1d4ed8; border-color:#bfdbfe; }
.admin-status-draft { background:#fef3c7; color:#92400e; border-color:#fde68a; }
.admin-sku-link, .admin-product-link { color:#0b5ed7; font-weight:900; text-decoration:none; }
.admin-sku-link:hover, .admin-product-link:hover { text-decoration: underline; }
.admin-current-product { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin: 0 0 16px; padding:12px 14px; border:1px solid #dbeafe; border-radius:16px; background:#eff6ff; color:#0f172a; }
.admin-current-product span { color:#475569; font-weight:800; }
.admin-section-title { font-weight:1000; color:#0f172a; border-top:1px solid #e5e7eb; padding-top:14px; margin-top:8px; }
@media (max-width: 760px) {
  .admin-catalog-scroll { max-height:none; overflow: visible; border: 0; }
  .admin-catalog-table, .admin-catalog-table thead, .admin-catalog-table tbody, .admin-catalog-table tr, .admin-catalog-table th, .admin-catalog-table td { display:block; width:100%; min-width:0 !important; position:static !important; white-space:normal; }
  .admin-catalog-table thead { display:none; }
  .admin-catalog-table tr { border:1px solid #e5e7eb; border-radius:18px; margin:12px 0; padding:12px; background:#fff; box-shadow:0 8px 20px rgba(15,23,42,.06); }
  .admin-catalog-table td { border-bottom:0; padding:7px 0; }
  .admin-catalog-table td::before { content: attr(data-label); display:block; color:#64748b; font-size:11px; font-weight:900; text-transform:uppercase; letter-spacing:.04em; }
  .admin-catalog-bulk-actions { position: static; }
}


/* V60: 商品发布按钮、商品管理分页和分类 Emoji 提示 */
.admin-publish-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #0b5ed7;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}
.admin-publish-toggle input { width: auto; accent-color: #0b5ed7; }
.admin-publish-toggle:has(input:checked) { background: #dcfce7; color: #166534; border-color: #86efac; }
.admin-selected-count { display:inline-flex; align-items:center; min-height:34px; padding:6px 10px; border:1px solid #e5e7eb; border-radius:999px; background:#fff; font-weight:800; color:#334155; }
.admin-page-info { display:inline-flex; align-items:center; padding:8px 10px; color:#475569; font-size:13px; font-weight:800; }
.admin-visual-help { line-height:1.65; }

/* V62: páginas separadas de método de pago y política de despacho */
.policy-map-card { grid-column: 1 / -1; }
.dispatch-map { margin: 18px 0 0; }
.dispatch-map img {
  display: block;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  border-radius: 22px;
  border: 1px solid #dbe6f3;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
  background: #f8fafc;
}
.dispatch-map figcaption {
  max-width: 980px;
  margin: 10px auto 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}
.policy-card ul { margin: 10px 0 0 18px; padding: 0; }
.policy-card li { margin: 7px 0; }

/* V63 商品管理修复与 UI 优化 */
.admin-category-card .admin-mini-grid { align-items: start; }
.admin-category-icon-field input,
.admin-category-sort-field input { height: 40px; }
.admin-category-icon-field .admin-help { display:block; min-height: 18px; margin-top: 5px; line-height: 1.25; }
.admin-category-sort-field { display:flex; flex-direction:column; justify-content:flex-start; }
.admin-catalog-panel { max-width: 1760px; }
.admin-catalog-bulk-actions { display:grid; grid-template-columns: minmax(160px, 220px) minmax(180px, 260px) auto 1fr; align-items:center; gap:10px; }
.admin-catalog-bulk-actions select { min-height:40px; }
.admin-catalog-table { min-width: 1180px; }
.admin-catalog-table th, .admin-catalog-table td { vertical-align: middle; }
.admin-catalog-table .admin-actions { flex-wrap: nowrap; gap:6px; }
.admin-status-inactive { background:#f1f5f9; color:#475569; border:1px solid #cbd5e1; }
.admin-status-active { background:#dcfce7; color:#166534; border:1px solid #86efac; }
@media (max-width: 860px) {
  .admin-catalog-bulk-actions { grid-template-columns: 1fr; }
}

/* V67 商品管理与首页调整 */
.admin-bulk-target-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #334155;
  margin: 0;
}
.admin-bulk-target-category select {
  min-width: 180px;
}
.admin-bulk-target-category select:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.admin-catalog-bulk-actions {
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* V68 admin menu and badge cards */
.admin-menu-editor-block{border:1px solid #e5e7eb;border-radius:18px;padding:16px;margin:16px 0;background:#fff}
.admin-menu-list{display:grid;gap:12px}
.admin-menu-row{display:grid;grid-template-columns:1.2fr 1fr 1.4fr 1fr 1fr .9fr .7fr .6fr;gap:10px;align-items:end;border:1px solid #edf2f7;border-radius:14px;padding:12px;background:#f8fafc}
.admin-badge-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:16px;margin-top:18px}
.admin-badge-card{border:1px solid #e5e7eb;border-radius:18px;padding:16px;background:#fff;box-shadow:0 10px 26px rgba(15,23,42,.06)}
.admin-badge-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.admin-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media (max-width:900px){.admin-menu-row{grid-template-columns:1fr}.admin-grid.compact{grid-template-columns:1fr}}

/* V72 home sections and hidden badges */
.admin-check-grid label.is-disabled,
.admin-badge-card .is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.admin-badge-usage {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
}
.admin-badge-editor-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.admin-badge-editor-box {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 8px;
}
.admin-badge-editor-box label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.admin-badge-editor-box input[type="radio"],
.admin-badge-editor-box input[type="checkbox"] {
  width: auto;
}
@media (max-width: 760px) {
  .admin-badge-editor-split { grid-template-columns: 1fr; }
}


/* V72 首页板块运营增强 */
.section-heading .section-more-link { margin-left: auto; align-self: center; }
.section-more-link { display:inline-flex; align-items:center; justify-content:center; border:1px solid #0B5ED7; color:#0B5ED7; background:#fff; border-radius:999px; padding:8px 14px; font-weight:900; text-decoration:none; }
.home-featured-block-carousel .home-featured-grid,
.home-featured-carousel { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; gap:16px; padding-bottom:12px; }
.home-featured-carousel .product-card { min-width:240px; max-width:280px; scroll-snap-align:start; }
.home-section-admin-row { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.home-section-admin-row .full { grid-column: 1 / -1; }
.home-section-preview { padding:10px 12px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:14px; color:#475569; }
@media (max-width: 760px) { .home-section-admin-row { grid-template-columns:1fr; } }

.logo.image-logo{display:inline-flex;align-items:center;text-decoration:none;}
.logo.image-logo img{max-height:54px;max-width:220px;width:auto;height:auto;display:block;object-fit:contain;}
.admin-section-number{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:10px 12px;color:#334155;}


/* V74 后台表单 UI 统一美化：Home Banner / 分类 / 颜色 / 角标 */
.admin-home-settings-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.35fr);
  gap: 18px;
  align-items: start;
}
.admin-settings-card {
  border: 1px solid #dbe6f3;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 18px;
  box-shadow: 0 12px 28px rgba(15,23,42,.06);
}
.admin-settings-card-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}
.admin-settings-card-title strong {
  font-size: 18px;
  color: #0f172a;
}
.admin-settings-card-title span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}
.admin-form-compact {
  gap: 12px 16px !important;
}
.admin-form-compact label,
.admin-ui-polished-panel label,
.admin-badge-card label,
.admin-visual-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  color: #334155;
  line-height: 1.25;
}
.admin-form-compact input,
.admin-form-compact select,
.admin-form-compact textarea,
.admin-ui-polished-panel input,
.admin-ui-polished-panel select,
.admin-ui-polished-panel textarea,
.admin-badge-card input,
.admin-badge-card select,
.admin-badge-card textarea,
.admin-visual-card input,
.admin-visual-card select,
.admin-visual-card textarea {
  margin-top: 0 !important;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 14px;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.admin-form-compact input[type="checkbox"],
.admin-ui-polished-panel input[type="checkbox"],
.admin-badge-card input[type="checkbox"],
.admin-visual-card input[type="checkbox"] {
  width: auto !important;
  min-height: auto;
  padding: 0;
}
.admin-logo-preview-box,
.admin-hero-preview,
.admin-image-list-title {
  margin-top: 0;
}
.admin-hero-preview {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.admin-hero-preview img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

/* 分类与颜色卡片：更紧凑、更对齐 */
.admin-category-cards,
.admin-color-cards,
.admin-badge-card-grid {
  align-items: stretch;
}
.admin-category-card,
.admin-color-card,
.admin-badge-card {
  border-radius: 20px !important;
  padding: 18px !important;
  gap: 14px !important;
}
.admin-category-card .admin-mini-grid,
.admin-color-card .admin-mini-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(110px, .45fr);
  align-items: end;
}
.admin-category-card .admin-category-icon-field input {
  max-width: 150px;
  font-size: 20px;
  text-align: center;
}
.admin-category-card .admin-category-sort-field input,
.admin-color-card input[type="number"] {
  max-width: 120px;
}
.admin-category-card > label,
.admin-color-card > label {
  margin: 0;
}
.admin-card-flags {
  margin-top: 2px;
  padding-top: 12px !important;
}
.admin-card-flags label {
  flex-direction: row !important;
  gap: 7px !important;
  margin: 0;
}
.admin-color-card .admin-visual-card-head {
  min-height: 58px;
}
.admin-color-big-dot {
  width: 46px !important;
  height: 46px !important;
}
.admin-color-card .admin-color-hex-input {
  max-width: 150px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* 角标管理：输入框宽度、选择框和文字对齐 */
.admin-badge-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
  gap: 16px;
}
.admin-badge-card {
  border: 1px solid #dbe6f3;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 28px rgba(15,23,42,.06);
}
.admin-badge-card-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.admin-badge-card .admin-grid.compact,
#admin-badges-panel .admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px 16px;
  align-items: end;
}
#admin-badges-panel .admin-grid .full,
.admin-badge-card .admin-grid.compact .full {
  grid-column: 1 / -1;
}
#admin-badges-panel input[name="badge_key"],
#admin-badges-panel input[name="badge_discount"],
.admin-badge-card input[name="badge_key"],
.admin-badge-card input[name="badge_discount"] {
  max-width: 180px;
}
#admin-badges-panel input[name="badge_skus"],
.admin-badge-card input[name="badge_skus"] {
  max-width: 100%;
}
#admin-badges-panel select[name="badge_color_key"],
#admin-badges-panel select[name="badge_text_color_key"],
.admin-badge-card select[name="badge_color_key"],
.admin-badge-card select[name="badge_text_color_key"] {
  max-width: 260px;
}
.admin-check-grid {
  gap: 8px !important;
}
.admin-check-grid label {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 7px !important;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  font-weight: 800 !important;
}
.admin-badge-usage {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 10px 12px;
  line-height: 1.6;
}
.admin-ui-polished-panel .small-muted,
.admin-ui-polished-panel .admin-help {
  line-height: 1.55;
}

@media (max-width: 960px) {
  .admin-home-settings-grid { grid-template-columns: 1fr; }
  .admin-badge-card-grid { grid-template-columns: 1fr; }
  #admin-badges-panel .admin-grid,
  .admin-badge-card .admin-grid.compact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .admin-category-card .admin-mini-grid,
  .admin-color-card .admin-mini-grid { grid-template-columns: 1fr; }
}

/* V75: 后台商品分类 / 颜色管理 UI 重构 + 手机端通知栏不遮挡 Banner */
#admin-categories-panel,
#admin-colors-panel {
  overflow: visible;
}
#admin-categories-panel .admin-card-toolbar,
#admin-colors-panel .admin-card-toolbar {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
#categoryCardsGrid,
#colorCardsGrid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
  align-items: stretch;
}
#categoryCardsGrid .admin-visual-card,
#colorCardsGrid .admin-visual-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  border: 1px solid #dbe6f3;
  border-radius: 22px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}
#categoryCardsGrid .admin-visual-card-head,
#colorCardsGrid .admin-visual-card-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf2f7;
}
#categoryCardsGrid .admin-visual-card-head strong,
#colorCardsGrid .admin-visual-card-head strong {
  display: block;
  min-width: 0;
  color: #0f172a;
  font-size: 17px;
  font-weight: 1000;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
#categoryCardsGrid .admin-visual-card-head small,
#colorCardsGrid .admin-visual-card-head small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
#categoryCardsGrid .admin-category-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #eff6ff, #fff7ed);
  border: 1px solid #dbeafe;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
  font-size: 30px;
  line-height: 1;
}
#colorCardsGrid .admin-color-big-dot {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .2), 0 10px 24px rgba(15, 23, 42, .16);
  flex: 0 0 auto;
}
#categoryCardsGrid .admin-mini-grid,
#colorCardsGrid .admin-mini-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 14px;
  align-items: start;
}
#categoryCardsGrid label,
#colorCardsGrid label {
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #082a5e;
  font-size: 13px;
  font-weight: 950;
}
#categoryCardsGrid input,
#categoryCardsGrid select,
#categoryCardsGrid textarea,
#colorCardsGrid input,
#colorCardsGrid select,
#colorCardsGrid textarea {
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
}
#categoryCardsGrid textarea,
#colorCardsGrid textarea {
  min-height: 78px;
  resize: vertical;
}
#categoryCardsGrid .admin-category-icon-field input,
#colorCardsGrid .admin-color-hex-input {
  max-width: 150px;
  font-size: 18px;
  text-align: center;
}
#categoryCardsGrid .admin-category-sort-field input,
#colorCardsGrid input[type="number"] {
  max-width: 130px;
  text-align: center;
}
#categoryCardsGrid .admin-help,
#colorCardsGrid .admin-help {
  margin-top: 0;
  min-height: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}
#categoryCardsGrid .admin-card-flags,
#colorCardsGrid .admin-card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px dashed #dbe6f3;
}
#categoryCardsGrid .admin-card-flags label,
#colorCardsGrid .admin-card-flags label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  width: auto;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}
#categoryCardsGrid .admin-card-flags input,
#colorCardsGrid .admin-card-flags input {
  width: auto !important;
  min-height: 0;
  padding: 0;
  margin: 0;
}
#categoryCardsGrid .danger-check,
#colorCardsGrid .danger-check {
  background: #fff1f2 !important;
  color: #be123c !important;
}
#admin-colors-panel .admin-color-strip {
  margin: 12px 0 18px;
}
@media (max-width: 760px) {
  .shipping-announcement {
    position: relative !important;
    z-index: 2;
    display: block;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
    border-bottom: 0;
  }
  .shipping-announcement strong,
  .shipping-announcement span {
    display: block;
  }
  .shipping-announcement span {
    margin-top: 2px;
  }
  .home-hero {
    position: relative;
    z-index: 1;
    margin-top: 0 !important;
    clear: both;
  }
  .home-hero-copy {
    bottom: 10px;
    padding: 14px;
    border-radius: 18px;
  }
  .home-hero-copy h1 {
    font-size: 24px;
  }
  .home-hero-copy p {
    font-size: 13px;
    margin-bottom: 10px;
  }
}
@media (max-width: 640px) {
  #categoryCardsGrid,
  #colorCardsGrid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  #categoryCardsGrid .admin-mini-grid,
  #colorCardsGrid .admin-mini-grid {
    grid-template-columns: 1fr 1fr;
  }
  #categoryCardsGrid .admin-mini-grid label:nth-child(1),
  #categoryCardsGrid .admin-mini-grid label:nth-child(2),
  #colorCardsGrid .admin-mini-grid label:nth-child(1),
  #colorCardsGrid .admin-mini-grid label:nth-child(2) {
    grid-column: 1 / -1;
  }
}
@media (max-width: 430px) {
  #categoryCardsGrid .admin-mini-grid,
  #colorCardsGrid .admin-mini-grid {
    grid-template-columns: 1fr;
  }
  #categoryCardsGrid .admin-category-icon-field input,
  #categoryCardsGrid .admin-category-sort-field input,
  #colorCardsGrid .admin-color-hex-input,
  #colorCardsGrid input[type="number"] {
    max-width: 100%;
    text-align: left;
  }
}

/* V76: 首页 Banner 文案层、LOGO 表单、发布状态和角标继承 UI */
.home-hero-copy {
  max-width: var(--hero-copy-desktop-width, 30vw);
  width: min(var(--hero-copy-desktop-width, 30vw), 560px);
  background: var(--hero-copy-bg, rgba(255,255,255,.86));
}
.home-hero-copy h1 {
  font-size: clamp(24px, 3.2vw, var(--hero-title-desktop, 44px));
}
.home-hero-copy.pos-left-top { left: clamp(18px, 5vw, 88px); right: auto; top: clamp(18px, 5vw, 72px); bottom: auto; transform: none; }
.home-hero-copy.pos-left-center { left: clamp(18px, 5vw, 88px); right: auto; top: 50%; bottom: auto; transform: translateY(-50%); }
.home-hero-copy.pos-left-bottom { left: clamp(18px, 5vw, 88px); right: auto; bottom: clamp(18px, 5vw, 80px); top: auto; transform: none; }
.home-hero-copy.pos-right-top { right: clamp(18px, 5vw, 88px); left: auto; top: clamp(18px, 5vw, 72px); bottom: auto; transform: none; }
.home-hero-copy.pos-right-center { right: clamp(18px, 5vw, 88px); left: auto; top: 50%; bottom: auto; transform: translateY(-50%); }
.home-hero-copy.pos-right-bottom { right: clamp(18px, 5vw, 88px); left: auto; bottom: clamp(18px, 5vw, 80px); top: auto; transform: none; }
.home-hero-copy.pos-center { left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.admin-home-v110-google-analytics-basic { align-items: start; }
.admin-home-v110-google-analytics-basic .admin-settings-card { display: flex; flex-direction: column; gap: 16px; }
.admin-field-rows { display: grid; gap: 12px; }
.admin-field-rows label { display: grid; grid-template-columns: 170px minmax(220px, 1fr); gap: 10px 14px; align-items: center; margin: 0; }
.admin-field-rows label.full { grid-template-columns: 170px minmax(220px, 1fr); }
.admin-field-rows label > span:first-child { font-weight: 900; color: #0f172a; }
.admin-field-rows input,
.admin-field-rows select,
.admin-field-rows textarea { width: 100%; max-width: 560px; }
.admin-field-rows input[type="number"] { max-width: 180px; }
.admin-field-rows small { grid-column: 2; color: #64748b; font-size: 12px; font-weight: 700; }
.admin-inline-check { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; }
.admin-inline-check input { width: auto !important; }
.admin-logo-preview-box { display: grid; gap: 8px; padding: 14px; border: 1px dashed #cbd5e1; border-radius: 16px; background: #f8fafc; }
.admin-logo-preview-box img { max-height: 64px; max-width: 260px; object-fit: contain; }
.admin-publish-status-card { grid-column: 1 / -1; display: grid; grid-template-columns: 160px auto 1fr; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid #dbeafe; border-radius: 18px; background: #f8fbff; }
.admin-publish-status-after-save { margin-top: 12px; }
.admin-publish-status-card > span { font-weight: 950; color: #0f172a; }
.admin-publish-status-card strong { display: inline-flex; align-items: center; justify-content: center; min-width: 78px; padding: 8px 12px; border-radius: 999px; font-size: 13px; }
.admin-publish-status-card strong.published { background: #dcfce7; color: #166534; }
.admin-publish-status-card strong.draft { background: #f1f5f9; color: #475569; }
.admin-publish-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-publish-status-card small { grid-column: 1 / -1; color: #64748b; }
.inherited-badge-note { margin: 8px 0 10px; padding: 8px 10px; border-radius: 12px; background: #eff6ff; color: #1d4ed8; font-weight: 800; }
.admin-badge-editor-box label small { margin-left: 6px; color: #2563eb; font-weight: 800; }
@media (max-width: 760px) {
  .home-hero-copy,
  .home-hero-copy.pos-left-top,
  .home-hero-copy.pos-left-center,
  .home-hero-copy.pos-left-bottom,
  .home-hero-copy.pos-right-top,
  .home-hero-copy.pos-right-center,
  .home-hero-copy.pos-right-bottom,
  .home-hero-copy.pos-center {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 10px;
    transform: translateX(-50%);
    width: var(--hero-copy-mobile-width, 25vw);
    max-width: var(--hero-copy-mobile-width, 25vw);
    padding: 12px 14px;
    border-radius: 16px;
  }
  .home-hero-copy h1 { font-size: var(--hero-title-mobile, 24px); }
  .home-hero-copy p { font-size: 13px; line-height: 1.3; }
  .admin-field-rows label,
  .admin-field-rows label.full { grid-template-columns: 1fr; gap: 6px; }
  .admin-field-rows small { grid-column: 1; }
  .admin-publish-status-card { grid-template-columns: 1fr; align-items: start; }
}


/* V78: stronger homepage Banner setting application */
.home-hero { position: relative; }
.home-hero-copy {
  max-width: var(--hero-copy-desktop-width, 30vw) !important;
  width: min(var(--hero-copy-desktop-width, 30vw), 560px) !important;
  background: var(--hero-copy-bg, rgba(255,255,255,.86)) !important;
}
.home-hero-copy h1 { font-size: clamp(24px, 3.2vw, var(--hero-title-desktop, 44px)) !important; }
.home-hero-copy.pos-left-top { left: clamp(18px, 5vw, 88px) !important; right: auto !important; top: clamp(18px, 5vw, 72px) !important; bottom: auto !important; transform: none !important; }
.home-hero-copy.pos-left-center { left: clamp(18px, 5vw, 88px) !important; right: auto !important; top: 50% !important; bottom: auto !important; transform: translateY(-50%) !important; }
.home-hero-copy.pos-left-bottom { left: clamp(18px, 5vw, 88px) !important; right: auto !important; bottom: clamp(18px, 5vw, 80px) !important; top: auto !important; transform: none !important; }
.home-hero-copy.pos-right-top { right: clamp(18px, 5vw, 88px) !important; left: auto !important; top: clamp(18px, 5vw, 72px) !important; bottom: auto !important; transform: none !important; }
.home-hero-copy.pos-right-center { right: clamp(18px, 5vw, 88px) !important; left: auto !important; top: 50% !important; bottom: auto !important; transform: translateY(-50%) !important; }
.home-hero-copy.pos-right-bottom { right: clamp(18px, 5vw, 88px) !important; left: auto !important; bottom: clamp(18px, 5vw, 80px) !important; top: auto !important; transform: none !important; }
.home-hero-copy.pos-center { left: 50% !important; right: auto !important; top: 50% !important; bottom: auto !important; transform: translate(-50%, -50%) !important; }
@media (max-width: 760px) {
  .home-hero-copy,
  .home-hero-copy.pos-left-top,
  .home-hero-copy.pos-left-center,
  .home-hero-copy.pos-left-bottom,
  .home-hero-copy.pos-right-top,
  .home-hero-copy.pos-right-center,
  .home-hero-copy.pos-right-bottom,
  .home-hero-copy.pos-center {
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: 10px !important;
    transform: translateX(-50%) !important;
    width: var(--hero-copy-mobile-width, 25vw) !important;
    max-width: var(--hero-copy-mobile-width, 25vw) !important;
    padding: 12px 14px !important;
  }
  .home-hero-copy h1 { font-size: var(--hero-title-mobile, 24px) !important; }
}

/* V83: mobile Banner text layer is hidden to keep the hero image clean on small screens. */
@media (max-width: 760px) {
  .home-hero-copy,
  .home-hero-copy.mobile-copy-hidden,
  .home-hero-copy.pos-left-top,
  .home-hero-copy.pos-left-center,
  .home-hero-copy.pos-left-bottom,
  .home-hero-copy.pos-right-top,
  .home-hero-copy.pos-right-center,
  .home-hero-copy.pos-right-bottom,
  .home-hero-copy.pos-center {
    display: none !important;
  }
}


/* V88 商品管理卡片式 UI：去掉横向滚动，提升录入和维护效率 */
.admin-catalog-panel { max-width: 1320px; }
.admin-card-toolbar { position: sticky; top: 0; z-index: 25; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border: 1px solid #e5e7eb; border-radius: 18px; padding: 12px; box-shadow: 0 10px 26px rgba(15,23,42,.06); }
.admin-toolbar { position: sticky; top: 76px; z-index: 24; background: rgba(248,250,252,.96); backdrop-filter: blur(10px); border: 1px solid #e5e7eb; border-radius: 18px; padding: 12px; margin: 12px 0; box-shadow: 0 10px 24px rgba(15,23,42,.05); }
.admin-compact-toggle { display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:8px 12px; border:1px solid #dbeafe; border-radius:999px; background:#eff6ff; color:#0b5ed7; font-weight:900; white-space:nowrap; }
.admin-compact-toggle input { width:auto; accent-color:#0b5ed7; }
.admin-catalog-scroll { max-height: none !important; overflow: visible !important; border: 0 !important; background: transparent !important; }
.admin-catalog-table,
.admin-catalog-table thead,
.admin-catalog-table tbody,
.admin-catalog-table tr,
.admin-catalog-table th,
.admin-catalog-table td { display:block; width:100%; min-width:0 !important; position:static !important; white-space:normal !important; }
.admin-catalog-table { border-collapse: separate !important; border-spacing: 0 !important; min-width:0 !important; }
.admin-catalog-table thead { display:none !important; }
.admin-catalog-table tbody { display:grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap:16px; align-items:stretch; }
.admin-catalog-table tr[data-admin-product-row] { display:grid; grid-template-columns: 92px minmax(0,1fr); grid-template-areas:"select select" "image name" "sku category" "price price" "box status" "updated actions"; gap:10px 14px; border:1px solid #e5e7eb; border-radius:22px; padding:14px; background:#fff; box-shadow:0 12px 30px rgba(15,23,42,.07); scroll-margin-top: 160px; }
.admin-catalog-table tr[data-admin-product-row]:hover { border-color:#bfdbfe; box-shadow:0 16px 36px rgba(37,99,235,.10); }
.admin-catalog-table td { border-bottom:0 !important; padding:0 !important; min-width:0; }
.admin-catalog-table td::before { content: attr(data-label); display:block; margin-bottom:4px; color:#64748b; font-size:11px; font-weight:1000; text-transform:uppercase; letter-spacing:.04em; }
.admin-catalog-table td:nth-child(1){ grid-area:select; display:flex; align-items:center; justify-content:space-between; }
.admin-catalog-table td:nth-child(1)::after{ content: attr(data-sku); }
.admin-catalog-table td:nth-child(2){ grid-area:image; }
.admin-catalog-table td:nth-child(3){ grid-area:sku; }
.admin-catalog-table td:nth-child(4){ grid-area:name; }
.admin-catalog-table td:nth-child(5){ grid-area:category; }
.admin-catalog-table td:nth-child(6){ grid-area:price; }
.admin-catalog-table td:nth-child(7){ grid-area:box; }
.admin-catalog-table td:nth-child(8){ grid-area:status; display:flex; gap:8px; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; }
.admin-catalog-table td:nth-child(9){ grid-area:updated; }
.admin-catalog-table td:nth-child(10){ grid-area:actions; }
.admin-catalog-table .admin-thumb { width:92px !important; height:92px !important; border-radius:18px !important; object-fit:cover; background:#f8fafc; border:1px solid #e5e7eb; }
.admin-price-stack { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:8px; }
.admin-price-stack span { display:flex; align-items:center; justify-content:center; min-height:42px; border:1px solid #e5e7eb; border-radius:14px; background:#f8fafc; color:#0f172a; font-size:12px; font-weight:900; text-align:center; padding:6px; }
.admin-chip-row, .admin-missing-row { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; align-items:center; }
.admin-mini-chip { display:inline-flex; align-items:center; min-height:24px; padding:3px 8px; border-radius:999px; background:#dbeafe; color:#1d4ed8; font-size:11px; font-weight:1000; }
.admin-missing-row { color:#92400e; font-size:12px; font-weight:900; }
.admin-missing-row span { display:inline-flex; align-items:center; min-height:22px; padding:2px 7px; border-radius:999px; background:#fef3c7; border:1px solid #fde68a; }
.admin-complete-row { display:inline-flex; align-items:center; margin-top:8px; min-height:24px; padding:3px 8px; border-radius:999px; background:#dcfce7; color:#166534; font-size:12px; font-weight:1000; }
.admin-card-actions { display:grid !important; grid-template-columns: repeat(2, minmax(0,1fr)); gap:8px !important; }
.admin-card-actions .btn { width:100%; justify-content:center; }
.btn-mini { min-height:32px; padding:5px 9px; font-size:12px; border-radius:999px; }
.admin-hidden-form { display:none !important; }
body.admin-compact-products .admin-catalog-table tbody { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap:12px; }
body.admin-compact-products .admin-catalog-table tr[data-admin-product-row] { grid-template-columns: 1fr; grid-template-areas:"select" "name" "price" "status" "actions"; padding:12px; border-radius:18px; }
body.admin-compact-products .admin-catalog-table td:nth-child(2),
body.admin-compact-products .admin-catalog-table td:nth-child(3),
body.admin-compact-products .admin-catalog-table td:nth-child(5),
body.admin-compact-products .admin-catalog-table td:nth-child(7),
body.admin-compact-products .admin-catalog-table td:nth-child(9) { display:none !important; }
body.admin-compact-products .admin-price-stack { grid-template-columns: 1fr; }
body.admin-compact-products .admin-price-stack span { min-height:32px; justify-content:flex-start; }
@media (max-width: 960px) {
  .admin-toolbar { top: 0; grid-template-columns: 1fr; }
  .admin-card-toolbar { position: static; }
  .admin-catalog-table tbody { grid-template-columns: 1fr; }
  .admin-catalog-table tr[data-admin-product-row] { grid-template-columns: 78px minmax(0,1fr); grid-template-areas:"select select" "image name" "price price" "status status" "actions actions"; }
  .admin-catalog-table td:nth-child(3), .admin-catalog-table td:nth-child(5), .admin-catalog-table td:nth-child(7), .admin-catalog-table td:nth-child(9) { display:none !important; }
  .admin-catalog-table .admin-thumb { width:78px !important; height:78px !important; }
  .admin-price-stack { grid-template-columns:1fr; }
}
@media (max-width: 520px) {
  .admin-catalog-table tr[data-admin-product-row] { grid-template-columns: 1fr; grid-template-areas:"select" "image" "name" "price" "status" "actions"; }
  .admin-catalog-table .admin-thumb { width:100% !important; height:180px !important; }
}

/* V88 admin product list normal-page compact cards */
.admin-catalog-panel { max-width: 1760px !important; }
.admin-catalog-panel .admin-card-toolbar,
.admin-catalog-panel .admin-toolbar,
.admin-catalog-bulk-actions {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  backdrop-filter: none !important;
}
.admin-catalog-panel .admin-toolbar {
  display: grid !important;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(120px, .8fr)) minmax(110px,.55fr) auto auto auto !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 10px !important;
  margin: 10px 0 !important;
  border-radius: 14px !important;
}
.admin-catalog-panel .admin-toolbar input,
.admin-catalog-panel .admin-toolbar select {
  min-height: 34px !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}
.admin-page-size-label {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}
.admin-page-size-label select { width: 76px !important; }
.admin-selected-count {
  white-space: nowrap !important;
  font-size: 12px !important;
  padding: 7px 9px !important;
  border-radius: 999px !important;
  background: #f8fafc !important;
  border: 1px solid #e5e7eb !important;
}
#adminSelectVisibleProducts {
  white-space: nowrap !important;
  min-height: 32px !important;
  padding: 6px 10px !important;
}
.admin-catalog-bulk-actions {
  grid-template-columns: minmax(140px, 180px) minmax(150px, 220px) auto 1fr !important;
  gap: 8px !important;
  padding: 10px !important;
  margin: 10px 0 !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}
.admin-catalog-scroll { max-height: none !important; overflow: visible !important; border: 0 !important; background: transparent !important; }
.admin-catalog-table tbody {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch !important;
}
.admin-catalog-table tr[data-admin-product-row] {
  display: grid !important;
  grid-template-columns: 66px minmax(0,1fr) !important;
  grid-template-areas:
    "select select"
    "image name"
    "price price"
    "actions actions" !important;
  gap: 7px 9px !important;
  border-radius: 15px !important;
  padding: 10px !important;
  box-shadow: 0 6px 16px rgba(15,23,42,.055) !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  scroll-margin-top: 20px !important;
}
.admin-catalog-table td { font-size: 12px !important; line-height: 1.25 !important; }
.admin-catalog-table td::before { display: none !important; }
.admin-catalog-table td:nth-child(1){ grid-area: select !important; display:flex !important; align-items:center !important; justify-content:space-between !important; min-height: 20px !important; }
.admin-catalog-table td:nth-child(1) label,
.admin-catalog-table .admin-check-all { font-size: 12px !important; white-space: nowrap !important; }
.admin-catalog-table td:nth-child(2){ grid-area: image !important; }
.admin-catalog-table td:nth-child(3),
.admin-catalog-table td:nth-child(5),
.admin-catalog-table td:nth-child(7),
.admin-catalog-table td:nth-child(8),
.admin-catalog-table td:nth-child(9){ display: none !important; }
.admin-catalog-table td:nth-child(4){ grid-area: name !important; min-width:0 !important; }
.admin-catalog-table td:nth-child(6){ grid-area: price !important; }
.admin-catalog-table td:nth-child(10){ grid-area: actions !important; }
.admin-catalog-table .admin-thumb { width: 66px !important; height: 66px !important; border-radius: 12px !important; object-fit: cover !important; }
.admin-product-titleline { display:flex; align-items:flex-start; justify-content:space-between; gap:6px; min-width:0; }
.admin-product-titleline .admin-product-link { font-size: 13px !important; line-height: 1.25 !important; font-weight: 1000 !important; color: #0f172a !important; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.admin-status-pill { font-size: 10px !important; padding: 3px 6px !important; border-radius: 999px !important; white-space: nowrap !important; }
.admin-product-meta-line { display:flex; flex-wrap:wrap; gap:5px; margin-top:3px; color:#64748b; font-size:11px; }
.admin-product-meta-line strong { color:#334155; font-weight:1000; }
.admin-feature-line { display:block; margin-top:2px; font-size:11px !important; line-height:1.2 !important; color:#64748b !important; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.admin-chip-row { gap:4px !important; margin-top:4px !important; }
.admin-mini-chip { font-size:10px !important; padding:2px 6px !important; border-radius:999px !important; }
.admin-missing-row, .admin-complete-row { margin-top:4px !important; font-size:10.5px !important; line-height:1.2 !important; }
.admin-missing-row span { padding:2px 5px !important; border-radius:999px !important; }
.admin-price-stack { display:grid !important; grid-template-columns: repeat(3, 1fr) !important; gap:5px !important; }
.admin-price-stack span { min-height: 26px !important; padding: 4px 6px !important; border-radius: 9px !important; font-size: 11px !important; line-height:1.15 !important; display:flex !important; flex-direction:column !important; justify-content:center !important; gap:1px !important; background:#f8fafc !important; border:1px solid #e5e7eb !important; white-space:nowrap !important; }
.admin-price-stack b { font-size:10px !important; color:#64748b !important; font-weight:1000 !important; }
.admin-card-actions { display:grid !important; grid-template-columns: repeat(4, minmax(0,1fr)) !important; gap:5px !important; }
.admin-card-actions .btn { min-height: 28px !important; padding: 5px 6px !important; font-size: 11px !important; border-radius: 9px !important; width:100% !important; justify-content:center !important; }
.admin-pagination { margin-top: 14px !important; }
.admin-pagination .btn { min-height:30px !important; padding:5px 9px !important; font-size:12px !important; }

@media (max-width: 1450px) {
  .admin-catalog-table tbody { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .admin-catalog-panel .admin-toolbar { grid-template-columns: repeat(4, minmax(0,1fr)) !important; }
}
@media (max-width: 1050px) {
  .admin-catalog-table tbody { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .admin-catalog-panel .admin-toolbar { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}
@media (max-width: 680px) {
  .admin-catalog-table tbody { grid-template-columns: 1fr !important; }
  .admin-catalog-panel .admin-toolbar,
  .admin-catalog-bulk-actions { grid-template-columns: 1fr !important; }
  .admin-catalog-table tr[data-admin-product-row] { grid-template-columns: 58px minmax(0,1fr) !important; }
  .admin-catalog-table .admin-thumb { width:58px !important; height:58px !important; }
}

/* V89 admin catalog dense UI redesign */
.admin-body { font-size: 14px; }
.admin-catalog-panel {
  max-width: 1680px !important;
  padding: 16px !important;
}
.admin-catalog-panel > h2 {
  margin: 0 0 4px !important;
  font-size: 20px !important;
  line-height: 1.2 !important;
}
.admin-catalog-panel > .small-muted {
  margin: 0 0 10px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}
.admin-catalog-panel .admin-card-toolbar {
  margin: 8px 0 !important;
  gap: 6px !important;
}
.admin-catalog-panel .admin-card-toolbar .btn,
.admin-catalog-panel .admin-card-toolbar a.btn {
  min-height: 30px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
  border-radius: 9px !important;
}
.admin-catalog-panel .admin-toolbar {
  display: grid !important;
  grid-template-columns: minmax(180px,1.6fr) minmax(110px,.7fr) minmax(110px,.7fr) minmax(130px,.8fr) minmax(96px,.55fr) auto auto auto !important;
  gap: 6px !important;
  align-items: center !important;
  padding: 7px !important;
  margin: 8px 0 !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: none !important;
}
.admin-catalog-panel .admin-toolbar input,
.admin-catalog-panel .admin-toolbar select,
.admin-catalog-bulk-actions select {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 8px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}
.admin-catalog-panel .admin-toolbar input[type="search"] { min-width: 160px !important; }
.admin-page-size-label {
  height: 30px !important;
  gap: 4px !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
}
.admin-page-size-label select {
  width: 68px !important;
  min-width: 68px !important;
}
.admin-selected-count {
  min-height: 28px !important;
  height: 28px !important;
  padding: 4px 8px !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #475569 !important;
}
#adminSelectVisibleProducts,
.btn-mini {
  min-height: 28px !important;
  height: 28px !important;
  padding: 4px 8px !important;
  font-size: 11.5px !important;
  border-radius: 8px !important;
}
.admin-catalog-bulk-actions {
  display: grid !important;
  grid-template-columns: minmax(130px,170px) minmax(140px,200px) auto 1fr !important;
  gap: 6px !important;
  align-items: center !important;
  padding: 7px !important;
  margin: 8px 0 !important;
  border-radius: 12px !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  box-shadow: none !important;
}
.admin-catalog-bulk-actions .btn {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}
.admin-catalog-bulk-actions .admin-help {
  font-size: 11px !important;
  line-height: 1.25 !important;
  color: #64748b !important;
}
.admin-catalog-scroll { max-height: none !important; overflow: visible !important; border: 0 !important; background: transparent !important; }
.admin-catalog-table { min-width: 0 !important; width: 100% !important; }
.admin-catalog-table thead { display: none !important; }
.admin-catalog-table tbody {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  align-items: stretch !important;
}
.admin-catalog-table tr[data-admin-product-row] {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 52px minmax(0,1fr) !important;
  grid-template-areas:
    "image name"
    "price price"
    "actions actions" !important;
  gap: 6px 8px !important;
  min-height: 138px !important;
  padding: 8px !important;
  border-radius: 12px !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  box-shadow: 0 3px 10px rgba(15,23,42,.045) !important;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease !important;
}
.admin-catalog-table tr[data-admin-product-row]:hover {
  border-color: #bfdbfe !important;
  box-shadow: 0 6px 18px rgba(37,99,235,.09) !important;
  transform: translateY(-1px) !important;
}
.admin-catalog-table td {
  border: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
  font-size: 11.5px !important;
  line-height: 1.22 !important;
}
.admin-catalog-table td::before { display: none !important; }
.admin-catalog-table td:nth-child(1) {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  z-index: 3 !important;
  display: block !important;
  min-height: 0 !important;
  width: 18px !important;
  height: 18px !important;
  padding: 0 !important;
}
.admin-catalog-table td:nth-child(1) input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  accent-color: #0b5ed7;
}
.admin-catalog-table td:nth-child(2) { grid-area: image !important; }
.admin-catalog-table td:nth-child(3),
.admin-catalog-table td:nth-child(5),
.admin-catalog-table td:nth-child(7),
.admin-catalog-table td:nth-child(8),
.admin-catalog-table td:nth-child(9) { display: none !important; }
.admin-catalog-table td:nth-child(4) { grid-area: name !important; padding-right: 18px !important; }
.admin-catalog-table td:nth-child(6) { grid-area: price !important; }
.admin-catalog-table td:nth-child(10) { grid-area: actions !important; }
.admin-catalog-table .admin-thumb {
  width: 52px !important;
  height: 52px !important;
  border-radius: 10px !important;
  object-fit: cover !important;
  background: #f8fafc !important;
  border: 1px solid #e5e7eb !important;
}
.admin-product-titleline {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 5px !important;
  min-width: 0 !important;
}
.admin-product-titleline .admin-product-link {
  font-size: 12.2px !important;
  line-height: 1.22 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  color: #0f172a !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-decoration: none !important;
}
.admin-status-pill {
  flex: 0 0 auto !important;
  font-size: 9.5px !important;
  line-height: 1 !important;
  padding: 3px 5px !important;
  border-radius: 999px !important;
  font-weight: 900 !important;
}
.admin-product-meta-line {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  margin-top: 2px !important;
  font-size: 10.5px !important;
  line-height: 1.15 !important;
  color: #64748b !important;
}
.admin-product-meta-line strong { color: #334155 !important; font-weight: 900 !important; }
.admin-feature-line {
  display: block !important;
  margin-top: 2px !important;
  font-size: 10.5px !important;
  line-height: 1.15 !important;
  color: #64748b !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.admin-chip-row { display: flex !important; gap: 3px !important; margin-top: 3px !important; overflow: hidden !important; max-height: 18px !important; }
.admin-mini-chip {
  font-size: 9.5px !important;
  line-height: 1 !important;
  padding: 2px 5px !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
}
.admin-missing-row,
.admin-complete-row {
  margin-top: 3px !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
  max-height: 26px !important;
  overflow: hidden !important;
}
.admin-missing-row strong { font-weight: 900 !important; }
.admin-missing-row span {
  padding: 1px 4px !important;
  border-radius: 999px !important;
  font-size: 9.5px !important;
}
.admin-price-stack {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  gap: 4px !important;
}
.admin-price-stack span {
  min-height: 22px !important;
  padding: 3px 4px !important;
  border-radius: 7px !important;
  border: 1px solid #e5e7eb !important;
  background: #f8fafc !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  font-size: 10.5px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}
.admin-price-stack b {
  font-size: 9.5px !important;
  color: #64748b !important;
  font-weight: 1000 !important;
}
.admin-card-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
  gap: 4px !important;
}
.admin-card-actions .btn,
.admin-card-actions a.btn,
.admin-card-actions button.btn {
  min-height: 24px !important;
  height: 24px !important;
  padding: 3px 4px !important;
  font-size: 10.5px !important;
  line-height: 1 !important;
  border-radius: 7px !important;
  font-weight: 850 !important;
  width: 100% !important;
  justify-content: center !important;
  box-shadow: none !important;
}
.admin-pagination {
  margin-top: 10px !important;
  gap: 5px !important;
}
.admin-pagination .btn {
  min-height: 26px !important;
  padding: 4px 8px !important;
  font-size: 11.5px !important;
  border-radius: 8px !important;
}
.admin-page-info { font-size: 12px !important; color: #64748b !important; }

@media (min-width: 1680px) {
  .admin-catalog-table tbody { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}
@media (max-width: 1380px) {
  .admin-catalog-table tbody { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .admin-catalog-panel .admin-toolbar { grid-template-columns: repeat(4, minmax(0,1fr)) !important; }
  .admin-catalog-bulk-actions { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
}
@media (max-width: 980px) {
  .admin-catalog-table tbody { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .admin-catalog-panel .admin-toolbar,
  .admin-catalog-bulk-actions { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}
@media (max-width: 620px) {
  .admin-catalog-panel { padding: 12px !important; }
  .admin-catalog-table tbody { grid-template-columns: 1fr !important; }
  .admin-catalog-panel .admin-toolbar,
  .admin-catalog-bulk-actions { grid-template-columns: 1fr !important; }
  .admin-catalog-table tr[data-admin-product-row] { grid-template-columns: 50px minmax(0,1fr) !important; }
  .admin-catalog-table .admin-thumb { width: 50px !important; height: 50px !important; }
}


/* V90 admin catalog toolbar and filter fix */
.admin-catalog-topbar {
  display: grid !important;
  grid-template-columns: auto minmax(260px, 520px) auto !important;
  justify-content: start !important;
  align-items: center !important;
  gap: 8px !important;
  position: static !important;
  padding: 7px !important;
  margin: 8px 0 6px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: none !important;
}
.admin-catalog-topbar .admin-catalog-search {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 9px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  min-width: 260px !important;
}
.admin-catalog-filterbar {
  display: grid !important;
  grid-template-columns: minmax(120px, .9fr) minmax(108px, .7fr) minmax(132px, .9fr) minmax(98px, .6fr) auto auto auto !important;
  gap: 6px !important;
  align-items: center !important;
  padding: 7px !important;
  margin: 6px 0 8px !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: none !important;
  position: static !important;
}
.admin-catalog-filterbar select,
.admin-catalog-filterbar input,
.admin-catalog-bulk-actions select {
  min-height: 28px !important;
  height: 28px !important;
  padding: 3px 8px !important;
  font-size: 11.5px !important;
  border-radius: 7px !important;
}
.admin-select-visible-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 3px 8px !important;
  border: 1px solid #dbeafe !important;
  border-radius: 999px !important;
  background: #eff6ff !important;
  color: #0b5ed7 !important;
  font-size: 11.5px !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}
.admin-select-visible-label input {
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  accent-color: #0b5ed7 !important;
}
.admin-catalog-bulk-actions {
  grid-template-columns: minmax(128px, 170px) minmax(140px, 200px) 1fr auto !important;
}
.admin-catalog-bulk-actions .btn,
.admin-catalog-bulk-actions button.btn {
  width: auto !important;
  min-width: 92px !important;
  max-width: 120px !important;
  justify-self: end !important;
}
.admin-catalog-table tr[data-admin-product-row][hidden] {
  display: none !important;
}
.admin-catalog-table tr[data-admin-product-row] {
  min-height: 132px !important;
}
@media (max-width: 1180px) {
  .admin-catalog-topbar { grid-template-columns: auto minmax(220px,1fr) auto !important; }
  .admin-catalog-filterbar { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
}
@media (max-width: 680px) {
  .admin-catalog-topbar,
  .admin-catalog-filterbar,
  .admin-catalog-bulk-actions { grid-template-columns: 1fr !important; }
  .admin-catalog-topbar .admin-catalog-search { min-width: 0 !important; width: 100% !important; }
  .admin-catalog-bulk-actions .btn,
  .admin-catalog-bulk-actions button.btn { width: 100% !important; max-width: none !important; justify-self: stretch !important; }
}


/* V92 admin product card: fixed 4-column desktop layout and fuller missing-data reminders */
@media (min-width: 1680px) {
  .admin-catalog-table tbody { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
.admin-catalog-panel { max-width: 1760px !important; }
.admin-catalog-table tbody {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
.admin-catalog-table tr[data-admin-product-row] {
  grid-template-columns: 60px minmax(0,1fr) !important;
  min-height: 156px !important;
  padding: 9px !important;
  gap: 7px 9px !important;
}
.admin-catalog-table .admin-thumb {
  width: 60px !important;
  height: 60px !important;
}
.admin-missing-row,
.admin-complete-row {
  max-height: none !important;
  overflow: visible !important;
  display: flex !important;
  align-items: flex-start !important;
  flex-wrap: wrap !important;
  gap: 3px !important;
  margin-top: 4px !important;
  font-size: 10.2px !important;
  line-height: 1.25 !important;
}
.admin-missing-row strong {
  flex: 0 0 auto !important;
  line-height: 17px !important;
}
.admin-missing-row span {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 16px !important;
  padding: 2px 5px !important;
  border-radius: 999px !important;
  font-size: 9.7px !important;
  line-height: 1 !important;
}
.admin-chip-row {
  max-height: 19px !important;
  flex-wrap: wrap !important;
}
.admin-product-titleline .admin-product-link {
  -webkit-line-clamp: 2 !important;
  font-size: 12.5px !important;
}
.admin-feature-line {
  white-space: normal !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
}
.admin-card-actions .btn,
.admin-card-actions a.btn,
.admin-card-actions button.btn {
  min-height: 25px !important;
  height: 25px !important;
  font-size: 10.8px !important;
}
@media (max-width: 1380px) {
  .admin-catalog-table tbody { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 980px) {
  .admin-catalog-table tbody { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 620px) {
  .admin-catalog-table tbody { grid-template-columns: 1fr !important; }
  .admin-catalog-table tr[data-admin-product-row] { grid-template-columns: 56px minmax(0,1fr) !important; }
  .admin-catalog-table .admin-thumb { width: 56px !important; height: 56px !important; }
}


/* V93: legal policy pages and homepage trust links */
.home-legal-access {
  width: min(1180px, calc(100% - 42px));
  margin: 28px auto 42px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
  box-shadow: 0 16px 34px rgba(11,35,64,.07);
}
.legal-heading { margin-bottom: 18px; }
.legal-link-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.legal-link-grid a {
  display: block;
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(11,94,215,.16);
  border-radius: 16px;
  background: #fff;
  color: var(--blue-dark);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.legal-link-grid a:hover { transform: translateY(-2px); border-color: rgba(11,94,215,.42); box-shadow: 0 10px 24px rgba(11,35,64,.09); }
.legal-link-grid strong { display: block; font-size: 13px; line-height: 1.2; margin-bottom: 7px; }
.legal-link-grid span { display: block; font-size: 12px; line-height: 1.38; color: var(--muted); font-weight: 700; }
.policy-page a { color: var(--blue); font-weight: 900; }
.policy-card strong { color: var(--blue-dark); }
.policy-card h2 { font-size: 22px; }
.policy-card p { margin: 0; }
.policy-card p + p { margin-top: 10px; }
.policy-highlight { border-left: 6px solid var(--red); background: #fff7f7; }
@media (max-width: 1180px) { .legal-link-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) {
  .home-legal-access { width: min(100% - 24px, 1180px); padding: 18px; }
  .legal-link-grid { grid-template-columns: 1fr; }
  .legal-link-grid a { min-height: auto; }
  .policy-hero, .policy-layout { width: min(100% - 24px, 1100px); }
  .policy-hero { padding: 24px; border-radius: 20px; }
  .policy-card { padding: 18px; border-radius: 16px; }
}


/* V95: skeleton de productos para evitar sensación de página detenida durante MISS de Cloudflare */
.product-loading-note {
  grid-column: 1 / -1;
  text-align: center;
  padding: 14px 18px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #eff6ff;
  color: #0b5ed7;
  font-weight: 900;
}
.product-card-skeleton { pointer-events: none; overflow: hidden; }
.product-card-skeleton .skeleton-img {
  aspect-ratio: 1 / 1;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 45%, #eef2f7 100%);
  background-size: 220% 100%;
  animation: todomaxSkeleton 1.15s ease-in-out infinite;
}
.product-card-skeleton .skeleton-line {
  height: 13px;
  margin: 10px 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 45%, #e2e8f0 100%);
  background-size: 220% 100%;
  animation: todomaxSkeleton 1.15s ease-in-out infinite;
}
.product-card-skeleton .skeleton-title { height: 18px; width: 78%; }
.product-card-skeleton .skeleton-short { width: 52%; }
.product-card-skeleton .skeleton-actions { display: flex; gap: 10px; margin-top: 16px; }
.product-card-skeleton .skeleton-actions span {
  display: block;
  height: 36px;
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(90deg, #e2e8f0 0%, #f8fafc 45%, #e2e8f0 100%);
  background-size: 220% 100%;
  animation: todomaxSkeleton 1.15s ease-in-out infinite;
}
.quick-whatsapp svg { display: block; width: 21px; height: 21px; color: #fff; }
@keyframes todomaxSkeleton {
  0% { background-position: 220% 0; }
  100% { background-position: -220% 0; }
}

/* V95.4: mobile CLS stability and lighter skeleton animation.
   Keeps the same resource URLs and cache architecture to avoid increasing Cloudflare cold-MISS points. */
.product-grid {
  align-items: stretch;
}
.product-image-link {
  display: block;
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  background: #f8fbff;
}
.product-image-link .product-image,
.product-card > .product-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: cover;
}
.product-card {
  contain: layout paint;
}
.product-card-skeleton {
  min-height: 382px;
}
.product-card-skeleton .product-info {
  min-height: 172px;
}
.product-card-skeleton .skeleton-img,
.product-card-skeleton .skeleton-line,
.product-card-skeleton .skeleton-actions span {
  background: #e8eef7;
  animation: todomaxSkeletonFade 1.15s ease-in-out infinite;
}
@keyframes todomaxSkeletonFade {
  0%, 100% { opacity: .58; }
  50% { opacity: 1; }
}
@media (max-width: 640px) {
  .products-section {
    width: min(100% - 24px, 1280px);
    margin-top: 24px;
  }
  .section-heading {
    margin: 22px auto 18px;
    min-height: 132px;
  }
  .section-heading h2 {
    font-size: clamp(28px, 8vw, 36px);
    line-height: 1.08;
  }
  .section-heading p {
    font-size: 15px;
    line-height: 1.35;
  }
  .catalog-toolbar {
    min-height: 126px;
    margin-bottom: 16px;
  }
  .product-grid {
    gap: 14px;
  }
  .product-card {
    min-height: 392px;
  }
  .product-info {
    min-height: 178px;
  }
  .product-info h3 {
    min-height: 38px;
  }
  .product-info p {
    min-height: 35px;
  }
  .product-loading-note {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .product-card-skeleton {
    min-height: 392px;
  }
  .product-card-skeleton .skeleton-actions span {
    height: 38px;
  }
}
@media (prefers-reduced-motion: reduce), (max-width: 640px) {
  .product-card-skeleton .skeleton-img,
  .product-card-skeleton .skeleton-line,
  .product-card-skeleton .skeleton-actions span {
    animation: none;
  }
}


/* V95.7: zero-shift placeholders for PageSpeed mobile CLS.
   Initial HTML now reserves space for featured products and catalog cards before JS/JSON finish loading. */
.home-featured-skeleton {
  min-height: 440px;
  content-visibility: auto;
  contain-intrinsic-size: 440px;
}
.home-featured-skeleton .compact-heading {
  min-height: 92px;
}
.product-grid-initial {
  min-height: 840px;
  content-visibility: auto;
  contain-intrinsic-size: 840px;
}
.product-grid-initial .product-card-skeleton,
.home-featured-skeleton .product-card-skeleton {
  visibility: visible;
}
.category-bar {
  min-height: 56px;
}
@media (max-width: 760px) {
  .category-bar {
    min-height: 56px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    scrollbar-width: none;
  }
  .category-bar::-webkit-scrollbar { display: none; }
  .home-featured-skeleton {
    min-height: 500px;
    contain-intrinsic-size: 500px;
  }
  .home-featured-skeleton .home-featured-grid {
    display: flex;
    overflow-x: hidden;
    gap: 14px;
    padding-bottom: 10px;
  }
  .home-featured-skeleton .product-card-skeleton {
    min-width: 220px;
    max-width: 220px;
    min-height: 392px;
  }
  .product-grid-initial {
    min-height: 858px;
    contain-intrinsic-size: 858px;
  }
}
@media (max-width: 430px) {
  .product-grid-initial {
    min-height: 3200px;
    contain-intrinsic-size: 3200px;
  }
}

/* V95.7: product card visual polish.
   Keeps the same resource structure; no new first-screen network dependency. */
.product-info {
  text-align: center;
  align-items: center;
}
.product-info h3,
.product-info p,
.tier-card-note {
  width: 100%;
  text-align: center;
}
.price-row,
.tier-card-price {
  width: 100%;
  justify-content: center;
  text-align: center;
}
.card-actions {
  width: 100%;
}
.quick-whatsapp {
  background: #ffffff;
  border: 2px solid #25D366;
  color: #25D366;
  box-shadow: 0 8px 18px rgba(37, 211, 102, .14);
}
.quick-whatsapp:hover {
  background: #f0fff6;
  transform: translateY(-1px);
}
.quick-whatsapp svg,
.quick-whatsapp .whatsapp-original-icon {
  display: block;
  width: 28px;
  height: 28px;
  color: initial;
}
.quick-whatsapp img {
  width: 28px;
  height: 28px;
  display: block;
}


/* V95.7: card text line break and anchored section scrolling. */
.products-section,
.home-featured-block,
.home-category-entrance,
.promo {
  scroll-margin-top: 96px;
}
.tier-card-note {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
}
.product-card .product-info,
.product-card .product-info h3,
.product-card .product-info p,
.product-card .tier-card-note,
.product-card .price-row {
  text-align: center;
}
.product-card .product-info { align-items: center; }
@media (max-width: 760px) {
  .products-section,
  .home-featured-block,
  .home-category-entrance,
  .promo {
    scroll-margin-top: 84px;
  }
}


/* V96: SEO/GEO content blocks for AI-readable Chile winter family positioning */
.geo-answer-section {
  max-width: 1180px;
  margin: 40px auto;
  padding: 0 20px;
}
.geo-answer-box {
  background: linear-gradient(135deg, rgba(47,110,186,.10), rgba(234,51,35,.08));
  border: 1px solid rgba(47,110,186,.18);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 16px 35px rgba(15, 23, 42, .08);
}
.geo-answer-box h2, .geo-faq-mini h2 {
  margin: 6px 0 12px;
  color: #0f172a;
}
.geo-answer-lead {
  font-size: 1.05rem;
  line-height: 1.65;
}
.geo-data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.geo-data-grid article, .geo-faq-mini details {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .06);
}
.geo-data-grid h3 { margin: 0 0 8px; color: #0B5ED7; }
.geo-table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, .10);
  background: #fff;
}
.geo-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.geo-table caption { text-align: left; font-weight: 800; padding: 16px 18px; color: #0f172a; }
.geo-table th, .geo-table td { padding: 14px 18px; border-top: 1px solid rgba(15,23,42,.08); text-align: left; vertical-align: top; }
.geo-table th { background: #f8fafc; color: #0B5ED7; }
.geo-faq-mini { margin-top: 18px; display: grid; gap: 12px; }
.geo-faq-mini summary { cursor: pointer; font-weight: 800; color: #0f172a; }
.geo-faq-mini p { margin: 10px 0 0; }
@media (max-width: 760px) {
  .geo-answer-section { margin: 28px auto; padding: 0 14px; }
  .geo-answer-box { padding: 20px; border-radius: 18px; }
  .geo-data-grid { grid-template-columns: 1fr; }
  .geo-table { min-width: 560px; }
}

/* V96.2: product detail images must be shown complete, not cropped.
   Product cards on the home page keep their square cover layout; this only affects detail galleries. */
.detail-gallery > img,
.detail-gallery img#detailMainImage,
.detail-gallery .detail-main-image,
.detail-gallery .product-detail-main-image {
  display: block;
  width: 100%;
  height: auto !important;
  aspect-ratio: auto !important;
  max-height: none;
  object-fit: contain !important;
  object-position: center center !important;
  background: #fff;
}
.detail-thumb img {
  object-fit: contain !important;
  background: #fff;
}
@media (max-width: 760px) {
  .detail-gallery {
    padding: 14px;
  }
  .detail-gallery > img,
  .detail-gallery img#detailMainImage,
  .detail-gallery .detail-main-image,
  .detail-gallery .product-detail-main-image {
    border-radius: 16px;
  }
}


/* V96.8: tienda/bodega trust section */
.storefront-proof {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 26px;
  align-items: center;
  margin: 34px auto;
  padding: 26px;
  border: 1px solid rgba(47, 110, 186, 0.16);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(241,247,255,0.92));
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}
.storefront-proof-text h2 { margin: 8px 0 12px; }
.storefront-proof-text p { color: var(--muted); line-height: 1.65; }
.storefront-proof-text strong { color: var(--ink); }
.storefront-proof-media { margin: 0; }
.storefront-proof-media img,
.policy-photo-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.14);
  background: #fff;
}
.storefront-proof-media figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.policy-photo-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: center;
}
.policy-photo-card h2 { margin-top: 0; }
.policy-photo-card p { color: var(--muted); line-height: 1.65; }
@media (max-width: 820px) {
  .storefront-proof,
  .policy-photo-card {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .storefront-proof { margin: 24px auto; }
}

/* V101: product cards equal height and compact product detail layout */
.product-grid {
  align-items: stretch;
}
.product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-card .product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card h3 {
  min-height: 2.65em;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .product-info > p {
  min-height: 3.1em;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .tier-card-price {
  min-height: 2.3em;
  align-items: center;
}
.product-card .tier-card-note,
.related-grid .tier-card-note {
  display: none !important;
}
.product-card .card-actions {
  margin-top: auto;
}

.detail-page {
  padding-top: 20px;
}
.detail-breadcrumb {
  margin-bottom: 14px;
}
.detail-layout {
  grid-template-columns: minmax(320px, 540px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.detail-gallery {
  padding: 16px;
  border-radius: 22px;
}
.detail-summary {
  padding: 24px;
  border-radius: 22px;
}
.detail-category {
  margin-bottom: 6px;
  font-size: 12px;
}
.detail-summary h1 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
  margin-bottom: 10px;
  letter-spacing: -0.8px;
}
.detail-feature {
  font-size: 16px;
  line-height: 1.45;
  margin-bottom: 12px;
}
.detail-sku-line {
  margin: 6px 0 12px;
}
.detail-price-row {
  margin-bottom: 14px;
}
.detail-price-row strong {
  font-size: clamp(28px, 3vw, 36px);
}
.detail-color-selector {
  margin: 12px 0 !important;
  padding: 12px !important;
  border-radius: 14px !important;
}
.detail-color-selector > strong {
  font-size: 15px !important;
  margin-bottom: 8px !important;
}
.detail-color-option {
  padding: 7px 10px !important;
  font-size: 13px !important;
}
.price-tier-table {
  margin: 12px 0 !important;
  padding: 14px !important;
  border-radius: 16px !important;
}
.price-tier-table h2 {
  font-size: 18px !important;
  margin-bottom: 10px !important;
}
.price-tier-row {
  padding: 9px 10px !important;
  font-size: 13px !important;
}
.detail-qty-box {
  margin: 12px 0 14px;
  padding: 14px;
  border-radius: 16px;
  gap: 8px;
}
.detail-qty-box label {
  grid-template-columns: auto 120px;
  align-items: center;
  gap: 12px;
}
.detail-qty-box input {
  width: 120px;
  height: 42px;
  font-size: 16px;
}
.detail-price-preview {
  gap: 12px;
  font-size: 13px;
}
.detail-note {
  margin-top: 6px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.35;
}
.detail-trust-box {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 16px;
}
.detail-trust-box strong {
  margin-bottom: 4px;
}
.detail-trust-box ul {
  margin-top: 6px;
  line-height: 1.42;
  font-size: 13px;
}
.detail-actions {
  gap: 10px;
  margin: 14px 0 18px;
}
.detail-actions .btn {
  min-width: 0;
  flex: 1 1 180px;
  padding: 12px 18px;
  font-size: 15px;
  border-radius: 14px;
}
.detail-description {
  margin-top: 14px;
}
.detail-description h2,
.detail-specs h2,
.detail-extra-info h2 {
  font-size: 20px;
}
.detail-benefits {
  margin-top: 24px;
}
@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .detail-summary {
    padding: 20px;
  }
}
@media (max-width: 760px) {
  .detail-qty-box label {
    grid-template-columns: 1fr;
  }
  .detail-actions .btn {
    flex-basis: 100%;
  }
}


/* V101: compact quantity box and filtered comuna suggestions */
.detail-qty-box {
  gap: 6px !important;
  padding: 10px 12px !important;
  margin: 8px 0 10px !important;
  border-radius: 14px !important;
}
.detail-qty-box label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: auto !important;
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 1.1 !important;
}
.detail-qty-box input,
.detail-qty-box input[type="number"] {
  width: 82px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 8px !important;
  font-size: 15px !important;
  border-radius: 10px !important;
}
.detail-price-preview {
  gap: 8px !important;
  font-size: 12.5px !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}
.detail-savings-banner,
.detail-upgrade-hint,
.detail-note {
  margin: 3px 0 !important;
  padding: 6px 8px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
  line-height: 1.22 !important;
}
.detail-note strong { font-weight: 950; }
.detail-actions {
  margin: 10px 0 12px !important;
}
.detail-actions .btn {
  padding: 10px 14px !important;
  font-size: 14px !important;
  border-radius: 12px !important;
}
.comuna-suggestions[hidden] { display: none !important; }
.comuna-suggestions {
  max-height: 260px;
  overflow: auto;
}
@media (max-width: 760px) {
  .detail-qty-box label {
    display: inline-flex !important;
    flex-direction: row !important;
    gap: 8px !important;
  }
  .detail-qty-box input,
  .detail-qty-box input[type="number"] {
    width: 82px !important;
  }
}

/* V102: 首页 Banner 轮播，固定容器，避免 CLS，只让第一张进入首屏关键路径 */
.home-hero-track,
.home-hero-slide,
.home-hero-slide picture,
.home-hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.home-hero-track { z-index: 1; }
.home-hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}
.home-hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.home-hero-slide img {
  object-fit: cover;
  display: block;
}
.home-hero-slide .home-hero-copy { z-index: 4; }
.home-hero-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 24px rgba(15,23,42,.16);
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.home-hero-prev { left: 14px; }
.home-hero-next { right: 14px; }
.home-hero-dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 5;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}
.home-hero-dot {
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}
.home-hero-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,.78);
  box-shadow: 0 2px 8px rgba(15,23,42,.18);
}
.home-hero-dot.active::after { background: #e60023; }
.admin-banner-slide-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 14px;
  background: #f8fafc;
}
@media (max-width: 760px) {
  .home-hero-nav { display: none; }
  .home-hero-dots { bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero-slide { transition: none; }
}


.home-hero-loading { background: linear-gradient(135deg, #eaf4ff 0%, #f8fbff 100%); }

/* V103: 修复 Banner 轮播初始化后父容器高度塌陷，避免首页 Banner 消失 */
.home-hero {
  position: relative !important;
  aspect-ratio: 1920 / 1054;
  min-height: 220px;
  overflow: hidden;
}
.home-hero-track {
  position: absolute;
  inset: 0;
}
@media (max-width: 760px) {
  .home-hero {
    aspect-ratio: 768 / 422;
    min-height: 210px;
  }
}

/* V132: cart full-list layout
   Show all cart products first, then Entrega/payment/totals.
   Avoid nested invisible scrolling inside #cartItems, especially on iPhone Safari. */
.cart-panel {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.cart-items {
  flex: 0 0 auto;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 14px 0 10px;
  margin-bottom: 8px;
}
.cart-items::after {
  content: "";
  display: block;
  height: 2px;
}
.cart-delivery-box {
  margin-top: 10px;
}
@media (max-width: 520px) {
  .cart-items {
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
}

/* V134 Safe Baseline Lock: preserves V132 cart full-list layout as the current iPhone Safari stable baseline. */

/* V136/V140: compact homepage quantity controls; detail page keeps "en carrito". */
.cart-action-slot {
  width: 100%;
  min-width: 0;
}
.cart-qty-control,
.detail-cart-control {
  display: grid;
  grid-template-columns: 44px minmax(92px, 1fr) 44px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(11, 94, 215, .22);
  border-radius: 999px;
  background: #f8fbff;
  padding: 4px;
}
.cart-qty-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: var(--primary, #0B5ED7);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.cart-qty-btn:active {
  transform: translateY(1px);
}
.cart-qty-label {
  text-align: center;
  color: #0f172a;
  font-size: .86rem;
  font-weight: 800;
  white-space: nowrap;
}
.cart-qty-label strong {
  font-size: 1rem;
}
.card-cart-note {
  color: #0B5ED7;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
  text-align: center;
  padding: 6px 10px;
  margin-bottom: 6px;
}

.card-actions .card-cart-qty-control {
  grid-template-columns: 34px minmax(24px, 1fr) 34px;
  gap: 4px;
  min-height: 42px;
  padding: 3px;
}
.card-actions .card-cart-qty-control .cart-qty-btn {
  width: 32px;
  height: 32px;
  font-size: 18px;
}
.card-actions .card-cart-qty-label strong {
  font-size: 1.05rem;
}
.detail-cart-control-wrap {
  min-width: 220px;
  flex: 1 1 220px;
}
@media (max-width: 520px) {
  .cart-qty-control,
  .detail-cart-control {
    grid-template-columns: 40px minmax(84px, 1fr) 40px;
  }
  .cart-qty-label {
    font-size: .8rem;
  }
  
.card-actions .card-cart-qty-control {
  grid-template-columns: 34px minmax(24px, 1fr) 34px;
  gap: 4px;
  min-height: 42px;
  padding: 3px;
}
.card-actions .card-cart-qty-control .cart-qty-btn {
  width: 32px;
  height: 32px;
  font-size: 18px;
}
.card-actions .card-cart-qty-label strong {
  font-size: 1.05rem;
}
.detail-cart-control-wrap {
    width: 100%;
    min-width: 100%;
  }
}


@media (max-width: 520px) {
  .card-actions .card-cart-qty-control {
    grid-template-columns: 32px minmax(22px, 1fr) 32px;
    gap: 3px;
  }
  .card-actions .card-cart-qty-control .cart-qty-btn {
    width: 30px;
    height: 30px;
    font-size: 17px;
  }
}

/* V140: homepage polish, hide unused sort control and center category cards */
.home-search-section .sort-box {
  display: none;
}
.home-search-section .search-box {
  width: 100%;
}
.home-category-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 240px));
  justify-content: center;
}
@media (max-width: 980px) {
  .home-category-grid {
    justify-content: flex-start;
  }
}

/* V145: detail tier reset quantity and actual quantity input. */
.category-bar {
  display: none !important;
}
.price-qty-button.active {
  background: var(--primary, #0B5ED7);
  color: #0f172a;
  border-color: var(--primary, #0B5ED7);
  box-shadow: 0 10px 24px rgba(11, 94, 215, .22);
}
.price-qty-button.active:hover {
  background: var(--primary, #0B5ED7);
  color: #0f172a;
}
.detail-cart-control .cart-qty-label strong {
  font-size: 1.1rem;
}


/* V145: detail cart control middle value is editable actual cart quantity */
.detail-cart-control .cart-qty-input,
.detail-cart-control .detail-cart-qty-input {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: none;
  background: transparent;
  text-align: center;
  color: #0f172a;
  font-size: 1.08rem;
  font-weight: 900;
  outline: none;
  -moz-appearance: textfield;
}
.detail-cart-control .cart-qty-input::-webkit-outer-spin-button,
.detail-cart-control .cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.detail-cart-control .cart-qty-input:focus {
  background: #ffffff;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(11, 94, 215, .2);
}

/* V146: legacy detail quantity input below add-to-cart is retired. Tier buttons and the actual in-cart quantity control are now the only quantity controls. */
.detail-qty-box { display: none !important; }

/* V150 Stability Consolidation: center product cards in configured homepage sections on desktop.
   This intentionally does not change the main catalog grid or mobile horizontal scrolling. */
@media (min-width: 981px) {
  .home-featured-block:not(.home-featured-block-carousel) .home-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 240px));
    justify-content: center;
    justify-items: stretch;
  }
  .home-featured-block:not(.home-featured-block-carousel) .home-featured-grid .product-card {
    width: 100%;
  }
}

/* V152 SEO / GEO Content Governance */
.legal-link-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(11, 94, 215, .08);
  margin-bottom: 8px;
  font-size: 15px;
}

/* V160 后台 SEO/GEO 编辑区排版强制生效修复 */
.admin-seo-geo-polished .admin-settings-card-title.admin-seo-geo-titlebar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}
.admin-seo-geo-save-hint {
  flex: 0 0 auto;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.admin-variable-help.admin-seo-geo-vars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  margin: -2px 0 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fbff;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}
.admin-seo-geo-vars strong {
  color: #0f172a;
  margin-right: 4px;
}
.admin-seo-geo-vars code {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 950;
}
.admin-seo-geo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .75fr);
  gap: 16px;
  align-items: stretch;
}
.admin-seo-geo-panel,
.admin-seo-geo-list-block {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(15,23,42,.04);
}
.admin-seo-geo-panel h4,
.admin-seo-geo-section-head h4 {
  margin: 0 0 10px;
  font-size: 15px;
  color: #0f172a;
}
.admin-seo-geo-compact-grid,
.admin-seo-geo-title-grid {
  display: grid;
  gap: 12px;
}
.admin-seo-geo-compact-grid {
  grid-template-columns: 170px 1fr 1fr;
}
.admin-seo-geo-compact-grid .wide { grid-column: span 2; }
.admin-seo-geo-compact-grid .full { grid-column: 1 / -1; }
.admin-seo-geo-title-grid { grid-template-columns: 1fr 1fr; }
.admin-seo-geo-enable .admin-inline-check {
  min-height: 40px;
  display: flex;
  align-items: center;
}
.admin-seo-geo-trust-text { margin-top: 12px; }
.admin-seo-geo-list-block { margin-top: 16px; }
.admin-seo-geo-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.admin-seo-geo-section-head p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}
.admin-seo-geo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-seo-geo-row {
  display: grid;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #e5edf7;
  border-radius: 16px;
  background: #f8fafc;
}
.admin-seo-geo-simple-row {
  grid-template-columns: 96px 90px minmax(0, 1fr);
}
.admin-seo-geo-faq-row {
  grid-template-columns: 96px 90px minmax(220px, .9fr) minmax(260px, 1.1fr);
}
.admin-seo-geo-check .admin-inline-check {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #dbeafe;
  background: #fff;
  border-radius: 12px;
}
.admin-seo-geo-sort input {
  text-align: center;
  font-weight: 900;
}
.admin-seo-geo-row textarea {
  min-height: 68px;
  resize: vertical;
}
.admin-seo-geo-sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 32%);
}
@media (max-width: 980px) {
  .admin-seo-geo-layout,
  .admin-seo-geo-compact-grid,
  .admin-seo-geo-title-grid,
  .admin-seo-geo-simple-row,
  .admin-seo-geo-faq-row {
    grid-template-columns: 1fr;
  }
  .admin-seo-geo-compact-grid .wide,
  .admin-seo-geo-compact-grid .full { grid-column: auto; }
  .admin-seo-geo-polished .admin-settings-card-title.admin-seo-geo-titlebar,
  .admin-seo-geo-section-head,
  .admin-seo-geo-sticky-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-seo-geo-save-hint { white-space: normal; }
}

/* V160: admin SEO/GEO CSS also embedded in q7ys83kj.php to avoid stale admin stylesheet cache. Version: v160-admin-seo-geo-inline-layout-fix */


/* V166: Admin product list card redesign and dark catalog cleanup. Critical copy is also inline in q7ys83kj.php. */
.admin-shell-v161 .admin-catalog-panel{padding:12px!important;background:#020617!important;color:#e5e7eb!important;max-width:none!important;}
.admin-shell-v161 .admin-catalog-topbar,.admin-shell-v161 .admin-catalog-filterbar,.admin-shell-v161 .admin-catalog-bulk-actions{background:#0b1220!important;border:1px solid rgba(148,163,184,.22)!important;box-shadow:none!important;border-radius:14px!important;color:#e5e7eb!important;}
.admin-shell-v161 .admin-catalog-scroll{max-height:none!important;overflow:visible!important;border:0!important;background:transparent!important;}
.admin-shell-v161 .admin-catalog-table{display:block!important;width:100%!important;min-width:0!important;background:transparent!important;border:0!important;box-shadow:none!important;}
.admin-shell-v161 .admin-catalog-table thead{display:none!important;}
.admin-shell-v161 .admin-catalog-table tbody{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(390px,1fr))!important;gap:12px!important;align-items:stretch!important;background:transparent!important;}
.admin-shell-v161 .admin-catalog-table tr[data-admin-product-row]{position:relative!important;display:grid!important;grid-template-columns:82px minmax(0,1fr)!important;grid-template-areas:"image info" "price price" "actions actions"!important;gap:10px 12px!important;min-height:186px!important;padding:12px!important;border-radius:16px!important;background:linear-gradient(180deg,#111827 0%,#0b1220 100%)!important;border:1px solid rgba(148,163,184,.24)!important;box-shadow:0 12px 24px rgba(0,0,0,.22)!important;color:#e5e7eb!important;}
.admin-shell-v161 .admin-catalog-table td{display:block!important;border:0!important;background:transparent!important;color:#e5e7eb!important;padding:0!important;min-width:0!important;font-size:12px!important;line-height:1.3!important;}
.admin-shell-v161 .admin-catalog-table td::before{display:none!important;content:none!important;}
.admin-shell-v161 .admin-catalog-table td:nth-child(1){position:absolute!important;top:10px!important;right:10px!important;width:18px!important;height:18px!important;z-index:4!important;display:block!important;}
.admin-shell-v161 .admin-catalog-table td:nth-child(2){grid-area:image!important;}
.admin-shell-v161 .admin-catalog-table td:nth-child(4){grid-area:info!important;padding-right:20px!important;}
.admin-shell-v161 .admin-catalog-table td:nth-child(6){grid-area:price!important;}
.admin-shell-v161 .admin-catalog-table td:nth-child(10){grid-area:actions!important;}
.admin-shell-v161 .admin-catalog-table td:nth-child(3),.admin-shell-v161 .admin-catalog-table td:nth-child(5),.admin-shell-v161 .admin-catalog-table td:nth-child(7),.admin-shell-v161 .admin-catalog-table td:nth-child(8),.admin-shell-v161 .admin-catalog-table td:nth-child(9){display:none!important;}
.admin-shell-v161 .admin-catalog-table .admin-thumb{width:82px!important;height:82px!important;border-radius:14px!important;object-fit:cover!important;background:#020617!important;border:1px solid rgba(148,163,184,.26)!important;}
.admin-shell-v161 .admin-product-titleline .admin-product-link{color:#f8fafc!important;text-decoration:none!important;font-size:14px!important;font-weight:950!important;line-height:1.25!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;}
.admin-shell-v161 .admin-product-meta-line{display:flex!important;flex-wrap:wrap!important;gap:6px!important;margin-top:6px!important;color:#94a3b8!important;font-size:11.5px!important;}
.admin-shell-v161 .admin-product-meta-line strong{color:#bfdbfe!important;}
.admin-shell-v161 .admin-feature-line{display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;white-space:normal!important;margin-top:5px!important;color:#cbd5e1!important;font-size:12px!important;line-height:1.3!important;}
.admin-shell-v161 .admin-missing-row span{background:rgba(250,204,21,.16)!important;border:1px solid rgba(250,204,21,.30)!important;color:#fde68a!important;border-radius:999px!important;}
.admin-shell-v161 .admin-complete-row{justify-content:center!important;background:rgba(22,163,74,.14)!important;border:1px solid rgba(74,222,128,.25)!important;color:#bbf7d0!important;border-radius:999px!important;font-weight:950!important;padding:4px 8px!important;}
.admin-shell-v161 .admin-price-stack{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;}
.admin-shell-v161 .admin-price-stack span{display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;min-height:34px!important;padding:6px 7px!important;background:#020617!important;border:1px solid rgba(148,163,184,.22)!important;color:#e5e7eb!important;border-radius:10px!important;font-size:12px!important;font-weight:900!important;}
.admin-shell-v161 .admin-price-stack b{color:#93c5fd!important;}
.admin-shell-v161 .admin-card-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;}
.admin-shell-v161 .admin-card-actions .btn,.admin-shell-v161 .admin-card-actions a.btn,.admin-shell-v161 .admin-card-actions button.btn{height:30px!important;min-height:30px!important;border-radius:9px!important;font-size:11.5px!important;font-weight:900!important;width:100%!important;justify-content:center!important;}
@media (min-width:1800px){.admin-shell-v161 .admin-catalog-table tbody{grid-template-columns:repeat(4,minmax(0,1fr))!important;}}
@media (max-width:1420px){.admin-shell-v161 .admin-catalog-table tbody{grid-template-columns:repeat(3,minmax(0,1fr))!important;}.admin-shell-v161 .admin-catalog-filterbar{grid-template-columns:repeat(3,minmax(0,1fr))!important;}.admin-shell-v161 .admin-catalog-bulk-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;}}
@media (max-width:1020px){.admin-shell-v161 .admin-catalog-table tbody{grid-template-columns:repeat(2,minmax(0,1fr))!important;}.admin-shell-v161 .admin-catalog-topbar,.admin-shell-v161 .admin-catalog-filterbar,.admin-shell-v161 .admin-catalog-bulk-actions{grid-template-columns:1fr 1fr!important;}}
@media (max-width:680px){.admin-shell-v161 .admin-catalog-table tbody{grid-template-columns:1fr!important;}.admin-shell-v161 .admin-catalog-table tr[data-admin-product-row]{grid-template-columns:64px minmax(0,1fr)!important;}.admin-shell-v161 .admin-catalog-table .admin-thumb{width:64px!important;height:64px!important;}.admin-shell-v161 .admin-price-stack{grid-template-columns:1fr!important;}.admin-shell-v161 .admin-card-actions{grid-template-columns:1fr 1fr!important;}.admin-shell-v161 .admin-catalog-topbar,.admin-shell-v161 .admin-catalog-filterbar,.admin-shell-v161 .admin-catalog-bulk-actions{grid-template-columns:1fr!important;}}


/* V167: Admin dark UI consolidation pack.
   Consolidates dark mode fixes collected from product list, category, color, badge, image library and diagnostics pages.
   CSS-only admin polish; no frontend/cart/shipping data logic changes. */
.admin-shell-v161 .admin-sidebar-logo-v161{
  background:linear-gradient(135deg,#0b1220,#111827)!important;
  color:#93c5fd!important;
  border:1px solid rgba(148,163,184,.28)!important;
  box-shadow:none!important;
}
.admin-shell-v161 .admin-actions.admin-card-toolbar,
.admin-shell-v161 .admin-toolbar,
.admin-shell-v161 form > .admin-actions.admin-card-toolbar,
.admin-shell-v161 section > .admin-toolbar{
  background:#0b1220!important;
  color:#e5e7eb!important;
  border:1px solid rgba(148,163,184,.22)!important;
  border-radius:14px!important;
  box-shadow:none!important;
  padding:10px!important;
  margin:10px 0 12px!important;
  min-height:0!important;
  gap:8px!important;
}
.admin-shell-v161 .admin-card-toolbar .btn,
.admin-shell-v161 .admin-toolbar .btn{
  min-height:34px!important;
  height:auto!important;
  border-radius:10px!important;
  padding:8px 12px!important;
}
.admin-shell-v161 .admin-toolbar input,
.admin-shell-v161 .admin-toolbar select,
.admin-shell-v161 .admin-card-toolbar input,
.admin-shell-v161 .admin-card-toolbar select{
  background:#020617!important;
  color:#f8fafc!important;
  border-color:#334155!important;
}

/* Category / color visual cards */
.admin-shell-v161 .admin-visual-grid,
.admin-shell-v161 #categoryCardsGrid,
.admin-shell-v161 #colorCardsGrid{
  gap:12px!important;
  margin-top:12px!important;
}
.admin-shell-v161 .admin-visual-card,
.admin-shell-v161 .admin-category-card,
.admin-shell-v161 .admin-color-card{
  background:linear-gradient(180deg,#1e293b 0%,#111827 100%)!important;
  border:1px solid rgba(148,163,184,.24)!important;
  box-shadow:none!important;
  color:#e5e7eb!important;
  padding:14px!important;
  border-radius:16px!important;
}
.admin-shell-v161 .admin-visual-card-head{margin-bottom:8px!important;gap:10px!important;}
.admin-shell-v161 .admin-visual-card-head strong,
.admin-shell-v161 .admin-category-card .admin-visual-card-head strong,
.admin-shell-v161 .admin-color-card .admin-visual-card-head strong{
  color:#f8fafc!important;
  font-weight:1000!important;
  letter-spacing:.01em!important;
}
.admin-shell-v161 .admin-visual-card-head small{
  color:#cbd5e1!important;
  font-weight:900!important;
}
.admin-shell-v161 .admin-category-icon-box,
.admin-shell-v161 .admin-category-icon-preview{
  background:#0b1220!important;
  border:1px solid rgba(148,163,184,.24)!important;
  color:#e5e7eb!important;
}
.admin-shell-v161 .admin-mini-grid label,
.admin-shell-v161 .admin-visual-card > label,
.admin-shell-v161 .admin-visual-card label{
  color:#cbd5e1!important;
}
.admin-shell-v161 .admin-visual-card textarea,
.admin-shell-v161 .admin-visual-card input,
.admin-shell-v161 .admin-mini-grid input{
  background:#020617!important;
  color:#f8fafc!important;
  border-color:#334155!important;
}
.admin-shell-v161 .admin-card-flags,
.admin-shell-v161 #categoryCardsGrid .admin-card-flags,
.admin-shell-v161 #colorCardsGrid .admin-card-flags{
  border-top:1px dashed rgba(148,163,184,.32)!important;
  padding-top:10px!important;
  gap:8px!important;
}
.admin-shell-v161 .admin-card-flags label,
.admin-shell-v161 #categoryCardsGrid .admin-card-flags label,
.admin-shell-v161 #colorCardsGrid .admin-card-flags label,
.admin-shell-v161 .admin-check-grid label{
  background:#0b1220!important;
  color:#e5e7eb!important;
  border:1px solid rgba(148,163,184,.24)!important;
  border-radius:12px!important;
  box-shadow:none!important;
}
.admin-shell-v161 .admin-card-flags label,
.admin-shell-v161 #categoryCardsGrid .admin-card-flags label,
.admin-shell-v161 #colorCardsGrid .admin-card-flags label{
  min-height:34px!important;
  padding:7px 10px!important;
  border-radius:999px!important;
}
.admin-shell-v161 .admin-check-grid label{
  padding:8px 10px!important;
  font-weight:850!important;
}
.admin-shell-v161 .admin-card-flags label:has(input:checked),
.admin-shell-v161 .admin-check-grid label:has(input:checked){
  background:rgba(37,99,235,.16)!important;
  border-color:rgba(96,165,250,.38)!important;
  color:#dbeafe!important;
}
.admin-shell-v161 .admin-card-flags .danger-check,
.admin-shell-v161 #categoryCardsGrid .danger-check,
.admin-shell-v161 #colorCardsGrid .danger-check,
.admin-shell-v161 label.danger-check{
  background:rgba(127,29,29,.24)!important;
  border:1px solid rgba(248,113,113,.40)!important;
  color:#fecaca!important;
}
.admin-shell-v161 .admin-visual-help{
  background:#0b1220!important;
  border-color:rgba(148,163,184,.24)!important;
  color:#cbd5e1!important;
}

/* Color management */
.admin-shell-v161 .admin-color-strip,
.admin-shell-v161 #admin-colors-panel .admin-color-strip{
  background:#0b1220!important;
  border:1px solid rgba(148,163,184,.22)!important;
  box-shadow:none!important;
  padding:10px!important;
  margin:10px 0 12px!important;
  border-radius:14px!important;
}
.admin-shell-v161 .admin-color-strip span,
.admin-shell-v161 .admin-color-swatch,
.admin-shell-v161 .admin-color-big-dot{
  border-color:rgba(248,250,252,.92)!important;
  box-shadow:0 0 0 1px rgba(148,163,184,.44),0 6px 16px rgba(0,0,0,.28)!important;
}
.admin-shell-v161 .admin-color-big-dot{
  background-clip:padding-box!important;
}

/* Badge management */
.admin-shell-v161 #admin-badges-panel .admin-badge-card-grid{
  gap:12px!important;
}
.admin-shell-v161 #admin-badges-panel .admin-badge-card,
.admin-shell-v161 .admin-badge-card{
  background:linear-gradient(180deg,#1e293b 0%,#111827 100%)!important;
  border:1px solid rgba(148,163,184,.24)!important;
  box-shadow:none!important;
  border-radius:16px!important;
  padding:14px!important;
}
.admin-shell-v161 .admin-badge-card-head{
  border-bottom:1px solid rgba(148,163,184,.22)!important;
  padding-bottom:10px!important;
  margin-bottom:10px!important;
}
.admin-shell-v161 .admin-badge-usage{
  background:#0b1220!important;
  border:1px dashed rgba(148,163,184,.35)!important;
  color:#cbd5e1!important;
  border-radius:12px!important;
  padding:9px 10px!important;
  line-height:1.5!important;
}
.admin-shell-v161 .admin-badge-usage strong{color:#f8fafc!important;}
.admin-shell-v161 #admin-badges-panel .admin-grid,
.admin-shell-v161 .admin-badge-card .admin-grid.compact{
  gap:10px!important;
}
.admin-shell-v161 #admin-badges-panel .admin-check-grid,
.admin-shell-v161 .admin-badge-card .admin-check-grid{
  background:transparent!important;
  border:0!important;
  padding:0!important;
}
.admin-shell-v161 #admin-badges-panel .admin-check-grid label,
.admin-shell-v161 .admin-badge-card .admin-check-grid label{
  min-height:34px!important;
}
.admin-shell-v161 .admin-check-grid label.is-disabled,
.admin-shell-v161 .admin-badge-card .is-disabled{
  background:#0f172a!important;
  color:#64748b!important;
  border-color:rgba(100,116,139,.22)!important;
  opacity:.72!important;
}

/* Image library */
.admin-shell-v161 #admin-images-panel .admin-toolbar{
  background:#0b1220!important;
  border:1px solid rgba(148,163,184,.22)!important;
  border-radius:14px!important;
  padding:10px!important;
}
.admin-shell-v161 #adminImageLibrary{
  gap:12px!important;
}
.admin-shell-v161 #adminImageLibrary .admin-library-card,
.admin-shell-v161 .admin-library-card{
  background:#111827!important;
  border:1px solid rgba(148,163,184,.24)!important;
  color:#e5e7eb!important;
  box-shadow:none!important;
  border-radius:14px!important;
  padding:10px!important;
}
.admin-shell-v161 .admin-library-card img{
  height:132px!important;
  object-fit:contain!important;
  background:#f8fafc!important;
  border-radius:10px!important;
}
.admin-shell-v161 .admin-library-card strong{
  color:#f8fafc!important;
  line-height:1.25!important;
}
.admin-shell-v161 .admin-library-card small{
  color:#94a3b8!important;
  line-height:1.35!important;
}
.admin-shell-v161 .admin-image-tags span,
.admin-shell-v161 #adminImageLibrary .admin-image-tags span{
  background:rgba(37,99,235,.16)!important;
  color:#bfdbfe!important;
  border:1px solid rgba(96,165,250,.32)!important;
  border-radius:999px!important;
}
.admin-shell-v161 .admin-image-tags .warn{
  background:rgba(127,29,29,.24)!important;
  color:#fecaca!important;
  border-color:rgba(248,113,113,.38)!important;
}

/* Diagnostics / summary metrics */
.admin-shell-v161 .admin-backup-summary{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  gap:10px!important;
}
.admin-shell-v161 .admin-backup-summary > div,
.admin-shell-v161 #admin-diagnostics-panel .admin-backup-summary > div{
  background:#111827!important;
  border:1px solid rgba(148,163,184,.24)!important;
  color:#e5e7eb!important;
  border-radius:14px!important;
  box-shadow:none!important;
  padding:12px!important;
}
.admin-shell-v161 .admin-backup-summary > div strong,
.admin-shell-v161 #admin-diagnostics-panel .admin-backup-summary > div strong{
  color:#f8fafc!important;
}
.admin-shell-v161 .admin-backup-summary > div span,
.admin-shell-v161 #admin-diagnostics-panel .admin-backup-summary > div span{
  color:#94a3b8!important;
}

/* Front SEO/GEO dark consolidation, overriding earlier V160 light inline styles. */
.admin-shell-v161 .admin-seo-geo-polished .admin-seo-geo-save-hint,
.admin-shell-v161 .admin-seo-geo-polished .admin-variable-help.admin-seo-geo-vars,
.admin-shell-v161 .admin-seo-geo-polished .admin-seo-geo-panel,
.admin-shell-v161 .admin-seo-geo-polished .admin-seo-geo-list-block,
.admin-shell-v161 .admin-seo-geo-polished .admin-seo-geo-row,
.admin-shell-v161 .admin-seo-geo-polished .admin-seo-geo-check .admin-inline-check{
  background:#111827!important;
  border-color:rgba(148,163,184,.24)!important;
  color:#e5e7eb!important;
  box-shadow:none!important;
}
.admin-shell-v161 .admin-seo-geo-polished .admin-seo-geo-row{background:#0b1220!important;}
.admin-shell-v161 .admin-seo-geo-polished .admin-seo-geo-panel h4,
.admin-shell-v161 .admin-seo-geo-polished .admin-seo-geo-section-head h4,
.admin-shell-v161 .admin-seo-geo-polished .admin-seo-geo-vars strong{color:#f8fafc!important;}
.admin-shell-v161 .admin-seo-geo-polished .admin-seo-geo-section-head p{color:#94a3b8!important;}
.admin-shell-v161 .admin-seo-geo-polished .admin-seo-geo-vars code{
  background:rgba(37,99,235,.16)!important;
  color:#bfdbfe!important;
  border:1px solid rgba(96,165,250,.32)!important;
}
.admin-shell-v161 .admin-seo-geo-polished .admin-seo-geo-sticky-actions{
  background:linear-gradient(180deg,rgba(2,6,23,0),#020617 34%)!important;
}



/* V168: Frontend Settings dark UI consolidation.
   Fixes remaining light blocks in front settings pages: Banner, Home Sections, Benefits, Trust, Policy and Menu management.
   CSS-only admin polish; no frontend/cart/shipping data logic changes. */
.admin-shell-v161 #admin-home-hero-panel .admin-banner-slide-card.full,
.admin-shell-v161 #admin-home-hero-panel .admin-logo-preview-box{
  background:linear-gradient(180deg,#111827 0%,#0b1220 100%)!important;
  border:1px solid rgba(148,163,184,.24)!important;
  color:#e5e7eb!important;
  box-shadow:none!important;
  border-radius:16px!important;
}
.admin-shell-v161 #admin-home-hero-panel .admin-banner-slide-card.full{
  padding:14px!important;
  margin-top:12px!important;
}
.admin-shell-v161 #admin-home-hero-panel .admin-banner-slide-card .admin-settings-card-title,
.admin-shell-v161 #admin-home-hero-panel .admin-logo-settings-card .admin-settings-card-title,
.admin-shell-v161 #admin-home-hero-panel .admin-banner-settings-card .admin-settings-card-title{
  border-bottom:1px solid rgba(148,163,184,.22)!important;
  padding-bottom:10px!important;
  margin-bottom:12px!important;
}
.admin-shell-v161 #admin-home-hero-panel .admin-banner-slide-card strong,
.admin-shell-v161 #admin-home-hero-panel .admin-logo-preview-box strong{
  color:#f8fafc!important;
}
.admin-shell-v161 #admin-home-hero-panel .admin-banner-slide-card span,
.admin-shell-v161 #admin-home-hero-panel .admin-banner-slide-card small,
.admin-shell-v161 #admin-home-hero-panel .admin-logo-preview-box .small-muted{
  color:#94a3b8!important;
}
.admin-shell-v161 #admin-home-hero-panel .admin-logo-preview-box{
  min-height:96px!important;
  padding:16px!important;
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
  background-color:#0b1220!important;
  background-image:linear-gradient(45deg,rgba(148,163,184,.07) 25%,transparent 25%),linear-gradient(-45deg,rgba(148,163,184,.07) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(148,163,184,.07) 75%),linear-gradient(-45deg,transparent 75%,rgba(148,163,184,.07) 75%)!important;
  background-size:18px 18px!important;
  background-position:0 0,0 9px,9px -9px,-9px 0!important;
}
.admin-shell-v161 #admin-home-hero-panel .admin-logo-preview-box img{
  max-height:68px!important;
  max-width:260px!important;
  object-fit:contain!important;
  background:rgba(248,250,252,.92)!important;
  border-radius:10px!important;
  padding:10px!important;
}
.admin-shell-v161 #admin-home-hero-panel .admin-hero-preview,
.admin-shell-v161 #admin-home-hero-panel .admin-image-list-title{
  background:#0b1220!important;
  border-color:rgba(148,163,184,.24)!important;
  color:#cbd5e1!important;
}
.admin-shell-v161 #admin-home-hero-panel .admin-hero-preview img{
  border:1px solid rgba(148,163,184,.28)!important;
  border-radius:14px!important;
  background:#020617!important;
}

.admin-shell-v161 #homeSectionCardsList .admin-section-number,
.admin-shell-v161 .home-section-admin-row .admin-section-number{
  background:linear-gradient(90deg,#0b1220,#111827)!important;
  color:#e5e7eb!important;
  border:1px solid rgba(96,165,250,.24)!important;
  border-radius:12px!important;
  padding:10px 12px!important;
  min-height:38px!important;
  height:auto!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
.admin-shell-v161 #homeSectionCardsList .admin-section-number strong,
.admin-shell-v161 .home-section-admin-row .admin-section-number strong{
  color:#93c5fd!important;
  background:rgba(37,99,235,.18)!important;
  border:1px solid rgba(96,165,250,.32)!important;
  border-radius:999px!important;
  padding:2px 8px!important;
}

.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-list,
.admin-shell-v161 #admin-menus-panel .admin-menu-list{
  gap:10px!important;
}
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-row,
.admin-shell-v161 #admin-menus-panel .admin-menu-row{
  background:linear-gradient(180deg,#111827 0%,#0b1220 100%)!important;
  border:1px solid rgba(148,163,184,.24)!important;
  color:#e5e7eb!important;
  box-shadow:none!important;
  border-radius:14px!important;
  padding:12px!important;
}
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-row label,
.admin-shell-v161 #admin-menus-panel .admin-menu-row label{
  color:#cbd5e1!important;
  font-weight:850!important;
}
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-row label > span,
.admin-shell-v161 #admin-menus-panel .admin-menu-row label > span{
  color:#94a3b8!important;
}
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-row input,
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-row select,
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-row textarea,
.admin-shell-v161 #admin-menus-panel .admin-menu-row input,
.admin-shell-v161 #admin-menus-panel .admin-menu-row select,
.admin-shell-v161 #admin-menus-panel .admin-menu-row textarea{
  background:#020617!important;
  color:#f8fafc!important;
  border-color:#334155!important;
  box-shadow:none!important;
}
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-row input:focus,
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-row select:focus,
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-row textarea:focus,
.admin-shell-v161 #admin-menus-panel .admin-menu-row input:focus,
.admin-shell-v161 #admin-menus-panel .admin-menu-row select:focus,
.admin-shell-v161 #admin-menus-panel .admin-menu-row textarea:focus{
  border-color:#60a5fa!important;
  box-shadow:0 0 0 3px rgba(37,99,235,.18)!important;
}
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-inline-check,
.admin-shell-v161 #admin-menus-panel .admin-inline-check{
  background:#0f172a!important;
  border:1px solid rgba(148,163,184,.22)!important;
  color:#cbd5e1!important;
  border-radius:10px!important;
  padding:6px 8px!important;
}
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-row textarea,
.admin-shell-v161 #admin-menus-panel .admin-menu-row textarea{
  min-height:54px!important;
  resize:vertical!important;
}
.admin-shell-v161 #admin-home-sections-panel .front-module-benefits-v162 .admin-menu-row,
.admin-shell-v161 #admin-home-sections-panel .front-module-policy-v162 .admin-menu-row{
  min-height:0!important;
}
.admin-shell-v161 #admin-home-sections-panel .front-module-trust-v162 .admin-menu-row,
.admin-shell-v161 #admin-menus-panel .admin-menu-row{
  min-height:0!important;
}
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-row .danger-check,
.admin-shell-v161 #admin-menus-panel .admin-menu-row .danger-check{
  background:rgba(127,29,29,.24)!important;
  border-color:rgba(248,113,113,.38)!important;
  color:#fecaca!important;
}
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-row .home-section-preview,
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-row .notice,
.admin-shell-v161 #admin-menus-panel .admin-menu-row .notice{
  background:#0b1220!important;
  border-color:rgba(148,163,184,.24)!important;
  color:#cbd5e1!important;
}
.admin-shell-v161 #admin-home-sections-panel .front-module-v162 .admin-menu-row .small-muted,
.admin-shell-v161 #admin-menus-panel .admin-menu-row .small-muted{
  color:#94a3b8!important;
}
.admin-shell-v161 #admin-menus-panel .admin-menu-editor-block{
  background:#111827!important;
  border:1px solid rgba(148,163,184,.24)!important;
  border-radius:16px!important;
  padding:12px!important;
}
.admin-shell-v161 #admin-menus-panel .admin-menu-editor-block h3,
.admin-shell-v161 #admin-menus-panel .admin-menu-editor-block h4{
  color:#f8fafc!important;
}

/* Keep already-good front basic and SEO/GEO pages untouched except shared dark form primitives above. */


/* V171: Admin IA/UX Fix after V170 validation.
   Fixes login dark mode, real 5-page Global Settings split, and stronger card borders.
   Backend-only CSS; no frontend/cart/shipping/product-data logic changes. */
body.admin-body.admin-login-page-v170,
body.admin-login-page-v170{
  min-height:100vh!important;
  margin:0!important;
  background:
    radial-gradient(circle at 45% 28%, rgba(37,99,235,.16), transparent 26%),
    radial-gradient(circle at 62% 62%, rgba(225,29,72,.10), transparent 30%),
    linear-gradient(180deg,#020617 0%,#050816 100%)!important;
  color:#e5e7eb!important;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
}
body.admin-login-page-v170 .login-box{
  width:min(520px,calc(100% - 34px))!important;
  margin:clamp(64px,13vh,150px) auto!important;
}
body.admin-login-page-v170 .login-box .admin-card{
  background:linear-gradient(180deg,#111827 0%,#0b1220 100%)!important;
  border:1px solid rgba(148,163,184,.34)!important;
  border-radius:28px!important;
  box-shadow:0 30px 80px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.05)!important;
  color:#e5e7eb!important;
  padding:38px!important;
}
body.admin-login-page-v170 .login-box .logo{
  display:inline-flex!important;
  align-items:baseline!important;
  gap:0!important;
  text-decoration:none!important;
  letter-spacing:-.08em!important;
  font-size:46px!important;
  line-height:1!important;
  font-weight:1000!important;
  margin-bottom:24px!important;
}
body.admin-login-page-v170 .login-box .logo span,
body.admin-login-page-v170 .login-box .logo em{color:#93c5fd!important;font-style:italic!important;}
body.admin-login-page-v170 .login-box .logo strong{color:#e60023!important;font-style:italic!important;}
body.admin-login-page-v170 .login-box h1{
  color:#f8fafc!important;
  font-size:32px!important;
  line-height:1.15!important;
  margin:0 0 24px!important;
  opacity:1!important;
}
body.admin-login-page-v170 .login-box form{display:grid!important;gap:16px!important;}
body.admin-login-page-v170 .login-box label{
  color:#cbd5e1!important;
  font-weight:950!important;
  display:grid!important;
  gap:8px!important;
}
body.admin-login-page-v170 .login-box input[type="password"]{
  width:100%!important;
  height:58px!important;
  border-radius:16px!important;
  background:#020617!important;
  border:1px solid rgba(148,163,184,.35)!important;
  color:#f8fafc!important;
  padding:0 16px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04)!important;
}
body.admin-login-page-v170 .login-box input[type="password"]:focus{
  outline:none!important;
  border-color:#60a5fa!important;
  box-shadow:0 0 0 4px rgba(37,99,235,.22)!important;
}
body.admin-login-page-v170 .login-box .btn.btn-primary{
  width:max-content!important;
  min-width:112px!important;
  height:56px!important;
  border-radius:16px!important;
  box-shadow:0 18px 42px rgba(230,0,35,.22)!important;
}
body.admin-login-page-v170 .login-box .notice,
body.admin-login-page-v170 .login-box .notice.err{
  background:rgba(127,29,29,.28)!important;
  color:#fecaca!important;
  border:1px solid rgba(248,113,113,.38)!important;
  border-radius:14px!important;
}

/* V171: Global Settings must behave as five independent pages. */
.admin-shell-v161 .admin-system-subpanel-v170{
  display:none!important;
}
.admin-shell-v161 .admin-system-subpanel-v170.active{
  display:block!important;
}
.admin-shell-v161 #admin-system-panel > .small-muted{
  margin-bottom:14px!important;
}
.admin-shell-v161 .admin-system-subpanel-v170 form{
  margin:0!important;
}
.admin-shell-v161 .admin-system-subpanel-v170 .admin-grid{
  background:linear-gradient(180deg,#111827 0%,#0b1220 100%)!important;
  border:1px solid rgba(148,163,184,.26)!important;
  border-radius:18px!important;
  padding:16px!important;
  box-shadow:0 14px 34px rgba(0,0,0,.22)!important;
}
.admin-shell-v161 .admin-system-subpanel-v170 .admin-actions{
  background:transparent!important;
  border:0!important;
  padding-left:0!important;
}

/* V171: stronger card boundaries for visual recognition. */
.admin-shell-v161 .admin-catalog-table tr[data-admin-product-row],
.admin-shell-v161 .admin-visual-card,
.admin-shell-v161 #categoryCardsGrid .admin-visual-card,
.admin-shell-v161 #colorCardsGrid .admin-visual-card,
.admin-shell-v161 .admin-category-card,
.admin-shell-v161 .admin-color-card,
.admin-shell-v161 #adminImageLibrary .admin-library-card,
.admin-shell-v161 .admin-library-card{
  border:1.5px solid rgba(148,163,184,.42)!important;
  box-shadow:0 12px 28px rgba(0,0,0,.26), inset 0 1px 0 rgba(255,255,255,.045)!important;
}
.admin-shell-v161 .admin-catalog-table tr[data-admin-product-row]:hover,
.admin-shell-v161 .admin-visual-card:hover,
.admin-shell-v161 #adminImageLibrary .admin-library-card:hover,
.admin-shell-v161 .admin-library-card:hover{
  border-color:rgba(96,165,250,.62)!important;
  box-shadow:0 16px 36px rgba(0,0,0,.32), 0 0 0 1px rgba(96,165,250,.16), inset 0 1px 0 rgba(255,255,255,.06)!important;
}
.admin-shell-v161 .admin-library-card img,
.admin-shell-v161 .admin-thumb,
.admin-shell-v161 .admin-visual-card-head .admin-category-icon-box,
.admin-shell-v161 .admin-color-big-dot{
  border-color:rgba(203,213,225,.50)!important;
}


/* V175 final overrides: dashboard default support, equal product cards, compact badge layout. */
body.admin-body .admin-shell-v161 .admin-main-panel:not(.active){display:none!important;}
body.admin-body .admin-shell-v161 .admin-main-panel.active{display:block!important;}
body.admin-body .admin-shell-v161 #catalog.admin-catalog-panel{max-width:none!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{display:grid!important;grid-template-columns:repeat(auto-fill, minmax(330px, 360px))!important;justify-content:start!important;align-items:stretch!important;grid-auto-rows:220px!important;gap:16px!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tr[data-admin-product-row]{width:100%!important;height:220px!important;min-height:220px!important;max-height:220px!important;overflow:hidden!important;box-sizing:border-box!important;border:2px solid #2f6eba!important;border-radius:18px!important;display:grid!important;grid-template-columns:72px minmax(0,1fr)!important;grid-template-rows:72px 38px 34px 34px!important;grid-template-areas:"image info" "price price" "actions actions" "actions actions"!important;gap:8px 10px!important;padding:12px!important;background:linear-gradient(180deg,#111827,#0b1220)!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table .admin-thumb{width:72px!important;height:72px!important;border-radius:12px!important;}
body.admin-body .admin-shell-v161 #catalog .admin-product-titleline .admin-product-link{-webkit-line-clamp:2!important;min-height:34px!important;}
body.admin-body .admin-shell-v161 #catalog .admin-feature-line{-webkit-line-clamp:2!important;min-height:30px!important;}
body.admin-body .admin-shell-v161 #catalog .admin-complete-row,body.admin-body .admin-shell-v161 #catalog .admin-missing-row{max-height:22px!important;overflow:hidden!important;white-space:nowrap!important;}
body.admin-body .admin-shell-v161 #catalog .admin-price-stack{height:34px!important;align-self:end!important;}
body.admin-body .admin-shell-v161 #catalog .admin-price-stack span{min-height:32px!important;height:32px!important;padding:4px 6px!important;}
body.admin-body .admin-shell-v161 #catalog .admin-card-actions{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;align-self:end!important;}
body.admin-body .admin-shell-v161 #catalog .admin-card-actions .btn{height:30px!important;min-height:30px!important;max-width:none!important;}
@media (min-width:1700px){body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{grid-template-columns:repeat(4, 360px)!important;}}
@media (max-width:1450px){body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{grid-template-columns:repeat(auto-fill,minmax(320px,1fr))!important;}body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tr[data-admin-product-row]{height:224px!important;max-height:224px!important;}}
@media (max-width:760px){body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{grid-template-columns:1fr!important;grid-auto-rows:auto!important;}body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tr[data-admin-product-row]{height:auto!important;max-height:none!important;}}
body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type{max-width:1180px!important;width:fit-content!important;min-width:min(100%,760px)!important;box-sizing:border-box!important;border:2px solid #2f6eba!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid{display:grid!important;grid-template-columns:140px 190px 210px 210px 120px 220px!important;gap:10px!important;align-items:start!important;justify-content:start!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid > label{width:auto!important;max-width:220px!important;min-width:0!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel label input,body.admin-body .admin-shell-v161 #admin-badges-panel label select{width:100%!important;max-width:220px!important;box-sizing:border-box!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel label input[type="number"]{max-width:120px!important;text-align:center!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-check-grid{display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:flex-start!important;justify-content:flex-start!important;max-width:720px!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-check-grid label{flex:0 0 auto!important;width:auto!important;min-width:0!important;max-width:185px!important;min-height:34px!important;height:auto!important;padding:7px 12px!important;border-radius:999px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;border:1.5px solid #2f6eba!important;background:#020617!important;color:#e5e7eb!important;box-sizing:border-box!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-check-grid label input{width:16px!important;min-width:16px!important;height:16px!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(540px,680px))!important;justify-content:start!important;gap:16px!important;align-items:start!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card{width:100%!important;max-width:680px!important;box-sizing:border-box!important;border:2px solid #2f6eba!important;overflow:hidden!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact{display:grid!important;grid-template-columns:130px 180px 190px 190px!important;gap:10px!important;align-items:start!important;justify-content:start!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact > label{max-width:190px!important;min-width:0!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact > .full{grid-column:1/-1!important;max-width:100%!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-usage{max-width:620px!important;border:1.5px solid #2f6eba!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-actions .btn{width:auto!important;max-width:220px!important;min-width:96px!important;}
@media (max-width:980px){body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type{width:100%!important;min-width:0!important;}body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid,body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact{grid-template-columns:repeat(2,minmax(140px,1fr))!important;}body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-grid{grid-template-columns:1fr!important;}body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card{max-width:none!important;}}

/* V176: Correct product cards and badge management layout after V175 validation.
   Backend-only CSS. Fixes: product card overflow/uneven content and badge form/card horizontal overflow. */
:root{--admin-theme-blue:#2F6EBA;}

/* Product list: keep fixed card geometry, but give content enough vertical space and prevent overlap. */
body.admin-body .admin-shell-v161 #catalog.admin-catalog-panel{
  max-width:none!important;
  overflow-x:hidden!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{
  display:grid!important;
  grid-template-columns:repeat(auto-fill, minmax(350px, 370px))!important;
  justify-content:start!important;
  align-items:stretch!important;
  gap:18px!important;
  grid-auto-rows:260px!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tr[data-admin-product-row]{
  width:100%!important;
  height:260px!important;
  min-height:260px!important;
  max-height:260px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  border:2px solid var(--admin-theme-blue)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,#111827 0%,#0b1220 100%)!important;
  display:grid!important;
  grid-template-columns:82px minmax(0,1fr)!important;
  grid-template-rows:20px 92px 40px 38px!important;
  grid-template-areas:
    "select select"
    "image info"
    "price price"
    "actions actions"!important;
  gap:8px 10px!important;
  padding:12px!important;
  box-shadow:0 12px 26px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.045)!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(1){grid-area:select!important;min-height:18px!important;max-height:20px!important;overflow:hidden!important;display:flex!important;align-items:center!important;justify-content:space-between!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(2){grid-area:image!important;display:block!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(4){grid-area:info!important;display:block!important;min-width:0!important;overflow:hidden!important;max-height:92px!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(6){grid-area:price!important;display:block!important;align-self:end!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(10){grid-area:actions!important;display:block!important;align-self:end!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(3),
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(5),
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(7),
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(8),
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(9){display:none!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table .admin-thumb{
  width:82px!important;height:82px!important;max-width:82px!important;max-height:82px!important;
  border-radius:12px!important;object-fit:cover!important;border:1px solid rgba(203,213,225,.45)!important;background:#020617!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-product-titleline,
body.admin-body .admin-shell-v161 #catalog .admin-product-titleline .admin-product-link{
  display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;
  overflow:hidden!important;line-height:1.25!important;min-height:34px!important;max-height:36px!important;color:#f8fafc!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-feature-line{
  display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;
  overflow:hidden!important;line-height:1.25!important;max-height:34px!important;color:#cbd5e1!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-meta-line,
body.admin-body .admin-shell-v161 #catalog .admin-missing-row,
body.admin-body .admin-shell-v161 #catalog .admin-complete-row{
  max-height:22px!important;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-price-stack{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;height:36px!important;max-height:36px!important;overflow:hidden!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-price-stack span{
  height:34px!important;min-height:34px!important;display:flex!important;align-items:center!important;justify-content:center!important;
  padding:4px 6px!important;border-radius:8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-card-actions{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;height:36px!important;max-height:36px!important;overflow:hidden!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-card-actions .btn{
  width:100%!important;min-width:0!important;max-width:none!important;height:34px!important;min-height:34px!important;padding:5px 6px!important;font-size:12px!important;line-height:1!important;
}
@media (min-width:1700px){body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{grid-template-columns:repeat(4,370px)!important;}}
@media (max-width:1500px){body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{grid-template-columns:repeat(4,minmax(300px,1fr))!important;}body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tr[data-admin-product-row]{height:260px!important;}}
@media (max-width:1180px){body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{grid-template-columns:repeat(2,minmax(320px,1fr))!important;}}
@media (max-width:760px){body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{grid-template-columns:1fr!important;grid-auto-rows:auto!important;}body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tr[data-admin-product-row]{height:auto!important;min-height:0!important;max-height:none!important;}}

/* Badge management: remove accidental oversized panel and keep all controls inside compact columns. */
body.admin-body .admin-shell-v161 #admin-badges-panel{
  overflow-x:hidden!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type,
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card{
  width:100%!important;
  max-width:980px!important;
  min-width:0!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  border:2px solid var(--admin-theme-blue)!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(150px,220px))!important;
  gap:12px!important;
  align-items:start!important;
  justify-content:start!important;
  max-width:960px!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid > label,
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact > label{
  width:100%!important;
  min-width:0!important;
  max-width:220px!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel input,
body.admin-body .admin-shell-v161 #admin-badges-panel select{
  width:100%!important;
  min-width:0!important;
  max-width:220px!important;
  box-sizing:border-box!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel input[name="badge_discount"],
body.admin-body .admin-shell-v161 #admin-badges-panel input[type="number"]{
  max-width:120px!important;
  text-align:center!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel input[name="badge_skus"]{
  max-width:220px!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid > .full,
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact > .full{
  grid-column:1/-1!important;
  width:100%!important;
  max-width:760px!important;
  overflow:hidden!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-check-grid{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;
  max-width:760px!important;
  width:100%!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-check-grid label{
  flex:0 0 auto!important;
  width:auto!important;
  max-width:170px!important;
  min-width:0!important;
  min-height:32px!important;
  height:32px!important;
  padding:6px 12px!important;
  border-radius:999px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  border:1.5px solid var(--admin-theme-blue)!important;
  background:#020617!important;
  color:#f8fafc!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-check-grid label input[type="checkbox"]{
  width:15px!important;
  height:15px!important;
  min-width:15px!important;
  max-width:15px!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(420px,520px))!important;
  justify-content:start!important;
  gap:18px!important;
  align-items:start!important;
  max-width:1120px!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card{
  max-width:520px!important;
  padding:16px!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(150px,220px))!important;
  gap:12px!important;
  align-items:start!important;
  justify-content:start!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-head{
  min-height:42px!important;
  padding:8px 10px!important;
  border:1px solid rgba(47,110,186,.65)!important;
  border-radius:12px!important;
  background:rgba(2,6,23,.35)!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-usage{
  width:100%!important;
  max-width:100%!important;
  min-height:0!important;
  padding:10px!important;
  border:1.5px solid var(--admin-theme-blue)!important;
  border-radius:12px!important;
  background:#0b1220!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  align-items:center!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-actions .btn{
  width:auto!important;
  max-width:190px!important;
  min-width:88px!important;
  flex:0 0 auto!important;
}
@media (max-width:1100px){
  body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid{grid-template-columns:repeat(2,minmax(150px,220px))!important;}
  body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-grid{grid-template-columns:1fr!important;max-width:620px!important;}
  body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card{max-width:620px!important;}
}
@media (max-width:640px){
  body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid,
  body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact{grid-template-columns:1fr!important;}
}


/* V177 - Responsive product cards + badge layout wrapping fix
   Fixes V176 regressions where fixed card geometry clipped content and badge controls overflowed inside constrained cards. */
:root{--admin-card-fixed-blue:#2F6EBA;}

/* Product list: responsive auto-fill grid. Cards keep a readable width, but heights may grow enough to show content. */
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{
  display:grid!important;
  grid-template-columns:repeat(auto-fit, minmax(360px, 420px))!important;
  justify-content:start!important;
  align-items:start!important;
  gap:18px!important;
  grid-auto-rows:auto!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tr[data-admin-product-row]{
  width:100%!important;
  max-width:420px!important;
  min-width:0!important;
  height:auto!important;
  min-height:270px!important;
  max-height:none!important;
  overflow:visible!important;
  box-sizing:border-box!important;
  border:2px solid var(--admin-card-fixed-blue)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,#111827 0%,#0b1220 100%)!important;
  display:grid!important;
  grid-template-columns:88px minmax(0,1fr)!important;
  grid-template-rows:auto minmax(112px,auto) auto auto!important;
  grid-template-areas:
    "select select"
    "image info"
    "price price"
    "actions actions"!important;
  gap:10px 12px!important;
  padding:12px!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(1){grid-area:select!important;display:flex!important;min-height:18px!important;align-items:center!important;justify-content:space-between!important;overflow:visible!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(2){grid-area:image!important;display:block!important;min-width:0!important;overflow:visible!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(4){grid-area:info!important;display:block!important;min-width:0!important;overflow:visible!important;max-height:none!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(6){grid-area:price!important;display:block!important;align-self:end!important;min-width:0!important;overflow:visible!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(10){grid-area:actions!important;display:block!important;align-self:end!important;min-width:0!important;overflow:visible!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-table .admin-thumb{
  width:88px!important;height:88px!important;max-width:88px!important;max-height:88px!important;
  border-radius:12px!important;object-fit:cover!important;border:1px solid rgba(203,213,225,.45)!important;background:#020617!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-product-titleline,
body.admin-body .admin-shell-v161 #catalog .admin-product-titleline .admin-product-link{
  display:block!important;
  -webkit-line-clamp:unset!important;
  max-height:none!important;
  min-height:0!important;
  overflow:visible!important;
  white-space:normal!important;
  line-height:1.25!important;
  color:#f8fafc!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-feature-line{
  display:block!important;
  -webkit-line-clamp:unset!important;
  max-height:none!important;
  overflow:visible!important;
  white-space:normal!important;
  line-height:1.28!important;
  color:#cbd5e1!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-meta-line,
body.admin-body .admin-shell-v161 #catalog .admin-missing-row,
body.admin-body .admin-shell-v161 #catalog .admin-complete-row{
  max-height:none!important;
  overflow:visible!important;
  white-space:normal!important;
  text-overflow:clip!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-price-stack{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:6px!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-price-stack span{
  min-height:32px!important;
  height:auto!important;
  padding:6px 6px!important;
  white-space:normal!important;
  line-height:1.15!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-card-actions{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:6px!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}
body.admin-body .admin-shell-v161 #catalog .admin-card-actions .btn{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:34px!important;
  min-height:34px!important;
  padding:5px 6px!important;
  font-size:12px!important;
}
@media (min-width:1680px){body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{grid-template-columns:repeat(auto-fit, minmax(360px, 420px))!important;}}
@media (max-width:940px){body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{grid-template-columns:repeat(auto-fit, minmax(320px, 1fr))!important;}body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tr[data-admin-product-row]{max-width:none!important;}}
@media (max-width:520px){body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{grid-template-columns:1fr!important;}body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tr[data-admin-product-row]{grid-template-columns:74px minmax(0,1fr)!important;}body.admin-body .admin-shell-v161 #catalog .admin-catalog-table .admin-thumb{width:74px!important;height:74px!important;}}

/* Badge management: fluid cards. Constrain controls, but allow rows to wrap inside the card instead of clipping. */
body.admin-body .admin-shell-v161 #admin-badges-panel{
  overflow-x:hidden!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type,
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card{
  width:100%!important;
  max-width:min(100%, 1120px)!important;
  min-width:0!important;
  box-sizing:border-box!important;
  overflow:visible!important;
  border:2px solid var(--admin-card-fixed-blue)!important;
  border-radius:18px!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid,
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact{
  display:grid!important;
  grid-template-columns:repeat(auto-fit, minmax(150px, 220px))!important;
  gap:12px!important;
  align-items:start!important;
  justify-content:start!important;
  max-width:100%!important;
  width:100%!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid > label,
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact > label{
  width:100%!important;
  min-width:0!important;
  max-width:220px!important;
  box-sizing:border-box!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel input,
body.admin-body .admin-shell-v161 #admin-badges-panel select{
  width:100%!important;
  min-width:0!important;
  max-width:220px!important;
  box-sizing:border-box!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel input[type="number"],
body.admin-body .admin-shell-v161 #admin-badges-panel input[name="badge_discount"]{
  max-width:120px!important;
  text-align:center!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel input[name="badge_skus"]{
  max-width:280px!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid > .full,
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact > .full{
  grid-column:1/-1!important;
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-check-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit, minmax(138px, max-content))!important;
  gap:8px!important;
  align-items:start!important;
  justify-content:start!important;
  max-width:100%!important;
  width:100%!important;
  overflow:visible!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-check-grid label{
  width:auto!important;
  max-width:175px!important;
  min-width:0!important;
  min-height:32px!important;
  height:auto!important;
  padding:7px 11px!important;
  border-radius:999px!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  border:1.5px solid var(--admin-card-fixed-blue)!important;
  background:#020617!important;
  color:#f8fafc!important;
  line-height:1.15!important;
  box-sizing:border-box!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-check-grid label input[type="checkbox"]{
  width:15px!important;height:15px!important;min-width:15px!important;max-width:15px!important;flex:0 0 15px!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit, minmax(520px, min(100%, 820px)))!important;
  justify-content:start!important;
  gap:18px!important;
  align-items:start!important;
  max-width:100%!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card{
  max-width:820px!important;
  padding:16px!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact{
  grid-template-columns:repeat(auto-fit, minmax(150px, 220px))!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-head{
  min-height:42px!important;padding:8px 10px!important;border:1px solid rgba(47,110,186,.75)!important;border-radius:12px!important;background:rgba(2,6,23,.35)!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-usage{
  width:100%!important;max-width:100%!important;min-height:0!important;padding:10px!important;border:1.5px solid var(--admin-card-fixed-blue)!important;border-radius:12px!important;background:#0b1220!important;box-sizing:border-box!important;overflow-wrap:anywhere!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-actions{
  display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:center!important;
}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-actions .btn{
  width:auto!important;max-width:190px!important;min-width:88px!important;flex:0 0 auto!important;
}
@media (max-width:720px){
  body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-grid{grid-template-columns:1fr!important;}
  body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card{max-width:100%!important;}
  body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid,
  body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact{grid-template-columns:repeat(auto-fit, minmax(150px, 1fr))!important;}
  body.admin-body .admin-shell-v161 #admin-badges-panel .admin-check-grid{grid-template-columns:repeat(auto-fit, minmax(130px, max-content))!important;}
}

/* V178 backend layout rebuild marker: authoritative CSS is also in q7ys83kj.php for cache-safe admin rendering. */

/* V179 Admin UI Design System Implementation */
    /* V179 Admin UI Design System Implementation
       Purpose: replace local CSS tug-of-war with content-based component constraints.
       Backend-only; no frontend/cart/shipping/data changes. */
    body.admin-body .admin-shell-v161{
      --tmx-blue:#2F6EBA;
      --tmx-blue-soft:rgba(47,110,186,.72);
      --tmx-panel:#101827;
      --tmx-panel-2:#0b1220;
      --tmx-field:#020617;
      --tmx-text:#f8fafc;
      --tmx-muted:#cbd5e1;
      --tmx-border:#2F6EBA;
    }

    /* Universal sizing constraints */
    body.admin-body .admin-shell-v161 .btn,
    body.admin-body .admin-shell-v161 button.btn,
    body.admin-body .admin-shell-v161 a.btn{
      width:auto!important;
      min-width:88px!important;
      max-width:180px!important;
      flex:0 0 auto!important;
      white-space:nowrap!important;
      box-sizing:border-box!important;
    }
    body.admin-body .admin-shell-v161 .btn-primary,
    body.admin-body .admin-shell-v161 .admin-actions .btn-primary{
      min-width:120px!important;
      max-width:220px!important;
    }
    body.admin-body .admin-shell-v161 input:not([type=checkbox]):not([type=radio]):not([type=file]),
    body.admin-body .admin-shell-v161 select,
    body.admin-body .admin-shell-v161 textarea{
      box-sizing:border-box!important;
      min-width:0!important;
      max-width:100%!important;
    }
    body.admin-body .admin-shell-v161 input[type=number],
    body.admin-body .admin-shell-v161 input[name*=sort],
    body.admin-body .admin-shell-v161 input[name*=Sort],
    body.admin-body .admin-shell-v161 input[name*=discount],
    body.admin-body .admin-shell-v161 input[name*=Discount]{
      width:110px!important;
      max-width:140px!important;
    }
    body.admin-body .admin-shell-v161 input[name*=icon],
    body.admin-body .admin-shell-v161 input[name*=emoji],
    body.admin-body .admin-shell-v161 input[name*=Icon],
    body.admin-body .admin-shell-v161 input[name*=Emoji]{
      width:88px!important;
      max-width:110px!important;
      text-align:center!important;
    }
    body.admin-body .admin-shell-v161 select{
      width:auto!important;
      min-width:160px!important;
      max-width:280px!important;
    }
    body.admin-body .admin-shell-v161 input[type=search],
    body.admin-body .admin-shell-v161 input[placeholder*="搜索"],
    body.admin-body .admin-shell-v161 input[placeholder*="Search"]{
      width:360px!important;
      min-width:260px!important;
      max-width:520px!important;
    }
    body.admin-body .admin-shell-v161 textarea{
      width:100%!important;
      max-width:100%!important;
      min-height:76px!important;
      resize:vertical!important;
      overflow-wrap:anywhere!important;
    }

    /* Card boundary system: visible by default, not only on hover */
    body.admin-body .admin-shell-v161 .admin-card,
    body.admin-body .admin-shell-v161 .admin-settings-card,
    body.admin-body .admin-shell-v161 .admin-visual-card,
    body.admin-body .admin-shell-v161 .admin-library-card,
    body.admin-body .admin-shell-v161 .admin-badge-card,
    body.admin-body .admin-shell-v161 .admin-menu-editor-block,
    body.admin-body .admin-shell-v161 .admin-dashboard-card-v161{
      border:2px solid var(--tmx-border)!important;
      box-shadow:0 12px 28px rgba(0,0,0,.20)!important;
    }

    /* Toolbar sizing */
    body.admin-body .admin-shell-v161 .admin-toolbar,
    body.admin-body .admin-shell-v161 .admin-actions,
    body.admin-body .admin-shell-v161 .admin-card-toolbar{
      display:flex!important;
      flex-wrap:wrap!important;
      align-items:center!important;
      justify-content:flex-start!important;
      gap:10px!important;
    }
    body.admin-body .admin-shell-v161 .admin-toolbar input,
    body.admin-body .admin-shell-v161 .admin-toolbar select,
    body.admin-body .admin-shell-v161 .admin-actions input,
    body.admin-body .admin-shell-v161 .admin-actions select{
      flex:0 1 auto!important;
    }

    /* Product list: constrained cards, natural height, stable internal zones */
    body.admin-body .admin-shell-v161 #catalog .admin-toolbar,
    body.admin-body .admin-shell-v161 #catalog .admin-actions{
      align-items:center!important;
      justify-content:flex-start!important;
    }
    body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{
      display:grid!important;
      grid-template-columns:repeat(auto-fill, minmax(320px, 360px))!important;
      gap:18px!important;
      justify-content:start!important;
      align-items:start!important;
      width:100%!important;
    }
    body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tr[data-admin-product-row]{
      width:100%!important;
      min-width:320px!important;
      max-width:360px!important;
      height:auto!important;
      min-height:0!important;
      max-height:none!important;
      display:grid!important;
      grid-template-columns:76px minmax(0,1fr)!important;
      grid-template-areas:"image info" "price price" "actions actions"!important;
      gap:10px 12px!important;
      align-content:start!important;
      padding:14px!important;
      border:2px solid var(--tmx-border)!important;
      border-radius:18px!important;
      background:linear-gradient(180deg,#111827 0%,#0b1220 100%)!important;
      overflow:visible!important;
    }
    body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(2){grid-area:image!important;}
    body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(4){grid-area:info!important;min-width:0!important;overflow:visible!important;}
    body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(6){grid-area:price!important;}
    body.admin-body .admin-shell-v161 #catalog .admin-catalog-table td:nth-child(10){grid-area:actions!important;}
    body.admin-body .admin-shell-v161 #catalog .admin-catalog-table .admin-thumb{
      width:76px!important;height:76px!important;max-width:76px!important;max-height:76px!important;object-fit:cover!important;border-radius:13px!important;
    }
    body.admin-body .admin-shell-v161 #catalog .admin-product-titleline .admin-product-link{
      display:block!important;
      white-space:normal!important;
      overflow:visible!important;
      text-overflow:clip!important;
      max-height:none!important;
      line-height:1.25!important;
      color:#f8fafc!important;
      font-weight:950!important;
    }
    body.admin-body .admin-shell-v161 #catalog .admin-feature-line{
      display:-webkit-box!important;
      -webkit-box-orient:vertical!important;
      -webkit-line-clamp:2!important;
      overflow:hidden!important;
      line-height:1.32!important;
      white-space:normal!important;
    }
    body.admin-body .admin-shell-v161 #catalog .admin-price-stack{
      display:grid!important;
      grid-template-columns:repeat(3,minmax(0,1fr))!important;
      gap:8px!important;
      width:100%!important;
    }
    body.admin-body .admin-shell-v161 #catalog .admin-card-actions{
      display:grid!important;
      grid-template-columns:repeat(4,minmax(0,1fr))!important;
      gap:8px!important;
      width:100%!important;
    }
    body.admin-body .admin-shell-v161 #catalog .admin-card-actions .btn{
      width:100%!important;
      min-width:0!important;
      max-width:none!important;
      padding-left:6px!important;
      padding-right:6px!important;
    }

    /* Visual cards (category/color/image): card types with max-width */
    body.admin-body .admin-shell-v161 .admin-category-card{width:100%!important;max-width:420px!important;}
    body.admin-body .admin-shell-v161 .admin-color-card{width:100%!important;max-width:360px!important;}
    body.admin-body .admin-shell-v161 .admin-library-card{width:100%!important;max-width:220px!important;}
    body.admin-body .admin-shell-v161 .admin-category-cards,
    body.admin-body .admin-shell-v161 .admin-color-cards,
    body.admin-body .admin-shell-v161 #adminImageLibrary{
      justify-content:start!important;
      align-items:start!important;
    }

    /* Compact checkbox/pill system */
    body.admin-body .admin-shell-v161 .admin-check-grid,
    body.admin-body .admin-shell-v161 .admin-card-flags{
      display:flex!important;
      flex-wrap:wrap!important;
      align-items:center!important;
      justify-content:flex-start!important;
      gap:8px!important;
      width:auto!important;
      max-width:100%!important;
    }
    body.admin-body .admin-shell-v161 .admin-check-grid label,
    body.admin-body .admin-shell-v161 .admin-card-flags label{
      display:inline-flex!important;
      flex:0 0 auto!important;
      align-items:center!important;
      justify-content:flex-start!important;
      gap:7px!important;
      width:auto!important;
      max-width:220px!important;
      min-height:34px!important;
      padding:7px 12px!important;
      border:1.5px solid var(--tmx-blue)!important;
      border-radius:999px!important;
      background:#020617!important;
      color:#f8fafc!important;
      white-space:nowrap!important;
      overflow:hidden!important;
      text-overflow:ellipsis!important;
      box-sizing:border-box!important;
    }
    body.admin-body .admin-shell-v161 .admin-check-grid label input[type=checkbox],
    body.admin-body .admin-shell-v161 .admin-card-flags label input[type=checkbox]{
      flex:0 0 16px!important;width:16px!important;height:16px!important;margin:0!important;
    }

    /* Badge management: authoritative compact layout */
    body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type{
      width:min(100%, 960px)!important;
      max-width:960px!important;
      padding:16px!important;
      border:2px solid var(--tmx-border)!important;
      border-radius:18px!important;
      background:linear-gradient(180deg,#111827,#0b1220)!important;
      overflow:visible!important;
    }
    body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid,
    body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact{
      display:grid!important;
      grid-template-columns:160px 220px 220px 220px!important;
      gap:12px!important;
      align-items:start!important;
      justify-content:start!important;
      width:100%!important;
      max-width:100%!important;
    }
    body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid > label,
    body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact > label{
      width:auto!important;
      max-width:100%!important;
      min-width:0!important;
      overflow:visible!important;
    }
    body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid > .full,
    body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact > .full{
      grid-column:1/-1!important;
      width:100%!important;
      max-width:100%!important;
    }
    body.admin-body .admin-shell-v161 #admin-badges-panel input:not([type=checkbox]):not([type=radio]):not([type=file]),
    body.admin-body .admin-shell-v161 #admin-badges-panel select{
      width:100%!important;
      max-width:100%!important;
    }
    body.admin-body .admin-shell-v161 #admin-badges-panel input[name="badge_id"],
    body.admin-body .admin-shell-v161 #admin-badges-panel input[name="badge_discount"]{max-width:140px!important;}
    body.admin-body .admin-shell-v161 #admin-badges-panel input[name="badge_name"]{max-width:220px!important;}
    body.admin-body .admin-shell-v161 #admin-badges-panel input[name="badge_skus"]{max-width:360px!important;}
    body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-grid{
      display:grid!important;
      grid-template-columns:repeat(auto-fill, minmax(560px, 760px))!important;
      gap:18px!important;
      justify-content:start!important;
      align-items:start!important;
      width:100%!important;
    }
    body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card{
      width:100%!important;
      max-width:760px!important;
      padding:16px!important;
      border:2px solid var(--tmx-border)!important;
      border-radius:18px!important;
      overflow:visible!important;
      background:linear-gradient(180deg,#111827,#0b1220)!important;
    }
    body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-head{
      display:grid!important;
      grid-template-columns:auto 1fr!important;
      align-items:center!important;
      gap:10px 14px!important;
      min-height:52px!important;
      padding:10px 12px!important;
      border:1.5px solid rgba(47,110,186,.72)!important;
      border-radius:14px!important;
      background:rgba(15,23,42,.75)!important;
    }
    body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-head > *:last-child{
      justify-self:end!important;
      white-space:nowrap!important;
    }
    body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-usage{
      display:flex!important;
      flex-wrap:wrap!important;
      gap:10px 18px!important;
      align-items:center!important;
      width:auto!important;
      max-width:100%!important;
      min-height:38px!important;
      padding:9px 12px!important;
      border:1.5px solid var(--tmx-blue)!important;
      border-radius:12px!important;
      background:rgba(15,23,42,.72)!important;
      color:#e5e7eb!important;
    }
    body.admin-body .admin-shell-v161 #admin-badges-panel .admin-actions{
      display:flex!important;
      flex-wrap:wrap!important;
      gap:10px!important;
      justify-content:flex-start!important;
      align-items:center!important;
    }
    body.admin-body .admin-shell-v161 #admin-badges-panel .admin-actions .btn{
      width:auto!important;
      min-width:96px!important;
      max-width:180px!important;
    }
    @media (max-width:1180px){
      body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid,
      body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact{grid-template-columns:160px 220px 220px!important;}
      body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-grid{grid-template-columns:minmax(0,760px)!important;}
    }
    @media (max-width:760px){
      body.admin-body .admin-shell-v161 #admin-badges-panel > form:first-of-type > .admin-grid,
      body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card .admin-grid.compact{grid-template-columns:1fr!important;}
      body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tbody{grid-template-columns:minmax(0,1fr)!important;}
      body.admin-body .admin-shell-v161 #catalog .admin-catalog-table tr[data-admin-product-row]{max-width:none!important;}
    }


/* === V180 Admin UI Design System Real Rebuild === */
body.admin-body .admin-shell-v161 #catalog .admin-catalog-topbar{display:flex!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important;padding:10px!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-topbar .btn{flex:0 0 auto!important;width:auto!important;max-width:180px!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-search{flex:0 1 420px!important;width:clamp(280px,32vw,420px)!important;max-width:420px!important;min-width:260px!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-filterbar{display:flex!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important;padding:10px!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-filterbar select{width:auto!important;min-width:160px!important;max-width:240px!important;flex:0 0 auto!important;}
body.admin-body .admin-shell-v161 #catalog .admin-page-size-label{display:inline-flex!important;align-items:center!important;gap:8px!important;flex:0 0 auto!important;white-space:nowrap!important;}
body.admin-body .admin-shell-v161 #catalog #adminPageSize{min-width:88px!important;max-width:110px!important;}
body.admin-body .admin-shell-v161 #catalog .admin-selected-count,body.admin-body .admin-shell-v161 #catalog .admin-select-visible-label{flex:0 0 auto!important;width:auto!important;white-space:nowrap!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-bulk-actions{display:flex!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important;padding:10px!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-bulk-actions select{width:auto!important;min-width:160px!important;max-width:240px!important;flex:0 0 auto!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-bulk-actions .btn{flex:0 0 auto!important;width:auto!important;max-width:180px!important;}
body.admin-body .admin-shell-v161 #catalog .admin-catalog-scroll-v180{overflow:visible!important;background:transparent!important;border:0!important;max-height:none!important;}
body.admin-body .admin-shell-v161 #catalog .admin-product-grid-v180{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(320px,360px))!important;gap:14px!important;align-items:stretch!important;justify-content:start!important;width:100%!important;}
body.admin-body .admin-shell-v161 #catalog .admin-product-card-v180{position:relative!important;display:flex!important;flex-direction:column!important;gap:10px!important;box-sizing:border-box!important;width:100%!important;max-width:360px!important;min-width:0!important;min-height:238px!important;padding:12px!important;border-radius:16px!important;background:linear-gradient(180deg,#111827 0%,#0b1220 100%)!important;border:1.5px solid rgba(47,110,186,.78)!important;color:#e5e7eb!important;box-shadow:0 12px 24px rgba(0,0,0,.22)!important;overflow:hidden!important;}
body.admin-body .admin-shell-v161 #catalog .admin-product-card-v180[hidden]{display:none!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-check-v180{position:absolute!important;right:10px!important;top:10px!important;z-index:2!important;width:auto!important;display:inline-flex!important;align-items:center!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-check-v180 input{width:16px!important;height:16px!important;min-height:16px!important;margin:0!important;accent-color:#60a5fa!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-head-v180{display:grid!important;grid-template-columns:72px minmax(0,1fr)!important;gap:10px!important;align-items:start!important;padding-right:20px!important;min-width:0!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-image-v180{display:flex!important;align-items:center!important;justify-content:center!important;width:72px!important;height:72px!important;border-radius:12px!important;background:#020617!important;border:1px solid rgba(148,163,184,.34)!important;overflow:hidden!important;text-decoration:none!important;color:#94a3b8!important;font-size:12px!important;font-weight:900!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-image-v180 img,body.admin-body .admin-shell-v161 #catalog .product-card-image-v180 .admin-thumb{width:72px!important;height:72px!important;object-fit:cover!important;border:0!important;border-radius:12px!important;box-shadow:none!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-title-block-v180{min-width:0!important;display:flex!important;flex-direction:column!important;gap:5px!important;align-items:flex-start!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-titleline-v180{min-width:0!important;max-width:100%!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;line-height:1.25!important;font-size:13px!important;font-weight:900!important;min-height:32px!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-titleline-v180 a{color:#f8fafc!important;text-decoration:none!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-meta-v180{display:flex!important;flex-wrap:wrap!important;gap:6px!important;align-items:center!important;max-width:100%!important;color:#94a3b8!important;font-size:11px!important;line-height:1.2!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-meta-v180 strong{color:#bfdbfe!important;font-size:11px!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-desc-v180{display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;color:#cbd5e1!important;font-size:12px!important;line-height:1.35!important;min-height:32px!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-badges-v180{display:flex!important;flex-wrap:wrap!important;gap:5px!important;max-height:24px!important;overflow:hidden!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-quality-v180{display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:nowrap!important;min-height:28px!important;max-width:100%!important;overflow:hidden!important;padding:5px 8px!important;border-radius:10px!important;border:1px solid rgba(148,163,184,.22)!important;background:rgba(2,6,23,.55)!important;color:#cbd5e1!important;font-size:11px!important;white-space:nowrap!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-quality-v180 span{display:inline-flex!important;flex:0 0 auto!important;border-radius:999px!important;padding:2px 6px!important;background:rgba(30,41,59,.9)!important;color:#e5e7eb!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-quality-v180.is-complete{border-color:rgba(34,197,94,.28)!important;color:#bbf7d0!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-quality-v180.is-missing{border-color:rgba(251,191,36,.32)!important;color:#fde68a!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-prices-v180{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin-top:auto!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-prices-v180 span{display:flex!important;align-items:center!important;justify-content:center!important;gap:4px!important;min-height:32px!important;border-radius:10px!important;background:#020617!important;border:1px solid rgba(59,130,246,.28)!important;color:#e5e7eb!important;font-size:11px!important;font-weight:900!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;padding:4px 5px!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-prices-v180 b{color:#93c5fd!important;font-weight:950!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-actions-v180{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;margin-top:0!important;}
body.admin-body .admin-shell-v161 #catalog .product-card-actions-v180 .btn,body.admin-body .admin-shell-v161 #catalog .product-card-actions-v180 a.btn,body.admin-body .admin-shell-v161 #catalog .product-card-actions-v180 button.btn{width:100%!important;max-width:none!important;min-width:0!important;min-height:30px!important;height:30px!important;padding:5px 6px!important;border-radius:9px!important;font-size:11px!important;line-height:1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;}
@media(max-width:760px){body.admin-body .admin-shell-v161 #catalog .admin-product-grid-v180{grid-template-columns:minmax(0,1fr)!important;}body.admin-body .admin-shell-v161 #catalog .admin-product-card-v180{max-width:none!important;}body.admin-body .admin-shell-v161 #catalog .admin-catalog-search{width:100%!important;max-width:100%!important;}}

body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-builder-v180,body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-v180{box-sizing:border-box!important;max-width:760px!important;width:100%!important;min-width:0!important;border:1.5px solid rgba(47,110,186,.82)!important;border-radius:18px!important;background:linear-gradient(180deg,#111827,#0b1220)!important;box-shadow:0 14px 30px rgba(0,0,0,.24)!important;color:#e5e7eb!important;overflow:hidden!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-builder-v180{padding:14px!important;margin:14px 0 18px!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-grid-v180{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(560px,760px))!important;gap:16px!important;align-items:start!important;justify-content:start!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-v180{padding:14px!important;display:flex!important;flex-direction:column!important;gap:12px!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-card-head-v180{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding-bottom:10px!important;border-bottom:1px solid rgba(148,163,184,.25)!important;min-height:46px!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-card-head-v180 .badge{flex:0 0 auto!important;max-width:180px!important;width:auto!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-card-summary-v180{flex:0 1 auto!important;color:#94a3b8!important;font-size:12px!important;font-weight:800!important;white-space:nowrap!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-section-v180{box-sizing:border-box!important;min-width:0!important;width:100%!important;padding:10px!important;border:1px solid rgba(148,163,184,.18)!important;border-radius:14px!important;background:rgba(2,6,23,.34)!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-section-note-v180{color:#cbd5e1!important;font-size:12px!important;line-height:1.45!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-section-v180 h3{margin:0 0 8px!important;color:#f8fafc!important;font-size:13px!important;line-height:1.2!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-field-row-v180{display:flex!important;align-items:flex-start!important;gap:10px!important;flex-wrap:wrap!important;min-width:0!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-field-row-v180 label{display:flex!important;flex-direction:column!important;gap:5px!important;min-width:0!important;color:#cbd5e1!important;font-size:12px!important;font-weight:800!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel input,body.admin-body .admin-shell-v161 #admin-badges-panel select{box-sizing:border-box!important;min-width:0!important;height:34px!important;min-height:34px!important;border-radius:10px!important;background:#020617!important;color:#f8fafc!important;border:1px solid #334155!important;font-size:12px!important;width:100%!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-field-short-v180{flex:0 0 160px!important;max-width:180px!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-field-title-v180{flex:0 1 280px!important;max-width:320px!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-field-select-v180{flex:0 1 220px!important;max-width:240px!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-field-number-v180{flex:0 0 120px!important;max-width:140px!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .admin-field-sku-v180{flex:0 1 340px!important;max-width:420px!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-compact-check-v180{flex:0 0 auto!important;display:inline-flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;min-height:34px!important;max-width:180px!important;padding:7px 10px!important;border:1px solid rgba(148,163,184,.25)!important;border-radius:999px!important;background:#020617!important;white-space:nowrap!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-compact-check-v180 input{width:16px!important;height:16px!important;min-height:16px!important;flex:0 0 auto!important;accent-color:#60a5fa!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-chip-grid-v180{display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:flex-start!important;width:100%!important;min-width:0!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-chip-v180{box-sizing:border-box!important;display:inline-flex!important;flex:0 0 auto!important;align-items:center!important;gap:7px!important;max-width:220px!important;min-height:34px!important;padding:7px 10px!important;border-radius:999px!important;border:1px solid rgba(148,163,184,.28)!important;background:#020617!important;color:#e5e7eb!important;font-size:12px!important;font-weight:800!important;line-height:1.2!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-chip-v180 input{width:16px!important;height:16px!important;min-height:16px!important;flex:0 0 auto!important;accent-color:#60a5fa!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-chip-v180 span{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-chip-v180.is-disabled{opacity:.52!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-status-line-v180{display:flex!important;align-items:center!important;gap:14px!important;flex-wrap:wrap!important;padding:9px 10px!important;border:1px solid rgba(96,165,250,.24)!important;border-radius:12px!important;background:rgba(2,6,23,.55)!important;color:#cbd5e1!important;font-size:12px!important;line-height:1.35!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-status-line-v180 span{flex:0 1 auto!important;min-width:0!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-actions-v180{display:flex!important;align-items:center!important;gap:9px!important;flex-wrap:wrap!important;margin-top:4px!important;}
body.admin-body .admin-shell-v161 #admin-badges-panel .badge-actions-v180 .btn{flex:0 0 auto!important;width:auto!important;min-width:88px!important;max-width:180px!important;min-height:34px!important;padding:7px 12px!important;border-radius:10px!important;}
@media(max-width:900px){body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-grid-v180{grid-template-columns:minmax(0,1fr)!important;}body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-builder-v180,body.admin-body .admin-shell-v161 #admin-badges-panel .admin-badge-card-v180{max-width:none!important;}body.admin-body .admin-shell-v161 #admin-badges-panel .badge-status-line-v180 span{white-space:normal!important;}}


/* === V181 Admin Catalog Components Rebuild: categories / colors / image library === */
body.admin-body .admin-shell-v161 #admin-categories-panel,
body.admin-body .admin-shell-v161 #admin-colors-panel,
body.admin-body .admin-shell-v161 #admin-images-panel{
  --v181-blue:#2f6eba;
  --v181-panel:#0b1220;
  --v181-card:#111827;
  --v181-card2:#0f172a;
  --v181-border:rgba(47,110,186,.84);
  --v181-soft:rgba(148,163,184,.22);
}
body.admin-body .admin-shell-v161 #admin-categories-panel .admin-card-toolbar,
body.admin-body .admin-shell-v161 #admin-colors-panel .admin-card-toolbar,
body.admin-body .admin-shell-v161 #admin-images-panel .admin-toolbar{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:10px!important;
  width:auto!important;
  max-width:100%!important;
  padding:10px!important;
  border:1px solid rgba(47,110,186,.32)!important;
  border-radius:14px!important;
  background:rgba(2,6,23,.35)!important;
}
body.admin-body .admin-shell-v161 #admin-categories-panel .admin-card-toolbar .btn,
body.admin-body .admin-shell-v161 #admin-colors-panel .admin-card-toolbar .btn,
body.admin-body .admin-shell-v161 #admin-images-panel .admin-toolbar .btn{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:96px!important;
  max-width:180px!important;
}
body.admin-body .admin-shell-v161 #admin-images-panel .admin-toolbar input[type=search]{
  flex:0 1 420px!important;
  width:clamp(260px,34vw,420px)!important;
  min-width:260px!important;
  max-width:420px!important;
}
body.admin-body .admin-shell-v161 #admin-images-panel .admin-toolbar select{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:160px!important;
  max-width:240px!important;
}
body.admin-body .admin-shell-v161 #categoryCardsGrid,
body.admin-body .admin-shell-v161 #colorCardsGrid{
  display:grid!important;
  gap:14px!important;
  align-items:start!important;
  justify-content:start!important;
  width:100%!important;
}
body.admin-body .admin-shell-v161 #categoryCardsGrid{
  grid-template-columns:repeat(auto-fill,minmax(320px,420px))!important;
}
body.admin-body .admin-shell-v161 #colorCardsGrid{
  grid-template-columns:repeat(auto-fill,minmax(280px,360px))!important;
}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-category-card,
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-color-card{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  padding:14px!important;
  border:1.5px solid var(--v181-border)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,var(--v181-card),var(--v181-panel))!important;
  color:#e5e7eb!important;
  box-shadow:0 12px 26px rgba(0,0,0,.22)!important;
  overflow:hidden!important;
}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-visual-card-head,
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-visual-card-head{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  gap:10px!important;
  align-items:center!important;
  min-height:48px!important;
  margin-bottom:10px!important;
  padding-bottom:10px!important;
  border-bottom:1px solid rgba(148,163,184,.22)!important;
}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-visual-card-head strong,
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-visual-card-head strong{
  display:block!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:#f8fafc!important;
  font-size:14px!important;
  line-height:1.25!important;
}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-visual-card-head small,
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-visual-card-head small{
  display:block!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:#94a3b8!important;
  font-size:11px!important;
  font-weight:800!important;
}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-category-icon-box{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:14px!important;
  background:#020617!important;
  border:1px solid rgba(96,165,250,.35)!important;
  font-size:22px!important;
}
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-color-big-dot{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  border-radius:999px!important;
  border:1px solid rgba(255,255,255,.62)!important;
  box-shadow:0 0 0 3px rgba(15,23,42,.9),0 6px 16px rgba(0,0,0,.24)!important;
}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-mini-grid,
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-mini-grid{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:10px!important;
  align-items:flex-start!important;
  min-width:0!important;
  width:100%!important;
}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-mini-grid label,
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-mini-grid label,
body.admin-body .admin-shell-v161 #categoryCardsGrid > .admin-category-card > label,
body.admin-body .admin-shell-v161 #colorCardsGrid > .admin-color-card > label{
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  min-width:0!important;
  color:#cbd5e1!important;
  font-size:12px!important;
  font-weight:850!important;
  line-height:1.25!important;
}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-mini-grid label:nth-child(1),
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-mini-grid label:nth-child(1){flex:0 1 240px!important;max-width:280px!important;}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-mini-grid label:nth-child(2),
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-mini-grid label:nth-child(2){flex:0 1 200px!important;max-width:240px!important;}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-category-icon-field{flex:0 0 96px!important;max-width:110px!important;}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-category-sort-field,
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-mini-grid label:nth-child(4){flex:0 0 110px!important;max-width:130px!important;}
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-color-hex-input{max-width:180px!important;}
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-mini-grid label:nth-child(3){flex:0 0 180px!important;max-width:190px!important;}
body.admin-body .admin-shell-v161 #categoryCardsGrid input,
body.admin-body .admin-shell-v161 #colorCardsGrid input,
body.admin-body .admin-shell-v161 #categoryCardsGrid textarea,
body.admin-body .admin-shell-v161 #colorCardsGrid textarea{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  border:1px solid #334155!important;
  border-radius:10px!important;
  background:#020617!important;
  color:#f8fafc!important;
  min-height:34px!important;
  font-size:12px!important;
}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-category-icon-field input{width:88px!important;max-width:96px!important;text-align:center!important;font-size:18px!important;padding-left:8px!important;padding-right:8px!important;}
body.admin-body .admin-shell-v161 #categoryCardsGrid input[type=number],
body.admin-body .admin-shell-v161 #colorCardsGrid input[type=number]{width:100px!important;max-width:110px!important;}
body.admin-body .admin-shell-v161 #categoryCardsGrid > .admin-category-card > label:has(textarea){width:100%!important;max-width:100%!important;margin-top:10px!important;}
body.admin-body .admin-shell-v161 #categoryCardsGrid textarea{width:100%!important;max-width:100%!important;min-height:72px!important;resize:vertical!important;line-height:1.35!important;}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-help{font-size:11px!important;color:#94a3b8!important;line-height:1.25!important;}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-card-flags,
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-card-flags{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  align-items:center!important;
  margin-top:12px!important;
  width:100%!important;
}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-card-flags label,
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-card-flags label{
  box-sizing:border-box!important;
  display:inline-flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  gap:7px!important;
  width:auto!important;
  max-width:220px!important;
  min-height:34px!important;
  padding:7px 10px!important;
  border:1px solid rgba(148,163,184,.28)!important;
  border-radius:999px!important;
  background:#020617!important;
  color:#e5e7eb!important;
  font-size:12px!important;
  font-weight:850!important;
  white-space:nowrap!important;
}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-card-flags input,
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-card-flags input{
  flex:0 0 auto!important;
  width:16px!important;
  height:16px!important;
  min-height:16px!important;
  margin:0!important;
  accent-color:#60a5fa!important;
}
body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-card-flags .danger-check,
body.admin-body .admin-shell-v161 #colorCardsGrid .admin-card-flags .danger-check{
  border-color:rgba(248,113,113,.4)!important;
  color:#fecaca!important;
}
body.admin-body .admin-shell-v161 #admin-colors-panel .admin-color-strip{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  align-items:center!important;
  width:auto!important;
  max-width:100%!important;
  margin:12px 0!important;
  padding:10px!important;
  border:1px solid rgba(47,110,186,.28)!important;
  border-radius:14px!important;
  background:rgba(2,6,23,.32)!important;
}
body.admin-body .admin-shell-v161 #admin-colors-panel .admin-color-strip span{
  flex:0 0 auto!important;
  width:24px!important;
  height:24px!important;
  border-radius:999px!important;
  border:1px solid rgba(255,255,255,.62)!important;
}
body.admin-body .admin-shell-v161 #admin-images-panel .admin-backup-card:first-of-type{
  max-width:720px!important;
  width:fit-content!important;
  min-width:min(100%,420px)!important;
  padding:14px!important;
  border:1.5px solid rgba(47,110,186,.72)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,var(--v181-card),var(--v181-panel))!important;
}
body.admin-body .admin-shell-v161 #admin-images-panel .admin-backup-card:first-of-type input[type=file]{max-width:420px!important;width:100%!important;}
body.admin-body .admin-shell-v161 #admin-images-panel .admin-backup-card:first-of-type .btn{width:auto!important;max-width:220px!important;}
body.admin-body .admin-shell-v161 #adminImageLibrary{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(180px,220px))!important;
  justify-content:start!important;
  align-items:start!important;
  gap:14px!important;
  width:100%!important;
}
body.admin-body .admin-shell-v161 #adminImageLibrary .admin-library-card{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:220px!important;
  min-width:0!important;
  padding:10px!important;
  border:1.5px solid rgba(47,110,186,.72)!important;
  border-radius:16px!important;
  background:linear-gradient(180deg,var(--v181-card),var(--v181-panel))!important;
  color:#e5e7eb!important;
  box-shadow:0 12px 24px rgba(0,0,0,.22)!important;
  overflow:hidden!important;
}
body.admin-body .admin-shell-v161 #adminImageLibrary .admin-library-card img{
  width:100%!important;
  height:124px!important;
  object-fit:cover!important;
  border-radius:12px!important;
  border:1px solid rgba(148,163,184,.34)!important;
  background:#020617!important;
}
body.admin-body .admin-shell-v161 #adminImageLibrary .admin-image-file-name{
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  min-height:32px!important;
  overflow:hidden!important;
  word-break:break-word!important;
  color:#f8fafc!important;
  font-size:12px!important;
  line-height:1.25!important;
}
body.admin-body .admin-shell-v161 #adminImageLibrary .admin-image-file-size{font-size:11px!important;color:#94a3b8!important;font-weight:850!important;}
body.admin-body .admin-shell-v161 #adminImageLibrary .admin-image-tags{display:flex!important;flex-wrap:wrap!important;gap:5px!important;max-height:46px!important;overflow:hidden!important;}
body.admin-body .admin-shell-v161 #adminImageLibrary .admin-image-tags span{
  flex:0 0 auto!important;
  max-width:180px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  border-radius:999px!important;
  padding:3px 7px!important;
  background:rgba(59,130,246,.18)!important;
  border:1px solid rgba(59,130,246,.28)!important;
  color:#bfdbfe!important;
  font-size:11px!important;
  font-weight:850!important;
}
body.admin-body .admin-shell-v161 #adminImageLibrary .admin-image-tags .warn{background:rgba(251,191,36,.16)!important;border-color:rgba(251,191,36,.35)!important;color:#fde68a!important;}
body.admin-body .admin-shell-v161 #adminImageLibrary .admin-image-card-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:6px!important;
  margin-top:6px!important;
}
body.admin-body .admin-shell-v161 #adminImageLibrary .admin-image-card-actions .btn,
body.admin-body .admin-shell-v161 #adminImageLibrary .admin-image-card-actions button.btn{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:72px!important;
  max-width:110px!important;
  min-height:30px!important;
  padding:6px 9px!important;
  border-radius:9px!important;
  font-size:11px!important;
}
body.admin-body .admin-shell-v161 #adminImageLibrary .admin-image-assign-form{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:6px!important;
  margin-top:8px!important;
}
body.admin-body .admin-shell-v161 #adminImageLibrary .admin-product-pick-input{
  flex:1 1 150px!important;
  min-width:150px!important;
  max-width:190px!important;
  height:32px!important;
  min-height:32px!important;
  font-size:11px!important;
}
body.admin-body .admin-shell-v161 #adminImageLibrary .admin-image-assign-form .btn{
  flex:0 0 auto!important;
  width:auto!important;
  min-width:64px!important;
  max-width:82px!important;
  min-height:32px!important;
  padding:6px 9px!important;
  font-size:11px!important;
}
@media(max-width:760px){
  body.admin-body .admin-shell-v161 #categoryCardsGrid,
  body.admin-body .admin-shell-v161 #colorCardsGrid,
  body.admin-body .admin-shell-v161 #adminImageLibrary{grid-template-columns:minmax(0,1fr)!important;}
  body.admin-body .admin-shell-v161 #categoryCardsGrid .admin-category-card,
  body.admin-body .admin-shell-v161 #colorCardsGrid .admin-color-card,
  body.admin-body .admin-shell-v161 #adminImageLibrary .admin-library-card{max-width:none!important;}
  body.admin-body .admin-shell-v161 #admin-images-panel .admin-toolbar input[type=search]{width:100%!important;max-width:100%!important;}
}
