/* Магазин — mobile-first, тёмная тема Createrra, акцент #EE252C */
:root {
  --shop-bg: #0d0d0e;
  --shop-card: #1a1a1b;
  --shop-surface: #252527;
  --shop-text: #ffffff;
  --shop-muted: #9ca3af;
  --shop-accent: #ee252c;
  --shop-line: #2d2d30;
  --shop-radius: 14px;
  --shop-radius-sm: 10px;
  --shop-nav-height: 64px;
  --shop-safe-bottom: env(safe-area-inset-bottom, 0px);
}

.shop-page {
  box-sizing: border-box;
  min-height: 100vh;
  background: var(--shop-bg);
  color: var(--shop-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--shop-nav-height) + 16px + var(--shop-safe-bottom));
  overflow-x: hidden;
}

/* Header */
.shop-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--shop-bg);
  border-bottom: 1px solid var(--shop-line);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-logo {
  height: 46px;
  width: auto;
  display: block;
}

.shop-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--shop-text);
}

.shop-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--shop-radius-sm);
  background: var(--shop-surface);
  border: none;
  color: var(--shop-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.shop-icon-btn:hover {
  background: var(--shop-line);
}

.shop-icon-btn svg {
  width: 22px;
  height: 22px;
}

.shop-cart-badge {
  position: relative;
}

.shop-cart-badge[data-count]::after {
  content: attr(data-count);
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--shop-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Search */
.shop-search-wrap {
  padding: 12px 16px;
}

.shop-search {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border-radius: 999px;
  background: var(--shop-surface);
  border: 1px solid var(--shop-line);
  color: var(--shop-text);
  font-size: 1rem;
  position: relative;
}

.shop-search::placeholder {
  color: var(--shop-muted);
}

.shop-search-wrap {
  position: relative;
}

.shop-search-wrap::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") center/contain no-repeat;
  pointer-events: none;
}

/* Filters */
.shop-filters {
  padding: 0 16px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.shop-filter-select {
  height: 40px;
  padding: 0 36px 0 14px;
  border-radius: 999px;
  background: var(--shop-surface);
  border: 1px solid var(--shop-line);
  color: var(--shop-text);
  font-size: 0.875rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.shop-filter-select:focus {
  outline: none;
  border-color: var(--shop-accent);
}

.shop-filter-clear {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--shop-line);
  color: var(--shop-muted);
  font-size: 0.875rem;
  cursor: pointer;
}

.shop-filter-clear:hover {
  color: var(--shop-text);
}

/* Product grid */
.shop-products {
  padding: 0 16px 24px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0;
  list-style: none;
  padding: 0;
}

.shop-product-card {
  background: var(--shop-card);
  border-radius: var(--shop-radius);
  overflow: hidden;
  border: 1px solid var(--shop-line);
  display: flex;
  flex-direction: column;
}

.shop-product-image-wrap {
  position: relative;
  aspect-ratio: 1;
  background: var(--shop-surface);
  overflow: hidden;
}

.shop-product-image-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.shop-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--shop-muted);
  font-size: 2.5rem;
}

.shop-product-add {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border: none;
  color: var(--shop-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.shop-product-add:hover {
  background: rgba(255,255,255,0.3);
}

.shop-product-add:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.shop-product-add svg {
  width: 22px;
  height: 22px;
}

.shop-product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shop-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shop-product-add-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--shop-accent);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.15s;
}

.shop-product-add-icon:hover {
  filter: brightness(1.15);
}

.shop-product-add-icon:active {
  filter: brightness(0.9);
}

.shop-product-add-icon svg {
  width: 20px;
  height: 20px;
}

.shop-product-add-icon.in-cart {
  font-size: 0.875rem;
  font-weight: 600;
}

.shop-product-add-qty {
  display: block;
  line-height: 1;
}

.shop-product-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--shop-accent);
}

.shop-product-old-price {
  font-size: 0.8125rem;
  color: var(--shop-muted);
  text-decoration: line-through;
  margin-left: 6px;
}

.shop-product-name {
  font-size: 0.875rem;
  color: var(--shop-text);
  text-decoration: none;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-product-name:hover {
  text-decoration: underline;
}

.shop-product-sku {
  font-size: 0.75rem;
  color: var(--shop-muted);
}

/* Bottom nav */
.shop-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: var(--shop-nav-height);
  padding: 0 8px var(--shop-safe-bottom) 8px;
  background: var(--shop-card);
  border-top: 1px solid var(--shop-line);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 20;
  box-sizing: border-box;
}

.shop-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--shop-muted);
  text-decoration: none;
  font-size: 0.6875rem;
  padding: 8px 12px;
  border-radius: var(--shop-radius-sm);
  transition: color 0.15s;
}

.shop-nav-item:hover,
.shop-nav-item.active {
  color: var(--shop-text);
}

.shop-nav-item svg {
  width: 24px;
  height: 24px;
}

.shop-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--shop-muted);
}

.shop-loading {
  text-align: center;
  padding: 32px;
  color: var(--shop-muted);
}

/* Product detail page */
.shop-logo-link,
.shop-title-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.shop-title-link .shop-title {
  margin: 0;
}

.shop-product-detail {
  padding: 16px;
  padding-bottom: 24px;
  max-width: 560px;
  margin: 0 auto;
}

.shop-back {
  display: inline-block;
  color: var(--shop-muted);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.shop-back:hover {
  color: var(--shop-text);
}

.product-detail-card {
  background: var(--shop-card);
  border-radius: var(--shop-radius);
  border: 1px solid var(--shop-line);
  overflow: hidden;
}

.product-detail-gallery {
  aspect-ratio: 1;
  background: var(--shop-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-image-placeholder {
  font-size: 4rem;
  color: var(--shop-muted);
}

.product-detail-body {
  padding: 20px;
}

.product-detail-category {
  font-size: 0.8125rem;
  color: var(--shop-muted);
  margin: 0 0 6px 0;
}

.product-detail-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.product-detail-sku {
  font-size: 0.8125rem;
  color: var(--shop-muted);
  margin: 0 0 14px 0;
}

.product-detail-prices {
  margin-bottom: 18px;
}

.product-detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--shop-accent);
}

.product-detail-old-price {
  font-size: 1rem;
  color: var(--shop-muted);
  text-decoration: line-through;
  margin-left: 10px;
}

.product-detail-description {
  margin-bottom: 18px;
}

.product-detail-description h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.product-detail-description p {
  font-size: 0.875rem;
  color: var(--shop-muted);
  line-height: 1.5;
  margin: 0;
  white-space: pre-wrap;
}

.product-detail-meta {
  font-size: 0.8125rem;
  color: var(--shop-muted);
  margin-bottom: 18px;
}

.product-detail-meta p {
  margin: 0 0 4px 0;
}

.shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 0 20px;
  border-radius: var(--shop-radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}

.shop-btn-primary {
  background: var(--shop-accent);
  color: #fff;
}

.shop-btn-primary:hover {
  filter: brightness(1.1);
}

.shop-btn-cart .btn-label-in-cart {
  font-weight: 500;
}

.shop-btn-block {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.shop-btn-secondary {
  background: transparent;
  color: var(--shop-muted);
  border: 1px solid var(--shop-line);
}

.shop-btn-secondary:hover {
  color: var(--shop-text);
  border-color: var(--shop-muted);
}

/* Cart page */
.cart-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 24px;
}

.cart-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 20px 0;
}

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--shop-muted);
}

.cart-empty p {
  margin: 0 0 20px 0;
}

.cart-empty .shop-btn {
  max-width: 280px;
  margin: 0 auto;
}

.cart-list {
  list-style: none;
  margin: 0 0 20px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--shop-card);
  border-radius: var(--shop-radius);
  border: 1px solid var(--shop-line);
}

.cart-item-image-link {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: var(--shop-radius-sm);
  overflow: hidden;
  background: var(--shop-surface);
  display: block;
}

.cart-item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--shop-muted);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--shop-text);
  text-decoration: none;
  margin-bottom: 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-item-name:hover {
  text-decoration: underline;
}

.cart-item-price {
  font-size: 0.8125rem;
  color: var(--shop-accent);
  font-weight: 600;
  margin: 0 0 8px 0;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--shop-surface);
  border: 1px solid var(--shop-line);
  color: var(--shop-text);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.cart-qty-btn:hover {
  background: var(--shop-line);
}

.cart-qty-value {
  min-width: 28px;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 500;
}

.cart-item-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cart-item-line-total {
  font-size: 1rem;
  font-weight: 700;
  color: var(--shop-text);
}

.cart-item-remove {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--shop-line);
  color: var(--shop-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}

.cart-item-remove:hover {
  color: var(--shop-accent);
  border-color: var(--shop-accent);
}

.cart-item-error {
  flex-wrap: wrap;
}

.cart-footer {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 16px 0;
  border-top: 1px solid var(--shop-line);
}

.cart-footer-actions {
  margin-bottom: 12px;
}

.cart-footer-actions .shop-btn-secondary {
  width: 100%;
  min-height: 44px;
}

.cart-footer .shop-btn-block,
.cart-footer #cart-checkout {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 50px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 1.125rem;
  font-weight: 600;
}

.cart-total-sum {
  font-size: 1.25rem;
  color: var(--shop-accent);
}

/* Checkout */
.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-back-link {
  color: var(--shop-text);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.shop-back-link:hover {
  opacity: 0.8;
}

.shop-back-link svg {
  width: 24px;
  height: 24px;
}

.checkout-header-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.checkout-header-spacer {
  width: 40px;
}

.checkout-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 100px;
}

.checkout-section {
  margin-bottom: 24px;
}

.checkout-section-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--shop-text);
}

.checkout-card {
  background: var(--shop-card);
  border-radius: var(--shop-radius);
  border: 1px solid var(--shop-line);
  padding: 16px;
}

.checkout-contacts {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.checkout-icon-user,
.checkout-icon-truck {
  flex-shrink: 0;
  color: var(--shop-muted);
  display: flex;
  align-items: center;
}

.checkout-icon-user svg,
.checkout-icon-truck svg {
  width: 20px;
  height: 20px;
}

.checkout-contacts-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-input,
.checkout-select {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  padding: 0 14px;
  border-radius: var(--shop-radius-sm);
  background: var(--shop-surface);
  border: 1px solid var(--shop-line);
  color: var(--shop-text);
  font-size: 1rem;
}

.checkout-input::placeholder {
  color: var(--shop-muted);
}

.checkout-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.checkout-delivery-toggle {
  display: flex;
  gap: 0;
  background: var(--shop-surface);
  border-radius: var(--shop-radius-sm);
  padding: 4px;
  margin-bottom: 12px;
}

.checkout-toggle-btn {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--shop-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.checkout-toggle-btn.active {
  background: var(--shop-card);
  color: var(--shop-text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.checkout-delivery-courier .checkout-card,
.checkout-delivery-pickup .checkout-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.checkout-delivery-courier-label {
  flex: 1;
  min-width: 140px;
  font-size: 0.9375rem;
}

.checkout-address-empty,
.checkout-address-filled {
  width: 100%;
}

.checkout-add-address {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  border: 1px dashed var(--shop-line);
  border-radius: var(--shop-radius-sm);
  color: var(--shop-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: border-color 0.15s, color 0.15s;
}

.checkout-add-address:hover {
  border-color: var(--shop-accent);
  color: var(--shop-accent);
}

.checkout-address-text {
  margin: 0 0 8px 0;
  font-size: 0.9375rem;
  color: var(--shop-text);
}

.checkout-link {
  font-size: 0.875rem;
  color: var(--shop-accent);
  text-decoration: none;
}

.checkout-link:hover {
  text-decoration: underline;
}

.checkout-comment-wrap {
  width: 100%;
  margin-top: 8px;
}

.checkout-delivery-label {
  margin: 0 0 8px 0;
  font-size: 0.875rem;
  color: var(--shop-muted);
}

.checkout-payment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkout-payment-btn {
  min-height: 56px;
  padding: 12px;
  border-radius: var(--shop-radius-sm);
  border: 1px solid var(--shop-line);
  background: var(--shop-card);
  color: var(--shop-text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.checkout-payment-btn.active {
  border-color: var(--shop-accent);
  background: rgba(238, 37, 44, 0.1);
}

.checkout-summary-card .checkout-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  color: var(--shop-muted);
}

.checkout-summary-discount {
  color: var(--shop-accent);
}

.checkout-summary-divider {
  height: 1px;
  background: var(--shop-line);
  margin: 12px 0;
}

.checkout-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--shop-text);
}

.checkout-summary-total span:last-child {
  font-size: 1.25rem;
  color: var(--shop-accent);
}

.checkout-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  padding-bottom: calc(16px + var(--shop-safe-bottom, 0px));
  background: var(--shop-bg);
  border-top: 1px solid var(--shop-line);
  z-index: 15;
  box-sizing: border-box;
  max-width: 100vw;
}

.checkout-footer .shop-btn {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Checkout address page */
.checkout-address-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 32px;
}

.checkout-address-delivery-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  color: var(--shop-muted);
  margin: 0 0 20px 0;
}

.checkout-address-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkout-address-autocomplete {
  position: relative;
}

.checkout-address-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  background: var(--shop-card);
  border: 1px solid var(--shop-line);
  border-radius: var(--shop-radius-sm);
  z-index: 30;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.checkout-address-suggestion-item {
  padding: 12px 14px;
  font-size: 0.9375rem;
  color: var(--shop-text);
  cursor: pointer;
  border-bottom: 1px solid var(--shop-line);
  transition: background 0.1s;
}

.checkout-address-suggestion-item:last-child {
  border-bottom: none;
}

.checkout-address-suggestion-item:hover,
.checkout-address-suggestion-item:focus {
  background: var(--shop-surface);
  outline: none;
}

.checkout-label {
  font-size: 0.8125rem;
  color: var(--shop-muted);
}

.checkout-address-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkout-address-subtitle {
  font-size: 1rem;
  font-weight: 600;
  margin: 20px 0 0 0;
}

.checkout-address-footer {
  margin-top: 24px;
}

.checkout-address-footer .shop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Order success */
.order-success-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 32px;
  overflow-x: hidden;
}

.order-success-page .shop-btn {
  box-sizing: border-box;
  max-width: 100%;
}

.order-success-section {
  box-sizing: border-box;
  overflow: hidden;
  margin-bottom: 24px;
}

.order-success-number {
  font-size: 0.9375rem;
  color: var(--shop-muted);
  margin: 0 0 24px 0;
}

.order-success-footer {
  box-sizing: border-box;
  max-width: 100%;
}

.order-success-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.order-success-items {
  list-style: none;
  margin: 0 0 12px 0;
  padding: 0;
}

.order-success-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--shop-card);
  border-radius: var(--shop-radius-sm);
  border: 1px solid var(--shop-line);
  margin-bottom: 8px;
  font-size: 0.9375rem;
}

.order-success-item-photo {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--shop-radius-sm);
  overflow: hidden;
  background: var(--shop-bg);
}

.order-success-item-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-success-item-photo-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--shop-line);
}

.order-success-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.order-success-item-name {
  color: var(--shop-text);
  flex: 1;
  min-width: 0;
}

.order-success-item-qty {
  color: var(--shop-muted);
  flex-shrink: 0;
}

.order-success-edit-btn {
  margin-top: 8px;
}

.order-success-delivery-card .order-success-delivery-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 0;
  font-size: 0.9375rem;
}

.order-success-address {
  margin: 0 0 8px 0;
  font-size: 0.9375rem;
  color: var(--shop-text);
}

.order-success-muted {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--shop-muted);
}

.order-success-track {
  font-size: 0.9375rem;
  color: var(--shop-muted);
  margin: 0 0 24px 0;
}

.order-success-link {
  color: var(--shop-accent);
  text-decoration: none;
}

.order-success-link:hover {
  text-decoration: underline;
}

.order-success-footer .shop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Profile / Личный кабинет */
.profile-login-page,
.profile-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 32px;
}

.profile-login-intro {
  color: var(--shop-muted);
  font-size: 0.9375rem;
  margin: 0 0 20px 0;
}

.profile-login-error {
  color: var(--shop-accent);
  font-size: 0.9375rem;
  margin: 0 0 16px 0;
}

.profile-login-step {
  margin-bottom: 24px;
}

.profile-login-hint {
  font-size: 0.875rem;
  color: var(--shop-muted);
  margin: 0 0 16px 0;
}

.profile-user {
  font-size: 0.9375rem;
  color: var(--shop-muted);
  margin: 0 0 20px 0;
}

.profile-orders-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.profile-orders-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-order-card {
  background: var(--shop-card);
  border-radius: var(--shop-radius);
  border: 1px solid var(--shop-line);
  padding: 16px;
  box-sizing: border-box;
  overflow: hidden;
}

.profile-order-card .shop-btn {
  box-sizing: border-box;
  max-width: 100%;
}

.profile-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.profile-order-number {
  font-weight: 600;
  font-size: 1rem;
}

.profile-order-status {
  font-size: 0.8125rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--shop-surface);
  color: var(--shop-muted);
}

.profile-order-status-shipping,
.profile-order-status-delivered,
.profile-order-status-received {
  background: rgba(60, 151, 66, 0.2);
  color: #5dd666;
}

.profile-order-status-cancelled {
  background: rgba(204, 54, 37, 0.2);
  color: var(--shop-accent);
}

.profile-order-meta {
  font-size: 0.875rem;
  color: var(--shop-muted);
  margin-bottom: 12px;
}

.profile-order-total {
  color: var(--shop-accent);
  font-weight: 600;
  margin-right: 12px;
}

.profile-order-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.profile-order-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--shop-line);
}

.profile-order-item:last-child {
  border-bottom: none;
}

.profile-order-item-name {
  color: var(--shop-text);
}

.profile-order-item-qty {
  color: var(--shop-muted);
}

.profile-empty {
  color: var(--shop-muted);
  margin: 0 0 16px 0;
}
