/* GULDOKON — Marketplace */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple: #7000FF;
  --purple-light: #F3ECFF;
  --purple-dark: #5200BD;
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --text: #1C1C1E;
  --text2: #636366;
  --text3: #AEAEB2;
  --border: #E5E5EA;
  --green: #34C759;
  --red: #FF3B30;
  --radius: 10px;
}

html { scroll-behavior: smooth; }

body.uzum-body {
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== HEADER ===== */
.uzum-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--card);
  height: 52px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.uzum-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 12px;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.uzum-logo { flex-shrink: 0; }
.uzum-logo img { height: 28px; }
.uzum-search {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg);
  border-radius: 8px;
  padding: 0 12px;
  height: 36px;
  border: 1.5px solid transparent;
  transition: border-color .15s;
}
.uzum-search:focus-within {
  border-color: var(--purple);
  background: var(--card);
}
.uzum-search i { color: var(--text3); font-size: 15px; margin-right: 8px; }
.uzum-search input {
  flex: 1; border: none; background: none;
  font-size: 14px; color: var(--text);
  outline: none; height: 100%; font-family: inherit;
}
.uzum-search input::placeholder { color: var(--text3); }
.uzum-header-actions { display: flex; gap: 4px; flex-shrink: 0; }
.uzum-header-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; color: var(--text); font-size: 18px;
  transition: background .15s;
}
.uzum-header-btn:hover { background: var(--bg); }
.uzum-login-btn {
  width: auto; padding: 0 14px;
  background: var(--purple); color: #fff;
  font-size: 13px; font-weight: 600;
}
.uzum-login-btn:hover { background: var(--purple-dark); color: #fff; }

/* ===== MAIN ===== */
.uzum-main {
  max-width: 960px;
  margin: 60px auto 72px;
  padding: 0 12px;
}

/* ===== CATEGORIES (chips) ===== */
.uzum-categories { margin: 10px 0 6px; }
.uzum-cat-scroll {
  display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
}
.uzum-cat-scroll::-webkit-scrollbar { display: none; }
.uzum-cat-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  font-size: 13px; font-weight: 500;
  color: var(--text); white-space: nowrap;
  transition: all .15s; flex-shrink: 0;
}
.uzum-cat-chip i { font-size: 13px; color: var(--purple); }
.uzum-cat-chip:hover,
.uzum-cat-chip:active {
  background: var(--purple); color: #fff; border-color: var(--purple);
}
.uzum-cat-chip:hover i,
.uzum-cat-chip:active i { color: #fff; }

/* ===== SECTION ===== */
.uzum-section { margin: 18px 0; }
.uzum-section-head {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.uzum-section-head h2 { font-size: 17px; font-weight: 700; }
.uzum-section-head a {
  font-size: 13px; color: var(--purple);
  font-weight: 500; display: flex; align-items: center; gap: 2px;
}

/* ===== PRODUCT GRID ===== */
.uzum-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 540px) { .uzum-products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .uzum-products-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; } }
@media (min-width: 1024px) { .uzum-products-grid { grid-template-columns: repeat(5, 1fr); } }

/* ===== PRODUCT CARD ===== */
.uzum-product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.uzum-product-card a { display: block; }
.uzum-product-img {
  position: relative; width: 100%;
  padding-top: 100%; background: var(--bg);
}
.uzum-product-img img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.uzum-product-info { padding: 8px 10px 10px; }
.uzum-product-price {
  font-size: 15px; font-weight: 700;
  color: var(--text); margin-bottom: 2px;
}
.uzum-product-title {
  font-size: 12px; color: var(--text2);
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 2px;
}
.uzum-product-seller { font-size: 11px; color: var(--text3); }

.uzum-add-cart {
  position: absolute; top: 6px; right: 6px;
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
  color: var(--purple); border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: pointer; z-index: 2;
  transition: transform .1s;
}
.uzum-add-cart:active { transform: scale(0.9); }
.uzum-add-cart.added { background: var(--green); color: #fff; }

/* ===== REELS ===== */
.uzum-reels-scroll {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
}
.uzum-reels-scroll::-webkit-scrollbar { display: none; }
.uzum-reel-card {
  flex-shrink: 0; width: 115px; height: 165px;
  border-radius: var(--radius); overflow: hidden;
  position: relative; background: #000; display: block;
}
@media (min-width: 600px) { .uzum-reel-card { width: 135px; height: 190px; } }
.uzum-reel-card img { width: 100%; height: 100%; object-fit: cover; }
.uzum-reel-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  color: #fff; display: flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 500;
}
.uzum-reel-overlay i { font-size: 12px; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--card);
  display: flex; justify-content: space-around; align-items: center;
  height: 52px; z-index: 100;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center;
  color: var(--text3); font-size: 10px; gap: 1px;
  padding: 4px 0; position: relative;
  font-weight: 500; transition: color .15s;
}
.bottom-nav a i { font-size: 20px; }
.bottom-nav a:hover { color: var(--purple); }
.bottom-nav .upload-btn-nav {
  width: 40px; height: 40px;
  background: var(--purple); color: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(112,0,255,0.2);
}
.bottom-nav .upload-btn-nav:hover { color: #fff; background: var(--purple-dark); }
.bottom-nav .upload-btn-nav i { font-size: 20px; }
.bottom-nav .upload-btn-nav span { display: none; }
.cart-badge, .cart-badge-mobile {
  position: absolute; top: -2px; right: -6px;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 15px; height: 15px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ===== STORIES ===== */
.stories-bar {
  display: flex; gap: 10px;
  overflow-x: auto; padding: 6px 0;
  scrollbar-width: none; margin-bottom: 4px;
}
.stories-bar::-webkit-scrollbar { display: none; }
.story-circle {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; cursor: pointer; flex-shrink: 0;
}
.story-avatar-ring {
  width: 52px; height: 52px;
  border-radius: 50%; padding: 2px;
  background: linear-gradient(135deg, var(--purple), #A855F7);
  position: relative;
}
.story-avatar-ring img {
  width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--bg);
}
.story-add .story-avatar-ring { background: var(--border); }
.story-add-icon {
  position: absolute; bottom: -1px; right: -1px;
  width: 16px; height: 16px;
  background: var(--purple); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  border: 2px solid var(--bg);
}
.story-name {
  font-size: 10px; color: var(--text2);
  max-width: 56px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  text-align: center;
}
.story-add { text-decoration: none; color: inherit; }

/* ===== FEED (ig-post) ===== */
.ig-feed { display: flex; flex-direction: column; gap: 10px; }
.ig-post {
  background: var(--card);
  border-radius: 12px; overflow: hidden;
}
.ig-post-header {
  padding: 10px 12px; display: flex; align-items: center; gap: 8px;
}
.ig-post-avatar img {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
}
.ig-post-user { display: flex; flex-direction: column; flex: 1; }
.ig-post-username { font-weight: 600; font-size: 13px; color: var(--text); }
.ig-post-time { font-size: 11px; color: var(--text3); }
.ig-post-media { width: 100%; position: relative; background: var(--bg); }
.ig-post-media img, .ig-post-media video { width: 100%; display: block; }
.ig-post-actions { padding: 8px 12px; display: flex; justify-content: space-between; }
.ig-actions-left { display: flex; gap: 2px; }
.ig-action-btn {
  background: none; border: none; font-size: 20px;
  color: var(--text); cursor: pointer;
  padding: 3px 6px; border-radius: 6px;
}
.ig-action-btn:hover { background: var(--bg); }
.ig-like-btn.liked, .ig-like-btn.liked i { color: var(--red); }
.ig-post-info { padding: 0 12px 10px; }
.ig-post-stats { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.ig-post-caption { font-size: 13px; color: var(--text2); line-height: 1.35; }
.ig-caption-user { font-weight: 600; color: var(--text); margin-right: 4px; }
.ig-post-price { font-size: 15px; font-weight: 700; color: var(--purple); margin-bottom: 2px; }
.ig-post-views, .ig-post-comment-count { font-size: 12px; color: var(--text3); margin-top: 2px; }
.ig-post-comment-count { cursor: pointer; }
.ig-post-badge { margin-left: auto; font-size: 14px; color: var(--purple); }
.ig-badge-shop { color: var(--green); }

/* comments */
.ig-comments { padding: 0 12px 10px; }
.ig-comment-form { display: flex; gap: 6px; margin-top: 6px; }
.ig-comment-input {
  flex: 1; border: 1px solid var(--border);
  border-radius: 16px; padding: 6px 12px;
  font-size: 13px; outline: none; background: var(--bg);
  font-family: inherit;
}
.ig-comment-input:focus { border-color: var(--purple); background: var(--card); }
.ig-comment-send { background: none; border: none; font-size: 22px; color: var(--purple); cursor: pointer; }
.ig-comment-item { display: flex; gap: 8px; padding: 5px 0; font-size: 13px; }
.ig-comment-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ig-comment-login a { color: var(--purple); font-size: 13px; }

/* play/mute */
.ig-play-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  background: rgba(0,0,0,0.4); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px;
}
.ig-mute-btn {
  position: absolute; bottom: 8px; right: 8px;
  width: 28px; height: 28px;
  background: rgba(0,0,0,0.4); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; cursor: pointer;
}
.ig-video-wrap { position: relative; cursor: pointer; }
.ig-video-wrap .ig-poster { width: 100%; display: block; }
.ig-video-wrap video {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain; background: #000;
}
.ig-post-reel { max-height: 70vh; }
.ig-post-reel video, .ig-post-reel img { max-height: 70vh; object-fit: contain; background: #000; }

/* ===== EMPTY ===== */
.uzum-empty { text-align: center; padding: 40px 20px; color: var(--text3); }
.uzum-empty i { font-size: 36px; margin-bottom: 6px; display: block; }
.uzum-empty p { font-size: 14px; }

/* ===== SPINNER ===== */
.uzum-spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin .5s linear infinite;
  margin: 24px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== DESKTOP ===== */
@media (min-width: 768px) {
  .uzum-main { padding: 0 16px; }
  .uzum-header { height: 56px; }
  .uzum-header-inner { height: 56px; }
  .uzum-main { margin-top: 64px; }
  .uzum-section-head h2 { font-size: 19px; }
}
