@font-face {
  font-family: 'Nastaliq';
  src: url('/fonts/IranNastaliq.ttf') format('truetype');
}

body{
  margin:0;
  font-family:sans-serif;
  background:#0b0b0b;
  color:#FFD700;
}

.background-pic{
  position:fixed; inset:0;
  background:#000 url('/images/background.webp') center/cover no-repeat;
  z-index:-1;
}

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

.header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: flex-start;
  direction: ltr;
}
.header img{
  width:150px;height:150px;border-radius:50%;object-fit:cover;border:3px solid #FFD700;cursor:pointer;
}
.header-info {
  text-align: left;
  direction: rtl;
}
.header-info h1{margin:0;font-size:34px;font-family:'Nastaliq', serif;}
.header-info p{margin:5px 0 10px;font-size:18px;color:#FFA500;}
.stats{display:flex;gap:30px;margin-top:10px;}
.stats div{font-size:16px;}

.gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:20px; direction:ltr; }
.art-card { background:#111; border-radius:15px; overflow:hidden; position:relative; transition:transform 0.3s, box-shadow 0.3s; display:flex; flex-direction:column; direction:rtl; }
.art-card:hover{
  transform:scale(1.03);
  box-shadow:0 10px 25px rgba(255,215,0,0.6);
}
.art-info{
  padding:10px;
  flex-grow:1;
  display:flex;
  flex-direction:column;
}
.art-title{font-weight:bold;font-size:18px;margin:5px 0;}
.art-price{color:#FFD700;font-weight:bold;margin-bottom:5px;}
.actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:5px;
}
.actions button{
  padding:7px 32px;
  border:none;
  border-radius:6px;
  cursor:pointer;
  font-weight:bold;
  transition:0.3s;
}
.actions .like-btn{background:#FFA500;color:#0b0b0b;}
.actions .like-btn:hover{background:#FF8C00;color:#fff;}
.actions .buy-btn{background:#28c24a;color:#0b0b0b;}
.actions .buy-btn:hover{background:#28a745;color:#fff;}

.carousel{
  position:relative;
  overflow:hidden;
  height:200px;
  margin-bottom:10px;
}
.carousel img{
  width:100%;
  height:200px;
  object-fit:cover;
  display:none;
  border-radius:10px;
}
.carousel img.active{display:block;}
.carousel button{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(0,0,0,0.5);
  color:#FFD700;
  border:none;
  padding:7px 32px;
  cursor:pointer;
  font-weight:bold;
}
.carousel .prev{left:5px;}
.carousel .next{right:5px;}

.modal{
  display:none;
  position:fixed;
  top:0;left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.9);
  justify-content:center;
  align-items:center;
  z-index:1000;
}
.modal-content{
  position:relative;
  max-width:900px;
  width:90%;
  max-height:90vh;
  height:500px;
  background:#111;
  padding:0;
  border-radius:10px;
  display:flex;
  justify-content:center;
  align-items:center;
}

#imageModal .modal-prev,
#imageModal .modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  
  background: rgba(0, 0, 0, 0.5);
  color: #FFD700;
  border: none;
  padding: 7px 32px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: 0.3s;
}

#imageModal .modal-prev:hover,
#imageModal .modal-next:hover {
  background: rgba(0, 0, 0, 0.7);
  color: #FFD700;
}

#imageModal .modal-prev { left: 20px; }
#imageModal .modal-next { right: 20px; }

.modal-content img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:10px;
}
.modal-close{
  position:absolute;
  top:10px;
  right:10px;
  font-size:28px;
  color:#FFD700;
  cursor:pointer;
}

.pagination{
  margin-top:25px;
  display:flex;
  justify-content:center;
  gap:10px;
}
.page-btn{
  padding:7px 32px;
  background:#FFD700;
  color:#0b0b0b;
  border:none;
  border-radius:6px;
  cursor:pointer;
}
.page-btn.active{background:#FF8C00;}

@media (max-width:768px){
  .header{flex-direction:column;text-align:center;align-items:center;}
  .stats{justify-content:center;}
  .art-card img{height:180px;}
  .carousel img{height:180px;}
}
