:root {
  --shop-accent: #2f6fb3;
  --shop-hero-bg: #e6edf8;
  --shop-bg: #eef2f8;
  --shop-card: #ffffff;
  --shop-text: #0f172a;
  --shop-muted: #475569;
  --shop-border: #c9d8ee;
  --shop-shadow: 0 12px 26px rgba(15, 23, 42, 0.09);
}

body.shop-page {
  margin: 0;
  background: linear-gradient(180deg, #eff4fb 0%, #e2eaf7 100%);
  color: var(--shop-text);
}

.shop-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(6px);
  background: rgba(239, 244, 251, 0.95);
  border-bottom: 1px solid var(--shop-border);
}

.shop-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.shop-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--shop-text);
}

.shop-brand__logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}

.shop-brand__logo--secondary {
  height: 34px;
  opacity: 0.95;
}

.shop-brand__fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #e7eef8;
  border: 1px solid var(--shop-border);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.shop-brand__fallback.is-hidden {
  display: none;
}

.shop-brand__name {
  font-weight: 700;
  line-height: 1.1;
}

.shop-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-nav__link {
  text-decoration: none;
  color: #1f3c66;
  border: 1px solid #8fb2df;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 600;
  background: #f4f8ff;
}

.shop-nav__link.is-active,
.shop-nav__link:hover {
  color: #fff;
  background: var(--shop-accent);
  border-color: var(--shop-accent);
}

.shop-announcement {
  text-align: center;
  background: #fef3c7;
  color: #7c2d12;
  border-top: 1px solid #f8d88a;
  border-bottom: 1px solid #f8d88a;
  padding: 9px 14px;
  font-weight: 600;
}

.shop-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px 30px;
  display: grid;
  gap: 18px;
}

.shop-alert {
  border: 1px solid #a7bce2;
  border-radius: 12px;
  background: #f1f6ff;
  color: #1d3f73;
  padding: 10px 12px;
}

.shop-alert--error {
  background: #fff1f2;
  border-color: #f4b3be;
  color: #9f1239;
}

.shop-alert--success {
  background: #ecfdf3;
  border-color: #9ad9af;
  color: #166534;
}

.shop-payment-hint--error {
  color: #9f1239 !important;
  background: #fff1f2;
  border: 1px solid #f4b3be;
  border-radius: 10px;
  padding: 8px 10px;
}

.shop-payment-hint--success {
  color: #166534 !important;
  background: #ecfdf3;
  border: 1px solid #9ad9af;
  border-radius: 10px;
  padding: 8px 10px;
}

.shop-blocked-list {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.shop-blocked-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.shop-hero {
  border: 1px solid var(--shop-border);
  border-radius: 18px;
  background: var(--shop-hero-gradient, linear-gradient(135deg, var(--shop-hero-bg), #edf4ff));
  box-shadow: var(--shop-shadow);
  overflow: hidden;
  min-height: 240px;
  background-size: cover;
  background-position: center;
}

.shop-hero__copy {
  padding: 30px;
  max-width: 680px;
  display: grid;
  gap: 12px;
}

.shop-hero__copy h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.shop-hero__copy p {
  margin: 0;
  font-size: 17px;
  color: var(--shop-muted);
}

.shop-section {
  display: grid;
  gap: 12px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.shop-card {
  border-radius: 14px;
  overflow: visible;
  border: 1px solid var(--shop-border);
  background: #fff;
  box-shadow: var(--shop-shadow);
}

.shop-card__image-wrap {
  display: block;
  aspect-ratio: 4 / 3;
  background: #f2f7ff;
}

.shop-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.shop-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #edf3fc;
}

.shop-card__body {
  padding: 14px;
  display: grid;
  gap: 12px;
  min-height: 0;
}

.shop-card__body h2,
.shop-card__body h3,
.shop-card__body h4 {
  margin: 0;
  font-size: 19px;
}

.shop-card__body h2 a,
.shop-card__body h3 a,
.shop-card__body h4 a {
  color: inherit;
  text-decoration: none;
}

.shop-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shop-card__footer,
.shop-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.shop-card__footer {
  justify-content: space-between;
  align-items: flex-start;
}

.shop-card__body p {
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.shop-card__description {
  display: block !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  overflow: visible !important;
  max-height: none !important;
  min-height: 0 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal;
}

.shop-card__footer .btn,
.shop-card__footer button {
  white-space: normal;
  text-align: center;
}

.shop-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-toolbar__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  align-items: end;
}

.shop-product-detail {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(260px, 380px) 1fr;
}

.shop-product-detail__image {
  border: 1px solid var(--shop-border);
  border-radius: 12px;
  overflow: hidden;
  background: #f3f7ff;
  min-height: 240px;
}

.shop-product-detail__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.shop-product-detail__body {
  display: grid;
  gap: 10px;
}

.shop-product-detail__description {
  white-space: pre-line;
  color: var(--shop-muted);
}

.shop-product-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.shop-product-detail__price {
  font-size: 24px;
}

.shop-summary {
  margin-top: 10px;
  border-top: 1px solid var(--shop-border);
  padding-top: 10px;
  display: grid;
  gap: 8px;
}

.shop-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.shop-checkout-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 14px;
}

.shop-success {
  max-width: 760px;
}

.shop-contact-card {
  max-width: 760px;
}

.shop-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.shop-footer {
  border-top: 1px solid var(--shop-border);
  margin-top: 28px;
  background: #ebf1fb;
}

.shop-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  color: #334155;
}

.shop-footer__contact {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shop-contact-fab {
  position: fixed;
  right: 14px;
  bottom: 16px;
  z-index: 120;
  text-decoration: none;
  color: #fff;
  background: var(--shop-accent);
  border: 1px solid color-mix(in srgb, var(--shop-accent) 65%, #000 35%);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.24);
}

.shop-toolbar__actions .is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.shop-preview-shell {
  border: 1px solid var(--shop-border);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.shop-preview-hero {
  background: linear-gradient(135deg, var(--shop-hero-bg), #eef4ff);
  padding: 18px;
  display: grid;
  gap: 8px;
}

.shop-preview-brand {
  font-weight: 700;
  color: #0f172a;
}

.shop-preview-grid {
  padding: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

@media (max-width: 860px) {
  .shop-product-detail,
  .shop-checkout-layout {
    grid-template-columns: 1fr;
  }

  .shop-toolbar__actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .shop-toolbar__actions .btn,
  .shop-toolbar__actions button {
    width: 100%;
  }

  .shop-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .shop-nav {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .shop-header__inner {
    padding: 10px 12px;
    gap: 10px;
  }

  .shop-brand {
    width: 100%;
    gap: 8px;
  }

  .shop-brand__logo {
    height: 34px;
  }

  .shop-brand__logo--secondary {
    height: 26px;
  }

  .shop-brand__name {
    font-size: 14px;
    line-height: 1.2;
  }

  .shop-main {
    padding: 14px 12px 20px;
  }

  .shop-grid {
    grid-template-columns: 1fr;
  }

  .shop-card__image-wrap {
    aspect-ratio: 16 / 10;
  }

  .shop-card__body h2,
  .shop-card__body h3,
  .shop-card__body h4 {
    font-size: 17px;
  }

  .shop-card__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-card__footer .btn {
    width: 100%;
  }

  .shop-hero__copy {
    padding: 18px;
  }

  .shop-hero__copy p {
    font-size: 15px;
  }

  .shop-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .shop-nav__link {
    font-size: 14px;
    text-align: center;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .shop-product-detail__actions .btn,
  .shop-product-detail__actions button {
    width: 100%;
  }

  .shop-product-detail__price {
    font-size: 22px;
  }
}

@media (max-width: 700px) {
  table[data-mobile-cards="true"] {
    border: 0;
    background: transparent;
    margin-top: 8px;
  }

  table[data-mobile-cards="true"] thead {
    display: none;
  }

  table[data-mobile-cards="true"] tbody {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  table[data-mobile-cards="true"] tr {
    display: block;
    border: 1px solid var(--shop-border);
    border-radius: 12px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  }

  table[data-mobile-cards="true"] td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    padding: 6px 0;
    font-size: 14px;
  }

  table[data-mobile-cards="true"] td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #1e293b;
    flex: 0 0 40%;
    max-width: 40%;
  }

  table[data-mobile-cards="true"] td[colspan] {
    display: block;
    padding: 0;
  }

  table[data-mobile-cards="true"] td[colspan]::before {
    display: none;
    content: "";
  }

  table[data-mobile-cards="true"] td[data-label="Actions"] {
    display: block;
  }

  table[data-mobile-cards="true"] td[data-label="Actions"]::before {
    display: block;
    margin-bottom: 6px;
    max-width: none;
  }

  table[data-mobile-cards="true"] td[data-label="Actions"] .btn,
  table[data-mobile-cards="true"] td[data-label="Actions"] button {
    width: 100%;
  }

  table[data-mobile-cards="true"] td input[type="number"] {
    width: 100% !important;
    max-width: 100% !important;
  }
}
