/* Shop page - extends shared styles.css */

.has-shop-cart-modal-open {
  overflow: hidden;
}

.shop-page-wrap {
  padding-top: 0;
  padding-bottom: 96px;
}

.shop-page-inner {
  max-width: 1120px;
  margin: 50px auto 0;
}

.shop-toolbar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 26px;
  padding: 22px 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
}

.shop-toolbar-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: end;
}

@media (min-width: 860px) {
  .shop-toolbar {
    padding: 22px 24px;
  }

  .shop-toolbar-controls {
    display: flex;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
  }
}

.shop-toolbar-label {
  display: block;
  margin: 0 0 10px;
  font-family: var(--font-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.shop-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.shop-filter-field--brand,
.shop-filter-field--sort {
  min-width: 0;
  width: 100%;
}

@media (min-width: 860px) {
  .shop-filter-field--brand,
  .shop-filter-field--sort {
    flex: 0 0 240px;
    width: 240px;
    max-width: 240px;
  }
}

.shop-filter-field .select-control {
  width: 100%;
}

.shop-toolbar-categories {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.shop-category-select {
  display: block;
}

.shop-category-select .select-control {
  width: 100%;
}

.shop-category-filters {
  display: none;
}

.shop-category-filters__label {
  display: none;
}

.shop-category-filters__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shop-category-chip {
  appearance: none;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  padding: 10px 18px;
  font-family: var(--font-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  color: var(--foreground);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

@media (min-width: 860px) {
  .shop-category-select {
    display: none;
  }

  .shop-category-filters {
    display: block;
  }

  .shop-category-filters__label {
    display: block;
  }
}

.shop-category-chip:hover {
  border-color: rgba(238, 120, 196, 0.45);
}

.shop-category-chip.is-active {
  border-color: rgba(238, 120, 196, 0.55);
  background: rgba(238, 120, 196, 0.12);
  box-shadow: inset 0 0 0 1px rgba(238, 120, 196, 0.18);
}

.shop-category-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(238, 120, 196, 0.18);
}

.shop-brand-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 0;
  padding: 0;
}

@media (min-width: 860px) {
  .shop-brand-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .shop-brand-panel > div {
    width: 100%;
    max-width: none;
  }
}

.shop-brand-title {
  margin: 0;
  font-family: var(--font-secondary);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--foreground);
}

.shop-brand-description {
  margin: 14px 0 0;
  max-width: none;
  width: 100%;
  color: rgba(42, 26, 38, 0.78);
  font-size: 16px;
  line-height: 1.6;
}

.shop-results-count {
  margin: 0;
  font-family: var(--font-secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondary);
}

.shop-state-card {
  margin-top: 28px;
  padding: 42px 28px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #fff;
  text-align: center;
}

.shop-state-title {
  margin: 0;
  font-family: var(--font-secondary);
  font-size: 1.4rem;
  color: var(--foreground);
}

.shop-state-copy {
  margin: 12px auto 0;
  max-width: 34rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.shop-products-section {
  margin-top: 28px;
}

.shop-products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.shop-load-more {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.shop-load-more__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (min-width: 720px) {
  .shop-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .shop-products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.shop-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, #fff 42%, rgba(253, 245, 234, 0.22) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 18px 34px -30px rgba(42, 26, 38, 0.2);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

@media (hover: hover) and (pointer: fine) {
  .shop-product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(238, 120, 196, 0.35);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.88) inset,
      0 22px 40px -28px rgba(42, 26, 38, 0.24);
  }

  .shop-product-card:hover .shop-product-cart-btn {
    background: rgba(78, 108, 254, 0.06);
    border-color: rgba(78, 108, 254, 0.38);
    box-shadow: 0 12px 24px -22px rgba(78, 108, 254, 0.5);
    transform: translateY(-1px);
  }
}

.shop-product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(78, 108, 254, 0.05) inset;
}

.shop-product-card::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, rgba(238, 120, 196, 0.55), rgba(78, 108, 254, 0.35));
  opacity: 0.9;
  pointer-events: none;
}

.shop-product-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 218px;
  max-height: 250px;
  padding: 16px 16px 0;
  overflow: hidden;
}

.shop-product-media img,
.shop-product-media-placeholder {
  width: 100%;
  max-height: 218px;
  height: auto;
  border-radius: 18px;
}

.shop-product-media img {
  object-fit: contain;
}

.shop-product-media-placeholder {
  display: grid;
  place-items: center;
  min-height: 120px;
  max-height: 218px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted-foreground);
  font-family: var(--font-secondary);
  font-size: 14px;
  text-align: center;
}

.shop-product-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(42, 26, 38, 0.82);
  color: #fff;
  font-family: var(--font-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shop-product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px 20px 22px;
}

.shop-product-sku {
  margin: 0;
  font-family: var(--font-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  opacity: 0.85;
}

.shop-product-title {
  margin: 14px 0 0;
  font-family: var(--font-secondary);
  font-size: clamp(1.05rem, 1.9vw, 1.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--foreground);
}

@media (min-width: 860px) {
  .shop-product-title {
    font-size: clamp(0.98rem, 1.75vw, 1.12rem);
  }
}

.shop-product-brand {
  margin: 6px 0 14px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted-foreground);
}

.shop-product-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(236, 223, 232, 0.78);
}

.shop-product-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 1px solid rgba(78, 108, 254, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--secondary);
  font-family: var(--font-secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}

.shop-product-cart-btn:disabled {
  border-color: rgba(42, 26, 38, 0.08);
  background: rgba(42, 26, 38, 0.08);
  color: var(--muted-foreground);
  cursor: not-allowed;
}

.shop-product-price-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
}

.shop-product-price {
  font-family: var(--font-secondary);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--foreground);
}

.shop-product-price--was {
  font-size: 1rem;
  color: var(--muted-foreground);
  text-decoration: line-through;
}

.shop-product-stock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(78, 108, 254, 0.08);
  color: var(--secondary);
  font-family: var(--font-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shop-product-stock.is-empty {
  background: rgba(223, 60, 52, 0.08);
  color: var(--crimson);
}

.shop-cart-modal {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.shop-cart-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.shop-cart-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(42, 26, 38, 0.52);
  backdrop-filter: blur(7px);
  cursor: pointer;
}

.shop-cart-modal__dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(240, 172, 223, 0.2), transparent 34%),
    linear-gradient(135deg, #fff8fc 0%, #fff 52%, rgba(253, 245, 234, 0.44) 100%);
  box-shadow: 0 32px 70px -35px rgba(42, 26, 38, 0.4);
  overflow: hidden;
}

.shop-cart-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--foreground);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s;
}

.shop-cart-modal__close:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.shop-cart-modal__layout {
  display: grid;
  grid-template-columns: minmax(0, 310px) minmax(0, 1fr);
  max-height: inherit;
  overflow-y: auto;
}

.shop-cart-modal__media {
  display: flex;
  align-items: flex-start;
  padding: 26px;
  background:
    radial-gradient(circle at top right, rgba(240, 172, 223, 0.28), transparent 42%),
    linear-gradient(180deg, rgba(253, 245, 234, 0.76) 0%, rgba(255, 255, 255, 0.94) 100%);
  min-height: 100%;
}

.shop-cart-modal__media img,
.shop-cart-modal__media-placeholder {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
}

.shop-cart-modal__media img {
  display: block;
  object-fit: cover;
  box-shadow: 0 22px 44px -28px rgba(42, 26, 38, 0.24);
}

.shop-cart-modal__media-placeholder {
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted-foreground);
  text-align: center;
}

.shop-cart-modal__body {
  padding: 40px 34px 34px;
}

.shop-cart-modal__eyebrow {
  margin: 0;
  font-family: var(--font-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.shop-cart-modal__title {
  margin: 12px 0 0;
  font-family: var(--font-secondary);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--foreground);
}

.shop-cart-modal__price {
  margin: 14px 0 0;
  font-family: var(--font-secondary);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary);
}

.shop-cart-modal__note {
  margin: 18px 0 0;
  max-width: 28rem;
  color: rgba(42, 26, 38, 0.72);
  line-height: 1.6;
}

.shop-cart-modal__field {
  margin-top: 26px;
  padding: 22px 22px 20px;
  border: 1px solid rgba(236, 223, 232, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 34px -30px rgba(42, 26, 38, 0.18);
}

.shop-cart-modal__label {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.shop-cart-modal__quantity-controls {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(236, 223, 232, 0.98);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 28px -24px rgba(42, 26, 38, 0.18);
}

.shop-cart-modal__quantity-btn,
.shop-cart-modal__quantity-input {
  height: 44px;
  border: 0;
  background: transparent;
}

.shop-cart-modal__quantity-btn {
  width: 44px;
  color: var(--foreground);
  font-size: 20px;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}

.shop-cart-modal__quantity-btn:hover:not(:disabled) {
  background: rgba(238, 120, 196, 0.06);
  color: var(--primary);
}

.shop-cart-modal__quantity-btn:disabled {
  color: rgba(42, 26, 38, 0.28);
  cursor: default;
}

.shop-cart-modal__quantity-input {
  width: 72px;
  padding: 0 6px;
  color: var(--foreground);
  font-family: var(--font-secondary);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.shop-cart-modal__quantity-input::-webkit-outer-spin-button,
.shop-cart-modal__quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.shop-cart-modal__actions {
  margin-top: 26px;
}

.shop-cart-modal__action {
  min-width: 170px;
  box-shadow: 0 16px 28px -22px rgba(238, 120, 196, 0.55);
}

@media (max-width: 720px) {
  .shop-cart-modal {
    padding: 18px;
    align-items: flex-end;
  }

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

  .shop-cart-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 24px;
  }

  .shop-cart-modal__media {
    min-height: 0;
    padding: 18px 18px 0;
  }

  .shop-cart-modal__body {
    padding: 28px 20px 20px;
  }
}

@media (max-width: 640px) {
  .shop-state-card {
    padding: 22px;
  }

  .shop-product-body {
    padding: 22px;
  }

  .shop-product-media {
    padding: 14px 14px 0;
  }
}
