.wrapper {
  width: 95%;
  margin: 10px auto;
  padding: 15px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;

  @media (min-width: 481px) {
    width: 85%;
    padding: 20px;
    margin: 20px auto;
  }

  @media (min-width: 1024px) {
    width: 60%;
  }
}

.header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 20px;
}

.headerLeft {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-direction: column;
  width: 100%;

  @media (min-width: 481px) {
    flex-direction: row;
    margin-bottom: 20px;
  }
}

.addButton,
.backButton {
  background: #ff7f00;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
  width: 100%;

  &:hover {
    background: #e66b00;
  }

  @media (min-width: 481px) {
    width: auto;
    padding: 10px 15px;
    font-size: 16px;
  }
}

.categoryTitle {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;

  @media (min-width: 1024px) {
    font-size: 24px;
  }
}

.productList {
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
}

.productItem {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px;
  border-bottom: 2px solid #ddd;
  gap: 8px;

  &:hover {
    background: #f9f9f9;
  }

  @media (min-width: 481px) {
    flex-direction: row;
    align-items: center;
    padding: 15px;
    gap: 10px;
  }
}

.productIcon {
  width: 80px;
  height: 80px;
  border-radius: 5px;
  object-fit: cover;

  @media (min-width: 481px) {
    width: 60px;
    height: 60px;
  }
}

.productName {
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  order: -1;

  @media (min-width: 481px) {
    font-size: 18px;
    order: 0;
    flex-grow: 1;
  }
}

.actions {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: flex-end;
}

.editButton,
.deleteButton {
  padding: 6px 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.3s;

  @media (min-width: 481px) {
    padding: 8px 12px;
    font-size: 14px;
  }
}

.editButton {
  background: #3498db;
  color: white;

  &:hover {
    background: #2980b9;
  }
}

.deleteButton {
  background: #e74c3c;
  color: white;

  &:hover {
    background: #c0392b;
  }
}

.noProductMessage {
  width: 100%;
  text-align: center;
  padding: 20px;
  font-size: 16px;
  color: #666;
  background: #f9f9f9;
  border-radius: 8px;
  margin-top: 10px;
  border: 1px solid #ddd;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;

  button {
    padding: 6px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    background: #ddd;
    transition: background 0.3s;

    &:hover {
      background: #bbb;
    }

    &:disabled {
      background: #f0f0f0;
      cursor: not-allowed;
    }

    @media (min-width: 481px) {
      padding: 8px 12px;
      font-size: 14px;
    }
  }

  .activePage {
    background: #ff7f00;
    color: white;
  }
}

.modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
}

.modalContent {
  background: white;
  padding: 15px;
  border-radius: 8px;
  width: 95%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;

  @media (max-width: 480px) {
    width: 98%;
    padding: 10px;
  }
}

.modalTitle {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;

  @media (max-width: 480px) {
    font-size: 16px;
    margin-bottom: 8px;
  }
}

.modalBody {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 15px;
  margin-top: 15px;
}

.productImageLarge {
  width: 100%;
  max-width: 150px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  margin-bottom: 15px;

  @media (max-width: 480px) {
    max-width: 120px;
    margin-bottom: 10px;
  }
}

.productDetails {
  width: 100%;
  text-align: left;
  font-size: 14px;

  @media (max-width: 480px) {
    font-size: 13px;
  }
}

.formGroup {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.inputContainer,
.inputContainerFull {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;

  @media (min-width: 481px) {
    width: calc(50% - 5px);
  }
}

.inputContainerFull {
  @media (min-width: 481px) {
    width: 100%;
  }
}

.modalActions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  width: 100%;

  @media (min-width: 481px) {
    flex-direction: row;
    justify-content: center;
  }
}

.cancelButton,
.confirmButton,
.deleteConfirmButton {
  padding: 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
  width: 100%;

  @media (min-width: 481px) {
    width: auto;
    padding: 10px 15px;
  }

  @media (max-width: 480px) {
    padding: 10px;
    font-size: 13px;
  }
}

.cancelButton {
  background: #ccc;

  &:hover {
    background: #b3b3b3;
  }
}

.confirmButton {
  background: #ff7f00;
  color: white;

  &:hover {
    background: #e66b00;
  }
}

.modalWarningTitle {
  font-size: 20px;
  font-weight: bold;
  color: #e74c3c;
}

.warningText {
  color: #d32f2f;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 15px;

  @media (max-width: 480px) {
    font-size: 13px;
    margin-bottom: 10px;
  }
}

.deleteConfirmButton {
  background: #e74c3c;
  color: white;

  &:hover {
    background: #c0392b;
  }
}
