/* =========================================================
   FIXLENS BAZAR - STRICTLY FLAT FORUM STYLE (NO GRADIENTS)
   ========================================================= */

:root {
  --bg-page: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-secondary: #f4f5f6;
  --bg-card: #ffffff;
  --border-color: #e5e7eb;
  --border-subtle: #f3f4f6;
  --border-strong: #d1d5db;
  --text-main: #111827;
  --text-body: #1f2937;
  --text-muted: #6b7280;
  --text-subtle: #9ca3af;
  --vinted-teal: #c2410c;
  --vinted-teal-hover: #9a3412;
  --vinted-teal-light: #fff1eb;
  --accent-orange: #c2410c;
  --accent-orange-hover: #9a3412;
  --accent-orange-light: #fff1eb;
  --brand-green: #059669;
  --brand-blue: #c2410c;
  --brand-amber: #d97706;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  overflow-x: hidden;
}

body {
  background-color: var(--bg-page);
  color: var(--text-body);
  font-family: var(--font-family);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 40px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.chats-page,
body:has(.chats-layout) {
  min-height: 0 !important;
  height: 100% !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* =========================================================
   TOP HEADER (MATCHING VINTED & FORUM)
   ========================================================= */

.marketplace-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  width: 100%;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.mobile-search-row {
  display: none;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.brand-title {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
}

.brand-fix {
  color: #0f172a;
  font-weight: 900;
}

.brand-lens {
  color: #c2410c;
  font-weight: 900;
}

.brand-bazar {
  color: var(--vinted-teal);
  font-weight: 700;
  margin-left: 6px;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

/* Header Search */
.header-search-wrap {
  flex: 1;
  max-width: 580px;
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-wrap .search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-subtle);
  font-size: 0.95rem;
  pointer-events: none;
}

.header-search-input {
  width: 100%;
  height: 40px;
  padding: 0 38px 0 38px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s, background-color 0.15s;
}

.header-search-input:focus {
  border-color: var(--vinted-teal);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(9, 177, 186, 0.15);
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  color: var(--text-subtle);
  font-size: 0.9rem;
  display: none;
  padding: 4px;
}

.search-clear-btn:hover {
  color: var(--text-main);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.15rem;
  position: relative;
  transition: color 0.15s, background 0.15s;
}

.header-icon-btn:hover {
  color: var(--vinted-teal);
  background: var(--vinted-teal-light);
}

.header-icon-btn.active {
  color: #ef4444;
}

.header-icon-btn .badge-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--vinted-teal);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.btn-sell-header {
  background: var(--vinted-teal);
  color: #ffffff;
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.15s, transform 0.1s;
}

.btn-sell-header:hover {
  background: var(--vinted-teal-hover);
  color: #ffffff;
}

.btn-sell-header:active {
  transform: scale(0.97);
}

.btn-sell-header:hover {
  background: var(--accent-orange-hover);
}

/* User Menu */
.user-profile-menu-wrap {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  transition: background 0.15s;
}

.user-profile-btn:hover {
  background: var(--bg-surface-secondary);
}

.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
  object-fit: cover;
  flex-shrink: 0;
}

.profile-dropdown-box {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 220px;
  display: none;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.profile-dropdown-box.open {
  display: flex;
}

.profile-dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.profile-dropdown-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.profile-dropdown-role {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.88rem;
  color: var(--text-body);
  transition: background 0.15s;
}

.profile-dropdown-item:hover {
  background: var(--bg-surface-secondary);
}

.profile-dropdown-divider {
  height: 1px;
  background: var(--border-color);
}

.login-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-orange);
  padding: 8px 12px;
  border-radius: var(--radius-md);
}

.login-link:hover {
  background: var(--accent-orange-light);
}

/* =========================================================
   MAIN CONTAINER & FILTER BAR
   ========================================================= */

.marketplace-main {
  width: 100%;
  margin: 20px 0 0;
  padding: 0 16px 60px;
}

.filter-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.filter-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill-dropdown {
  position: relative;
}

.filter-pill {
  height: 36px;
  padding: 0 14px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
  transform: none !important;
}

.filter-pill:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
  transform: none !important;
}

.filter-pill.active {
  background: #fff1eb;
  border-color: #c2410c;
  color: #c2410c;
}

.filter-pill.active i,
.filter-pill.active span {
  color: #c2410c;
}

.filter-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  min-width: 180px;
  display: none;
  flex-direction: column;
  z-index: 100;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.filter-dropdown-menu.open {
  display: flex;
}

.dropdown-item {
  padding: 8px 14px;
  font-size: 0.82rem;
  color: var(--text-body);
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-item:hover,
.dropdown-item.selected {
  background: var(--bg-surface-secondary);
  font-weight: 600;
  color: var(--accent-orange);
}

.filter-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.results-count {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.btn-reset-filters {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-reset-filters:hover {
  color: var(--accent-orange);
}

#category-dropdown-menu,
#part-type-dropdown-menu,
#brand-dropdown-menu {
  max-height: 320px;
  overflow-y: auto;
  min-width: 210px;
}

.price-filter-dropdown {
  min-width: 230px;
}

.price-custom-inputs {
  padding: 10px 12px;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.price-inputs-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-input {
  width: 76px;
  height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  box-sizing: border-box;
}

.price-input:focus {
  border-color: var(--accent-orange);
}

.btn-apply-price {
  width: 30px;
  height: 30px;
  background: var(--accent-orange);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  flex-shrink: 0;
  transform: none !important;
  transition: background 0.15s;
}

.btn-apply-price:hover {
  background: var(--accent-orange-hover);
}

/* Active Filter Chips / Tags */
.active-filters-chips-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-body);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-main);
}

.filter-chip .chip-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.filter-chip .chip-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-size: 0.72rem;
  transition: color 0.15s;
  transform: none !important;
}

.filter-chip .chip-close:hover {
  color: #ef4444;
}

.btn-clear-all-chips {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--accent-orange);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transform: none !important;
}

.btn-clear-all-chips:hover {
  text-decoration: underline;
}

/* =========================================================
   VINTED PRODUCT CARDS GRID (MATCHING IMAGE 1)
   ========================================================= */

.items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .items-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1024px) {
  .items-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1200px) {
  .items-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1440px) {
  .items-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1680px) {
  .items-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 20px;
  }
}

.vinted-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  transform: none !important;
}

@media (hover: hover) {
  .vinted-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    transform: none !important;
  }
}

/* Vinted Seller Row (Above Photo) */
.vinted-card-seller {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  user-select: none;
}

.vinted-seller-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--accent-orange);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
}

.vinted-seller-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vinted-seller-avatar-fallback {
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
}

.vinted-seller-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vinted-card-seller:hover .vinted-seller-name {
  color: var(--accent-orange);
  text-decoration: underline;
}

/* Card Photo Box: Precision Pro 1:1 Square Ratio */
.card-photo-box {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 square ratio for engineering parts */
  background: #f8fafc;
  overflow: hidden;
}

.card-photo-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

/* Condition Badge (Top-left) */
.badge-condition {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  color: #ffffff;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.badge-new { background: #059669; }
.badge-used { background: #334155; }
.badge-repair { background: #d97706; }
.badge-parts { background: #64748b; }

/* Floating Vinted Heart / Like Button */
.card-like-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  height: 30px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  color: #64748b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
  transform: none !important;
}

.card-like-btn:hover {
  background: #ffffff;
  color: #ef4444;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  transform: none !important;
}

.card-like-btn.liked {
  color: #ef4444;
  background: #ffffff;
}

.card-like-btn i {
  font-size: 0.85rem;
}

.card-like-count {
  font-size: 11.5px;
  font-weight: 600;
  color: #374151;
  font-variant-numeric: tabular-nums;
}

/* Card Info: Precision Pro Structure (Price -> Brand -> Title -> Meta) */
.card-info {
  padding: 10px 12px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #ffffff;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.card-price {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.card-brand {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-orange);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-title {
  font-size: 13.5px;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

/* =========================================================
   PRODUCT DETAILS MODAL / VIEW (MATCHING IMAGE 3)
   ========================================================= */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
  overflow-y: auto;
}

.modal-backdrop.open {
  display: flex;
}

.item-details-modal-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 980px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
}

.details-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
}

.details-modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}

.details-modal-close {
  color: var(--text-muted);
  font-size: 1.25rem;
  padding: 4px 8px;
}

.details-modal-close:hover {
  color: var(--text-main);
}

/* Image 3 layout: Left (Photos + Member Items) & Right (Sidebar) */
.product-view-layout {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .product-view-layout {
    flex-direction: row;
  }
}

.product-left-col {
  flex: 1 1 58%;
  padding: 24px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-main-photo-wrap {
  position: relative;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.product-main-photo-wrap.loupe-active {
  cursor: crosshair;
}

.product-main-photo-img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  transition: opacity 0.15s;
}

.product-main-photo-wrap.loupe-active .product-main-photo-img {
  cursor: crosshair;
}

/* Gray Floating Photo Toolbar on Card (Лупа & Приближення) */
.photo-card-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
}

.photo-tool-btn {
  height: 32px;
  padding: 0 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  color: #475569;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  user-select: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transform: none !important;
}

.photo-tool-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
  transform: none !important;
}

.photo-tool-btn:active {
  transform: none !important;
}

.photo-tool-btn.active {
  background: #334155;
  border-color: #1e293b;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.photo-tool-btn.active i {
  color: #ffffff;
}

/* Magnifier Loupe Lens Element (Лупа) */
.photo-loupe-lens {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 3px solid #94a3b8;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25), inset 0 0 12px rgba(15, 23, 42, 0.15);
  background-repeat: no-repeat;
  background-color: #ffffff;
  pointer-events: none;
  z-index: 25;
  display: none;
  transform: translate(-50%, -50%);
}

.photo-loupe-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  line-height: 1.2;
  white-space: nowrap;
}

/* Fullscreen Photo Zoom Modal */
.photo-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.photo-zoom-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.photo-zoom-toolbar {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100001;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  max-width: 95vw;
}

.photo-zoom-tool-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.photo-zoom-tool-divider {
  width: 1px;
  height: 20px;
  background: #cbd5e1;
  margin: 0 4px;
}

.photo-zoom-btn {
  height: 32px;
  padding: 0 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-full);
  color: #475569;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transform: none !important;
}

.photo-zoom-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
  transform: none !important;
}

.photo-zoom-btn:active {
  transform: none !important;
}

.photo-zoom-btn.active {
  background: #334155;
  border-color: #1e293b;
  color: #ffffff;
}

.photo-zoom-btn.active i {
  color: #ffffff;
}

.photo-zoom-btn.photo-zoom-val {
  min-width: 58px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.photo-zoom-btn.photo-zoom-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  color: #64748b;
}

.photo-zoom-btn.photo-zoom-close:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
}

.photo-zoom-viewport {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 100000;
  touch-action: none;
}

.photo-zoom-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  cursor: grab;
  user-select: none;
  will-change: transform;
  transform-origin: center center;
  transition: transform 0.08s ease-out;
}

.photo-zoom-viewport.is-dragging .photo-zoom-img {
  cursor: grabbing;
  transition: none;
}

.modal-loupe-lens {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid #94a3b8;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 0 12px rgba(15, 23, 42, 0.2);
  background-repeat: no-repeat;
  background-color: #ffffff;
  pointer-events: none;
  display: none;
  z-index: 100002;
  transform: translate(-50%, -50%);
}

.photo-zoom-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100001;
  background: rgba(241, 245, 249, 0.95);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 14px;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.photo-zoom-hint .mobile-hint {
  display: none;
}

.product-breadcrumbs {
  font-size: 0.84rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.4;
}

.product-breadcrumbs a,
.product-breadcrumbs .crumb-link {
  color: var(--vinted-teal);
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.product-breadcrumbs a:hover,
.product-breadcrumbs .crumb-link:hover {
  color: #078c93;
  text-decoration: underline;
}

.product-breadcrumbs span:last-child {
  color: var(--text-secondary);
  font-weight: 500;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Member Items Section (Image 3) */
.member-items-section {
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.member-items-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
}

.member-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 600px) {
  .member-items-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Right Sidebar (Image 3) */
.product-right-col {
  flex: 1 1 42%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #ffffff;
}

.product-main-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.product-sub-header {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.product-main-price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
}

/* Specs Table (Image 3) */
.product-specs-table {
  width: 100%;
  border-collapse: collapse;
}

.product-specs-table tr {
  border-bottom: 1px solid var(--border-color);
}

.product-specs-table td {
  padding: 8px 0;
  font-size: 0.85rem;
}

.specs-label {
  color: var(--text-muted);
  width: 35%;
}

.specs-val {
  color: var(--text-main);
  font-weight: 500;
}

/* Description */
.product-desc-box {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.product-desc-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.product-desc-text {
  font-size: 0.88rem;
  color: var(--text-body);
  white-space: pre-wrap;
  line-height: 1.5;
}

/* Action Buttons (Image 3) */
.product-actions-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-ask-seller {
  background: var(--accent-orange);
  color: #ffffff;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.15s;
}

.btn-ask-seller:hover {
  background: var(--accent-orange-hover);
}

.btn-make-offer {
  background: var(--bg-surface-secondary);
  color: var(--text-main);
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn-make-offer:hover {
  background: #e2e8f0;
}

/* Seller Card in Details (Image 3 bottom right) */
.details-seller-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.details-seller-card:hover {
  border-color: var(--accent-orange);
}

.seller-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
  object-fit: cover;
  flex-shrink: 0;
}

.seller-card-meta {
  flex: 1;
}

.seller-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.seller-card-stars {
  font-size: 0.78rem;
  color: #f59e0b;
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
}

.seller-card-online {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* =========================================================
   ITEM DETAILS VIEW (DEDICATED STANDALONE PAGE)
   ========================================================= */

.item-detail-view-wrap {
  margin-bottom: 30px;
}

.item-detail-back-row {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.item-detail-card-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* =========================================================
   USER PROFILE VIEW (MATCHING IMAGE 2)
   ========================================================= */

.profile-view-wrap {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}

.profile-back-row {
  margin-bottom: 16px;
}

.profile-back-btn {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-back-btn:hover {
  color: var(--accent-orange);
}

.profile-header-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.profile-info-left {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.profile-large-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 2rem;
  color: #ffffff;
  object-fit: cover;
  flex-shrink: 0;
}

.profile-details-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-username {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.profile-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #f59e0b;
}

.profile-about-meta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-about-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-edit-profile {
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

.btn-edit-profile:hover {
  background: var(--bg-surface-secondary);
}

/* Profile Tabs */
.profile-tabs-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 20px;
  border-bottom: 1px solid var(--border-color);
}

.profile-tab-btn {
  padding: 10px 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  cursor: pointer;
}

.profile-tab-btn.active {
  color: var(--accent-orange);
}

.profile-tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-orange);
}

/* =========================================================
   CREATE LISTING MODAL
   ========================================================= */

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.modal-close-btn {
  color: var(--text-muted);
  font-size: 1.25rem;
  padding: 4px 8px;
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-form {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-label .required {
  color: #ef4444;
}

.form-input,
.form-select,
.form-textarea {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-orange);
  background: #ffffff;
}

.image-upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-surface-secondary);
  transition: border-color 0.15s;
}

.image-upload-zone:hover {
  border-color: var(--accent-orange);
}

.upload-icon {
  font-size: 2rem;
  color: var(--text-subtle);
  margin-bottom: 8px;
}

.upload-text {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
}

.upload-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.image-preview-box {
  position: relative;
  display: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 220px;
}

.image-preview-img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.remove-img-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.condition-pills-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.condition-pill-radio {
  display: none;
}

.condition-pill-label {
  display: block;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-body);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.condition-pill-radio:checked + .condition-pill-label {
  background: var(--accent-orange-light);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  font-weight: 600;
}

/* Draft Alert Banner in Create Listing Modal */
.draft-alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #166534;
}

.draft-alert-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.draft-alert-icon {
  font-size: 1.15rem;
  color: #16a34a;
  flex-shrink: 0;
}

.draft-alert-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.draft-alert-title {
  font-weight: 600;
  color: #15803d;
}

.draft-alert-time {
  font-size: 0.75rem;
  color: #4b7a5a;
}

.btn-discard-draft {
  background: #ffffff;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #dc2626;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-discard-draft:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.draft-status-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.draft-status-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.draft-status-text.saved {
  color: #16a34a;
  font-weight: 500;
}

.draft-status-text.saving {
  color: var(--vinted-teal);
}

.modal-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.btn-save-draft {
  padding: 10px 18px;
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-save-draft:hover {
  background: #f8fafc;
  border-color: var(--vinted-teal);
  color: var(--vinted-teal);
}

.btn-save-draft.btn-saved-success {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #059669;
}

.btn-cancel {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
}

.btn-cancel:hover {
  color: var(--text-main);
}

.btn-submit-item {
  padding: 10px 22px;
  background: var(--accent-orange);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn-submit-item:hover {
  background: var(--accent-orange-hover);
}

@media (max-width: 576px) {
  .modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .draft-status-wrap {
    justify-content: center;
  }
  .modal-footer-actions {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }
  .modal-footer-actions button {
    flex: 1;
    justify-content: center;
    padding: 10px 8px;
    font-size: 0.82rem;
  }
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.empty-state-icon {
  font-size: 2.5rem;
  color: var(--text-subtle);
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-state-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto;
}

/* Toast Message */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  z-index: 1000;
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
}

.toast-msg.success {
  border-color: var(--brand-green);
}

.toast-msg.error {
  border-color: #ef4444;
}

/* =========================================================
   MOBILE SLIDE-OUT DRAWER MENU (ВИСУВНЕ МЕНЮ)
   ========================================================= */

.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 290px;
  max-width: 86vw;
  background-color: #ffffff;
  z-index: 1101;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-drawer.open {
  transform: translateX(0);
}

body.drawer-locked {
  overflow: hidden;
}

/* Drawer Header */
.mobile-drawer-header {
  padding: 18px 16px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-drawer-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.drawer-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  color: #ffffff;
  object-fit: cover;
  flex-shrink: 0;
}

.drawer-user-avatar.guest-avatar {
  background-color: #94a3b8;
  font-size: 1.1rem;
}

.drawer-user-meta {
  min-width: 0;
  flex: 1;
}

.drawer-user-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.drawer-user-handle {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-drawer-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.15rem;
  transition: background-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.mobile-drawer-close:hover,
.mobile-drawer-close:active {
  background-color: #e2e8f0;
  color: var(--text-main);
}

/* Drawer Body */
.mobile-drawer-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.drawer-btn-create {
  display: none !important;
}

/* Nav list inside Drawer */
.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.drawer-nav-item i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.drawer-nav-item:hover,
.drawer-nav-item:active {
  background-color: var(--bg-surface-secondary);
  color: var(--text-main);
}

.drawer-nav-item .drawer-badge {
  margin-left: auto;
  background: #c2410c;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.drawer-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 8px 0;
}

.drawer-logout-item {
  color: #ef4444;
}

.drawer-logout-item i {
  color: #ef4444;
}

.drawer-logout-item:hover,
.drawer-logout-item:active {
  background-color: #fef2f2;
  color: #dc2626;
}

/* Guest buttons in drawer */
.drawer-btn-login {
  background: var(--accent-orange);
  color: #ffffff;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.drawer-btn-register {
  background: var(--bg-surface-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

/* =========================================================
   RESPONSIVE LAYOUT (MOBILE OPTIMIZATIONS)
   ========================================================= */

@media (max-width: 768px) {
  .marketplace-header {
    padding: 8px 12px 10px;
  }

  .header-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }

  /* Desktop search is hidden on mobile */
  .desktop-search-wrap {
    display: none !important;
  }

  /* Brand Area (Left) */
  .brand-area {
    gap: 8px;
    flex-shrink: 0;
  }

  .brand-area .header-icon-btn {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.95rem;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .brand-bazar {
    font-size: 1rem;
    margin-left: 4px;
  }

  /* Header Actions (Right: Chats, Favs, Plus, Avatar) */
  .header-actions {
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
  }

  .header-icon-btn {
    width: 34px;
    height: 34px;
    font-size: 1.05rem;
  }

  .header-icon-btn .badge-count {
    top: 2px;
    right: 2px;
    min-width: 14px;
    height: 14px;
    font-size: 0.6rem;
    padding: 0 3px;
  }

  /* Compact Sell Button on mobile */
  .btn-sell-header {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }

  .btn-sell-header span {
    display: none;
  }

  .btn-sell-header i {
    font-size: 0.95rem;
  }

  /* Avatar button on mobile: show ONLY the round avatar circle */
  .user-profile-btn {
    padding: 0;
    gap: 0;
    border-radius: 50%;
  }

  .user-profile-btn .user-avatar-circle {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  .user-profile-btn .user-name-label,
  .user-profile-btn .user-chevron-icon {
    display: none !important;
  }

  /* Hide desktop dropdown on mobile in favor of slide-out drawer */
  .profile-dropdown-box {
    display: none !important;
  }

  /* =========================================================
     VINTED MOBILE SEARCH BAR (DEDICATED ROW BELOW TOP BAR)
     ========================================================= */
  .mobile-search-row {
    display: block !important;
    width: 100%;
  }

  .vinted-search-bar {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    height: 40px;
    width: 100%;
    overflow: hidden;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
  }

  .vinted-search-bar:focus-within {
    border-color: var(--accent-orange);
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(194, 65, 12, 0.12);
  }

  .vinted-search-cat-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    height: 100%;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-main);
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.15s;
  }

  .vinted-search-cat-btn:active {
    background-color: rgba(0, 0, 0, 0.05);
  }

  .vinted-search-cat-btn i {
    font-size: 0.65rem;
    color: var(--text-muted);
  }

  .vinted-search-divider {
    width: 1px;
    height: 20px;
    background: var(--border-strong);
    flex-shrink: 0;
  }

  .vinted-search-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    min-width: 0;
  }

  .vinted-search-input-wrap .search-icon {
    position: absolute;
    left: 10px;
    color: var(--text-subtle);
    font-size: 0.85rem;
    pointer-events: none;
  }

  .vinted-search-input {
    width: 100%;
    height: 100%;
    padding: 0 32px 0 32px;
    background: transparent;
    border: none;
    font-size: 0.88rem;
    color: var(--text-main);
    outline: none;
  }

  .vinted-search-input-wrap .search-clear-btn {
    position: absolute;
    right: 8px;
    color: var(--text-subtle);
    font-size: 0.85rem;
    padding: 4px;
    display: none;
  }

  .vinted-search-input-wrap .search-clear-btn:hover {
    color: var(--text-main);
  }

  .filter-bar {
    padding: 10px 12px;
  }

  /* Item details page responsive adaptations */
  .item-detail-view-wrap {
    margin-bottom: 20px;
  }

  .item-detail-card-box {
    border-radius: var(--radius-md);
  }

  .product-left-col {
    padding: 12px 14px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
  }

  .product-main-photo-wrap {
    min-height: 220px;
    border-radius: var(--radius-sm);
  }

  .product-main-photo-img {
    max-height: 320px;
  }

  .photo-card-tools {
    top: 8px;
    right: 8px;
    gap: 4px;
  }

  .photo-tool-btn {
    height: 28px;
    padding: 0 9px;
    font-size: 0.76rem;
    gap: 4px;
  }

  .photo-loupe-lens {
    width: 140px;
    height: 140px;
  }

  .photo-zoom-toolbar {
    top: 10px;
    padding: 4px 8px;
    gap: 4px;
    max-width: 96vw;
  }

  .photo-zoom-btn {
    height: 28px;
    padding: 0 8px;
    font-size: 0.76rem;
    gap: 4px;
  }

  .photo-zoom-btn.photo-zoom-val {
    min-width: 48px;
  }

  .photo-zoom-btn.photo-zoom-close {
    width: 28px;
    height: 28px;
  }

  .modal-loupe-lens {
    width: 150px;
    height: 150px;
  }

  .photo-zoom-hint .desktop-hint {
    display: none;
  }

  .photo-zoom-hint .mobile-hint {
    display: inline;
  }

  .product-right-col {
    padding: 16px 14px;
    gap: 14px;
  }

  .product-main-title {
    font-size: 1.2rem;
  }

  .product-main-price {
    font-size: 1.45rem;
  }

  .product-specs-table td {
    padding: 6px 0;
    font-size: 0.82rem;
  }

  .product-desc-box {
    padding: 12px;
  }

  .product-desc-text {
    font-size: 0.84rem;
  }

  .details-seller-card {
    padding: 10px 12px;
  }

  .member-items-section {
    padding: 16px 14px;
    margin-top: 0;
  }

  .member-items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Bottom Clearance on mobile for catalog and views */
  .marketplace-main {
    padding: 0 12px calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #view-feed {
    padding-bottom: 40px !important;
  }

  .item-detail-view-wrap {
    margin-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .profile-view-wrap {
    margin-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .item-details-modal-box {
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 350px) {
  .brand-bazar {
    display: none;
  }
  .header-actions {
    gap: 4px;
  }
  .header-icon-btn,
  .btn-sell-header,
  .user-profile-btn .user-avatar-circle {
    width: 32px;
    height: 32px;
  }
}

/* ==============================================================================
   Отключение анимации поднятия кнопок при наведении (Барахолка)
   ============================================================================== */
button:hover,
button:focus,
.btn:hover,
.btn:focus,
.btn-sell-header:hover,
.header-icon-btn:hover,
.user-profile-btn:hover,
.btn-reset-filters:hover,
.btn-ask-seller:hover,
.btn-make-offer:hover,
.btn-edit-profile:hover,
.btn-submit-item:hover,
.btn-cancel:hover,
.drawer-btn-create:hover,
.drawer-nav-item:hover,
.card-like-btn:hover,
.card-like-btn:active,
.details-modal-close:hover,
.modal-close-btn:hover,
.mobile-drawer-close:hover,
.filter-pill:hover,
.dropdown-item:hover,
.photo-tool-btn:hover,
.photo-tool-btn:active,
.photo-zoom-btn:hover,
.photo-zoom-btn:active {
  transform: none !important;
}

/* ==============================================================================
   REVIEWS & RATINGS SYSTEM
   ============================================================================== */

/* Summary Card */
.reviews-summary-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.reviews-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  text-align: center;
  padding-right: 12px;
  border-right: 1px solid var(--border-color);
}

.reviews-big-score {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.reviews-score-stars {
  margin-top: 8px;
  display: flex;
  gap: 4px;
  font-size: 1.1rem;
  color: #f59e0b;
}

.reviews-score-count {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Rating Distribution Bars */
.reviews-bars-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 320px;
}

.reviews-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.bar-star-label {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 32px;
  font-weight: 600;
  color: var(--text-main);
}

.bar-star-label i {
  color: #f59e0b;
  font-size: 0.75rem;
}

.bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-muted, #f1f5f9);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: #f59e0b;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.bar-count {
  width: 24px;
  text-align: right;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Action Block */
.reviews-action-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.btn-leave-review {
  background: var(--accent-orange);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(194, 65, 12, 0.25);
  transition: background 0.15s ease;
}

.btn-leave-review:hover {
  background: #9a3412;
  color: #ffffff;
}

.reviews-guarantee-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.reviews-guarantee-hint i {
  color: #10b981;
}

/* Reviews List */
.reviews-list-wrap {
  margin-top: 24px;
}

.reviews-loading {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.reviews-items-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Individual Review Card */
.review-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: border-color 0.15s ease;
}

.review-card.mine {
  border-color: rgba(194, 65, 12, 0.4);
  background: rgba(194, 65, 12, 0.015);
}

.review-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.review-author-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  flex-shrink: 0;
  overflow: hidden;
}

.review-author-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-author-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
  text-decoration: none;
}

.review-author-name:hover {
  color: var(--accent-orange);
}

.review-sub-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.review-deal-badge {
  background: var(--bg-muted, #f1f5f9);
  color: var(--text-main);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
}

.review-deal-badge.buyer {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.review-deal-badge.seller {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.review-deal-badge.repair {
  background: rgba(194, 65, 12, 0.1);
  color: #c2410c;
}

.review-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-stars {
  display: flex;
  gap: 2px;
  font-size: 0.88rem;
  color: #f59e0b;
}

.review-actions-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-review-action {
  background: none;
  border: none;
  padding: 4px 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-review-action:hover {
  color: var(--accent-orange);
  background: var(--bg-muted);
}

.btn-review-action.danger:hover {
  color: #ef4444;
}

.review-text {
  margin-top: 12px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-main);
  word-break: break-word;
}

.review-attached-deal {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-muted);
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
}

.review-attached-deal:hover {
  color: var(--accent-orange);
}

/* Seller Reply Box */
.review-reply-box {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--bg-muted, #f8fafc);
  border-left: 3px solid var(--accent-orange);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.review-reply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.review-reply-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
}

.review-reply-badge {
  background: var(--accent-orange);
  color: #ffffff;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.review-reply-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.review-reply-text {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-main);
}

/* Reply Inline Form */
.review-inline-reply-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.review-inline-reply-form textarea {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.85rem;
  padding: 8px 10px;
}

/* Star Rating Picker in Modal */
.review-modal-target-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
}

.review-target-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
  overflow: hidden;
}

.review-target-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.review-target-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.star-rating-picker {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.star-pick-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #d1d5db;
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.15s ease, transform 0.1s ease;
}

.star-pick-btn.active,
.star-pick-btn.hover {
  color: #f59e0b;
}

.star-pick-btn:hover {
  transform: scale(1.15) !important;
}

.star-rating-caption {
  font-size: 0.84rem;
  font-weight: 600;
  color: #d97706;
  margin-top: 6px;
}

.deal-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.deal-chip {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.deal-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-main);
}

.deal-chip.active {
  background: rgba(194, 65, 12, 0.1);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.review-attached-item-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  background: var(--bg-muted);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Mobile Responsiveness for Reviews */
@media (max-width: 768px) {
  .reviews-summary-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  .reviews-score-block {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-right: 0;
    padding-bottom: 14px;
  }
  .reviews-bars-block {
    max-width: 100%;
    width: 100%;
  }
  .reviews-action-block {
    width: 100%;
  }
  .btn-leave-review {
    width: 100%;
    justify-content: center;
  }
  .review-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .review-header-right {
    width: 100%;
    justify-content: space-between;
  }
}


