:root {
  --bg: #f8f8f8;
  --fg: #333;
  --accent: #b9a082;
  --accent-dark: #ac9272;
  --error: #d32f2f;
  --success: #4CAF50;
  --border-color: #e0e0e0;
  --radius: 8px;
  --space: 1.5rem;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --light-grey: #f0f0f0;
  --text-light: #555;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--light-grey);
  color: var(--fg);
  line-height: 1.6;
  font-size: 16px;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a{
  text-decoration: none;
}


.gerlach-navbar {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 15px 40px;
  border-bottom: 1px solid var(--border-color);
  background-color: #fff;
  margin: 0 auto;
  box-shadow: var(--shadow);
  z-index: 10;
  position: relative;
}

.info-bar {
  background-color: var(--accent);
  color: #fff;
  padding: 5px 0;
}

.info-bar ul {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 960px;
  height: 44px;
  margin: 0 auto;
  list-style: none;
}

.info-bar ul li {
  display: flex;
  align-items: flex-end;
  font-size: 0.8em;
  font-weight: 500;
  white-space: nowrap;
}

.info-bar ul img {
  height: 18px;
  margin-right: 8px;
}

.nav-left,
.nav-right {
  list-style: none;
  display: flex;
  gap: 45px;
  font-weight: 600;
}

.nav-left li,
.nav-right li {
  letter-spacing: 0.5px;
  text-decoration: none;
  color: var(--fg);
  cursor: pointer;
  text-transform: uppercase;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.nav-left li:hover,
.nav-right li:hover {
  color: var(--accent);
  opacity: 0.8;
}

.logo img {
  height: 88px;
  width: auto;
  display: block;
}

.hamburger-menu {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--fg);
  cursor: pointer;
  padding: 5px;
  align-self: center;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100%;
  background-color: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
  transition: right 0.3s ease-out;
  flex-direction: column;
  padding-top: 60px;
}

.mobile-nav.active {
  right: 0;
  display: flex;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

.mobile-nav ul li {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--fg);
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mobile-nav ul li:hover {
  background-color: var(--light-grey);
}

.close-mobile-nav {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--fg);
  cursor: pointer;
}

.app {
  max-width: 900px;
  width: 90%;
  margin: 3rem auto 5rem auto;
  padding: var(--space) calc(var(--space) * 1.5);
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.app-header h1 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: var(--space);
  color: var(--fg);
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

.progress-bar {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 3rem;
  padding: 0 5%;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 5%;
  right: 5%;
  height: 2px;
  background: var(--border-color);
  transform: translateY(-50%);
  z-index: 1;
}

.progress-step {
  width: 40px;
  height: 40px;
  background: var(--border-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  position: relative;
  z-index: 2;
  font-size: 1.1rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.progress-step::after {
  content: attr(data-title);
  position: absolute;
  top: 48px;
  font-size: 0.85rem;
  color: var(--fg);
  text-align: center;
  width: max-content;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 500;
}

.progress-step-active {
  background: var(--accent);
}

.step-container {
  position: relative;
  flex-grow: 1;
  padding-top: 1rem;
  padding-bottom: 1rem;
  min-height: 450px;
}

.step {
  width: 100%;
  padding: 1.5rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: none;
  flex-direction: column;
}

.step.active {
  display: flex;
}

.form-group {
    margin-bottom: var(--space);
    position: relative;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--fg);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: "Poppins", sans-serif;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(185, 160, 130, 0.2);
}

input[type="file"] {
  padding: 0.75rem 0;
}

textarea {
  min-height: 120px;
}

.info-icon {
    color: var(--text-light);
    font-size: 0.9em;
    margin-left: 0.3em;
    cursor: pointer;
    position: relative;
    z-index: 5;
}

.info-icon::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--fg);
    color: #fff;
    padding: 0.7em 1em;
    border-radius: 5px;
    font-size: 0.8em;
    white-space: normal;
    width: 250px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: var(--shadow);
    z-index: 10;
}

.info-icon::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
    border-width: 8px;
    border-style: solid;
    border-color: var(--fg) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
}

.info-icon:hover::before,
.info-icon:hover::after {
    opacity: 1;
    visibility: visible;
}

.copied-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    animation: fadeinout 3s forwards;
    white-space: nowrap;
    font-size: 0.9em;
}

@keyframes fadeinout {
  0% { opacity: 0; visibility: hidden; }
  10% { opacity: 1; visibility: visible; }
  90% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}


.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 1.8rem;
  margin-bottom: 15px;
  border-radius: var(--radius);
  transition: background 0.2s ease, transform 0.1s ease;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.secondary {
  background: #e0e0e0;
  color: var(--fg);
}

.btn.secondary:hover {
  background: #d0d0d0;
  color: var(--fg);
}

#sendDataLoader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
    margin: 1.5rem auto 0.5rem auto;
}

#sendInfoMessage,
.message {
    color: var(--fg);
    font-weight: 500;
    text-align: center;
    margin-bottom: 1.5rem;
}

.message.error-message {
    color: var(--error);
}
.message.success-message {
    color: var(--success);
}


.hidden {
  display: none !important;
}

.order-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 10px 0;
    color: var(--fg);
    text-align: left; /* ZMIANA: Wyrównanie do lewej */
}

.order-header p {
    margin: 0.2rem 0;
    font-size: 0.95rem;
    font-weight: 400;
}

.order-header p strong {
    font-weight: 600;
}


.products-list {
  display: grid;
  gap: 1.2rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.product-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #fdfdfd;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.product-img {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  overflow: hidden;
  border-radius: var(--radius);
  margin-right: 1rem;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-info .name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--fg);
  margin-bottom: 0.2rem;
}

.product-info .code,
.product-info .price,
.product-info .ordered-qty {
  font-size: 0.9rem;
  color: var(--text-light);
}

.qty-control {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.qty-control button {
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.1s ease;
}

.qty-control button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.qty-control button:active {
  transform: translateY(0);
}

.qty-control .count {
  min-width: 30px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
}

.reason-selection {
    margin-top: 1rem;
    margin-bottom: var(--space);
}

.summary-details {
  background: #fdfdfd;
  border-radius: var(--radius);
  margin-bottom: var(--space);
  line-height: 1.8;
  font-size: 0.95rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.summary-details table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    min-width: 400px;
}

.summary-details th,
.summary-details td {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
}

.summary-details th {
    background-color: var(--light-grey);
    font-weight: 600;
    color: var(--fg);
    white-space: nowrap;
}

.summary-details td strong {
    color: var(--fg);
    font-weight: 500;
}

.summary-details .product-list-summary {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
.summary-details .product-list-summary li {
    margin-bottom: 0.2rem;
    padding-left: 1em;
    text-indent: -1em;
}

.final-confirmation-text-intro {
    text-align: center;
    line-height: 1.6;
    margin: 15px 0;
    color: var(--fg);
}

.final-confirmation-text-outro {
    font-size: 1.0em;
    text-align: center;
    line-height: 1.4;
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
    color: var(--text-light);
}

.final-numbers-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px auto;
    max-width: 450px;
}

.final-numbers-table td {
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    vertical-align: middle;
    text-align: left;
    font-size: 1.1em;
}

.final-numbers-table td strong {
    font-weight: 600;
    color: var(--fg);
}

.final-numbers-table .highlight-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
    display: inline-block;
    vertical-align: middle;
}


.copy-icon {
    margin-left: 0.8rem;
    cursor: pointer;
    color: var(--accent);
    transition: color 0.2s ease;
    font-size: 0.9em;
    vertical-align: middle;
}

.copy-icon:hover {
    color: var(--accent-dark);
}


.navigation-buttons {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1rem;
}
.navigation-buttons .btn {
    flex-grow: 1;
    text-align: center;
    margin-top: 0;
}


.footer {
  background-color: #1c1c1c;
  color: #f0f0f0;
  padding: 20px;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  max-width: 1600px;
  margin: 0 auto;
  line-height: 1.8;
  color: #ddd;
}

.footer h2 {
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #cbb69d;
  margin-bottom: 25px;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

.footer a {
  color: #ddd;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer p {
  font-size: 12px;
}

.footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

@media (max-width: 1550px) {
    
    .nav-left, .nav-right {
        font-size: 14px;
    }
   
}

@media (max-width: 1200px) {
    .gerlach-navbar {
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
    }
    .nav-left, .nav-right {
        display: none;
    }
    .hamburger-menu {
        display: block;
    }
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .logo img{
      height: 45px;
    }

    .mobile-nav {
        display: none;
    }
}

@media (max-width: 992px) {
    .app {
        max-width: 99%;
        padding: var(--space);
    }
    .progress-step::after {
      top: 40px;
      font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
  .gerlach-navbar {
    align-items: center;
    padding: 15px 20px;
  }
  .nav-left, .nav-right {
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .logo img {
    height: 60px;
  }
  .info-bar ul {
    flex-direction: column;
    height: auto;
    padding: 10px 0;
  }
  .info-bar ul li {
    margin-bottom: 5px;
  }
  .app {
    margin: 2rem auto;
    padding: 1rem;
    width: 95%;
  }
  .progress-bar {
    padding: 0 5%;
    margin-bottom: 2rem;
  }
  .progress-step::after {
    top: 45px;
    font-size: 0.75rem;
  }
  .product-item {
    flex-direction: column;
    text-align: center;
  }
  .product-img {
    margin-right: 0;
    margin-bottom: 10px;
  }
  .product-info {
      text-align: center;
  }
  .qty-control {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }
  .navigation-buttons {
    flex-direction: column;
  }
  .navigation-buttons .btn {
      width: 100%;
  }
}



@media (max-width: 480px) {

  .info-bar{
    display: none;
  }

  .logo img{
    height: 40px;
  }

  .app-header h1 {
    font-size: 1.8rem;
  }
  .progress-step {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  .progress-step::after {
    font-size: 0.65rem;
    top: 38px;
  }
  .info-bar ul li {
    font-size: 0.7em;
  }
}