/* =====================================================
   GLOBAL STYLES
===================================================== */

html {
  font-size: clamp(14px, 1.6vw, 16px);
}

body {
  margin: 0;
  padding: 0;
  font-family: "Aptos", "Inter", "Segoe UI", Arial, sans-serif;
  background-color: #f2f2f2;
}

p,
ul li {
  font-size: 16px;
  color: #333;
}

p {
  margin-bottom: 10px;
}

ul li {
  margin-bottom: 8px;
}

h1 {
  font-size: clamp(22px, 4vw, 32px);
}

h2 {
  font-size: clamp(18px, 3vw, 24px);
}


/* =====================================================
   LAYOUT CONTAINERS
===================================================== */

.container {
  width: 600px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}


/* =====================================================
   TOP NAVIGATION
===================================================== */

.top-menu {
  position: sticky;
  top: 0;
  z-index: 1000;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 8px 30px;
  background-color: #007bff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.menu-links {
  display: flex;
  gap: 10px;
}

.menu-link {
  padding: 8px 22px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
}

.menu-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
}


/* =====================================================
   LOGIN DISPLAY
===================================================== */

.login-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;

  padding: 5px 15px;
  /*border-radius: 50px;*/
  background: rgba(0, 0, 0, 0.1);
  color: rgb(0, 0, 0);
  font-size: 14px;
}

#UsernameField {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

#LogoutButton {
  all: unset;
  cursor: pointer;

  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;

  background-color: #ff4d4d;
  color: white;
  transition: 0.2s;
}

#LogoutButton:hover {
  background-color: #e60000;
  transform: translateY(-1px);
}

#LogoutButton:disabled {
  background-color: #666;
  opacity: 0.5;
  cursor: not-allowed;
}


/* =====================================================
   FORM ELEMENTS
===================================================== */

input[type="text"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  font-family: "Aptos", "Inter", "Segoe UI", Arial, sans-serif;
  border-radius: 5px;
  border: 1px solid #a7a4a4;
  box-sizing: border-box;
}

button {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;

  border: none;
  border-radius: 5px;
  cursor: pointer;

  color: #fff;
  background-color: #28a745;
}

button:hover {
  opacity: 0.9;
}


/* =====================================================
   RESULT BOXES
===================================================== */

.result {
  min-height: 40px;
  margin-bottom: 10px;
  padding: 10px;

  font-size: 14px;
  word-wrap: break-word;
  white-space: pre-line;

  background-color: #f9f9f9;
  border: 1px solid #a7a4a4;
  border-radius: 5px;
}


/* =====================================================
   LINK BUTTON
===================================================== */

.link-button {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 15px;

  text-decoration: none;
  border-radius: 5px;
  color: white;
  background-color: #007bff;
}

.link-button:hover {
  background-color: #0056b3;
}


/* =====================================================
   TABLES
===================================================== */

table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
}

th,
td {
  padding: 8px;
  text-align: left;
  border: 1px solid #ccc;
}

th {
  background-color: #f2f2f2;
}


/* =====================================================
   TOGGLE SWITCH
===================================================== */

.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-toggle {
  --w: 32px;
  --h: 15px;
  --k: 13px;

  position: relative;
  width: var(--w);
  height: var(--h);
}

.slider-toggle input {
  display: none;
}

.slider-toggle label {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  position: relative;

  background-color: red;
  border-radius: calc(var(--h) / 2);
  transition: background-color 0.3s;
}

.slider-toggle label::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;

  width: var(--k);
  height: var(--k);
  border-radius: 50%;
  background-color: white;

  transition: transform 0.3s;
}

.slider-toggle input:checked + label {
  background-color: green;
}

.slider-toggle input:checked + label::after {
  transform: translateX(calc(var(--w) - var(--k) - 1px));
}


/* =====================================================
   DROPDOWN SELECT
===================================================== */

#categorySelect {
  width: 220px;
  padding: 8px 12px;

  font-family: "Roboto", Arial, sans-serif;
  font-size: 16px;
  color: #333;

  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;

  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  transition: border-color 0.2s, box-shadow 0.2s;
}

#categorySelect:hover {
  border-color: #888;
}

#categorySelect:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 5px rgba(74, 144, 226, 0.5);
}

#categorySelect-container {
  position: relative;
  display: inline-block;
}

#categorySelect-container::after {
  content: "▼";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;

  font-size: 12px;
  color: #666;
}


/* =====================================================
   CHECKOUT TOPBAR – Improved
===================================================== */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 7px 10px;
  margin-bottom: 30px;

  background-color: #f8f8f8;
  border-radius: 8px;
}

.topbar span {
  font-size: 14px;
  color: #333;
}

.topbar strong {
  font-weight: 600;
  margin-left: 6px;
}

.topbar a {
  padding: 4px 7px;
  background-color: rgb(128, 128, 128);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: 0.2s ease;
}

.topbar a:hover {
  background-color: #333;
}

.cart-info {
  display: flex;
  gap: 25px;
}

/* =====================================================
   PRODUCT LISTING
===================================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.product-card {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: white;
}

.product-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.product-desc {
  margin-bottom: 12px;
  font-size: 14px;
  color: #555;
}

.product-price {
  margin-bottom: 12px;
  font-weight: 600;
}

.product-actions {
  display: flex;
  gap: 8px;
}

.product-actions button {
  flex: 1;
  padding: 6px;
}

/* =====================================================
   GUESTBOOK ENTRIES
===================================================== */
#entries {
  list-style: none;
  padding: 0;
}

.guest-entry {
  background: #f9f9f9;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
}

.entry-message {
  font-size: 16px;
  color: #222;
}
/* =====================================================
   MOBILE OPTIMIZATION
===================================================== */

@media (max-width: 768px) {

  /* kontener strony */
  .container {
    width: auto;
    margin: 10px;
    padding: 15px;
  }

  /* menu */
  .menu-link {
    font-size: 14px;
    padding: 6px 10px;
  }

  .top-menu {
    padding: 6px 10px;
    flex-wrap: wrap;
    gap: 5px;
  }

  /* login info */
  .login-info {
    font-size: 12px;
    padding: 4px 8px;
  }

  /* formularze */
  input,
  textarea,
  button {
    font-size: 14px;
    padding: 8px;
  }

  /* nagłówki */
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  /* tabela */
  table {
    font-size: 14px;
  }

  /* produkty */
  .product-grid {
    grid-template-columns: 1fr;
  }

}



.total-box {
  border: 2px solid rgb(54, 54, 54);
  padding: 8px 12px;
  display: inline-block;
  border-radius: 8px;
}