* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f4f6f8;
  color: #333;
}

header {
  background: #2c3e50;
  color: white;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

header h1 {
  font-size: 1.6rem;
  text-align: center;
}

/* Navigacijos mygtukai su perstumiamu horizontaliai sąrašu telefone */
nav {
  display: flex;
  gap: 0.5rem;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 5px;
  -webkit-overflow-scrolling: touch;
}

/* Paslepiame negražų scrollbar'ą */
nav::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  background: #34495e;
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap; /* Neleidžia tekstui mygtuke sulūžti į dvi eilutes */
  flex-shrink: 0;
}

.cat-btn.active, .cat-btn:hover {
  background: #e67e22;
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  padding: 1rem;
}

.product-card {
  cursor: pointer;
  transition: transform 0.2s;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
}

.product-info {
  margin-top: 0.5rem;
}

.price {
  font-size: 1.25rem;
  color: #e67e22;
  font-weight: bold;
}

.badge {
  display: inline-block;
  background: #eee;
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

/* Modalinis langas (Atskiras prekės puslapis) */
.modal {
  display: none;
  position: fixed;
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: white;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 8px;
  padding: 1.5rem;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px; 
  right: 15px;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
}

.modal-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
}

#main-modal-img {
  width: 100%;
  height: 450px;
  object-fit: contain;
  background: #f8f8f8;
  border-radius: 8px;
  border: 1px solid #eee;
}

.thumbs-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
  overflow-x: auto;
}

.thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.thumb.active {
  border-color: #e67e22;
}

.call-to-buy {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #fff8e7;
  border: 1px solid #ffe0b2;
  border-radius: 6px;
}

.phone-btn {
  display: inline-block;
  margin: 0.5rem 0;
  padding: 0.8rem 1.4rem;
  background: #27ae60;
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  font-size: 1.1rem;
}

/* Forma */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.btn {
  background: #27ae60;
  color: white;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.hidden { display: none; }
.nav-link { color: white; }

/* PRITAIKYMAS TELEFONAMS */
@media (max-width: 768px) {
  header {
    padding: 0.8rem;
  }
  
  .modal-body {
    grid-template-columns: 1fr;
  }

  #main-modal-img {
    height: 280px;
  }
}
/* Stiliai admin lentelei */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th, .admin-table td {
  padding: 0.8rem;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.admin-table th {
  background: #f8f9fa;
  font-weight: 600;
}

.admin-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.delete-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.delete-btn:hover {
  background: #c0392b;
}
.edit-btn {
  background: #f39c12;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-right: 5px;
}

.edit-btn:hover {
  background: #d68910;
}

.action-buttons {
  display: flex;
  gap: 5px;
}
/* Aptarnavimo režimo stiliai */
.maintenance-box {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  padding: 1rem;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.status-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1rem;
}

.indicator {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.indicator.green {
  background-color: #27ae60;
  box-shadow: 0 0 8px rgba(39, 174, 96, 0.6);
}

.indicator.red {
  background-color: #e74c3c;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.6);
}

.red-bg {
  background-color: #e74c3c;
}
.red-bg:hover {
  background-color: #c0392b;
}

.green-bg {
  background-color: #27ae60;
}
.green-bg:hover {
  background-color: #219653;
}

/* Aptarnavimo ekrano žinutė lankytojams */
.maintenance-screen {
  text-align: center;
  padding: 4rem 1rem;
  background: white;
  margin: 3rem auto;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.maintenance-screen h2 {
  color: #e74c3c;
  margin-bottom: 1rem;
}