#shopMain.main {
  padding-top: 0;
}

.shop-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: 1.25rem;
  padding-bottom: 4rem;
  padding-top: calc(var(--header-h) + 2rem);
}

.shop-page-header {
  margin-bottom: 1.75rem;
}

.shop-catalog__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
}

.shop-catalog__lead {
  color: var(--color-muted, #5c6570);
  margin: 0;
  max-width: 52rem;
}

.shop-checkout {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .shop-checkout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 2rem;
  }
}

@media (max-width: 1023px) {
  .shop-checkout__summary {
    order: -1;
  }
}

.shop-checkout__main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.shop-checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.shop-step {
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--color-border, #e2e6ea);
  border-radius: 12px;
  background: var(--color-surface, #fff);
}

.shop-step__title {
  margin: 0 0 1.15rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.shop-step--products .shop-products {
  margin: 0;
}

.shop-step .field--full {
  margin-top: 0;
}

.shop-step .inquiry-form__grid {
  margin: 0;
}

.shop-guest-register {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px dashed var(--color-border, #e2e6ea);
}

.shop-guest-register__toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.shop-guest-register__toggle input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.shop-guest-register__fields {
  margin-bottom: 0.75rem;
}

.shop-guest-register__hint {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: var(--color-muted, #5c6570);
}

.shop-guest-register__signin {
  margin: 0;
  font-size: 0.875rem;
}

.shop-guest-register__signin a {
  color: var(--color-accent, #2563eb);
}

.shop-products {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .shop-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem 1.25rem;
  }
}

.shop-product {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0.65rem 1rem;
  align-items: start;
  padding: 1rem 1.1rem;
  border: 1px solid var(--color-border, #e2e6ea);
  border-radius: 10px;
  background: var(--color-bg-alt, #f9fafb);
}

.shop-product__meta {
  min-width: 0;
}

.shop-product--config .shop-product__config {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 0.15rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border, #e2e6ea);
}

.shop-product--config .shop-product__config .shop-config {
  width: 100%;
}

/* Shop catalog cards: keep spec lists single-column (no 2-col grid inside narrow cards). */
.shop-product__config .shop-unit-qty--catalog.shop-unit-qty--grid,
.shop-product__config .shop-unit-qty--catalog {
  grid-template-columns: 1fr;
}

.shop-product__config .shop-unit-qty--catalog.shop-unit-qty--grid .shop-unit-qty__group {
  grid-template-columns: 1fr;
}

.shop-product__config .shop-unit-qty--scroll {
  max-height: min(16rem, 40vh);
}

.shop-config {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.shop-config__group {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border, #e2e6ea);
  border-radius: 8px;
  background: var(--color-surface, #fff);
}

.shop-config__legend {
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0 0.25rem;
}

.shop-config__radio {
  display: block;
  margin: 0.35rem 0 0;
  cursor: pointer;
}

.shop-config__hint,
.shop-config__error {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--color-muted, #5c6570);
}

.shop-config__error {
  color: #b42318;
}

.shop-config--steps {
  gap: 1rem;
}

.shop-config__step {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.shop-config__step--locked {
  opacity: 0.72;
}

.shop-config__step-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shop-config__step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-primary, #0f6cbd);
}

.shop-config__step-title {
  font-size: 0.85rem;
  font-weight: 700;
}

.shop-config__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.shop-config__choice-wrap {
  position: relative;
  display: inline-flex;
}

.shop-config__choice-wrap .shop-config__choice {
  padding-right: 1.65rem;
}

.shop-config__choice {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--color-border, #d0d5dd);
  border-radius: 8px;
  background: var(--color-surface, #fff);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.shop-config__choice:hover {
  border-color: var(--color-primary, #0f6cbd);
}

.shop-config__choice.is-active {
  border-color: var(--color-primary, #0f6cbd);
  background: rgba(15, 108, 189, 0.08);
  color: var(--color-primary, #0f6cbd);
}

.shop-config__choices--single .shop-config__choice {
  cursor: default;
  border-style: dashed;
}

.shop-config__choice-clear {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 1;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--color-border, #d0d5dd);
  border-radius: 50%;
  background: var(--color-surface, #fff);
  color: var(--color-muted, #5c6570);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-config__choice-clear:hover {
  color: #b42318;
  border-color: #fecdca;
  background: #fef3f2;
}

.shop-config__hint--gate {
  font-style: italic;
}

.shop-config__hint--limit {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: #b42318;
}

.shop-config__hint--limit .shop-config__hint-icon {
  flex-shrink: 0;
  margin-top: 0.12rem;
  line-height: 0;
  color: #b42318;
}

.shop-config__hint--limit .shop-config__hint-text {
  flex: 1;
  min-width: 0;
  color: inherit;
}

.shop-config__hint--item {
  margin: -0.25rem 0 0.35rem;
  padding-left: 0.15rem;
}

.shop-config__accessories-gate {
  margin-top: 0.65rem;
}

.shop-config__accessories-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.shop-config__accessories-panel {
  margin-top: 0.55rem;
}

.shop-config__accessories-panel[hidden],
.shop-config__accessories-panel.shop-config__accessories-panel--hidden {
  display: none !important;
}

body.shop-limit-modal-open {
  overflow: hidden;
}

.shop-limit-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.shop-limit-modal[hidden] {
  display: none;
}

.shop-limit-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.shop-limit-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 22rem);
  padding: 1.25rem 1.35rem 1.1rem;
  border-radius: 10px;
  background: var(--color-surface, #fff);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.shop-limit-modal__title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
}

.shop-limit-modal__message {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--color-muted, #5c6570);
}

.shop-limit-modal__close {
  position: absolute;
  top: 0.35rem;
  right: 0.5rem;
  border: none;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-muted, #666);
}

.shop-limit-modal__ok {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--color-primary, #0f6cbd);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.shop-unit-qty {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.shop-unit-qty--inline {
  gap: 0.35rem;
}

.shop-unit-qty--scroll {
  max-height: min(22rem, 52vh);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem 0.55rem 0.5rem 0.65rem;
  margin: 0 -0.15rem;
  border: 1px solid var(--color-border, #e2e6ea);
  border-radius: 8px;
  background: var(--color-surface, #fff);
  scrollbar-gutter: stable;
}

.shop-unit-qty--scroll.shop-unit-qty--grid {
  padding-right: 0.45rem;
}

.shop-config__hint--scroll {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  font-style: italic;
}

.shop-unit-qty--grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem 0.75rem;
  align-content: start;
}

@media (min-width: 520px) {
  .shop-unit-qty--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-unit-qty--grid .shop-unit-qty__group {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 0.75rem;
    align-items: start;
  }

  .shop-unit-qty--grid .shop-unit-qty__group-title {
    grid-column: 1 / -1;
  }

  .shop-unit-qty--grid .shop-config__hint--item {
    grid-column: 1 / -1;
  }
}

.shop-unit-qty__group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.shop-unit-qty__group + .shop-unit-qty__group {
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--color-border, #e2e6ea);
}

.shop-unit-qty__group-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted, #5c6570);
  margin: 0 0 0.1rem;
}

.shop-unit-qty__row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.shop-unit-qty__row--inline {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.1rem;
}

.shop-unit-qty__row--inline .shop-unit-qty__label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-unit-qty__row--inline .shop-qty {
  flex-shrink: 0;
}

.shop-unit-qty--scroll .shop-qty button {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

.shop-unit-qty--scroll .shop-qty input {
  width: 40px;
  padding: 0.3rem;
}

.shop-unit-qty__row--selected {
  position: relative;
  padding-top: 0.15rem;
  padding-right: 0.5rem;
}

.shop-unit-qty__row--inline.shop-unit-qty__row--selected {
  padding-top: 0.35rem;
}

.shop-unit-qty__row--selected .shop-config__choice-clear {
  top: -4px;
  right: -4px;
}

.shop-unit-qty__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted, #5c6570);
}

.shop-cart__line-detail {
  display: block;
  font-size: 0.8rem;
  color: var(--color-muted, #5c6570);
  margin-top: 0.15rem;
}

.shop-product__img {
  width: 88px;
  height: 66px;
  object-fit: cover;
  border-radius: 8px;
  background: #f0f2f4;
}

.shop-product__title {
  font-weight: 600;
  margin: 0 0 0.25rem;
  font-size: 1rem;
  line-height: 1.3;
}

.shop-product__price {
  font-weight: 700;
  color: var(--color-accent, #c45c26);
  margin: 0.35rem 0 0;
}

.shop-product__summary {
  font-size: 0.875rem;
  color: var(--color-muted, #5c6570);
  margin: 0;
  line-height: 1.45;
}

.shop-qty {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.shop-qty button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border, #e2e6ea);
  border-radius: 8px;
  background: var(--color-surface, #fff);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.shop-qty input {
  width: 44px;
  text-align: center;
  border: 1px solid var(--color-border, #e2e6ea);
  border-radius: 8px;
  padding: 0.4rem;
  background: var(--color-surface, #fff);
}

.shop-checkout__summary {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--color-border, #e2e6ea);
  border-radius: 12px;
  background: var(--color-surface, #fff);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.shop-cart__title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.shop-cart__lines {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.9rem;
  max-height: 220px;
  overflow-y: auto;
}

.shop-cart__lines li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border, #e2e6ea);
  line-height: 1.35;
}

.shop-cart__line-main {
  flex: 1;
  min-width: 0;
}

.shop-cart__line-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.shop-cart__line-price {
  font-weight: 600;
  white-space: nowrap;
}

.shop-cart__remove {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--color-border, #e2e6ea);
  border-radius: 6px;
  background: var(--color-surface, #fff);
  color: var(--color-muted, #5c6570);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.shop-cart__remove:hover {
  color: #b42318;
  border-color: #fecdca;
  background: #fef3f2;
}

.shop-cart__lines li:last-child {
  border-bottom: none;
}

.shop-summary-rows {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border, #e2e6ea);
  font-size: 0.9rem;
  color: var(--color-muted, #5c6570);
}

.shop-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.shop-cart__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.shop-checkout__actions {
  margin-top: 0;
}

.btn-submit--block {
  display: block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.shop-payment-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding: 0;
  border: none;
}

.shop-payment-options legend {
  padding: 0;
  margin-bottom: 0.35rem;
}

.shop-payment-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border, #e2e6ea);
  border-radius: 8px;
  background: var(--color-bg-alt, #f9fafb);
}

.shop-payment-options label:has(input:checked) {
  border-color: var(--color-accent, #c45c26);
  background: rgba(196, 92, 38, 0.06);
}

.shop-bank-info {
  font-size: 0.875rem;
  padding: 0.85rem 1rem;
  background: var(--color-bg-alt, #f6f7f8);
  border-radius: 8px;
  margin-top: 1rem;
  border: 1px solid var(--color-border, #e2e6ea);
}

.shop-bank-info p {
  margin: 0.25rem 0;
}

.shop-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.shop-message.error {
  color: #b42318;
}

.shop-message.success {
  color: #067647;
}

.shop-empty {
  color: var(--color-muted, #5c6570);
  font-size: 0.9rem;
}

#paypalButtonContainer {
  margin-top: 1rem;
  min-height: 45px;
  max-width: 100%;
}

#shopSuccess.shop-layout {
  grid-template-columns: 1fr;
  max-width: 880px;
}

.shop-success-panel {
  padding: 1.5rem;
  padding-top: calc(var(--header-h) + 2rem + 1.5rem);
  border-radius: 12px;
  border: 1px solid var(--color-border, #e2e6ea);
  background: var(--color-surface, #fff);
}

@media (max-width: 640px) {
  .shop-products {
    grid-template-columns: 1fr;
  }

  .shop-product {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .shop-unit-qty__row .shop-qty {
    justify-content: flex-start;
  }
}

html[data-theme="dark"] .shop-step,
html[data-theme="dark"] .shop-product,
html[data-theme="dark"] .shop-checkout__summary,
html[data-theme="dark"] .shop-success-panel,
html[data-theme="dark"] .shop-config__group,
html[data-theme="dark"] .shop-config__choice,
html[data-theme="dark"] .shop-config__choice-clear,
html[data-theme="dark"] .shop-limit-modal__dialog {
  background: var(--color-surface, #1a1d21);
  border-color: var(--color-border, #2e343b);
}

html[data-theme="dark"] .shop-product {
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] .shop-payment-options label {
  background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .shop-bank-info {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--color-border, #2e343b);
  color: #e5e7eb;
}

html[data-theme="dark"] .shop-config__step-title,
html[data-theme="dark"] .shop-config__accessories-toggle,
html[data-theme="dark"] .shop-unit-qty__label {
  color: #e5e7eb;
}

html[data-theme="dark"] .shop-config__hint:not(.shop-config__hint--limit) {
  color: var(--color-muted, #9ca3af);
}

html[data-theme="dark"] .shop-config__choice {
  color: #e5e7eb;
}

html[data-theme="dark"] .shop-config__choice.is-active {
  background: rgba(96, 165, 250, 0.12);
  border-color: var(--color-primary, #60a5fa);
  color: var(--color-primary, #93c5fd);
}

html[data-theme="dark"] .shop-config__choice-clear {
  color: var(--color-muted, #9ca3af);
}

html[data-theme="dark"] .shop-config__choice-clear:hover {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.35);
}

html[data-theme="dark"] .shop-config__choices--single .shop-config__choice {
  border-color: var(--color-border, #2e343b);
  color: #e5e7eb;
}

html[data-theme="dark"] .shop-limit-modal__title {
  color: #f3f4f6;
}

html[data-theme="dark"] .shop-limit-modal__message {
  color: var(--color-muted, #9ca3af);
}

html[data-theme="dark"] .shop-limit-modal__close {
  color: var(--color-muted, #9ca3af);
}

html[data-theme="dark"] .shop-qty button,
html[data-theme="dark"] .shop-qty input {
  background: var(--color-surface, #1a1d21);
  border-color: var(--color-border, #2e343b);
  color: #e5e7eb;
}

html[data-theme="dark"] .shop-unit-qty--scroll {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--color-border, #2e343b);
}

html[data-theme="dark"] .shop-unit-qty__group + .shop-unit-qty__group {
  border-top-color: var(--color-border, #2e343b);
}

html[data-theme="dark"] .shop-product--config .shop-product__config {
  border-top-color: var(--color-border, #2e343b);
}
