/* =====================================================
   వ్యాపార నామిక — Main Stylesheet
   Responsive for Mobile, Tablet, Desktop
   ===================================================== */

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

:root {
  --primary: #1a1a2e;
  --primary-dark: #0f0f1a;
  --accent: #f5a623;
  --accent-dark: #e09510;
  --blue: #2563eb;
  --blue-light: #eff6ff;
  --green: #16a34a;
  --green-light: #f0fdf4;
  --red: #dc2626;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --radius: 10px;
  --radius-lg: 16px;
}

body { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--text); background: var(--white); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; }

/* ---- BUTTONS ---- */
.btn-primary { background: var(--accent); color: var(--primary); border: none; padding: 10px 20px; border-radius: var(--radius); font-weight: 700; font-size: 14px; transition: background 0.2s, transform 0.1s; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.3); padding: 9px 16px; border-radius: var(--radius); font-size: 14px; display: flex; align-items: center; gap: 6px; transition: background 0.2s; }
.btn-secondary:hover { background: rgba(255,255,255,0.2); }
.btn-outline { display: inline-block; padding: 12px 28px; border: 2px solid var(--primary); color: var(--primary); border-radius: var(--radius); font-weight: 600; transition: all 0.2s; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-pay { width: 100%; background: var(--accent); color: var(--primary); border: none; padding: 15px; border-radius: var(--radius); font-size: 16px; font-weight: 700; transition: background 0.2s; margin-top: 8px; }
.btn-pay:hover { background: var(--accent-dark); }
.full-width { width: 100%; }

/* ---- NAVBAR ---- */
.header { background: var(--primary); position: sticky; top: 0; z-index: 100; }
.navbar { max-width: 1200px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-size: 20px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; }
.logo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a { color: rgba(255,255,255,0.8); font-size: 14px; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
.hamburger { display: none; background: none; border: none; color: #fff; font-size: 22px; padding: 4px; }
.mobile-menu { display: none; flex-direction: column; gap: 12px; padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1); background: var(--primary-dark); }
.mobile-menu a { color: rgba(255,255,255,0.8); font-size: 15px; padding: 8px 0; }
.mobile-menu.open { display: flex; }

/* ---- HERO ---- */
.hero { background: linear-gradient(135deg, var(--primary) 0%, #16213e 50%, #0f3460 100%); padding: 60px 20px 40px; text-align: center; }
.hero-content { max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: clamp(26px, 5vw, 48px); font-weight: 800; color: #fff; margin-bottom: 12px; line-height: 1.2; }
.hero h1 .highlight { color: var(--accent); }
.hero p { color: rgba(255,255,255,0.75); font-size: 16px; margin-bottom: 28px; }

.search-box { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 640px; margin: 0 auto 40px; }
.search-box input { flex: 1; min-width: 200px; padding: 13px 16px; border-radius: var(--radius); border: none; font-size: 15px; }
.search-box select { padding: 13px 12px; border-radius: var(--radius); border: none; font-size: 14px; background: #fff; }
.btn-search { background: var(--accent); color: var(--primary); border: none; padding: 13px 24px; border-radius: var(--radius); font-weight: 700; font-size: 15px; }
.btn-search:hover { background: var(--accent-dark); }

.hero-stats { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 28px; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 12px; color: rgba(255,255,255,0.6); }

/* ---- SECTIONS ---- */
.section { padding: 60px 20px; }
.bg-light { background: var(--bg); }
.container { max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 24px; font-weight: 700; margin-bottom: 28px; color: var(--text); display: flex; align-items: center; gap: 12px; }
.section-title::after { content: ''; flex: 1; height: 2px; background: var(--border); }
.center-btn { text-align: center; margin-top: 32px; }

/* ---- CATEGORY GRID ---- */
.cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.cat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 10px; text-align: center; cursor: pointer; transition: all 0.2s; }
.cat-card:hover { border-color: var(--blue); background: var(--blue-light); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-icon { font-size: 32px; margin-bottom: 8px; }
.cat-name { font-size: 12px; font-weight: 600; color: var(--text); }
.cat-name-te { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---- FILTER TABS ---- */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.tab { padding: 8px 18px; border-radius: 20px; border: 1px solid var(--border); font-size: 13px; font-weight: 500; background: var(--white); color: var(--text-muted); white-space: nowrap; transition: all 0.2s; }
.tab:hover, .tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- LISTINGS GRID ---- */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.listing-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; transition: all 0.2s; }
.listing-card:hover { border-color: #93c5fd; box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.listing-thumb { height: 150px; display: flex; align-items: center; justify-content: center; font-size: 48px; position: relative; }
.listing-badge { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: 5px; font-size: 10px; font-weight: 700; }
.badge-featured { background: var(--accent); color: var(--primary); }
.badge-verified { background: var(--green); color: #fff; }
.listing-body { padding: 16px; }
.listing-cat { font-size: 11px; color: var(--blue); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.listing-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.listing-loc { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.listing-desc { font-size: 13px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.listing-phone { font-size: 14px; font-weight: 700; color: var(--blue); }
.listing-views { font-size: 12px; color: var(--text-muted); }
.loading-spinner { text-align: center; padding: 40px; color: var(--text-muted); font-size: 16px; grid-column: 1/-1; }

/* ---- HOW IT WORKS ---- */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px 24px; text-align: center; position: relative; }
.step-num { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; width: 28px; height: 28px; border-radius: 50%; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step-icon { font-size: 40px; margin-bottom: 12px; }
.step-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ---- MODAL ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 500; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--white); border-radius: var(--radius-lg); max-width: 560px; width: 100%; max-height: 92vh; overflow-y: auto; padding: 28px; }
.modal-sm { max-width: 420px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-size: 20px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--text-muted); line-height: 1; padding: 4px; }

/* ---- PRICE BANNER ---- */
.price-banner { background: var(--blue-light); border: 1px solid #bfdbfe; border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.price-amount { font-size: 32px; font-weight: 800; color: var(--blue); }
.price-amount span { font-size: 15px; font-weight: 400; color: var(--text-muted); }
.price-tag { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.price-features { list-style: none; font-size: 13px; color: var(--text-muted); }
.price-features li { padding: 3px 0; display: flex; align-items: center; gap: 6px; }
.price-features li::before { content: '✓'; color: var(--green); font-weight: 700; }

/* ---- FORM ---- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 11px 13px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--text); background: var(--white); transition: border-color 0.2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-error { background: #fef2f2; border: 1px solid #fca5a5; color: var(--red); padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 10px; }

.pay-methods { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.pay-methods span { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 5px 12px; font-size: 12px; color: var(--text-muted); }

/* ---- SUCCESS ---- */
.success-body { text-align: center; padding: 10px 0; }
.success-icon { font-size: 64px; margin-bottom: 16px; }
.success-body h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.success-body p { color: var(--text-muted); line-height: 1.7; margin-bottom: 20px; }

/* ---- FOOTER ---- */
.footer { background: var(--primary); color: rgba(255,255,255,0.7); padding: 48px 20px 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-logo { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-grid p { font-size: 14px; line-height: 1.6; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul li a { font-size: 14px; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer ul li a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 13px; }

/* ---- ADMIN STYLES ---- */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--primary); color: #fff; padding: 24px 16px; }
.admin-sidebar .logo { font-size: 17px; margin-bottom: 32px; }
.admin-nav { list-style: none; }
.admin-nav li a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: rgba(255,255,255,0.7); font-size: 14px; margin-bottom: 4px; transition: all 0.2s; }
.admin-nav li a:hover, .admin-nav li a.active { background: rgba(255,255,255,0.12); color: #fff; }
.admin-main { padding: 32px; background: var(--bg); }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.admin-header h1 { font-size: 22px; font-weight: 700; }
.stats-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card-num { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-card-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.admin-table-wrap { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { background: var(--bg); padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved { background: var(--green-light); color: var(--green); }
.badge-rejected { background: #fef2f2; color: var(--red); }
.action-btns { display: flex; gap: 6px; }
.btn-approve { background: var(--green); color: #fff; border: none; padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.btn-reject { background: var(--red); color: #fff; border: none; padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.btn-delete { background: #fee2e2; color: var(--red); border: none; padding: 5px 10px; border-radius: 6px; font-size: 12px; }
.search-filter-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search-filter-bar input, .search-filter-bar select { padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; }

/* ---- USER AVATAR ---- */
.user-avatar { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 14px; }
.avatar-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.btn-logout { background: rgba(255,255,255,0.15); color: #fff; border: none; padding: 6px 12px; border-radius: 6px; font-size: 13px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero { padding: 40px 16px 30px; }
  .section { padding: 40px 16px; }
  .hero-stats { gap: 20px; }
  .cats-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .listings-grid { grid-template-columns: 1fr; }
  .modal { padding: 20px 16px; }
}
