/* ═══════════════════════════════════════════
   Shop — Products / Cart / Checkout
═══════════════════════════════════════════ */

.shop-page {
  padding: 1.5rem 0 4rem;
}

.shop-page__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.shop-page__head h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}

.shop-page__head p {
  margin: 0.4rem 0 0;
  color: var(--mute);
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.shop-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.shop-chip:hover,
.shop-chip.is-active {
  opacity: 1;
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.shop-search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  max-width: 420px;
}

.shop-search input {
  flex: 1;
  min-height: 46px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font: inherit;
  color: var(--ink);
}

.shop-search button {
  min-height: 46px;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
}

.shop-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
}

.shop-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(11, 107, 203, 0.2);
}

.shop-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: linear-gradient(160deg, #f7f9fb, #e8eef5);
  overflow: hidden;
}

.shop-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 0.75rem;
  transition: transform 0.55s var(--ease);
}

.shop-card:hover .shop-card__media img {
  transform: scale(1.05);
}

.shop-card__badge,
.shop-card__off {
  position: absolute;
  z-index: 1;
  top: 0.75rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.shop-card__badge {
  inset-inline-start: 0.75rem;
  background: rgba(12, 18, 34, 0.85);
  color: #fff;
}

.shop-card__off {
  inset-inline-end: 0.75rem;
  background: #e11d48;
  color: #fff;
}

.shop-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1rem 1.1rem;
  flex: 1;
}

.shop-card__cat {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.shop-card__body h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.shop-card__body h3 a:hover {
  opacity: 1;
  color: var(--accent);
}

.shop-card__body > p {
  margin: 0;
  color: var(--mute);
  font-size: 0.86rem;
  line-height: 1.6;
  flex: 1;
}

.shop-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.65rem;
}

.shop-price strong {
  display: block;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.shop-price strong.is-oos {
  color: #da1e28;
}

.shop-price small {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--mute);
}

.shop-price s {
  display: block;
  font-size: 0.78rem;
  color: var(--mute);
}

.shop-add {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}

.shop-add:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

/* Detail */
.shop-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.shop-detail__media {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #eef2f6;
  border: 1px solid var(--line);
  aspect-ratio: 1 / 1;
}

.shop-detail__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 1.25rem;
}

.shop-detail__info h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}

.shop-detail__desc {
  color: var(--mute);
  line-height: 1.85;
}

.shop-detail__price {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.shop-detail__price strong {
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.shop-detail__price s {
  color: var(--mute);
}

.shop-detail__features {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.shop-detail__features li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: #f5f7fa;
  font-size: 0.92rem;
}

.shop-detail__features span {
  color: var(--mute);
}

.shop-detail__variants {
  margin-top: 1.25rem;
}

.shop-detail__variants-label {
  font-weight: 650;
  margin-bottom: 0.65rem;
}

.shop-variant-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.shop-variant {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.4rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.shop-variant.is-active {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.12);
}

.shop-variant.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
}

.shop-variant__swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.shop-variant__name {
  font-weight: 650;
  font-size: 0.88rem;
}

.shop-variant__price {
  color: var(--mute);
  font-size: 0.8rem;
}

.shop-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.shop-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}

.shop-qty input {
  width: 56px;
  height: 46px;
  border: 0;
  text-align: center;
  font: inherit;
  font-weight: 650;
  background: transparent;
}

.shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s, color 0.3s;
}

.shop-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}

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

.shop-btn--primary:hover {
  background: var(--accent);
}

.shop-btn--line {
  background: var(--white);
  border-color: var(--line-strong);
  color: var(--ink);
}

/* Cart / Checkout layout */
.shop-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.25rem;
  align-items: start;
}

.shop-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.25rem;
}

.shop-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.shop-line {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.shop-line:last-child {
  border-bottom: 0;
}

.shop-line img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--bg-soft);
}

.shop-line h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.shop-line__meta {
  color: var(--mute);
  font-size: 0.84rem;
}

.shop-line__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.shop-line__actions form {
  display: inline-flex;
  gap: 0.35rem;
}

.shop-line__actions input[type="number"] {
  width: 56px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  font: inherit;
}

.shop-line__actions button {
  height: 36px;
  padding: 0 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.shop-summary dl {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
}

.shop-summary dt,
.shop-summary dd {
  display: flex;
  justify-content: space-between;
  margin: 0;
  gap: 1rem;
}

.shop-summary .is-total {
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 1.05rem;
  font-weight: 700;
}

.shop-form {
  display: grid;
  gap: 0.9rem;
}

.shop-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.shop-input {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font: inherit;
  color: var(--ink);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.shop-input:focus {
  outline: 0;
  border-color: rgba(11, 107, 203, 0.45);
  box-shadow: 0 0 0 4px rgba(11, 107, 203, 0.12);
  background: #fff;
}

.shop-input--area {
  min-height: 96px;
  resize: vertical;
}

.shop-form .errorlist {
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
  color: #e11d48;
  font-size: 0.82rem;
  font-weight: 500;
}

.shop-success {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.shop-success__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f8ef;
  color: #12b76a;
  font-size: 1.6rem;
}

.shop-success h1 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
}

.shop-success p {
  color: var(--mute);
}

.shop-empty {
  text-align: center;
  padding: 3rem 1.25rem;
  background: var(--white);
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
}

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