:root {
  --main: #1a2433;
  --accent: #f37021;
  --messenger: #0084ff;
  --text-color: #333;
  --bg-overlay: rgba(255, 255, 255, 0.92);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  margin: 0;
  color: var(--text-color);
  padding-bottom: 120px;
}

h2 {
  scroll-margin-top: 100px;
}

header,
.container,
.card,
.modal-content {
  background-color: var(--bg-overlay);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

header {
  padding: 0.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--accent);
  flex-wrap: wrap;
}

.logo-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
}

.logo-img {
  height: 50px;
  width: auto;
  margin-right: 15px;
}

.logo-text {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--main);
  letter-spacing: 1px;
}

nav a {
  text-decoration: none;
  color: var(--main);
  font-weight: 600;
  margin-left: 20px;
  font-size: 0.9rem;
  transition: 0.2s;
}

nav a:hover {
  color: var(--accent);
}

.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  border-radius: 12px;
}

.section-title {
  text-align: center;
  color: var(--main);
  margin: 40px 0 20px;
  position: relative;
  padding-bottom: 10px;
}

.section-title::after {
  content: "";
  width: 60px;
  height: 3px;
  background: var(--accent);
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.intro-section {
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  text-align: center;
}

.intro-section img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  object-fit: cover;
  margin-bottom: 15px;
}

.contact-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  padding: 20px;
}

.contact-info {
  flex: 1;
  min-width: 280px;
}

.info-row {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 1rem;
}

.info-row span {
  margin-right: 15px;
  font-size: 1.5rem;
}

.contact-card {
  padding: 20px;
}

.contact-disclaimer {
  font-size: 0.9rem;
  color: #666;
  border-top: 1px solid #eee;
  padding-top: 10px;
  margin-top: 15px;
}

.map-container {
  flex: 1;
  min-width: 280px;
  border-radius: 10px;
  overflow: hidden;
  height: 200px;
  background: #eee;
}

.custom-print-card {
  border: 2px solid var(--accent) !important;
  background: linear-gradient(145deg, #ffffff, #fff5f0);
  margin-bottom: 40px;
}

.custom-print-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 20px;
}

.custom-print-content {
  flex: 1;
  min-width: 300px;
}

.custom-print-content h3 {
  margin-top: 0;
}

.custom-print-icon {
  flex: 0.4;
  text-align: center;
  font-size: 4rem;
}

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

.card {
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: 0.3s;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
}

.card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.add-item-card {
  border: 3px dashed #ccc;
  background-color: rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 350px;
  height: 100%;
  box-sizing: border-box;
}

.add-item-card:hover {
  border-color: var(--accent);
  background-color: rgba(243, 112, 33, 0.05);
  transform: translateY(-5px);
}

.add-item-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 20px;
}

.add-icon {
  font-size: 5rem;
  font-weight: 300;
  color: #aaa;
  line-height: 1;
  transition: color 0.3s ease;
}

.add-item-card:hover .add-icon {
  color: var(--accent);
}

.add-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--main);
  letter-spacing: 0.5px;
}

.part-customizer {
  background: rgba(0, 0, 0, 0.04);
  padding: 12px;
  border-radius: 8px;
  margin: 10px 0;
  border: 1px dashed var(--accent);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.part-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  gap: 10px;
}

.part-row label {
  font-weight: 600;
  color: var(--main);
  min-width: 60px;
}

.part-row select,
.part-row input[type="file"] {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: var(--text-color);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
}

.part-row select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f37021' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 35px;
}

.part-row select:hover,
.part-row select:focus,
.part-row input[type="file"]:hover,
.part-row input[type="file"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(243, 112, 33, 0.15);
}

.price {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--main);
  margin: 10px 0;
}

.btn-buy,
.btn-update,
.btn-delete {
  background: var(--main);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  transition: 0.2s;
}

.btn-update,
.btn-delete {
  margin-top: 10px;
}

.btn-buy:hover,
.btn-update:hover,
.btn-delete:hover {
  background: var(--accent);
  transform: scale(1.02);
}

.btn-accent {
  background: var(--accent);
}

.btn-messenger {
  background: var(--messenger);
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #1e1e24;
  color: #e0e0e0;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  border-radius: 20px;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid #444;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Színválasztó Modal specifikus stílusok */
.color-modal-content {
  max-width: 400px;
}

.color-modal-content h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #fff;
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
}

.modal-part-customizer {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.modal-part-customizer .part-row {
  margin-bottom: 15px;
}

.modal-part-customizer label {
  color: #e0e0e0;
  min-width: 80px;
}

.modal-part-customizer select {
  background-color: #2a2a35;
  color: #fff;
  border: 1px solid #444;
}

.modal-part-customizer select:focus,
.modal-part-customizer select:hover {
  border-color: var(--accent);
}

/* Add Item Modal */
.login-card {
  background-color: var(--bg-overlay);
  color: var(--text-color);
  border: none;
}

.close-modal,
.close-btn {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  font-weight: bold;
  line-height: 1;
  transition: color 0.2s;
}

.close-modal:hover,
.close-btn:hover {
  color: #ff6b6b;
}

.input-group {
  margin-top: 10px;
}

textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
  box-sizing: border-box;
  resize: vertical;
}

textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(243, 112, 33, 0.15);
}

.hidden-input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.custom-model-wrapper {
  margin: 20px 0;
  width: 100%;
}

.model-upload-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  background-color: rgba(255, 255, 255, 0.288);
  border: 2px dashed #555;
  border-radius: 12px;
  color: #ccc;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.model-upload-btn:hover {
  border-color: var(--accent);
  background-color: rgba(243, 112, 33, 0.05);
  color: #ffffff;
}

.model-upload-btn:hover .icon-container {
  color: var(--accent);
  transform: translateY(-5px);
}

.icon-container {
  color: #888;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

#modelFileName {
  color: #888;
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 8px;
}

.model-upload-btn:hover #modelFileName {
  color: var(--accent);
}

.file-hint {
  font-size: 0.85rem;
  color: #777;
}

/* Cart Styles */
#cartList {
  margin-top: 20px;
  margin-bottom: 20px;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: 5px;
}

#cartList::-webkit-scrollbar {
  width: 6px;
}

#cartList::-webkit-scrollbar-track {
  background: #2a2a35;
  border-radius: 4px;
}

#cartList::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

#cartList::-webkit-scrollbar-thumb:hover {
  background: #ff6b6b;
}

/* Mennyiség szabályozó konténer */
.qty-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 15px; /* Távolság a mennyiség és az ár között */
  background: #2a2a2a;
  padding: 3px 5px;
  border-radius: 6px;
  border: 1px solid #444;
}

/* Maguk a + és - gombok */
.btn-qty {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}

.btn-qty:hover {
  background: #444;
}

/* A darabszám kijelzője a gombok között */
.qty-display {
  font-weight: bold;
  min-width: 15px;
  text-align: center;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 95%;
  padding: 15px 0;
  border-bottom: 1px solid #333;
}

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

.item-info {
  display: flex;
  flex-direction: column;
}

.item-name {
  margin: 0 0 5px 0;
  font-size: 1.1rem;
  color: #ffffff;
}

.item-color {
  color: #aaa;
  font-size: 0.9rem;
}

.item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
}

.item-price {
  font-weight: bold;
  font-size: 1.15rem;
  color: #ff6b6b;
  position: relative;
  padding-bottom: 2px;
}

.item-price::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0%;
  background-color: #ff4d4d;
  transition: width 0.3s ease;
}

.btn-remove-item {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: #ff4d4d;
  cursor: pointer;
  padding: 0;
  margin-left: 10px;
  width: 24px;
  text-align: right;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.item-actions:hover .btn-remove-item {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.btn-remove-item:hover {
  color: #cc0000;
  transform: scale(1.1);
}

.cart-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-top: 15px;
  padding-top: 20px;
}

#modalTotal {
  margin: 0 0 15px 0;
  color: #fff;
  font-size: 1.4rem;
  text-align: right;
}

.item-qty-container {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.item-qty-container label {
  font-size: 0.85rem;
  color: #aaa;
}

.custom-qty-wrapper {
  display: flex;
  align-items: center;
  background-color: #2a2a35;
  border: 1px solid #444;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.custom-qty-wrapper:hover {
  border-color: #666;
}

.qty-btn {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 1.1rem;
  padding: 4px 10px;
  cursor: pointer;
  transition:
    color 0.2s,
    background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

.item-qty-input {
  width: 30px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.95rem;
  text-align: center;
  outline: none;
  padding: 4px 0;
  -moz-appearance: textfield;
}

.item-qty-input::-webkit-outer-spin-button,
.item-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--accent);
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  z-index: 1000;
  border: none;
  text-align: center;
  transition: 0.3s;
}

/* admin-panel galériának*/
/* Carousel / Slider Stílusok */
.carousel-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 20px 0;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
}

.carousel-track {
  display: flex;
  gap: 20px;
  width: max-content;
  /* Az animáció felel a folyamatos balról jobbra úszásért */
  animation: scrollTrack 60s linear infinite;
}

.carousel-track:hover {
  animation-play-state: paused; /* Megáll, ha ráviszi az egeret */
}

.carousel-slide {
  width: 250px; /* Egy kép szélessége */
  height: 250px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes scrollTrack {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  } /* Mivel duplikáltuk a képeket, 50%-nál ugrik vissza zökkenőmentesen */
}

/* Galéria Admin Lista Stílusok */
.gallery-admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-overlay);
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: grab;
}

.gallery-admin-item:active {
  cursor: grabbing;
}

.drag-handle {
  font-size: 1.5rem;
  color: #888;
  margin-right: 15px;
  cursor: grab;
}

.gallery-admin-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 5px;
  margin-right: auto;
}

/* --- Egyedi nyomtatás hiba animáció --- */
@keyframes subtleRedFlash {
  0%,
  100% {
    border-color: #555;
    background-color: rgba(255, 255, 255, 0.288);
  }
  50% {
    border-color: #ff4d4d;
    background-color: rgba(255, 77, 77, 0.1); /* Nagyon halvány piros háttér */
    transform: scale(
      0.98
    ); /* Egy ici-picit "összehúzódik", hogy jobban észrevehető legyen */
  }
}

.model-upload-btn.error-flash {
  animation: subtleRedFlash 0.4s ease-in-out 1; /* Kétszer villan fel gyorsan */
  border-color: #ff4d4d;
}

.model-upload-btn.error-flash .icon-container {
  color: #ff4d4d;
}

/* --- Sikeres Rendelés Visszajelzés (Success Modal) --- */
.success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInOverlay 0.3s ease;
}

.success-card {
  background-color: #1e1e24;
  color: #e0e0e0;
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  max-width: 450px;
  width: 90%;
  border: 2px solid #f37021; /* Fantasy Forge narancssárga */
  box-shadow: 0 15px 40px rgba(243, 112, 33, 0.2);
  animation: popInCard 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 15px;
  line-height: 1;
}

.success-card h3 {
  margin: 0 0 15px 0;
  color: #ffffff;
  font-size: 1.8rem;
}

.success-card p {
  color: #cccccc;
  line-height: 1.6;
  font-size: 1.05rem;
  margin-bottom: 25px;
}

/* Hamburger ikon alapból rejtve */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--main);
  border-radius: 3px;
  transition: 0.3s;
}

@media (max-width: 735px) {
  .hamburger {
    display: flex;
  }

  /* Navigáció mobilos nézete */
  #navbar {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-overlay);
    padding: 10px 0;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #ddd;
  }

  #navbar.active {
    display: flex;
  }

  #navbar a {
    margin: 15px 0;
    text-align: center;
    font-size: 1.1rem;
  }
}

@media (max-width: 600px) {
  .custom-print-icon {
    display: none;
  }
}

/* Animációk a sima, profi megjelenéshez */
@keyframes fadeInOverlay {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes popInCard {
  from {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}
