/* بازارچه ماشین لباسشویی و ظرفشویی ۹۶۳ کالا - استایل محلی */
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  direction: rtl;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #faf8f5 0%, #f0ebe3 100%);
  color: #2c1810;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}

/* نوار بالا */
.navbar {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0.5rem 0;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #8b4513;
}

.navbar-logo {
  height: 36px;
  width: auto;
  display: block;
}

@media (min-width: 480px) {
  .navbar-logo { height: 42px; }
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-links a {
  color: #5c4033;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.navbar-links a:hover {
  background: rgba(139, 69, 19, 0.08);
  color: #8b4513;
}

.nav-link-with-badge {
  position: relative;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  margin-right: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #dc3545;
  border-radius: 10px;
  vertical-align: middle;
  animation: navBadgePulse 1.5s ease-in-out infinite;
}

@keyframes navBadgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

/* دکمه‌ها */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(145deg, #a0522d, #8b4513);
  color: #fff;
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
}

.btn-success {
  background: linear-gradient(145deg, #2d7a52, #1e5c3a);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(145deg, #c45c4a, #a63d2e);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: #8b4513;
  border: 2px solid #8b4513;
}

.btn-outline:hover {
  background: rgba(139, 69, 19, 0.08);
}

.btn-back-carpets {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.btn-back-carpets .btn-back-icon {
  font-size: 1.1em;
  opacity: 0.9;
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

/* کارت محصول (ماشین لباسشویی و ظرفشویی) */
.carpet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
}

@media (min-width: 480px) {
  .carpet-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.carpet-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.carpet-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.carpet-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #f0ebe3;
}

.carpet-card-body {
  padding: 1.25rem;
}

.carpet-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #2c1810;
}

.carpet-card-desc {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #5c4033;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* الرت سفارشی */
.alert-toast-container {
  position: fixed;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

@media (min-width: 640px) {
  .alert-toast-container {
    left: auto;
    width: 360px;
    top: 1rem;
    right: 1rem;
  }
}

.alert-toast {
  pointer-events: auto;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  animation: alertSlide 0.35s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: opacity 0.3s, transform 0.3s;
}

.alert-toast.success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  border: 1px solid #b1dfbb;
}

.alert-toast.warning {
  background: linear-gradient(135deg, #fff3cd, #ffeeba);
  color: #856404;
  border: 1px solid #ffecb5;
}

.alert-toast.error {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 1px solid #f1b0b7;
}

.alert-toast.info {
  background: linear-gradient(135deg, #cce5ff, #b8daff);
  color: #004085;
  border: 1px solid #9fcdff;
}

.alert-toast .icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.alert-toast.success .icon { background: #28a745; color: #fff; }
.alert-toast.warning .icon { background: #ffc107; color: #000; }
.alert-toast.error .icon { background: #dc3545; color: #fff; }
.alert-toast.info .icon { background: #17a2b8; color: #fff; }

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

/* صفحه لاگین */
.auth-card {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.auth-card h1 {
  margin: 0 0 1.5rem;
  font-size: 1.35rem;
  color: #2c1810;
  text-align: center;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: #5c4033;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  border: 2px solid #e8e0d5;
  border-radius: 10px;
  direction: rtl;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #8b4513;
}

/* پنل و جداول */
.panel-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.panel-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0ebe3;
  font-weight: 700;
  font-size: 1.05rem;
  color: #2c1810;
}

.panel-card-body {
  padding: 1.25rem;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  padding: 0.75rem 1rem;
  text-align: right;
  border-bottom: 1px solid #f0ebe3;
}

.table th {
  font-weight: 600;
  color: #5c4033;
  background: #faf8f5;
}

.table tr:hover td {
  background: #faf8f5;
}

/* مودال تأیید */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-box h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: #2c1810;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  justify-content: flex-end;
}

/* فوتر */
.page-footer {
  padding: 2rem 1.5rem;
  text-align: center;
  margin-top: 2rem;
  background: linear-gradient(180deg, rgba(250, 248, 245, 0.6) 0%, rgba(240, 235, 227, 0.9) 100%);
  border-top: 1px solid rgba(139, 69, 19, 0.08);
}

.page-footer-brand {
  margin: 0 0 0.75rem;
  color: #5c4033;
  font-size: 0.9rem;
  line-height: 1.7;
  font-weight: 500;
}

.page-footer-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: #8b4513;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  background: rgba(139, 69, 19, 0.06);
  border: 1px solid rgba(139, 69, 19, 0.12);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.page-footer-phone:hover {
  background: rgba(139, 69, 19, 0.1);
  color: #6d3410;
  border-color: rgba(139, 69, 19, 0.2);
  transform: translateY(-1px);
}

.page-footer-phone-icon {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* لیست استعلام کاربر */
.inquiry-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.inquiry-item {
  padding: 1rem;
  border-bottom: 1px solid #f0ebe3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.inquiry-item:last-child {
  border-bottom: none;
}

.inquiry-item .title {
  font-weight: 600;
  color: #2c1810;
}

.inquiry-item .meta {
  font-size: 0.85rem;
  color: #8a7359;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.badge-pending { background: #fff3cd; color: #856404; }
.badge-answered { background: #d4edda; color: #155724; }
.badge-cancelled { background: #f8d7da; color: #721c24; }
.badge-purchase { background: #cce5ff; color: #004085; }

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: #8a7359;
}

.empty-state p { margin: 0; }

/* جعبه اطلاع‌رسانی (الرت ثابت صفحه) */
.alert-info-box {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #cce5ff, #b8daff);
  color: #004085;
  border: 1px solid #9fcdff;
}

.alert-info-box .icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: #17a2b8;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

/* جعبه پاسخ مدیر برای کاربر */
.admin-response-box {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f0f7f0;
  border: 1px solid #c3e6cb;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #155724;
}

.admin-response-box strong { display: block; margin-bottom: 0.25rem; }

/* صفحه‌بندی */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.pagination li a,
.pagination li span {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: #5c4033;
  background: #fff;
  border: 1px solid #e8e0d5;
  font-size: 0.9rem;
}

.pagination li a:hover {
  background: #faf8f5;
  border-color: #8b4513;
  color: #8b4513;
}

.pagination li.disabled span {
  color: #9ca3af;
  cursor: not-allowed;
}

.pagination li.active span {
  background: #8b4513;
  color: #fff;
  border-color: #8b4513;
}
