
:root {
  --accent: #2481cc;
  --background: #f4f6fa;
  --surface: #ffffff;
  --text: #18202b;
}

* { box-sizing: border-box; }

body {
  margin: 0 !important;
  padding: 20px 16px 110px;
  font-family: -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background: var(--background) !important;
  color: var(--text) !important;
}

h2 {
  font-size: 26px;
  margin: 12px 0 24px;
  font-weight: 800;
}

#products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.product {
  background: var(--surface);
  border: 0 !important;
  border-radius: 18px !important;
  padding: 14px !important;
  margin: 0 !important;
  box-shadow: 0 4px 20px rgba(20,30,50,.06);
}

.product h3 {
  font-size: 16px;
  margin: 8px 0;
}

.product p {
  font-size: 19px;
  font-weight: 800;
}

.product button {
  width: 100%;
  border-radius: 12px;
  background: var(--accent);
  font-weight: 600;
}

#checkout {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  width: calc(100% - 32px);
  padding: 16px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  z-index: 10;
}

#cart {
  margin-top: 24px;
  font-size: 16px;
}

#admin-entry button {
  background: #18202b !important;
}


/* STORE — главная страница */
.store-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:24px;
}
.store-brand {
  display:flex;
  align-items:center;
  gap:12px;
}
.store-brand strong {
  display:block;
  font-size:23px;
  font-weight:900;
  letter-spacing:2px;
}
.store-brand small {
  display:block;
  font-size:11px;
  color:#89909c;
  margin-top:3px;
}
.store-logo {
  display:grid;
  place-items:center;
  width:46px;
  height:46px;
  border-radius:15px;
  background:#18202b;
  color:white;
  font-size:26px;
  font-weight:900;
}
.store-avatar {
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  background:white;
  border-radius:50%;
  font-size:23px;
}
.store-hero {
  position:relative;
  overflow:hidden;
  background:linear-gradient(135deg,#19283f,#345d85);
  color:white;
  padding:28px 24px;
  border-radius:24px;
  min-height:245px;
}
.hero-label {
  font-size:10px;
  letter-spacing:2px;
  opacity:.75;
}
.store-hero h1 {
  font-size:32px;
  line-height:1.12;
  margin:18px 0 12px;
}
.store-hero p {
  font-size:12px;
  opacity:.8;
}
.store-hero button {
  margin-top:15px;
  background:white;
  color:#18202b;
  font-weight:700;
  position:relative;
  z-index:1;
}
.hero-decoration {
  position:absolute;
  right:-15px;
  bottom:-45px;
  font-size:190px;
  opacity:.12;
}
.section-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:26px 0 14px;
}
.section-heading h2 {
  font-size:20px;
  margin:0;
}
.section-heading span {
  color:#89909c;
  font-size:12px;
}
.store-categories {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}
.category {
  background:white;
  border-radius:16px;
  padding:15px 3px;
  text-align:center;
  font-size:11px;
}
.category span {
  display:block;
  font-size:27px;
  margin-bottom:9px;
}

/* Переключение каталога и корзины */
[hidden] { display: none !important; }

/* Современный дизайн Mini App */
:root {
  --accent: #7255f6;
  --background: #f6f4ff;
}

.store-hero {
  background: linear-gradient(125deg, #6545ef, #a34ef5, #ff71a8);
  background-size: 200% 200%;
  animation: heroFlow 8s ease-in-out infinite;
  box-shadow: 0 12px 30px rgba(114,85,246,.22);
}

@keyframes heroFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.store-hero button,
.product button {
  transition: transform .2s ease, box-shadow .2s ease;
}

.store-hero button:active,
.product button:active {
  transform: scale(.95);
}

.product {
  animation: cardAppear .45s ease both;
  transition: transform .2s ease;
}

@keyframes cardAppear {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.product:nth-child(2n) {
  animation-delay: .08s;
}

.category {
  box-shadow: 0 5px 18px rgba(40,30,90,.06);
  transition: transform .2s ease;
}

.category:active {
  transform: scale(.94);
}

.store-logo {
  background: linear-gradient(135deg, #7255f6, #ed62b0);
}

@media (prefers-reduced-motion: reduce) {
  .store-hero, .product {
    animation: none;
  }
}

/* Нижняя навигация */
#store-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  box-shadow: 0 -5px 25px rgba(35,25,80,.10);
  backdrop-filter: blur(16px);
}
#store-bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: transparent;
  color: #858399;
  text-decoration: none;
  font-size: 22px;
  font-weight: 700;
}
#store-bottom-nav .nav-item span {
  font-size: 11px;
}
#store-bottom-nav .nav-item.active {
  color: #7255f6;
}

/* Компактные карточки товаров */
#products {
  gap: 12px;
  align-items: stretch;
}
#products .modern-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px !important;
  border-radius: 20px !important;
  box-shadow: 0 5px 20px rgba(35,25,80,.07);
}
.modern-card > img {
  height: 150px !important;
  border-radius: 14px !important;
  margin-bottom: 8px !important;
}
.modern-card h3 {
  font-size: 14px;
  line-height: 1.3;
  margin: 4px 0;
}
.modern-card > p:not(.product-description):not(.product-stock) {
  font-size: 19px;
  margin: 7px 0;
  color: #7255f6;
}
.modern-card .product-description {
  display: none;
}
.modern-card .product-stock {
  font-size: 11px;
  font-weight: 500;
  color: #849087;
  margin: 3px 0 10px;
}
.modern-card .quantity-controls {
  margin-top: auto !important;
  justify-content: space-between;
  gap: 4px !important;
}
.modern-card .quantity-controls button {
  flex: 0 0 32px !important;
  padding: 7px !important;
  font-size: 16px;
}
.modern-card > button {
  margin-top: 10px;
  padding: 11px 5px;
  font-size: 12px;
  border-radius: 12px;
}
