*,::after,::before{box-sizing:border-box}
html{
    font-family:system-ui,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji';
    line-height:1.15;
    -webkit-text-size-adjust:100%;
    tab-size:4
}


/* Grundschriftarten im Body */
body {
   font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Arial;
   margin:0
}


/* Header und Footer */
header, footer {
  padding: 1rem;
  background: #f6f7f9;
}

header .main-nav {
  border-top: 1px solid #ddd;
  display:flex; 
  justify-content:space-between; 
  align-items:center; 
  flex-wrap:wrap;
  padding-top: 5px;
  margin-top: 10px;
  margin-bottom: -15px;
}

.main-nav-toggle{
  display:flex; 
  gap:1rem; 
  align-items:center;

}

.nav-right{
  display:flex; 
  gap:1rem; 
  align-items:center;
  margin-left:auto;
}

.nav-left{
  display:flex; 
  gap:1rem; 
  align-items:center;
}

.nav-cart {
  position: relative;
  text-decoration: none;
  font-size: 1.2rem;
  color: #333;
  margin-right: 20px;

}

.nav-cart .cart-count {
  position: absolute;
  bottom: 0px;
  right: -14px;
  background: red;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 50%;
  padding: 2px 3px;
  min-width: 18px;
  min-height: 18px;
  text-align: center;
  line-height: 1.2;
}



/* Container: mittig, max. 1024px breit */
.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 1rem;
}

/* Grid-System: flexible Kartenaufteilung */
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* Karten (Card-Layout) */
.card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: #fff;
}
.card-body {
  padding: .75rem 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: .3rem ;
  border-radius: 10px;
  border: 1px solid #1111;
  cursor: pointer;
}
.btn-primary { 
    background: #111; 
    color: #fff; 
}
.btn-edit{ 
    background: #7bda4f; 
    color: #fff; 
}
.btn-danger{ 
    background: #b91c1c; 
    color: #fff; 
}

.btn-disabled{ background: #918d8d; 
    color: #fff; 
}

.btn-small {
    width: 150px;
}


/* Badges (kleine Labels) */
.badge {
  display:inline-block;
  padding:.15rem .5rem;
  border-radius:8px;
  background:#eee;
  font-size:.8rem;
}

/* Tabellen */
table { 
  width: 100%; 
  border-collapse: collapse; 
}
th, td { 
  padding: .5rem; 
  border-bottom: 1px solid #e5e7eb; 
  vertical-align: top; 
}

/* Formulareingaben */
input[type=text],
input[type=email],
input[type=password],
input[type=date],
textarea,
select,
input[type=number] {
  width: 100%;
  padding: .5rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

/* Formular-Layout */
form { 
  display: grid; 
  gap: .6rem; 
}

/* Hilfsklassen */
.right { float: right; }
.muted { color: #6b7280; }
a { text-decoration: none; }
button{
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Arial;
}

/* --- Desktop --- */
  @media (min-width: 655px) {
    .main-nav-toggle {
      display:flex !important;
      align-items:center;
    }
    #menu-toggle {
      display:none !important;
    }
    .span-text-none { display:inline; }
  }

  /* --- Mobile --- */
  @media (max-width: 654px) {
    #menu-toggle {
      display:block !important; /* Burger sichtbar */
    }
    .main-nav-toggle {
      display:none;
      flex-direction:column;
      gap:0.5rem;
      background:white;
      position:absolute;
      top:125px;
      right:5px;
      padding:1rem;
      border:1px solid #ccc;
      border-radius:8px;
      box-shadow:0 4px 8px rgba(0,0,0,0.1);
      z-index:999;
      align-items:flex-start;
      min-width: 50%;
    }

    .main-nav.active {
      display: flex;
    }
    /* Text bei Home/Corbeille ausblenden auf Mobile */
    .span-text-none { display:none; }

    /* Mobile: Bilder unten statt daneben */
    .product-grid {
      grid-template-columns: 1fr;
    }


  }

.dropdown-content-admin, .dropdown-content-user{
  display:none; 
  position:absolute; 
  right:0; top:100%; 
  background:white; 
  border:1px solid #ccc; 
  border-radius:6px; 
  min-width:180px; 
  box-shadow:0 4px 8px rgba(0,0,0,0.1);
  z-index:999;
  padding: 5px;
}

.dropdown-content-admin a:hover {
  background:#f0f0f0;
}

.dropdown-content-user a:hover {
  background:#f0f0f0;
}

.dropdown-content-admin a, .dropdown-content-user a {
  padding-left: 5px;
  margin-bottom: 15px;
}


.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%; /* alle Karten gleich hoch */
}

.card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-body form {
  margin-top: auto; /* schiebt Button ganz nach unten */
}


/*-----------------------------*/

/* Produktdetailseite */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.product-image img {
  width: 100%;
  height: 360px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.product-info {
  display: flex;
  flex-direction: column;
}

.cart-form {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin: 1rem 0;
}

.cart-form input[type="number"] {
  max-width: 90px;
}

/* Preise */
.price-old {
  text-decoration: line-through;
  color: #888;
  margin-right: .5rem;
}
.price-offer {
  color: #e60000;
  font-weight: bold;
}

/* Likes */
.likes {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 1rem 0;
}
.like-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: #888;
}
.like-btn.liked {
  color: red;
}
.like-count {
  font-weight: bold;
}

/* Corbeille */
.cart-item-form {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.cart-item-form input[type="number"] {
  max-width: 80px;
}

/* Product image gallery*/

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.gallery img {
  max-width: 100%;
  border-radius: 4px;
  background: #fff;
}

#mainImage {
  width: 100%;
  height: 360px;
  object-fit: contain;
  border: 1px solid #ccc;
}

.thumbnails {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.thumbnails img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
}

.thumbnails img:hover {
  border-color: #007BFF;
}



/*----------- ALERT -------------------*/
.alert {
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-radius: 6px;
  font-size: 0.95rem;
}

.alert.success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert.error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.alert.info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}


/*--------- POPUP ----------------------*/
.popup-alert {
  position: fixed;
  /*display: none;*/
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 9999;
  transition: opacity 0.6s ease;
}
.popup-alert.success {
  background: #d4edda;
}
.popup-alert.error {
  background: #f44336;
}


/*----------------------Categorie ------------------*/
/* Grid Layout */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Produktkarte */
.product-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 200px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  background: #fff;
  padding: .5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
  transition: transform .2s;
}

.product-card:hover {
  transform: translateY(-3px);
}

/* Bild */
.product-img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  margin-bottom: .5rem;
  border-radius: 4px;
}

/* Produktinfo */
.product-name {
  font-size: 1rem;
  margin: .5rem 0;
  font-weight: bold;
}

.product-price {
  color: #333;
  font-weight: 500;
}

.product-offer {
  color: red;
  font-weight: bold;
}

/* Footer (Button unten) */
.product-footer {
  margin-top: .5rem;
}


.back-link {
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
  color: #007bff;
}

.back-link:hover {
  text-decoration: underline;
}

/*--------------- DataTable customer -------------*/
.objectsTable
{
  width: 100%;
}

/*------------------ register mask --------------------------*/
.form-mask {
  max-width: 500px;
  margin: 1rem auto;
  background: #fafafa;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.form-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: bold;
  margin-bottom: .3rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: .5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-fieldset {
  margin-top: 1.5rem;
  border: 1px solid #ccc;
  padding: 1rem;
  border-radius: 6px;
  background: #fff;
}

.form-fieldset legend {
  font-weight: bold;
  padding: 0 .5rem;
}

.form-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

/*-------------- category home page ----------------*/
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.category-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  text-align: center;
  padding: 1rem;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.category-cover {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.category-placeholder {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: #f3f3f3;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

@media (max-width: 600px) {
  .category-card {
    padding: 0.75rem;
  }

  .category-cover {
    height: 120px;
  }
}


/*

b,strong{
    font-weight:bolder
}
code,kbd,pre,samp{
    font-family:ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;
    font-size:1em
}
small{
    font-size:80%
}

.input-small {
    width: 200px;
}

.input-mini {
    width: 150px;
}


sub,sup{
    font-size:75%;
    line-height:0;
    position:relative;
    vertical-align:baseline
}
sub{
    bottom:-.25em
}
sup{
    top:-.5em
}
table{
    border-color:currentcolor
}

button,input,optgroup,select,textarea{
    font-family:inherit;
    font-size:100%;
    line-height:1.15;
    margin:0
}

form input[type=text],
form input[type=number],
form select,
form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  margin-bottom: 0.5rem;
}

[type=button],[type=reset],[type=submit],button{
    -webkit-appearance:button
}

legend{
    padding:0
}
progress
{
    vertical-align:baseline
}

::-webkit-inner-spin-button,::-webkit-outer-spin-button{
    height:auto
}
[type=search]{
    -webkit-appearance:textfield;
    outline-offset:-2px
}
::-webkit-search-decoration{
    -webkit-appearance:none
}

::-webkit-file-upload-button{
    -webkit-appearance:button;
    font:inherit
}

summary{
    display:list-item
}


*/

.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-weight: 500;
  animation: fadeIn 0.5s ease-in-out;
}

.alert-success {
  background-color: #e6ffed;
  border: 1px solid #16a34a;
  color: #065f46;
}

.alert-error {
  background-color: #fee2e2;
  border: 1px solid #dc2626;
  color: #7f1d1d;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}


.head-menu-btn
{
    display:block; padding:0.5rem; text-decoration:none; color:black;
}