:root {
  --gold-dark: #D4AF37;
  --gold-light: #F5E6C8;
  --black: #121212;
  --black-light: #1E1E1E;
  --white: #FFFFFF;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
}

body {
  font-family: Tajawal, sans-serif;
  background-color: var(--black);
  color: var(--white);
  margin: 0;
  padding: 0;
}

.header, .item {
  position: relative;
}

.header {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(135deg, var(--black-light), var(--black));
  border-bottom: 3px solid var(--gold-dark);
}

.header h1 {
  font-size: 2.8rem;
  margin: 0;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
  color: var(--gold-light);
}

.header .admin-link {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  text-decoration: none;
  font-size: 1.2rem;
  color: var(--gold-light);
}

.container {
  width: 100%;
  max-width: none;
  padding: 15px 10px;
  margin: 0 auto;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
}

.item {
  background: var(--white);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: 0.4s;
  border: 1px solid rgba(212, 175, 55, 0.3);
  cursor: pointer;
}

body.dark-mode .item {
  background: var(--black);
}

.item:hover {
  transform: translateY(-12px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  border-color: var(--gold-dark);
}

.item-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.item:hover .item-overlay {
  opacity: 1;
}

.item-overlay i {
  font-size: 3.5rem;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.7);
  animation: 1.5s infinite pulse;
  color: var(--gold-light);
}

.item-title {
  height: 25px;
  padding: 1px;
  text-align: center;
  font-size: 1.1rem;
  color: #d4af37;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  font-weight: 700;
}

.toast {
  position: fixed;
  top: 25px;
  right: 25px;
  background: var(--gold-dark);
  color: var(--black);
  padding: 18px 30px;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  transform: translateX(150%);
  transition: transform 0.4s;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background: var(--success);
  color: #fff;
}

.toast.error {
  background: var(--danger);
  color: #fff;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.loader {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--gold-light);
  animation: 1s ease-in-out infinite spin;
}


@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}



@media (max-width: 768px) {
  .items-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .item-title {
    font-size: 0.85rem;
  }    
    
  .header h1 {
    font-size: 2rem;
  }
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
  appearance: none;
}
