/* ==========================================================================
   VINTED SNIPER OS — STYLESHEET
   Paletă Vinted: Teal Primar #09B1BA, Deep Teal #007782, Light Teal #E6F7F8
   Background: #F7F9FA / Dark Accent #182226 / White #FFFFFF
   ========================================================================== */

:root {
  --vinted-teal: #09B1BA;
  --vinted-teal-hover: #089CA4;
  --vinted-teal-dark: #007782;
  --vinted-teal-light: #EBF8F9;
  --vinted-teal-border: #B2E5E8;
  
  --bg-main: #F4F6F8;
  --bg-card: #FFFFFF;
  --bg-input: #FAFBFC;
  
  --text-dark: #172B30;
  --text-muted: #627D87;
  --text-light: #8FA4AC;
  
  --accent-gold: #FFB300;
  --accent-green: #00A676;
  --accent-red: #E63946;
  --border-subtle: #E2E8F0;
  --border-focus: #09B1BA;
  
  --shadow-sm: 0 1px 3px rgba(18, 43, 50, 0.05);
  --shadow-md: 0 4px 12px rgba(18, 43, 50, 0.08);
  --shadow-lg: 0 10px 25px rgba(18, 43, 50, 0.12);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.app-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vinted-logo-badge {
  width: 44px;
  height: 44px;
  background: var(--vinted-teal);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(9, 177, 186, 0.35);
}

.vinted-logo-badge svg {
  width: 26px;
  height: 26px;
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-dark);
}

.badge-tag {
  background: var(--vinted-teal-light);
  color: var(--vinted-teal-dark);
  border: 1px solid var(--vinted-teal-border);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.brand-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.btn-hub-return {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-hub-return:hover {
  background: #EAEFF2;
  border-color: #CBD5E1;
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--vinted-teal);
  color: #FFFFFF;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(9, 177, 186, 0.3);
  transition: all 0.2s ease;
}

.btn-primary-action:hover {
  background: var(--vinted-teal-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   Main Layout & Content
   ========================================================================== */
.main-layout {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Sizing Profile Banner */
.sizing-profile-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.profile-title-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  font-size: 1.5rem;
}

.profile-title-block h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.profile-title-block p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-text-action {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.btn-text-action:hover {
  color: var(--vinted-teal-dark);
}

.sizes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.size-input-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.size-input-item label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dark);
}

.size-input-item input {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--vinted-teal-dark);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.size-input-item input:focus {
  outline: none;
  border-color: var(--vinted-teal);
  box-shadow: 0 0 0 3px rgba(9, 177, 186, 0.15);
  background: #FFFFFF;
}

.hint {
  font-size: 0.72rem;
  color: var(--text-light);
}

/* Controls & Toolbar */
.controls-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.pill-btn {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  color: var(--text-dark);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

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

.pill-btn.active {
  background: var(--vinted-teal-dark);
  color: #FFFFFF;
  border-color: var(--vinted-teal-dark);
}

.btn-secondary-action {
  background: #FFFFFF;
  border: 1px solid var(--vinted-teal);
  color: var(--vinted-teal-dark);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-secondary-action:hover {
  background: var(--vinted-teal-light);
}

/* Section Headings */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
  gap: 16px;
}

.section-heading h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
}

.section-heading p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hunting-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-green);
  background: #E8F8F2;
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.9; }
  50% { transform: scale(1.3); opacity: 0.4; }
  100% { transform: scale(0.95); opacity: 0.9; }
}

/* ==========================================================================
   Hunts Cards Grid
   ========================================================================== */
.hunts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.hunt-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
}

.hunt-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--vinted-teal-border);
}

.hunt-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 10px;
}

.hunt-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hunt-badge-cat {
  font-size: 1.1rem;
}

.hunt-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
}

.hunt-actions {
  display: flex;
  gap: 6px;
}

.btn-icon-sm {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

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

.hunt-details-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.hunt-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.detail-label {
  color: var(--text-muted);
}

.detail-val {
  font-weight: 600;
  color: var(--text-dark);
}

.detail-val.price {
  color: var(--vinted-teal-dark);
  font-weight: 700;
}

.detail-val.country {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hunt-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.hunt-toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  appearance: none;
  background: #CBD5E1;
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hunt-toggle-switch:checked {
  background: var(--vinted-teal);
}

.hunt-toggle-switch::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform 0.2s ease;
}

.hunt-toggle-switch:checked::before {
  transform: translateX(16px);
}

.btn-scan-single {
  background: var(--vinted-teal-light);
  color: var(--vinted-teal-dark);
  border: 1px solid var(--vinted-teal-border);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-scan-single:hover {
  background: var(--vinted-teal);
  color: #FFFFFF;
}

/* ==========================================================================
   Deals Stream Section
   ========================================================================== */
.deals-cards-stream {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.deal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.deal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--vinted-teal-border);
}

.deal-image-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  background: #EAEFF2;
  overflow: hidden;
}

.deal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.deal-card:hover .deal-img {
  transform: scale(1.03);
}

.deal-badge-condition {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(23, 43, 48, 0.85);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.deal-badge-condition.strict-new {
  background: var(--accent-green);
}

.deal-badge-country {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #FFFFFF;
  color: var(--text-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.deal-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 12px;
}

.deal-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deal-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.deal-price-block {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.deal-price {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--vinted-teal-dark);
}

.deal-currency {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--vinted-teal);
}

.deal-size-badge {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.deal-seller-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.seller-rating {
  color: var(--accent-gold);
  font-weight: 700;
}

.btn-deal-buy {
  background: var(--vinted-teal);
  color: #FFFFFF;
  text-decoration: none;
  text-align: center;
  padding: 9px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  display: block;
  transition: all 0.2s ease;
}

.btn-deal-buy:hover {
  background: var(--vinted-teal-hover);
}

/* ==========================================================================
   Modal Dialog
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(18, 43, 50, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-window {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 80vh;
  overflow-y: auto;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group select {
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  background: var(--bg-input);
  font-family: var(--font-main);
  color: var(--text-dark);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--vinted-teal);
  box-shadow: 0 0 0 3px rgba(9, 177, 186, 0.15);
  background: #FFFFFF;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.btn-cancel {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-save-modal {
  background: var(--vinted-teal);
  color: #FFFFFF;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-save-modal:hover {
  background: var(--vinted-teal-hover);
}

/* Toast */
.toast-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-dark);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .sizes-grid {
    grid-template-columns: 1fr 1fr;
  }
}
