@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@300;400;500;600;700;900&family=Cairo:wght@400;600;700;900&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Cairo', 'Noto Kufi Arabic', 'Segoe UI', sans-serif;
  direction: rtl;
  background: #FAFAF7;
  color: #1a1a1a;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

/* ===== CSS VARIABLES ===== */
:root {
  --gold-dark:    #7A5810;
  --gold:         #A0720E;
  --gold-mid:     #C4960F;
  --gold-light:   #D4A827;
  --gold-bright:  #E8C547;
  --gold-pale:    #FDF3D0;
  --gold-sand:    #F5E6B8;
  --brown-dark:   #3D2008;
  --brown:        #6B3F10;
  --cream:        #FFFDF5;
  --sand:         #F5EDD8;
  --sand-mid:     #EAD9B0;
  --sand-dark:    #D4BE8A;
  --white:        #FFFFFF;
  --text-dark:    #1C1208;
  --text-med:     #4A3A1A;
  --text-light:   #8A7050;
  --text-muted:   #B8A880;
  --border:       #E8D8A8;
  --border-light: #F0E8D0;
  --red:          #C0392B;
  --red-light:    #FDECEA;
  --green:        #1A7A40;
  --green-light:  #E8F8EE;
  --shadow-sm:    0 1px 4px rgba(122,88,16,0.06);
  --shadow:       0 4px 16px rgba(122,88,16,0.10);
  --shadow-lg:    0 10px 30px rgba(122,88,16,0.14);
  --shadow-gold:  0 6px 24px rgba(212,168,39,0.25);
  --radius-sm:    10px;
  --radius:       14px;
  --radius-lg:    20px;
  --radius-xl:    28px;
  --bottom-nav-h: 0px;
  --safe-bottom:  env(safe-area-inset-bottom, 0px);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp    { from { opacity:0; transform:translateY(20px) } to { opacity:1; transform:translateY(0) } }
@keyframes fadeIn    { from { opacity:0 } to { opacity:1 } }
@keyframes spin      { to { transform: rotate(360deg) } }
@keyframes pulse     { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }
@keyframes glow      { 0%,100%{box-shadow:0 0 10px rgba(212,168,39,.3)} 50%{box-shadow:0 0 22px rgba(212,168,39,.6)} }
@keyframes shimmer   { to { background-position: -200% 0 } }
@keyframes slideDown { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideLeft { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:translateX(0)} }
@keyframes countUp   { from{transform:scale(.85);opacity:0} to{transform:scale(1);opacity:1} }
@keyframes liveRing  { 0%{box-shadow:0 0 0 0 rgba(192,57,43,.5)} 70%{box-shadow:0 0 0 8px rgba(192,57,43,0)} 100%{box-shadow:0 0 0 0 rgba(192,57,43,0)} }
@keyframes float     { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes slideUp   { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:translateY(0)} }
@keyframes bounceIn  { 0%{transform:scale(.3);opacity:0} 50%{transform:scale(1.05)} 70%{transform:scale(.95)} 100%{transform:scale(1);opacity:1} }

/* ===== LOADER ===== */
.loader-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(160deg, #3D2008 0%, #6B3F10 40%, #A0720E 80%, #C4960F 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
  transition: opacity .6s;
}
.loader-logo-wrap {
  width: 100px; height: 100px;
  border-radius: 50%;
  overflow: hidden;
  background: white;
  padding: 4px;
  box-shadow: 0 0 30px rgba(212,168,39,0.5);
  animation: pulse 2s infinite;
}
.loader-logo-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.loader-tagline { color: rgba(255,255,255,0.85); font-size: 14px; letter-spacing: .5px; font-weight: 600; text-align: center; }
.loader-bar {
  width: 180px; height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px; overflow: hidden;
}
.loader-bar-fill {
  height: 100%; background: white;
  border-radius: 10px;
  animation: loaderFill 1.8s ease-in-out infinite;
}
@keyframes loaderFill { 0%{width:0%;margin-right:100%} 50%{width:70%;margin-right:0%} 100%{width:0%;margin-right:100%} }

/* ===== NAVBAR ===== */
.navbar {
  background: white;
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 1px 0 var(--border-light), 0 4px 20px rgba(0,0,0,0.04);
  border-bottom: 2px solid var(--gold-sand);
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; padding: 0 24px;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; cursor: pointer;
  flex-shrink: 0;
}
.navbar-logo {
  height: 46px; width: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-sand);
  transition: transform .3s, box-shadow .3s;
}
.navbar-brand:hover .navbar-logo {
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(212,168,39,0.3);
}
.navbar-brand-text {
  font-size: 18px; font-weight: 900;
  color: var(--brown-dark);
  letter-spacing: -.3px;
}
.navbar-brand-text span { color: var(--gold); }

.navbar-nav {
  display: flex; align-items: center; gap: 2px;
  flex-wrap: nowrap;
}
.nav-link {
  color: var(--text-med);
  padding: 8px 14px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; background: transparent; border: none;
  font-family: inherit; transition: all .2s;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; text-decoration: none;
}
.nav-link:hover { background: var(--sand); color: var(--brown-dark); }
.nav-link.active { background: var(--gold-pale); color: var(--gold-dark); }
.btn-nav-login {
  background: var(--gold-dark) !important;
  color: white !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  padding: 8px 18px !important;
  box-shadow: 0 2px 10px rgba(160,114,14,0.2);
  transition: all .25s !important;
}
.btn-nav-login:hover { background: var(--gold) !important; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(160,114,14,0.3) !important; }
.notif-btn { position: relative; }
.notif-badge {
  display: none; position: absolute;
  top: 2px; right: 2px;
  background: var(--red); color: white;
  border-radius: 50%; width: 16px; height: 16px;
  font-size: 10px; font-weight: 700;
  align-items: center; justify-content: center;
  border: 2px solid white;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(160deg, #3D2008 0%, #6B3F10 35%, #A0720E 70%, #C4960F 100%);
  position: relative; overflow: hidden;
  padding: 60px 24px 70px;
}
.hero-pattern {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.04) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%);
}
.hero-camel-bg {
  position: absolute; left: -30px; bottom: -20px;
  font-size: 300px; opacity: 0.05;
  transform: scaleX(-1) rotate(-5deg);
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 40px;
  position: relative; z-index: 1;
}
.hero-content { max-width: 600px; }
.hero-logo-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px; padding: 6px 16px 6px 6px;
  backdrop-filter: blur(8px);
  animation: fadeUp .6s ease;
  margin-bottom: 24px;
}
.hero-logo-badge img {
  height: 36px; width: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
}
.hero-logo-badge span { color: rgba(255,255,255,0.9); font-size: 13px; font-weight: 600; }
.hero-title {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 900; color: white;
  line-height: 1.2; margin-bottom: 16px;
  animation: fadeUp .7s ease;
}
.hero-title span { color: var(--gold-bright); }
.hero-subtitle {
  font-size: clamp(14px, 1.8vw, 16px);
  color: rgba(255,255,255,0.78);
  line-height: 1.8; max-width: 520px;
  margin-bottom: 32px;
  animation: fadeUp .8s ease;
}
.hero-btns {
  display: flex; gap: 12px; flex-wrap: wrap;
  animation: fadeUp .9s ease;
}
.btn-hero-main {
  background: white;
  color: var(--brown-dark);
  padding: 13px 28px; border-radius: 12px; border: none;
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .3s;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.btn-hero-main:hover { background: var(--gold-bright); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.btn-hero-outline {
  background: rgba(255,255,255,0.1);
  color: white; border: 1.5px solid rgba(255,255,255,0.3);
  padding: 12px 24px; border-radius: 12px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .3s;
  display: inline-flex; align-items: center; gap: 8px;
  backdrop-filter: blur(6px);
}
.btn-hero-outline:hover { background: rgba(255,255,255,0.2); border-color: white; transform: translateY(-1px); }

/* Hero Stats */
.hero-visual {
  display: flex; flex-direction: column; gap: 12px;
  animation: fadeUp 1s ease;
}
.hero-stat-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  border-radius: 16px; padding: 18px 24px;
  text-align: center; min-width: 155px;
}
.hero-stat-num {
  font-size: 32px; font-weight: 900;
  color: var(--gold-bright);
  animation: countUp .7s ease;
}
.hero-stat-label { font-size: 12.5px; color: rgba(255,255,255,0.75); margin-top: 2px; }

/* ===== SECTION ===== */
.section { padding: 48px 24px; }
.container { max-width: 1200px; margin: 0 auto; }
.section-head { margin-bottom: 32px; }
.section-head-row {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.section-label {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gold-pale); color: var(--gold-dark);
  border-radius: 50px; padding: 4px 14px;
  font-size: 12px; font-weight: 700;
  margin-bottom: 8px;
  border: 1px solid var(--gold-sand);
}
.section-title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 900; color: var(--brown-dark);
}
.section-sub { color: var(--text-light); font-size: 14px; margin-top: 4px; }
.view-all {
  color: var(--gold-dark); font-weight: 700; font-size: 13px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; display: flex; align-items: center; gap: 5px;
  transition: color .2s;
  text-decoration: none;
}
.view-all:hover { color: var(--gold); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  border: none; cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 600;
  transition: all .25s; text-decoration: none;
}
.btn-primary {
  background: var(--gold-dark);
  color: white;
  box-shadow: 0 2px 10px rgba(160,114,14,0.2);
}
.btn-primary:hover { background: var(--gold); transform: translateY(-1px); box-shadow: var(--shadow-gold); }
.btn-secondary {
  background: var(--sand); color: var(--gold-dark);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--sand-mid); }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #A93226; transform: translateY(-1px); }
.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: #156034; }
.btn-ghost { background: transparent; color: var(--gold-dark); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--gold-pale); border-color: var(--gold-light); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 14.5px; }
.btn-block { width: 100%; justify-content: center; }

/* ===== CAMEL CARD ===== */
.camels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}
.camel-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden; cursor: pointer;
  transition: all .3s cubic-bezier(.2,.8,.2,1);
  border: 1px solid var(--border-light);
  animation: fadeUp .5s ease both;
}
.camel-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--gold-sand);
}
.camel-card-img {
  height: 210px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #F8F4EC 0%, #EDE4D0 100%);
  display: flex; align-items: center; justify-content: center;
}
.camel-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.camel-card:hover .camel-card-img img { transform: scale(1.06); }
.camel-emoji { font-size: 80px; opacity: .6; transition: transform .4s; }
.camel-card:hover .camel-emoji { transform: scale(1.08) rotate(-3deg); }
.card-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 4px 12px; border-radius: 50px;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; gap: 4px;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.badge-auction {
  background: rgba(192,57,43,0.92); color: white;
  animation: liveRing 2s infinite;
}
.badge-available { background: rgba(26,122,64,0.92); color: white; }
.badge-sold      { background: rgba(100,100,100,0.85); color: white; }
.card-views {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,0.45); color: rgba(255,255,255,.9);
  padding: 3px 9px; border-radius: 20px; font-size: 11px;
  display: flex; align-items: center; gap: 4px;
}
/* Image count badge */
.card-img-count {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.5); color: white;
  padding: 3px 8px; border-radius: 20px; font-size: 11px;
  display: flex; align-items: center; gap: 4px;
  backdrop-filter: blur(4px);
}
.camel-card-body { padding: 16px; }
.camel-card-title {
  font-size: 15px; font-weight: 800;
  color: var(--text-dark); margin-bottom: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.camel-tags {
  display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px;
}
.camel-tag {
  background: #F7F3EB; color: var(--text-med);
  padding: 3px 9px; border-radius: 6px; font-size: 11px;
  border: 1px solid var(--border-light);
}
.countdown-chip {
  display: flex; align-items: center; gap: 5px;
  color: var(--red); font-size: 12px; font-weight: 700;
  margin-bottom: 10px;
}
.countdown-chip i { animation: pulse 1s infinite; }
.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border-light);
}
.card-price { font-size: 18px; font-weight: 900; color: var(--gold-dark); }
.card-price small { font-size: 11px; font-weight: 400; color: var(--text-muted); display: block; margin-top: 1px; }

/* ===== FILTER BAR ===== */
.filters-wrap {
  background: white; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 18px 20px;
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
}
.filters-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 140px; }
.filter-label { font-size: 11px; font-weight: 700; color: var(--text-light); letter-spacing: .3px; }
.filter-input, .filter-select {
  padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: 10px; font-family: inherit;
  font-size: 14px; color: var(--text-dark);
  background: white; outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.filter-input:focus, .filter-select:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(212,168,39,0.1);
}
.filter-search-wrap { position: relative; flex: 2; min-width: 200px; }
.filter-search-wrap i {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.filter-search-wrap .filter-input { padding-right: 34px; width: 100%; }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(61,32,8,0.5);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal {
  background: white; border-radius: var(--radius-xl);
  max-width: 520px; width: 100%;
  max-height: 92vh; overflow-y: auto;
  animation: fadeUp .3s ease;
  box-shadow: 0 25px 60px rgba(61,32,8,0.2);
}
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; background: white; z-index: 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-logo {
  height: 40px; width: 40px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold-sand);
}
.modal-title { font-size: 17px; font-weight: 800; color: var(--brown-dark); }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--sand); border: none; cursor: pointer;
  font-size: 14px; color: var(--text-light); transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--sand-mid); color: var(--text-dark); }
.modal-body { padding: 22px 24px; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--text-med); margin-bottom: 6px;
}
.form-label span { color: var(--red); }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit; font-size: 16px; color: var(--text-dark);
  background: white; outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(212,168,39,0.08);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Alert / Errors */
.alert { padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; display: flex; align-items: flex-start; gap: 8px; }
.alert-error   { background: var(--red-light); color: var(--red); border: 1px solid #F5C6C0; }
.alert-success { background: var(--green-light); color: var(--green); border: 1px solid #A8E0BE; }
.alert-info    { background: var(--gold-pale); color: var(--gold-dark); border: 1px solid var(--gold-sand); }

/* ===== TABS ===== */
.tabs-row {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 20px; overflow-x: auto;
}
.tab-btn {
  padding: 11px 18px; border: none; background: transparent;
  color: var(--text-light); font-family: inherit;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: all .2s; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.tab-btn:hover { color: var(--gold-dark); }
.tab-btn.active { color: var(--gold-dark); border-bottom-color: var(--gold-dark); }

/* ===== TOAST ===== */
.toast-wrap {
  position: fixed; top: 76px; left: 20px;
  z-index: 9990; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: white; border-radius: 12px;
  padding: 12px 16px; min-width: 260px; max-width: 360px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideLeft .3s ease;
  border-right: 3px solid var(--gold-light);
}
.toast-success { border-right-color: var(--green); }
.toast-error   { border-right-color: var(--red); }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-msg { font-size: 13px; color: var(--text-dark); line-height: 1.4; }

/* ===== CAMEL DETAIL ===== */
.camel-detail-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 28px; align-items: start;
}
.detail-sidebar { position: sticky; top: 80px; }

.detail-img {
  height: 340px; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(135deg, #F8F4EC 0%, #EDE4D0 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.detail-no-img-icon { font-size: 130px; opacity: .5; }
.detail-img img { width:100%; height:100%; object-fit:cover; }

/* Detail Gallery */
.detail-gallery { margin-bottom: 16px; }
.detail-main-img {
  height: 400px; border-radius: var(--radius-lg); overflow: hidden;
  position: relative; cursor: pointer;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #F8F4EC 0%, #EDE4D0 100%);
}
.detail-main-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.detail-main-img:hover img { transform: scale(1.03); }
.img-zoom-hint {
  position: absolute; bottom: 12px; left: 12px;
  background: rgba(0,0,0,0.5); color: white;
  padding: 6px 12px; border-radius: 8px;
  font-size: 12px; opacity: 0;
  transition: opacity .3s;
  backdrop-filter: blur(4px);
}
.detail-main-img:hover .img-zoom-hint { opacity: 1; }

.detail-thumbs {
  display: flex; gap: 8px; margin-top: 10px;
  overflow-x: auto; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.detail-thumb {
  width: 72px; height: 56px; flex-shrink: 0;
  border-radius: 10px; overflow: hidden;
  cursor: pointer;
  border: 2.5px solid transparent;
  opacity: .65;
  transition: all .25s;
  scroll-snap-align: start;
}
.detail-thumb:hover { opacity: .9; }
.detail-thumb.active {
  border-color: var(--gold-light);
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(212,168,39,0.2);
}
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 16px; }
.info-tile {
  background: white; border-radius: 12px;
  padding: 14px; border: 1px solid var(--border-light);
  transition: all .2s;
}
.info-tile:hover { border-color: var(--gold-sand); }
.info-tile-label { font-size: 10.5px; color: var(--text-muted); font-weight: 600; letter-spacing: .3px; }
.info-tile-val { font-size: 14px; font-weight: 800; color: var(--gold-dark); margin-top: 3px; }

/* Bid Box */
.bid-box {
  background: white;
  border: 2px solid var(--gold-sand); border-radius: var(--radius-lg);
  padding: 22px;
}
.bid-current-label { font-size: 12px; color: var(--text-muted); font-weight: 700; letter-spacing: .3px; }
.bid-current-val { font-size: 36px; font-weight: 900; color: var(--gold-dark); line-height: 1.1; }
.bid-input-row { display: flex; gap: 10px; margin-top: 14px; }
.bid-input-row input { flex: 1; }
.bids-list { max-height: 200px; overflow-y: auto; border-radius: 10px; border: 1px solid var(--border-light); }
.bid-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-bottom: 1px solid var(--border-light);
  font-size: 12.5px; transition: background .15s;
}
.bid-row:last-child { border-bottom: none; }
.bid-row:hover { background: var(--gold-pale); }
.bid-row.leader { background: #FFF9E6; }
.bid-name { font-weight: 700; color: var(--text-dark); }
.bid-amt { font-weight: 800; color: var(--gold-dark); }
.bid-time { color: var(--text-muted); font-size: 11px; }

/* Timer */
.auction-timer {
  display: flex; align-items: center; gap: 6px;
  color: var(--red); font-weight: 700; font-size: 13px;
  margin: 10px 0;
}
.timer-seg {
  background: var(--red); color: white;
  padding: 3px 8px; border-radius: 6px;
  font-size: 13px; font-weight: 800; min-width: 30px; text-align: center;
}

/* ===== PROFILE ===== */
.profile-card { background: white; border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); }
.avatar-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 900; color: white;
  box-shadow: 0 4px 12px rgba(160,114,14,0.25); flex-shrink: 0;
}
.profile-actions-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-top: 20px;
}
.profile-action-card {
  background: white; border-radius: 16px;
  padding: 20px; text-align: center;
  box-shadow: var(--shadow-sm); cursor: pointer;
  border: 1px solid var(--border-light);
  transition: all .3s;
}
.profile-action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* ===== FEATURES ===== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.feature-card {
  background: white; border-radius: var(--radius-lg);
  padding: 24px 20px; text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all .3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold-sand); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--gold-pale); border: 1px solid var(--gold-sand);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin: 0 auto 14px;
}
.feature-title { font-size: 15px; font-weight: 800; color: var(--brown-dark); margin-bottom: 6px; }
.feature-desc { font-size: 13px; color: var(--text-light); line-height: 1.65; }

/* ===== FOOTER ===== */
.footer {
  background: var(--brown-dark);
  color: rgba(255,255,255,.8); padding: 48px 24px 24px;
  margin-top: 0;
}
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 36px;
  margin-bottom: 36px;
}
.footer-brand-logo {
  height: 50px; width: 50px;
  border-radius: 50%; object-fit: cover;
  margin-bottom: 12px;
  border: 2px solid rgba(255,255,255,0.15);
}
.footer-brand-desc { font-size: 13px; line-height: 1.75; opacity: .75; }
.footer-col-title { font-size: 14px; font-weight: 700; color: white; margin-bottom: 14px; }
.footer-link {
  display: flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.65); font-size: 13px;
  text-decoration: none; margin-bottom: 8px; cursor: pointer;
  transition: color .2s;
}
.footer-link:hover { color: var(--gold-bright); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom-logo {
  height: 28px; width: 28px;
  border-radius: 50%; object-fit: cover;
  opacity: .5;
}
.footer-bottom-text { font-size: 12px; opacity: .55; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center; padding: 60px 24px;
}
.empty-icon { font-size: 64px; margin-bottom: 14px; opacity: .5; }
.empty-title { font-size: 18px; font-weight: 800; color: var(--text-med); margin-bottom: 6px; }
.empty-sub { font-size: 13.5px; color: var(--text-muted); margin-bottom: 20px; }

/* ===== SKELETON ===== */
.skel {
  background: linear-gradient(90deg, #F5EDD8 25%, #EDE4D0 50%, #F5EDD8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 18px; flex-wrap: wrap; }
.breadcrumb-sep { opacity: .4; }
.breadcrumb a { color: var(--gold-dark); cursor: pointer; font-weight: 600; }

/* ===== AUTH TABS ===== */
.auth-tabs { display: flex; background: #F5F3EE; border-radius: 10px; padding: 3px; margin-bottom: 20px; }
.auth-tab {
  flex: 1; padding: 10px; border: none; background: transparent;
  border-radius: 8px; font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; color: var(--text-light); transition: all .2s;
}
.auth-tab.active { background: white; color: var(--gold-dark); box-shadow: 0 2px 6px rgba(0,0,0,0.06); }

/* ===== LIVE DOT ===== */
.live-dot {
  display: inline-block; width: 7px; height: 7px;
  background: var(--red); border-radius: 50%;
  animation: liveRing 1.5s infinite;
  margin-left: 4px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sand-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-mid); }

/* ===== HAMBURGER ===== */
.navbar-hamburger {
  display: none;
  background: var(--sand);
  border: none; border-radius: 8px;
  color: var(--brown-dark); font-size: 16px;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s;
  flex-shrink: 0;
}
.navbar-hamburger:hover { background: var(--sand-mid); }

/* ===== SECTION DARK ===== */
.section-dark {
  background: linear-gradient(160deg, var(--brown-dark) 0%, #5C3A15 50%, var(--gold-dark) 100%);
}
.section-dark .section-title { color: white; }
.section-dark .section-sub { color: rgba(255,255,255,.7); }
.section-dark .section-label { background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.15);color:rgba(255,255,255,.85); }
.section-dark .feature-card {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
}
.section-dark .feature-icon { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.12); }
.section-dark .feature-title { color: white; }
.section-dark .feature-desc { color: rgba(255,255,255,.65); }

/* ===== ADD CAMEL SECTION ===== */
.form-card {
  background: white; border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.type-toggle {
  display: flex; gap: 10px; margin-bottom: 18px;
}
.type-btn {
  flex: 1; padding: 14px; border: 2px solid var(--border);
  border-radius: var(--radius); background: white;
  cursor: pointer; font-family: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--text-light); transition: all .25s; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.type-btn i { font-size: 20px; }
.type-btn:hover { border-color: var(--gold-light); background: var(--gold-pale); color: var(--gold-dark); }
.type-btn.selected {
  border-color: var(--gold-light); background: var(--gold-pale);
  color: var(--gold-dark); box-shadow: 0 0 0 3px rgba(212,168,39,.1);
}
.auction-settings {
  background: #FFFDF5; border: 1.5px solid var(--gold-sand);
  border-radius: var(--radius); padding: 18px; margin-top: 4px;
}

/* ===== IMAGE UPLOAD PREVIEWS ===== */
.img-previews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.img-preview-item {
  position: relative;
  width: 100%; aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 2.5px solid var(--border-light);
  transition: all .25s;
}
.img-preview-item.primary {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(212,168,39,0.15);
}
.img-preview-item img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.img-primary-badge {
  position: absolute; top: 6px; right: 6px;
  background: var(--gold-dark); color: white;
  padding: 3px 10px; border-radius: 50px;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; gap: 3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.img-preview-actions {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; gap: 4px; justify-content: center;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  padding: 18px 6px 8px;
  opacity: 0; transition: opacity .25s;
}
.img-preview-item:hover .img-preview-actions { opacity: 1; }
.img-preview-actions button {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: all .2s;
  background: rgba(255,255,255,.9);
  color: var(--text-dark);
}
.img-preview-actions button:hover {
  background: white;
  transform: scale(1.1);
}
.img-add-btn {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  aspect-ratio: 1;
  border: 2px dashed var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px; color: var(--text-muted);
  transition: all .25s;
  background: var(--sand);
}
.img-add-btn:hover {
  border-color: var(--gold-light);
  background: var(--gold-pale);
  color: var(--gold-dark);
}
.img-add-btn i { font-size: 24px; }

/* Drag & Drop zone */
.img-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all .3s;
  cursor: pointer;
  background: var(--cream);
}
.img-drop-zone.drag-over {
  border-color: var(--gold-light);
  background: var(--gold-pale);
  transform: scale(1.01);
}
.img-drop-zone-icon { font-size: 40px; margin-bottom: 8px; opacity: .5; }
.img-drop-zone-text { font-size: 14px; color: var(--text-light); font-weight: 600; }
.img-drop-zone-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, #F5EDD8 0%, #FDF3D0 50%, #F5EDD8 100%);
  text-align: center;
  padding: 48px 24px;
}
.cta-logo {
  height: 64px; width: 64px;
  border-radius: 50%; object-fit: cover;
  margin: 0 auto 16px;
  display: block;
  border: 3px solid var(--gold-sand);
  box-shadow: 0 4px 16px rgba(160,114,14,0.15);
}
.cta-title {
  font-size: clamp(18px,4vw,24px); font-weight: 900;
  color: var(--brown-dark); margin-bottom: 10px;
}
.cta-desc {
  color: var(--text-light); font-size: 14px;
  margin-bottom: 24px; line-height: 1.75;
}

/* ===== ENHANCED AUTH MODAL ===== */
.auth-modal-content { overflow: hidden; }
.auth-modal-hero {
  background: linear-gradient(160deg, #3D2008 0%, #6B3F10 40%, #A0720E 80%);
  padding: 28px 24px 22px;
  text-align: center;
  position: relative;
}
.auth-modal-logo {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,.25);
  margin-bottom: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.auth-modal-title { font-size: 20px; font-weight: 900; color: white; margin-bottom: 4px; }
.auth-modal-subtitle { font-size: 13px; color: rgba(255,255,255,.7); }
.auth-modal-hero .modal-close {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,255,255,.15); color: white;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.auth-modal-hero .modal-close:hover { background: rgba(255,255,255,.3); }

.auth-demo-info {
  background: var(--gold-pale); border: 1px solid var(--gold-sand);
  border-radius: 10px; padding: 10px 14px;
  font-size: 12px; color: var(--gold-dark);
  margin-top: 14px; display: flex; align-items: center; gap: 8px;
  line-height: 1.5;
}

/* Password toggle */
.password-input-wrap { position: relative; }
.password-toggle {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 14px; padding: 4px;
  transition: color .2s;
}
.password-toggle:hover { color: var(--gold-dark); }

/* ===== NOTIFICATION ITEM (Enhanced) ===== */
.notif-item {
  background: white; border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm); margin-bottom: 10px;
  display: flex; gap: 12px; align-items: flex-start;
  border: 1px solid var(--border-light);
  border-right: 4px solid var(--border);
  transition: all .3s;
  animation: fadeUp .3s ease both;
}
.notif-item.unread {
  border-right-color: var(--gold-light);
  background: #FFFDF5;
}
.notif-icon { font-size: 28px; flex-shrink: 0; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 700; font-size: 14px; color: var(--text-dark); margin-bottom: 3px; }
.notif-message { font-size: 13px; color: var(--text-med); line-height: 1.6; }
.notif-time { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.notif-dismiss {
  flex-shrink: 0; background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 12px; padding: 6px;
  border-radius: 50%; transition: all .2s;
}
.notif-dismiss:hover { background: var(--red-light); color: var(--red); }

/* ===== ENHANCED PROFILE ===== */
.profile-header-card {
  background: white; border-radius: var(--radius-xl);
  overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
}
.profile-cover {
  height: 120px;
  background: linear-gradient(160deg, #3D2008 0%, #6B3F10 35%, #A0720E 70%, #C4960F 100%);
  position: relative;
}
.profile-header-body {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 0 24px 24px;
  margin-top: -40px;
  flex-wrap: wrap;
}
.profile-avatar-wrap {
  position: relative; cursor: pointer;
  flex-shrink: 0;
}
.profile-avatar-img {
  width: 88px; height: 88px; border-radius: 50%;
  object-fit: cover; border: 4px solid white;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.profile-avatar-placeholder {
  width: 88px; height: 88px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 900; color: white;
  border: 4px solid white;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.profile-avatar-overlay {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px;
  opacity: 0; transition: opacity .25s;
}
.profile-avatar-wrap:hover .profile-avatar-overlay { opacity: 1; }
.profile-header-info { padding-top: 46px; flex: 1; min-width: 180px; }
.profile-header-name { font-size: 22px; font-weight: 900; color: var(--brown-dark); margin-bottom: 4px; }
.profile-header-meta {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px;
  font-size: 13px; color: var(--text-light);
}
.profile-header-meta i { color: var(--gold); }
.profile-header-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-badge {
  background: var(--gold-pale); color: var(--gold-dark);
  padding: 4px 12px; border-radius: 50px;
  font-size: 11.5px; font-weight: 700;
  border: 1px solid var(--gold-sand);
  display: inline-flex; align-items: center; gap: 4px;
}
.profile-badge-secondary { background: var(--sand); color: var(--text-light); border-color: var(--border); }

.profile-actions-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-bottom: 20px;
}
.profile-action-card {
  background: white; border-radius: 16px;
  padding: 20px 12px; text-align: center;
  box-shadow: var(--shadow-sm); cursor: pointer;
  border: 1px solid var(--border-light);
  transition: all .3s;
}
.profile-action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--gold-sand);
}
.profile-action-card:active { transform: scale(.97); }
.profile-action-icon { font-size: 30px; margin-bottom: 6px; }
.profile-action-label { font-size: 12.5px; font-weight: 700; color: var(--brown-dark); }

.profile-edit-card {
  background: white; border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.profile-edit-title {
  font-size: 15px; font-weight: 800; color: var(--brown-dark);
  margin-bottom: 18px; display: flex; align-items: center; gap: 8px;
}

/* Settings list */
.settings-list { display: flex; flex-direction: column; gap: 2px; }
.settings-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 12px; border-radius: 12px;
  cursor: pointer; transition: background .2s;
}
.settings-item:hover { background: var(--sand); }
.settings-item-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--gold-pale); color: var(--gold-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.settings-item-body { flex: 1; }
.settings-item-title { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.settings-item-desc { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.settings-item-arrow { color: var(--text-muted); font-size: 12px; }

/* Toggle switch */
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--border); border-radius: 24px;
  transition: .3s;
}
.switch-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  right: 3px; bottom: 3px;
  background: white; transition: .3s;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.switch input:checked + .switch-slider { background: var(--gold); }
.switch input:checked + .switch-slider::before { transform: translateX(-20px); }

/* Change password form */
.change-pass-form {
  margin-top: 16px; padding: 16px;
  background: var(--sand); border-radius: var(--radius);
  border: 1px solid var(--border);
  animation: slideDown .2s ease;
}

/* ===== AVATAR (navbar etc) ===== */
.avatar-circle-sm {
  width: 30px; height: 30px; border-radius: 50%;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.avatar-circle-sm .avatar-circle {
  font-size: 13px;
}
.avatar-img {
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold-sand);
}

/* ===== DETAIL ENHANCEMENTS ===== */
.price-block {
  background: var(--gold-pale); border: 2px solid var(--gold-sand);
  border-radius: var(--radius-lg); padding: 24px;
}
.price-label {
  font-size: 12px; color: var(--text-muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}
.price-value {
  font-size: clamp(28px,5vw,40px); font-weight: 900;
  color: var(--gold-dark); margin: 6px 0 20px;
}
.price-value small { font-size: 16px; font-weight: 600; }
.seller-contact-card {
  background: white; border-radius: 12px;
  padding: 16px; border: 1px solid var(--border-light);
}
.seller-contact-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.seller-phone {
  font-size: 18px; font-weight: 800; color: var(--gold-dark);
  text-decoration: none; display: block;
}
.seller-name { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.seller-info-bar {
  margin-top: 14px; padding: 12px 14px;
  background: var(--sand); border-radius: 10px;
  font-size: 12.5px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.seller-info-bar i { color: var(--gold-dark); }
.seller-info-bar strong { color: var(--text-dark); }
.desc-block {
  margin-top: 18px; background: var(--sand);
  border-radius: var(--radius); padding: 18px;
  border: 1px solid var(--border-light);
}
.desc-block-title { font-weight: 700; color: var(--brown-dark); margin-bottom: 8px; }
.desc-block p { font-size: 14.5px; color: var(--text-med); line-height: 1.8; }

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.94);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s ease;
}
.lightbox-overlay img {
  max-width: 92vw; max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  animation: fadeUp .3s ease;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-close {
  position: absolute; top: 20px; left: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: white;
  border: none; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  backdrop-filter: blur(4px);
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: white;
  border: none; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  backdrop-filter: blur(4px);
}
.lightbox-prev { right: 20px; }
.lightbox-next { left: 20px; }
.lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(255,255,255,.25);
  transform: translateY(-50%) scale(1.1);
}
.lightbox-counter {
  position: absolute; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.6); color: white;
  padding: 6px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
  backdrop-filter: blur(4px);
}

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
  z-index: 300;
  padding: 4px 0 calc(4px + var(--safe-bottom));
}
.mobile-bottom-nav-inner {
  display: flex; justify-content: space-around; align-items: center;
  max-width: 500px; margin: 0 auto;
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 6px 12px;
  color: var(--text-muted); background: none; border: none;
  cursor: pointer; font-family: inherit; font-size: 10px; font-weight: 600;
  transition: all .2s; position: relative;
  -webkit-tap-highlight-color: transparent;
  min-width: 52px;
}
.bottom-nav-item i { font-size: 18px; transition: all .2s; }
.bottom-nav-item.active {
  color: var(--gold-dark);
}
.bottom-nav-item.active i {
  transform: scale(1.1);
}
.bottom-nav-item.active::after {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 20px; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--gold-dark);
}
.bottom-nav-item .notif-dot {
  position: absolute; top: 2px; right: 8px;
  width: 8px; height: 8px; background: var(--red);
  border-radius: 50%; border: 2px solid white;
}
/* Add button in bottom nav */
.bottom-nav-add {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: white; border: 3px solid white;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(160,114,14,0.3);
  margin-top: -18px; transition: all .2s;
}
.bottom-nav-add:active { transform: scale(.92); }

/* ===== PULL TO REFRESH INDICATOR ===== */
.pull-refresh {
  text-align: center; padding: 12px; font-size: 13px;
  color: var(--text-muted); display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-content { max-width: 100%; }
  .hero-subtitle { margin: 0 auto 32px; }
  .hero-btns { justify-content: center; }
  .hero-visual { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .hero-logo-badge { margin: 0 auto 24px; }
}

@media (max-width: 768px) {
  :root { --bottom-nav-h: 60px; }
  
  body { padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom)); }

  .hero { padding: 32px 16px 40px; }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 13.5px; margin-bottom: 24px; }
  .section { padding: 28px 14px; }
  .navbar-inner { padding: 0 12px; height: 56px; }
  .navbar-logo { height: 38px; width: 38px; }
  .navbar-brand-text { font-size: 16px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .detail-main-img { height: 280px; }
  .bid-current-val { font-size: 28px; }
  .form-card { padding: 20px 16px; }
  .profile-card { padding: 20px 16px; }
  .hero-stat-card { padding: 14px 18px; min-width: 110px; }
  .hero-stat-num { font-size: 24px; }
  .hero-stat-label { font-size: 11px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .feature-card { padding: 20px 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer { padding-bottom: calc(24px + var(--bottom-nav-h) + var(--safe-bottom)); }

  /* Mobile navbar */
  .navbar-hamburger { display: flex; }
  .navbar-nav {
    display: none;
    position: absolute; top: 56px; right: 0; left: 0;
    background: white;
    flex-direction: column;
    padding: 10px 14px 14px;
    gap: 2px;
    border-top: 1px solid var(--border-light);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 190;
    animation: slideDown .25s ease;
  }
  .navbar-nav.mobile-open { display: flex; }
  .navbar-nav #user-menu {
    flex-direction: row !important;
    display: flex !important;
    flex-wrap: wrap;
  }
  .nav-link { width: 100%; justify-content: flex-start; padding: 12px 14px; font-size: 14px; }
  .btn-nav-login { justify-content: center !important; }
  #user-menu { width: 100%; }

  /* Show Mobile Bottom Nav */
  .mobile-bottom-nav { display: block; }

  /* Profile actions */
  .profile-actions-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .profile-action-card { padding: 14px 6px; }
  .profile-action-icon { font-size: 24px; }
  .profile-action-label { font-size: 11px; }
  .profile-header-body { padding: 0 16px 20px; }
  .profile-avatar-img, .profile-avatar-placeholder { width: 72px; height: 72px; }
  .profile-avatar-placeholder { font-size: 28px; }
  .profile-header-info { padding-top: 36px; }
  .profile-header-name { font-size: 18px; }
  .profile-edit-card { padding: 18px 14px; }

  /* Lightbox */
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; font-size: 16px; }
  .lightbox-prev { right: 10px; }
  .lightbox-next { left: 10px; }
  
  /* Camel grid 2 cols */
  .camels-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .camel-card-img { height: 180px; }
  .camel-card-body { padding: 12px; }
  .camel-card-title { font-size: 13.5px; }
  .card-price { font-size: 15px; }
  .card-price small { font-size: 10px; }
  .camel-tags { gap: 4px; margin-bottom: 8px; }
  .camel-tag { font-size: 10px; padding: 2px 7px; }
  
  /* Toast at bottom */
  .toast-wrap {
    top: auto; bottom: calc(var(--bottom-nav-h) + 12px + var(--safe-bottom));
    left: 14px; right: 14px;
  }
  .toast { min-width: unset; width: 100%; max-width: 100%; }
}

@media (max-width: 500px) {
  .hero { padding: 24px 12px 32px; }
  .hero-title { font-size: 22px; }
  .hero-btns { flex-direction: column; width: 100%; }
  .btn-hero-main, .btn-hero-outline { justify-content: center; width: 100%; padding: 14px 20px; }
  .type-toggle { flex-direction: column; }
  .filters-row { flex-direction: column; }
  .filter-group { min-width: unset; width: 100%; }
  .section { padding: 22px 12px; }
  .section-title { font-size: 19px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .features-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .feature-icon { width: 44px; height: 44px; font-size: 20px; border-radius: 10px; }
  .feature-title { font-size: 13px; }
  .feature-desc { font-size: 11.5px; }
  .modal { border-radius: var(--radius-lg); margin: 10px; }
  .modal-body { padding: 18px 16px; }
  .modal-header { padding: 16px 16px 12px; }
  .detail-main-img { height: 240px; border-radius: var(--radius); }
  .detail-thumb { width: 58px; height: 46px; border-radius: 8px; }
  .info-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .bid-input-row { flex-direction: column; }
  .camel-card-img { height: 160px; }
  .hero-visual { gap: 8px; }
  .hero-stat-card { padding: 12px 14px; min-width: 95px; }
  .hero-stat-num { font-size: 20px; }
  .cta-section { padding: 32px 14px; }
  .cta-section h2 { font-size: 20px !important; }
  .empty-state { padding: 40px 16px; }
  .empty-icon { font-size: 48px; }
  .breadcrumb { font-size: 12px; gap: 6px; }
  
  /* Image previews 3 cols on small */
  .img-previews-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

/* Camel detail responsive */
@media (max-width: 860px) {
  .camel-detail-grid {
    grid-template-columns: 1fr !important;
  }
  .detail-sidebar { position: static; }
}

/* Very small screens */
@media (max-width: 360px) {
  .hero-title { font-size: 20px; }
  .hero-visual { display: none; }
  .navbar-brand-text { font-size: 14px; }
  .navbar-logo { height: 34px; width: 34px; }
  .navbar-inner { height: 52px; }
  .img-previews-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-actions-grid { grid-template-columns: repeat(2, 1fr); }
  .camels-grid { grid-template-columns: 1fr; }
  .camel-card-img { height: 200px; }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-header-body { flex-direction: column; align-items: center; text-align: center; }
  .profile-header-info { padding-top: 10px; text-align: center; }
  .profile-header-meta { justify-content: center; }
  .profile-header-badges { justify-content: center; }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .img-preview-actions { opacity: 1; }
  .camel-card:hover { transform: none; }
  .feature-card:hover { transform: none; }
  .profile-action-card:hover { transform: none; }
  .camel-card:active { transform: scale(0.98); }
  .img-zoom-hint { opacity: 1; }
  .btn:active { transform: scale(.97); }
  .btn-hero-main:active { transform: scale(.97); }
  .btn-hero-outline:active { transform: scale(.97); }
  .profile-avatar-overlay { opacity: .6; }
  
  /* Better touch scrolling */
  .detail-thumbs { scrollbar-width: none; -ms-overflow-style: none; }
  .detail-thumbs::-webkit-scrollbar { display: none; }
}

/* Safe area for notched phones */
@supports(padding: max(0px)) {
  .mobile-bottom-nav {
    padding-bottom: max(4px, env(safe-area-inset-bottom));
  }
  body {
    padding-bottom: max(0px, calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)));
  }
}
