/* ===========================
   rentworld.ge — Global Styles
   =========================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #f59e0b;
  --secondary-dark: #d97706;
  --dark: #111827;
  --gray-800: #1f2937;
  --gray-600: #4b5563;
  --gray-400: #9ca3af;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --danger: #ef4444;
  --success: #10b981;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--dark); background: var(--gray-100); line-height: 1.6; font-size: 15px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Nav */
.nav { background: var(--white); border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.nav-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--primary); flex-shrink: 0; }
.nav-logo span { color: var(--secondary); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 500; font-size: 14px; color: var(--gray-600); transition: all .15s; }
.nav-link:hover { background: var(--gray-100); color: var(--dark); }
.nav-link.active { color: var(--primary); background: var(--primary-light); }
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; border: none; transition: all .15s; white-space: nowrap; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--secondary); color: var(--white); }
.btn-secondary:hover { background: var(--secondary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--gray-600); border: 1px solid var(--gray-200); }
.btn-ghost:hover { background: var(--gray-100); color: var(--dark); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* Cards */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.listing-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: all .2s; display: flex; flex-direction: column; }
.listing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.listing-img { aspect-ratio: 4/3; overflow: hidden; background: var(--gray-200); position: relative; background-size: cover; background-position: center; }
.listing-cat-badge { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.55); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.listing-info { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.listing-title { font-weight: 700; font-size: 15px; color: var(--dark); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing-city { color: var(--gray-400); font-size: 13px; }
.listing-price { font-weight: 800; font-size: 18px; color: var(--primary); margin-top: auto; padding-top: 8px; }
.listing-period { font-size: 13px; font-weight: 500; color: var(--gray-400); }

/* Badge */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; gap: 4px; }
.badge-primary { background: var(--primary); color: var(--white); }
.badge-secondary { background: var(--secondary); color: var(--white); }
.badge-gray { background: var(--gray-200); color: var(--gray-600); }

/* Category Card */
.category-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 16px; text-align: center; cursor: pointer; transition: all .2s; border: 2px solid transparent; display: block; }
.category-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.category-card.active { border-color: var(--primary); background: var(--primary-light); }
.category-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; font-size: 28px; background: var(--gray-100); }
.category-name { font-weight: 700; font-size: 14px; color: var(--dark); }

/* Form */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-weight: 600; font-size: 14px; color: var(--gray-800); }
.form-input, .form-select, .form-textarea { padding: 10px 14px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 15px; color: var(--dark); background: var(--white); transition: border-color .15s, box-shadow .15s; outline: none; width: 100%; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--gray-400); }

/* Grid */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; }

/* Section */
.section { padding: 48px 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.section-title { font-size: 22px; font-weight: 800; color: var(--dark); }
.section-title span { color: var(--primary); }

/* Hero */
.hero { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%); color: white; padding: 72px 0; }
.hero h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 900; line-height: 1.15; margin-bottom: 16px; }
.hero p { font-size: 18px; opacity: .85; margin-bottom: 36px; }
.hero-search { display: flex; gap: 10px; max-width: 680px; background: white; border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow-lg); }
.hero-search input { flex: 1; border: none; outline: none; font-size: 15px; padding: 6px 12px; color: var(--dark); }
.hero-search select { border: none; outline: none; font-size: 14px; color: var(--gray-600); padding: 6px 8px; background: var(--gray-100); border-radius: var(--radius-sm); }

/* Avatar */
.avatar-circle { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: white; font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.nav-avatar { display: flex; align-items: center; }

/* Empty state */
.empty-state { text-align: center; padding: 80px 20px; color: var(--gray-400); }
.empty-state .icon { font-size: 56px; margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--gray-600); margin-bottom: 8px; }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; padding: 14px 20px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; min-width: 260px; max-width: 360px; z-index: 9999; transform: translateX(120%); transition: transform .3s; }
.toast.show { transform: translateX(0); }
.toast-info { background: var(--dark); color: white; }
.toast-success { background: #065f46; color: white; }
.toast-error { background: #991b1b; color: white; }

/* Spinner */
.spinner { width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,.3); border-top-color: white; border-radius: 50%; animation: spin .6s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Photo upload */
.photo-upload-area { border: 2px dashed var(--gray-200); border-radius: var(--radius); padding: 32px; text-align: center; cursor: pointer; transition: all .2s; background: var(--gray-100); }
.photo-upload-area:hover, .photo-upload-area.drag-over { border-color: var(--primary); background: var(--primary-light); }
.photo-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 12px; }
.photo-preview { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; position: relative; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview .remove-btn { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6); color: white; border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 12px; display: flex; align-items: center; justify-content: center; }

/* Tabs (login) */
.tab-bar { display: flex; border-bottom: 2px solid var(--gray-200); margin-bottom: 24px; }
.tab-btn { padding: 10px 24px; font-weight: 600; font-size: 15px; border: none; background: none; color: var(--gray-400); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .listings-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .categories-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .section { padding: 32px 0; }
  .hero { padding: 48px 0; }
  .hero-search { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .listings-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
}
