/* aiavm shop — urun.sepetbox.com katalog sayfası */

body.shop {
  background: var(--bg);
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.shop-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 18px 60px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
}
@media (max-width: 880px) { .shop-wrap { grid-template-columns: 1fr; gap: 14px; padding: 12px; } }

/* SIDEBAR (kategori) */
.shop-side {
  position: sticky;
  top: 70px;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}
@media (max-width: 880px) {
  .shop-side { position: static; max-height: none; padding: 8px; }
}
.shop-side h3 {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
  padding: 0 8px;
}
.shop-cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.shop-cats li { margin: 0; }
.shop-cats a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  gap: 6px;
}
.shop-cats a:hover    { background: var(--bg-alt); }
.shop-cats a.active   { background: var(--accent); color: var(--accent-fg); }
.shop-cats .count     { font-size: 11px; color: var(--text-muted); }
.shop-cats a.active .count { color: var(--accent-fg); opacity: 0.85; }
.shop-cats a.cat-new { color: #6d28d9; font-weight: 600; }
.shop-cats a.cat-new:hover { background: #ede9fe; }
.shop-cats a.cat-new.active { background: #6d28d9; color: #fff; }

/* Mobilde sidebar yatay chip listesi */
@media (max-width: 880px) {
  .shop-cats {
    flex-direction: row;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 4px;
    margin: 0 -4px;
    scrollbar-width: none;
  }
  .shop-cats::-webkit-scrollbar { display: none; }
  .shop-cats li { flex-shrink: 0; }
  .shop-cats a {
    border: 1px solid var(--border);
    padding: 6px 12px;
    white-space: nowrap;
    font-size: 13px;
    border-radius: var(--radius-pill);
  }
  .shop-cats .count { display: none; }
  .shop-side h3 { display: none; }
}

/* MAIN */
.shop-main { min-width: 0; }

/* ARAMA KUTUSU */
.shop-search {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 4px 4px 16px;
  margin-bottom: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.shop-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.shop-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}
.shop-search input[type="search"] {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  padding: 10px 8px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  min-width: 0;
}
.shop-search input[type="search"]::placeholder { color: var(--text-muted); }
.shop-search input[type="search"]::-webkit-search-cancel-button { display: none; }
.shop-search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
  margin-right: 4px;
}
.shop-search-clear:hover { background: var(--bg-alt); color: var(--text); }
.shop-search button[type="submit"] {
  background: var(--accent);
  color: var(--accent-fg);
  border: 0;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  transition: opacity .15s;
}
.shop-search button[type="submit"]:hover { opacity: 0.92; }
@media (max-width: 600px) {
  .shop-search { padding: 4px 4px 4px 12px; }
  .shop-search input[type="search"] { font-size: 14px; padding: 9px 6px; }
  .shop-search button[type="submit"] { padding: 7px 14px; font-size: 13px; }
}

.shop-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 4px;
}
.shop-head h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.shop-head .meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* GRID */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1100px) { .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.shop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, transform .12s;
}
.shop-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.shop-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: var(--text);
  text-decoration: none;
}
.shop-card-img {
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}
.shop-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  display: block;
}
.shop-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.shop-card-name {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 35px;
}
.shop-card-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.shop-card-stock {
  font-size: 11px;
  color: var(--ok, #2a6b3e);
}
.shop-card-stock-out {
  color: var(--err, #9a2a2a);
}

/* STOK KALMADI — kart sönük + rozet */
.shop-card.is-oos .shop-card-img img {
  opacity: 0.55;
  filter: grayscale(0.4);
}
.shop-card.is-oos .shop-card-price {
  color: var(--text-dim, #6a665c);
  text-decoration: line-through;
}
.shop-card-oos-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(154, 42, 42, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* SEPETE EKLE BUTONU */
.shop-add-cart {
  display: block;
  margin: 0 10px 10px;
  padding: 9px 12px;
  background: var(--accent);
  color: var(--accent-fg);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  transition: opacity .15s, background .15s;
}
.shop-add-cart:hover    { opacity: 0.92; }
.shop-add-cart:disabled { opacity: 0.55; cursor: default; }
.shop-add-cart.added    { background: var(--ok, #2a6b3e); }
.shop-add-cart.err      { background: var(--err, #9a2a2a); }

/* SEPET BADGE stilleri chat.css'e taşındı — tüm sayfalarda paylaşılır. */

/* LOAD MORE */
.shop-loadmore-wrap {
  display: flex;
  justify-content: center;
  margin: 24px 0 12px;
}
.shop-loadmore {
  background: var(--accent);
  color: var(--accent-fg);
  border: 0;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: opacity .15s;
}
.shop-loadmore:hover    { opacity: 0.92; }
.shop-loadmore:disabled { opacity: 0.5; cursor: not-allowed; }
.shop-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.shop-end {
  text-align: center;
  padding: 18px;
  font-size: 12px;
  color: var(--text-muted);
}
